aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo@padovan.org>2012-05-03 03:54:21 -0400
committerGustavo Padovan <gustavo@padovan.org>2012-05-09 00:40:52 -0400
commitf2ba7fae044b578b068b40723dc3303b590abb78 (patch)
tree7cdd326064fe428eb0346b5b126bd2a6ede20381 /net
parent9d42820f378e6372f154a3f0c8def5d4bba29191 (diff)
Bluetooth: Remove hlen variable
hlen has a fixed size of L2CAP_HDR_SIZE, use this instead. 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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 02ba11831793..7acd884f1c3e 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1892,14 +1892,14 @@ static struct sk_buff *l2cap_create_basic_pdu(struct l2cap_chan *chan,
1892{ 1892{
1893 struct l2cap_conn *conn = chan->conn; 1893 struct l2cap_conn *conn = chan->conn;
1894 struct sk_buff *skb; 1894 struct sk_buff *skb;
1895 int err, count, hlen = L2CAP_HDR_SIZE; 1895 int err, count;
1896 struct l2cap_hdr *lh; 1896 struct l2cap_hdr *lh;
1897 1897
1898 BT_DBG("chan %p len %d", chan, (int)len); 1898 BT_DBG("chan %p len %d", chan, (int)len);
1899 1899
1900 count = min_t(unsigned int, (conn->mtu - hlen), len); 1900 count = min_t(unsigned int, (conn->mtu - L2CAP_HDR_SIZE), len);
1901 1901
1902 skb = chan->ops->alloc_skb(chan, count + hlen, 1902 skb = chan->ops->alloc_skb(chan, count + L2CAP_HDR_SIZE,
1903 msg->msg_flags & MSG_DONTWAIT); 1903 msg->msg_flags & MSG_DONTWAIT);
1904 if (IS_ERR(skb)) 1904 if (IS_ERR(skb))
1905 return skb; 1905 return skb;