summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/hci_h4.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-08-29 22:15:03 +0200
committerDavid S. Miller <davem@davemloft.net>2015-08-29 22:15:03 +0200
commitf5004a14fac0a71656340544c48a14c80a3afddf (patch)
treec92b514ef46049e3050ed95e3065ae2190d3d3fc /drivers/bluetooth/hci_h4.c
parentMerge branch 'tnl-ipv4-ipv6' (diff)
parentBluetooth: hci_bcm: Fix crash on suspend (diff)
downloadlinux-f5004a14fac0a71656340544c48a14c80a3afddf.tar.xz
linux-f5004a14fac0a71656340544c48a14c80a3afddf.zip
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Johan Hedberg says: ==================== pull request: bluetooth-next 2015-08-28 One more bunch of Bluetooth patches for 4.3: - Crash fix for hci_bcm driver - Enhancements to hci_intel driver (e.g. baudrate configuration) - Fix for SCO link type after multiple connect attempts - Cleanups & minor fixes in a few other places Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/bluetooth/hci_h4.c')
-rw-r--r--drivers/bluetooth/hci_h4.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/bluetooth/hci_h4.c b/drivers/bluetooth/hci_h4.c
index 57faddc53645..eec3f28e4bb9 100644
--- a/drivers/bluetooth/hci_h4.c
+++ b/drivers/bluetooth/hci_h4.c
@@ -223,8 +223,7 @@ struct sk_buff *h4_recv_buf(struct hci_dev *hdev, struct sk_buff *skb,
switch ((&pkts[i])->lsize) {
case 0:
/* No variable data length */
- (&pkts[i])->recv(hdev, skb);
- skb = NULL;
+ dlen = 0;
break;
case 1:
/* Single octet variable length */
@@ -252,6 +251,12 @@ struct sk_buff *h4_recv_buf(struct hci_dev *hdev, struct sk_buff *skb,
kfree_skb(skb);
return ERR_PTR(-EILSEQ);
}
+
+ if (!dlen) {
+ /* No more data, complete frame */
+ (&pkts[i])->recv(hdev, skb);
+ skb = NULL;
+ }
} else {
/* Complete frame */
(&pkts[i])->recv(hdev, skb);