]> Pileus Git - ~andy/linux/commit
Bluetooth: Fix packet size provided to the controller
authorGustavo Padovan <gustavo@padovan.org>
Fri, 11 May 2012 16:16:11 +0000 (13:16 -0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Wed, 16 May 2012 19:12:49 +0000 (16:12 -0300)
commit087bfd99f75c5f7d5430e7e122c2f288f03d6c23
tree46800ec29eadddfe157e0cc5c6f095b2eb8b6350
parentfbe0070092c3968927c63ab56c00b47c6aa3770f
Bluetooth: Fix packet size provided to the controller

When building fragmented skb's skb->len keeps track of the size of head
plus all fragments combined, however when queueing the skb for sending we
need to report the head size instead of the total size, so we just set
skb->len to skb_headlen().

This bug appeared when implementing MSG_MORE support for L2CAP sockets, it
never showed up before because l2cap_skbuff_fromiovec() never accounted skb
size correctly. A following patch will fix this.

Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
Reviewed-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/hci_core.c