Bluetooth: Fix double acking I-Frames when sending pending I-Frames
authorSzymon Janc <szymon.janc@tieto.com>
Tue, 7 Feb 2012 14:43:02 +0000 (15:43 +0100)
committerJohan Hedberg <johan.hedberg@intel.com>
Mon, 13 Feb 2012 15:01:35 +0000 (17:01 +0200)
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>
net/bluetooth/l2cap_core.c

index 9add85271658b28d809d1aa2c91dd5eb742b24d5..8efac7884ffb275b22d9cbf2a7a8b6154ec07baa 100644 (file)
@@ -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++;