aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2012-05-03 03:55:52 -0400
committerGustavo Padovan <gustavo@padovan.org>2012-05-09 00:40:53 -0400
commitdaf6a78c161fccd058ca2f1b21e757ebaa2e9909 (patch)
tree5685cbcf85db875598ccebec5567d5f4f925ad2c
parentf2ba7fae044b578b068b40723dc3303b590abb78 (diff)
Bluetooth: Remove unneeded calculation and magic number
Remove magic number unneeded calculation since hlen = L2CAP_HDR_SIZE + L2CAP_PSMLEN_SIZE Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
-rw-r--r--net/bluetooth/l2cap_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 7acd884f1c3e..fcd09fb4b94c 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1875,8 +1875,8 @@ static struct sk_buff *l2cap_create_connless_pdu(struct l2cap_chan *chan,
1875 /* Create L2CAP header */ 1875 /* Create L2CAP header */
1876 lh = (struct l2cap_hdr *) skb_put(skb, L2CAP_HDR_SIZE); 1876 lh = (struct l2cap_hdr *) skb_put(skb, L2CAP_HDR_SIZE);
1877 lh->cid = cpu_to_le16(chan->dcid); 1877 lh->cid = cpu_to_le16(chan->dcid);
1878 lh->len = cpu_to_le16(len + (hlen - L2CAP_HDR_SIZE)); 1878 lh->len = cpu_to_le16(len + L2CAP_PSMLEN_SIZE);
1879 put_unaligned(chan->psm, skb_put(skb, 2)); 1879 put_unaligned(chan->psm, skb_put(skb, L2CAP_PSMLEN_SIZE));
1880 1880
1881 err = l2cap_skbuff_fromiovec(chan, msg, len, count, skb); 1881 err = l2cap_skbuff_fromiovec(chan, msg, len, count, skb);
1882 if (unlikely(err < 0)) { 1882 if (unlikely(err < 0)) {