]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Bluetooth: Flag ACL frames as complete for AMP controllers
authorMat Martineau <mathewm@codeaurora.org>
Tue, 23 Oct 2012 22:24:18 +0000 (15:24 -0700)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Wed, 24 Oct 2012 02:24:34 +0000 (00:24 -0200)
AMP controllers expect to transmit only "complete" ACL frames.  These
frames have both the "start" and "cont" bits set.  AMP does not allow
fragmented ACLs.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Acked-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/l2cap_core.c

index 898529d102f286016c4dc8a161e85c34728d3677..22f3768aa0be786377f5546023ede245ed9cf47e 100644 (file)
@@ -763,6 +763,15 @@ static void l2cap_do_send(struct l2cap_chan *chan, struct sk_buff *skb)
        BT_DBG("chan %p, skb %p len %d priority %u", chan, skb, skb->len,
               skb->priority);
 
+       if (chan->hs_hcon && !__chan_is_moving(chan)) {
+               if (chan->hs_hchan)
+                       hci_send_acl(chan->hs_hchan, skb, ACL_COMPLETE);
+               else
+                       kfree_skb(skb);
+
+               return;
+       }
+
        if (!test_bit(FLAG_FLUSHABLE, &chan->flags) &&
            lmp_no_flush_capable(hcon->hdev))
                flags = ACL_START_NO_FLUSH;