|
From: Peter K. <pk...@us...> - 2001-10-22 12:52:14
|
The following files were modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
bcsp.c 1.21 1.22=20=20=20=20=20=20=20=20=20=20=20=20
hci.c 1.187 1.188=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
hci_get_ocf() and hci_get_ogf() should now work correctly regarding
endianness and alignment.
The diff of the modified file(s):
--- bcsp.c 2001/09/18 13:04:27 1.21
+++ bcsp.c 2001/10/22 12:51:44 1.22
@@ -252,13 +252,11 @@
s32
bcsp_write_top(u8 *data, u32 len)
{
- u16 opcode;
s32 ret =3D -EINVAL;
=20=09
switch (data[0]) {
case CMD_PKT:
- opcode =3D le16_to_cpu(get_unaligned((u16 *)&data[1]));
- if (hci_get_ocf(opcode) =3D=3D BCSP_OCF) {
+ if (hci_get_ocf(data+1) =3D=3D BCSP_OCF) {
ret =3D bcsp_sequence_send(data + 5, len - 5, data[4] & 0x3f);
} else {
ret =3D bcsp_sequence_send(data + 1, len - 1, BCSP_CMD_CHN);
--- hci.c 2001/10/16 14:57:10 1.187
+++ hci.c 2001/10/22 12:51:44 1.188
@@ -3622,10 +3622,10 @@
=20
PRINTPKT(__FUNCTION__, data, cmd->len + CMD_HDR_LEN + HCI_HDR_LEN);
=20
- switch (hci_get_ogf(cmd->opcode)) {
+ switch (hci_get_ogf(&cmd->opcode)) {
=20
case HCI_LC: /* Host Controller commands */
- switch (hci_get_ocf(cmd->opcode)) {
+ switch (hci_get_ocf(&cmd->opcode)) {
=20
case CREATE_CONNECTION:
/* Send connection request event */
@@ -3676,13 +3676,13 @@
=20
default:
printk(__FUNCTION__ ": Unknown command ogf:0x%x,ocf:0x%x\n",
- hci_get_ogf(cmd->opcode), hci_get_ocf(cmd->opcode));
+ hci_get_ogf(&cmd->opcode), hci_get_ocf(&cmd->opcode));
break;
}
break;
=20
case HCI_IP: /* Informational parameters */
- switch (hci_get_ocf(cmd->opcode)) {
+ switch (hci_get_ocf(&cmd->opcode)) {
=20
case READ_BUFFER_SIZE:
D_CMD(__FUNCTION__ ": READ_BUFFER_SIZE->setting buffer size\n");
@@ -3694,14 +3694,14 @@
=20
default:
printk(__FUNCTION__ ": Unknown command ogf:0x%x,ocf:0x%x\n",
- hci_get_ogf(cmd->opcode), hci_get_ocf(cmd->opcode));
+ hci_get_ogf(&cmd->opcode), hci_get_ocf(&cmd->opcode));
break;
}
break;
=20
default:
printk(__FUNCTION__ ": Unknown command ogf:0x%x,ocf:0x%x\n",
- hci_get_ogf(cmd->opcode), hci_get_ocf(cmd->opcode));
+ hci_get_ogf(&cmd->opcode), hci_get_ocf(&cmd->opcode));
break;
}
}
|