Commit 66eb50d5 authored by David S. Miller's avatar David S. Miller

Merge master.kernel.org:/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6

parents fdd8a532 89f2783d
...@@ -691,15 +691,18 @@ static void hci_usb_rx_complete(struct urb *urb) ...@@ -691,15 +691,18 @@ static void hci_usb_rx_complete(struct urb *urb)
urb->iso_frame_desc[i].offset, urb->iso_frame_desc[i].offset,
urb->iso_frame_desc[i].actual_length); urb->iso_frame_desc[i].actual_length);
if (!urb->iso_frame_desc[i].status) if (!urb->iso_frame_desc[i].status) {
husb->hdev->stat.byte_rx += urb->iso_frame_desc[i].actual_length;
hci_recv_fragment(husb->hdev, _urb->type, hci_recv_fragment(husb->hdev, _urb->type,
urb->transfer_buffer + urb->iso_frame_desc[i].offset, urb->transfer_buffer + urb->iso_frame_desc[i].offset,
urb->iso_frame_desc[i].actual_length); urb->iso_frame_desc[i].actual_length);
}
} }
#else #else
; ;
#endif #endif
} else { } else {
husb->hdev->stat.byte_rx += count;
err = hci_recv_fragment(husb->hdev, _urb->type, urb->transfer_buffer, count); err = hci_recv_fragment(husb->hdev, _urb->type, urb->transfer_buffer, count);
if (err < 0) { if (err < 0) {
BT_ERR("%s corrupted packet: type %d count %d", BT_ERR("%s corrupted packet: type %d count %d",
......
...@@ -183,6 +183,7 @@ static void hci_init_req(struct hci_dev *hdev, unsigned long opt) ...@@ -183,6 +183,7 @@ static void hci_init_req(struct hci_dev *hdev, unsigned long opt)
{ {
struct sk_buff *skb; struct sk_buff *skb;
__le16 param; __le16 param;
__u8 flt_type;
BT_DBG("%s %ld", hdev->name, opt); BT_DBG("%s %ld", hdev->name, opt);
...@@ -233,11 +234,8 @@ static void hci_init_req(struct hci_dev *hdev, unsigned long opt) ...@@ -233,11 +234,8 @@ static void hci_init_req(struct hci_dev *hdev, unsigned long opt)
/* Optional initialization */ /* Optional initialization */
/* Clear Event Filters */ /* Clear Event Filters */
{ flt_type = HCI_FLT_CLEAR_ALL;
struct hci_cp_set_event_flt cp; hci_send_cmd(hdev, OGF_HOST_CTL, OCF_SET_EVENT_FLT, 1, &flt_type);
cp.flt_type = HCI_FLT_CLEAR_ALL;
hci_send_cmd(hdev, OGF_HOST_CTL, OCF_SET_EVENT_FLT, sizeof(cp), &cp);
}
/* Page timeout ~20 secs */ /* Page timeout ~20 secs */
param = cpu_to_le16(0x8000); param = cpu_to_le16(0x8000);
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/compat.h>
#include <linux/socket.h> #include <linux/socket.h>
#include <linux/ioctl.h> #include <linux/ioctl.h>
#include <net/sock.h> #include <net/sock.h>
...@@ -70,15 +71,15 @@ static struct hci_sec_filter hci_sec_filter = { ...@@ -70,15 +71,15 @@ static struct hci_sec_filter hci_sec_filter = {
{ {
{ 0x0 }, { 0x0 },
/* OGF_LINK_CTL */ /* OGF_LINK_CTL */
{ 0xbe000006, 0x00000001, 0x000000, 0x00 }, { 0xbe000006, 0x00000001, 0x00000000, 0x00 },
/* OGF_LINK_POLICY */ /* OGF_LINK_POLICY */
{ 0x00005200, 0x00000000, 0x000000, 0x00 }, { 0x00005200, 0x00000000, 0x00000000, 0x00 },
/* OGF_HOST_CTL */ /* OGF_HOST_CTL */
{ 0xaab00200, 0x2b402aaa, 0x020154, 0x00 }, { 0xaab00200, 0x2b402aaa, 0x05220154, 0x00 },
/* OGF_INFO_PARAM */ /* OGF_INFO_PARAM */
{ 0x000002be, 0x00000000, 0x000000, 0x00 }, { 0x000002be, 0x00000000, 0x00000000, 0x00 },
/* OGF_STATUS_PARAM */ /* OGF_STATUS_PARAM */
{ 0x000000ea, 0x00000000, 0x000000, 0x00 } { 0x000000ea, 0x00000000, 0x00000000, 0x00 }
} }
}; };
...@@ -342,9 +343,23 @@ static inline void hci_sock_cmsg(struct sock *sk, struct msghdr *msg, struct sk_ ...@@ -342,9 +343,23 @@ static inline void hci_sock_cmsg(struct sock *sk, struct msghdr *msg, struct sk_
if (mask & HCI_CMSG_TSTAMP) { if (mask & HCI_CMSG_TSTAMP) {
struct timeval tv; struct timeval tv;
void *data;
int len;
skb_get_timestamp(skb, &tv); skb_get_timestamp(skb, &tv);
put_cmsg(msg, SOL_HCI, HCI_CMSG_TSTAMP, sizeof(tv), &tv);
if (msg->msg_flags & MSG_CMSG_COMPAT) {
struct compat_timeval ctv;
ctv.tv_sec = tv.tv_sec;
ctv.tv_usec = tv.tv_usec;
data = &ctv;
len = sizeof(ctv);
} else {
data = &tv;
len = sizeof(tv);
}
put_cmsg(msg, SOL_HCI, HCI_CMSG_TSTAMP, len, data);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment