aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@kimchee.(none)>2007-09-11 05:15:30 -0400
committerDavid S. Miller <davem@kimchee.(none)>2007-09-11 05:15:30 -0400
commit66eb50d5c972cc16df2be730497b7f06d75d8132 (patch)
tree975abcb46c951a6960921671f33ca1f8857e6ca1 /net
parentfdd8a532a6764393305ae7063a8994d71404c482 (diff)
parent89f2783ded0a4fc98852cb9552bb27a80cd6a41a (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_core.c8
-rw-r--r--net/bluetooth/hci_sock.c27
2 files changed, 24 insertions, 11 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 63caa414945..18e3afc964d 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 1dae3dfc66a..d16ca8e5370 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