]> git.baikalelectronics.ru Git - kernel.git/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)
commitb3b29a9fcbd164f968e70d70d32e651199b25276
tree46800ec29eadddfe157e0cc5c6f095b2eb8b6350
parent52861a86f5de94381057f08a32595f892d6f188e
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