Bluetooth: Fix skb length calculation
authorGustavo Padovan <gustavo@padovan.org>
Fri, 11 May 2012 16:16:12 +0000 (13:16 -0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Wed, 16 May 2012 19:12:56 +0000 (16:12 -0300)
When we add a fragment to a skb, len and data_len fields need to be
updated.

Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/l2cap_core.c

index 339f8344ee59ddc51f12b6f6cf02404e1035b207..b3907a3b523601bfc4cabbdce869209067680ea1 100644 (file)
@@ -1855,6 +1855,9 @@ static inline int l2cap_skbuff_fromiovec(struct l2cap_chan *chan,
                sent += count;
                len  -= count;
 
+               skb->len += (*frag)->len;
+               skb->data_len += (*frag)->len;
+
                frag = &(*frag)->next;
        }