Commit f2ba7fae authored by Gustavo Padovan's avatar Gustavo Padovan

Bluetooth: Remove hlen variable

hlen has a fixed size of L2CAP_HDR_SIZE, use this instead.
Signed-off-by: default avatarGustavo Padovan <gustavo@padovan.org>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent 9d42820f
...@@ -1892,14 +1892,14 @@ static struct sk_buff *l2cap_create_basic_pdu(struct l2cap_chan *chan, ...@@ -1892,14 +1892,14 @@ static struct sk_buff *l2cap_create_basic_pdu(struct l2cap_chan *chan,
{ {
struct l2cap_conn *conn = chan->conn; struct l2cap_conn *conn = chan->conn;
struct sk_buff *skb; struct sk_buff *skb;
int err, count, hlen = L2CAP_HDR_SIZE; int err, count;
struct l2cap_hdr *lh; struct l2cap_hdr *lh;
BT_DBG("chan %p len %d", chan, (int)len); BT_DBG("chan %p len %d", chan, (int)len);
count = min_t(unsigned int, (conn->mtu - hlen), len); count = min_t(unsigned int, (conn->mtu - L2CAP_HDR_SIZE), len);
skb = chan->ops->alloc_skb(chan, count + hlen, skb = chan->ops->alloc_skb(chan, count + L2CAP_HDR_SIZE,
msg->msg_flags & MSG_DONTWAIT); msg->msg_flags & MSG_DONTWAIT);
if (IS_ERR(skb)) if (IS_ERR(skb))
return skb; return skb;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment