diff options
author | Gustavo Padovan <gustavo@padovan.org> | 2012-05-11 12:16:12 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-05-16 15:12:56 -0400 |
commit | 2d0ed3d5879edae4bf1c98eb3163466c30d41789 (patch) | |
tree | 3e80e3198a6dd1019457e43365ee42be58b5ee4f /net/bluetooth | |
parent | 087bfd99f75c5f7d5430e7e122c2f288f03d6c23 (diff) |
Bluetooth: Fix skb length calculation
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>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 339f8344ee59..b3907a3b5236 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -1855,6 +1855,9 @@ static inline int l2cap_skbuff_fromiovec(struct l2cap_chan *chan, | |||
1855 | sent += count; | 1855 | sent += count; |
1856 | len -= count; | 1856 | len -= count; |
1857 | 1857 | ||
1858 | skb->len += (*frag)->len; | ||
1859 | skb->data_len += (*frag)->len; | ||
1860 | |||
1858 | frag = &(*frag)->next; | 1861 | frag = &(*frag)->next; |
1859 | } | 1862 | } |
1860 | 1863 | ||