linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gustavo Padovan <gustavo@padovan.org>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 2/4] Bluetooth: Fix skb length calculation
Date: Fri, 11 May 2012 13:16:12 -0300	[thread overview]
Message-ID: <1336752974-7747-2-git-send-email-gustavo@padovan.org> (raw)
In-Reply-To: <1336752974-7747-1-git-send-email-gustavo@padovan.org>

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>
---
 net/bluetooth/l2cap_core.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 2b30bd7..e5a4fd9 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1851,6 +1851,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;
 	}
 
-- 
1.7.10.1


  reply	other threads:[~2012-05-11 16:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-11 16:16 [PATCH 1/4] Bluetooth: Fix packet size provided to the controller Gustavo Padovan
2012-05-11 16:16 ` Gustavo Padovan [this message]
2012-05-11 16:16   ` [PATCH 3/4] Bluetooth: Add MSG_MORE support to L2CAP sockets Gustavo Padovan
2012-05-11 16:16     ` [PATCH 4/4] Bluetooth: add a timer to L2CAP MSG_MORE code Gustavo Padovan
2012-05-11 18:38       ` Mat Martineau
2012-05-11 19:23         ` Gustavo Padovan
2012-05-11 22:29           ` Mat Martineau
2012-05-11 18:31     ` [PATCH 3/4] Bluetooth: Add MSG_MORE support to L2CAP sockets Mat Martineau
2012-05-11 18:41       ` Mat Martineau
2012-05-11 19:15       ` Gustavo Padovan
2012-05-11 21:55         ` Mat Martineau
2012-05-16  7:49 ` [PATCH 1/4] Bluetooth: Fix packet size provided to the controller Johan Hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1336752974-7747-2-git-send-email-gustavo@padovan.org \
    --to=gustavo@padovan.org \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).