projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e10b996
)
Bluetooth: Remove unneeded elements from size calculation
author
Gustavo Padovan
<gustavo@padovan.org>
Wed, 2 May 2012 14:56:17 +0000
(11:56 -0300)
committer
Gustavo Padovan
<gustavo@padovan.org>
Wed, 9 May 2012 04:40:50 +0000
(
01:40
-0300)
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>
net/bluetooth/l2cap_core.c
patch
|
blob
|
blame
|
history
diff --git
a/net/bluetooth/l2cap_core.c
b/net/bluetooth/l2cap_core.c
index 744d036ca91c6cee7065b47ee64b9cfd15fed1de..02ba11831793ec7c55738749004e22cc9325ec0e 100644
(file)
--- 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,
/* Create L2CAP header */
lh = (struct l2cap_hdr *) skb_put(skb, L2CAP_HDR_SIZE);
lh->cid = cpu_to_le16(chan->dcid);
- lh->len = cpu_to_le16(len
+ (hlen - L2CAP_HDR_SIZE)
);
+ lh->len = cpu_to_le16(len);
err = l2cap_skbuff_fromiovec(chan, msg, len, count, skb);
if (unlikely(err < 0)) {