summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_sock.c
diff options
context:
space:
mode:
authorJohan Hedberg2013-05-17 12:09:05 +0200
committerMarcel Holtmann2013-12-05 16:05:34 +0100
commit0cd75f7ed740a8c605fe55ac71a9b5162c612422 (patch)
treeb155f3faacfeeaf1f244405b26e5b2f1105b53a2 /net/bluetooth/l2cap_sock.c
parentBluetooth: Add LE L2CAP flow control mode (diff)
downloadkernel-qcow2-linux-0cd75f7ed740a8c605fe55ac71a9b5162c612422.tar.gz
kernel-qcow2-linux-0cd75f7ed740a8c605fe55ac71a9b5162c612422.tar.xz
kernel-qcow2-linux-0cd75f7ed740a8c605fe55ac71a9b5162c612422.zip
Bluetooth: Track LE L2CAP credits in l2cap_chan
This patch adds tracking of L2CAP connection oriented channel local and remote credits to struct l2cap_chan and ensures that connect requests and responses contain the right values. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/l2cap_sock.c')
-rw-r--r--net/bluetooth/l2cap_sock.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index 485ca349fed5..61e25bafdf43 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -1321,6 +1321,8 @@ static void l2cap_sock_init(struct sock *sk, struct sock *parent)
chan->tx_win_max = pchan->tx_win_max;
chan->sec_level = pchan->sec_level;
chan->flags = pchan->flags;
+ chan->tx_credits = pchan->tx_credits;
+ chan->rx_credits = pchan->rx_credits;
security_sk_clone(parent, sk);
} else {