|
From: Anders J. <and...@us...> - 2002-02-28 20:12:16
|
The following files were modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
bluetooth.c 1.223 1.224=20=20=20=20=20=20=20=20=20=20=20
hci.c 1.193 1.194=20=20=20=20=20=20=20=20=20=20=20
hci_sec.c 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=20
hci_vendor.c 1.61 1.62=20=20=20=20=20=20=20=20=20=20=20=20
sec_client.c 1.22 1.23=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Modified event filter setting procedure to handle any kind of filter.
* Number of cmdbuffers isn't decreased after a set_baudrate command.
The diff of the modified file(s):
--- bluetooth.c 12 Feb 2002 13:54:00 -0000 1.223
+++ bluetooth.c 28 Feb 2002 20:12:14 -0000 1.224
@@ -974,11 +974,15 @@
case HCISET_EVENT_FILTER:
{
u8 param[size];
+ u16 filter_size;
=20
BT_DRIVER(__FUNCTION__ ": HCISET_EVENT_FILTER\n");
copy_from_user(param, (s32*)arg, size);
=20=09=09
- hci_set_event_filter(param);
+ /* The size of the filter is in the first two bytes */
+ filter_size =3D ((param[0] << 8) & 0xff00) | param [1];
+
+ hci_set_event_filter(¶m[2], filter_size);
break;
}=09
=20=09=09
--- hci.c 13 Feb 2002 10:04:54 -0000 1.193
+++ hci.c 28 Feb 2002 20:12:15 -0000 1.194
@@ -2818,18 +2818,14 @@
=20
=20
s32
-hci_set_event_filter(u8 *data)
+hci_set_event_filter(u8 *data, u16 len)
{
D_CMD(__FUNCTION__ "\n");
=20
c_pkt.type =3D CMD_PKT;
c_pkt.opcode =3D hci_put_opcode(SET_EVENT_FILTER, HCI_HC);
- c_pkt.data[0] =3D data[0];
- c_pkt.data[1] =3D data[1];
- c_pkt.data[2] =3D data[2];
-
- c_pkt.len =3D 3;
-=20=20
+ memcpy(c_pkt.data, data, len);
+ c_pkt.len =3D len;
return send_cmd_block((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN=
, DEFAULT_TIMEOUT);
}
=20
--- hci_sec.c 22 Feb 2002 13:16:59 -0000 1.1
+++ hci_sec.c 28 Feb 2002 20:12:15 -0000 1.2
@@ -85,15 +85,14 @@
=20
=20
=20
-void hci_process_sec_man_response(u16 result, u32 user_data, u32 request_v=
alue, unsigned char * event_param, unsigned char * remote_bd)
+void=20
+hci_process_sec_man_response(u16 result, u32 user_data, u32 request_value,=
unsigned char * event_param, unsigned char * remote_bd)
{
u8 pin_length =3D 0;
=20=09
- switch (request_value)
- {
+ switch (request_value) {
case PIN_CODE_REQUEST:
- switch(result)
- {
+ switch(result) {
case SECURITY_OK:
/* Calculate the PIN LENGTH */
while ((pin_length <=3D 16) && (event_param[pin_length] !=3D '\0'=
))
@@ -117,8 +116,7 @@
break;
=20=09=20=20=20=20
case LINK_KEY_REQUEST:
- switch(result)
- {
+ switch(result) {
case SECURITY_OK:
D(printk("Link key returned\n"));
hci_link_key_request_reply(remote_bd, event_param);
--- hci_vendor.c 28 Feb 2002 10:40:05 -0000 1.61
+++ hci_vendor.c 28 Feb 2002 20:12:15 -0000 1.62
@@ -1067,7 +1067,12 @@
#ifdef __KERNEL__
bt_wait_tx(2000); /* wait until DMA empty + 2 ms */
#endif
- hci_ctrl.hc_buf.cmd_num--;
+
+ /* FIXME: We don't catch a command status event after this and if=20
+ we decrease the number of buffers free it won't be updated
+ after the baudrate setting. We need to do this in a more
+ proper way. */
+ //hci_ctrl.hc_buf.cmd_num--;
=20
return tmp;
}
|