aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo@padovan.org>2012-05-02 10:56:17 -0400
committerGustavo Padovan <gustavo@padovan.org>2012-05-09 00:40:50 -0400
commit6ff9b5ef5e4e3f474689737640d0c01a96d0696d (patch)
tree329cbffb6a5f5f18247355963079dc4fe725df12 /net
parente10b9969f217c948c5523045f44eba4d3a758ff0 (diff)
Bluetooth: Remove unneeded elements from size calculation
hlen - L2CAP_HDR_SIZE = 0, so we don't need to add them in the calculation. Signed-off-by: Gustavo Padovan <gustavo@padovan.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/l2cap_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 744d036ca91c..02ba11831793 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1909,7 +1909,7 @@ static struct sk_buff *l2cap_create_basic_pdu(struct l2cap_chan *chan,
1909 /* Create L2CAP header */ 1909 /* Create L2CAP header */
1910 lh = (struct l2cap_hdr *) skb_put(skb, L2CAP_HDR_SIZE); 1910 lh = (struct l2cap_hdr *) skb_put(skb, L2CAP_HDR_SIZE);
1911 lh->cid = cpu_to_le16(chan->dcid); 1911 lh->cid = cpu_to_le16(chan->dcid);
1912 lh->len = cpu_to_le16(len + (hlen - L2CAP_HDR_SIZE)); 1912 lh->len = cpu_to_le16(len);
1913 1913
1914 err = l2cap_skbuff_fromiovec(chan, msg, len, count, skb); 1914 err = l2cap_skbuff_fromiovec(chan, msg, len, count, skb);
1915 if (unlikely(err < 0)) { 1915 if (unlikely(err < 0)) {