diff options
Diffstat (limited to 'net/bluetooth/hci_sock.c')
| -rw-r--r-- | net/bluetooth/hci_sock.c | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index 1dae3dfc66a9..5ccea5fbd236 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,24 @@ 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 | data = &tv; | ||
| 352 | len = sizeof(tv); | ||
| 353 | #ifdef CONFIG_COMPAT | ||
| 354 | if (msg->msg_flags & MSG_CMSG_COMPAT) { | ||
| 355 | struct compat_timeval ctv; | ||
| 356 | ctv.tv_sec = tv.tv_sec; | ||
| 357 | ctv.tv_usec = tv.tv_usec; | ||
| 358 | data = &ctv; | ||
| 359 | len = sizeof(ctv); | ||
| 360 | } | ||
| 361 | #endif | ||
| 362 | |||
| 363 | put_cmsg(msg, SOL_HCI, HCI_CMSG_TSTAMP, len, data); | ||
| 348 | } | 364 | } |
| 349 | } | 365 | } |
| 350 | 366 | ||
