diff options
author | David S. Miller <davem@kimchee.(none)> | 2007-09-11 05:15:30 -0400 |
---|---|---|
committer | David S. Miller <davem@kimchee.(none)> | 2007-09-11 05:15:30 -0400 |
commit | 66eb50d5c972cc16df2be730497b7f06d75d8132 (patch) | |
tree | 975abcb46c951a6960921671f33ca1f8857e6ca1 | |
parent | fdd8a532a6764393305ae7063a8994d71404c482 (diff) | |
parent | 89f2783ded0a4fc98852cb9552bb27a80cd6a41a (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6
-rw-r--r-- | drivers/bluetooth/hci_usb.c | 5 | ||||
-rw-r--r-- | net/bluetooth/hci_core.c | 8 | ||||
-rw-r--r-- | net/bluetooth/hci_sock.c | 27 |
3 files changed, 28 insertions, 12 deletions
diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c index 59b054810ed0..98a9cdeaffb6 100644 --- a/drivers/bluetooth/hci_usb.c +++ b/drivers/bluetooth/hci_usb.c | |||
@@ -691,15 +691,18 @@ static void hci_usb_rx_complete(struct urb *urb) | |||
691 | urb->iso_frame_desc[i].offset, | 691 | urb->iso_frame_desc[i].offset, |
692 | urb->iso_frame_desc[i].actual_length); | 692 | urb->iso_frame_desc[i].actual_length); |
693 | 693 | ||
694 | if (!urb->iso_frame_desc[i].status) | 694 | if (!urb->iso_frame_desc[i].status) { |
695 | husb->hdev->stat.byte_rx += urb->iso_frame_desc[i].actual_length; | ||
695 | hci_recv_fragment(husb->hdev, _urb->type, | 696 | hci_recv_fragment(husb->hdev, _urb->type, |
696 | urb->transfer_buffer + urb->iso_frame_desc[i].offset, | 697 | urb->transfer_buffer + urb->iso_frame_desc[i].offset, |
697 | urb->iso_frame_desc[i].actual_length); | 698 | urb->iso_frame_desc[i].actual_length); |
699 | } | ||
698 | } | 700 | } |
699 | #else | 701 | #else |
700 | ; | 702 | ; |
701 | #endif | 703 | #endif |
702 | } else { | 704 | } else { |
705 | husb->hdev->stat.byte_rx += count; | ||
703 | err = hci_recv_fragment(husb->hdev, _urb->type, urb->transfer_buffer, count); | 706 | err = hci_recv_fragment(husb->hdev, _urb->type, urb->transfer_buffer, count); |
704 | if (err < 0) { | 707 | if (err < 0) { |
705 | BT_ERR("%s corrupted packet: type %d count %d", | 708 | BT_ERR("%s corrupted packet: type %d count %d", |
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 63caa414945d..18e3afc964df 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -183,6 +183,7 @@ static void hci_init_req(struct hci_dev *hdev, unsigned long opt) | |||
183 | { | 183 | { |
184 | struct sk_buff *skb; | 184 | struct sk_buff *skb; |
185 | __le16 param; | 185 | __le16 param; |
186 | __u8 flt_type; | ||
186 | 187 | ||
187 | BT_DBG("%s %ld", hdev->name, opt); | 188 | BT_DBG("%s %ld", hdev->name, opt); |
188 | 189 | ||
@@ -233,11 +234,8 @@ static void hci_init_req(struct hci_dev *hdev, unsigned long opt) | |||
233 | /* Optional initialization */ | 234 | /* Optional initialization */ |
234 | 235 | ||
235 | /* Clear Event Filters */ | 236 | /* Clear Event Filters */ |
236 | { | 237 | flt_type = HCI_FLT_CLEAR_ALL; |
237 | struct hci_cp_set_event_flt cp; | 238 | hci_send_cmd(hdev, OGF_HOST_CTL, OCF_SET_EVENT_FLT, 1, &flt_type); |
238 | cp.flt_type = HCI_FLT_CLEAR_ALL; | ||
239 | hci_send_cmd(hdev, OGF_HOST_CTL, OCF_SET_EVENT_FLT, sizeof(cp), &cp); | ||
240 | } | ||
241 | 239 | ||
242 | /* Page timeout ~20 secs */ | 240 | /* Page timeout ~20 secs */ |
243 | param = cpu_to_le16(0x8000); | 241 | param = cpu_to_le16(0x8000); |
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index 1dae3dfc66a9..d16ca8e53700 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/skbuff.h> | 37 | #include <linux/skbuff.h> |
38 | #include <linux/workqueue.h> | 38 | #include <linux/workqueue.h> |
39 | #include <linux/interrupt.h> | 39 | #include <linux/interrupt.h> |
40 | #include <linux/compat.h> | ||
40 | #include <linux/socket.h> | 41 | #include <linux/socket.h> |
41 | #include <linux/ioctl.h> | 42 | #include <linux/ioctl.h> |
42 | #include <net/sock.h> | 43 | #include <net/sock.h> |
@@ -70,15 +71,15 @@ static struct hci_sec_filter hci_sec_filter = { | |||
70 | { | 71 | { |
71 | { 0x0 }, | 72 | { 0x0 }, |
72 | /* OGF_LINK_CTL */ | 73 | /* OGF_LINK_CTL */ |
73 | { 0xbe000006, 0x00000001, 0x000000, 0x00 }, | 74 | { 0xbe000006, 0x00000001, 0x00000000, 0x00 }, |
74 | /* OGF_LINK_POLICY */ | 75 | /* OGF_LINK_POLICY */ |
75 | { 0x00005200, 0x00000000, 0x000000, 0x00 }, | 76 | { 0x00005200, 0x00000000, 0x00000000, 0x00 }, |
76 | /* OGF_HOST_CTL */ | 77 | /* OGF_HOST_CTL */ |
77 | { 0xaab00200, 0x2b402aaa, 0x020154, 0x00 }, | 78 | { 0xaab00200, 0x2b402aaa, 0x05220154, 0x00 }, |
78 | /* OGF_INFO_PARAM */ | 79 | /* OGF_INFO_PARAM */ |
79 | { 0x000002be, 0x00000000, 0x000000, 0x00 }, | 80 | { 0x000002be, 0x00000000, 0x00000000, 0x00 }, |
80 | /* OGF_STATUS_PARAM */ | 81 | /* OGF_STATUS_PARAM */ |
81 | { 0x000000ea, 0x00000000, 0x000000, 0x00 } | 82 | { 0x000000ea, 0x00000000, 0x00000000, 0x00 } |
82 | } | 83 | } |
83 | }; | 84 | }; |
84 | 85 | ||
@@ -342,9 +343,23 @@ static inline void hci_sock_cmsg(struct sock *sk, struct msghdr *msg, struct sk_ | |||
342 | 343 | ||
343 | if (mask & HCI_CMSG_TSTAMP) { | 344 | if (mask & HCI_CMSG_TSTAMP) { |
344 | struct timeval tv; | 345 | struct timeval tv; |
346 | void *data; | ||
347 | int len; | ||
345 | 348 | ||
346 | skb_get_timestamp(skb, &tv); | 349 | skb_get_timestamp(skb, &tv); |
347 | put_cmsg(msg, SOL_HCI, HCI_CMSG_TSTAMP, sizeof(tv), &tv); | 350 | |
351 | if (msg->msg_flags & MSG_CMSG_COMPAT) { | ||
352 | struct compat_timeval ctv; | ||
353 | ctv.tv_sec = tv.tv_sec; | ||
354 | ctv.tv_usec = tv.tv_usec; | ||
355 | data = &ctv; | ||
356 | len = sizeof(ctv); | ||
357 | } else { | ||
358 | data = &tv; | ||
359 | len = sizeof(tv); | ||
360 | } | ||
361 | |||
362 | put_cmsg(msg, SOL_HCI, HCI_CMSG_TSTAMP, len, data); | ||
348 | } | 363 | } |
349 | } | 364 | } |
350 | 365 | ||