summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_core.c
diff options
context:
space:
mode:
authorSzymon Janc2012-02-07 15:43:02 +0100
committerJohan Hedberg2012-02-13 16:01:35 +0100
commit930fa4aee934ad59ed82163cdbee4922b883ef79 (patch)
treef83ecf592f5462ba4c5d644971111083ef56c206 /net/bluetooth/l2cap_core.c
parentBluetooth: Fix possible missing I-Frame acknowledgement (diff)
downloadkernel-qcow2-linux-930fa4aee934ad59ed82163cdbee4922b883ef79.tar.gz
kernel-qcow2-linux-930fa4aee934ad59ed82163cdbee4922b883ef79.tar.xz
kernel-qcow2-linux-930fa4aee934ad59ed82163cdbee4922b883ef79.zip
Bluetooth: Fix double acking I-Frames when sending pending I-Frames
Pending I-Frame(s) are considered as acknowledgement. To void double acking (via I-Frame and later via RR) clear ack timer when sending first pending I-Frame. Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r--net/bluetooth/l2cap_core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 9add85271658..8efac7884ffb 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1455,7 +1455,9 @@ static int l2cap_ertm_send(struct l2cap_chan *chan)
if (bt_cb(skb)->retries == 1) {
chan->unacked_frames++;
- nsent++;
+
+ if (!nsent++)
+ __clear_ack_timer(chan);
}
chan->frames_sent++;