summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_core.c
diff options
context:
space:
mode:
authorSzymon Janc2012-02-07 15:43:01 +0100
committerJohan Hedberg2012-02-13 16:01:35 +0100
commit8ed7a0ae7834cbefb82ed15a92e36983924efa23 (patch)
tree96cbe9f236a41556dde36c6d92e2355b4047f7b6 /net/bluetooth/l2cap_core.c
parentBluetooth: Remove unneeded sk variable (diff)
downloadkernel-qcow2-linux-8ed7a0ae7834cbefb82ed15a92e36983924efa23.tar.gz
kernel-qcow2-linux-8ed7a0ae7834cbefb82ed15a92e36983924efa23.tar.xz
kernel-qcow2-linux-8ed7a0ae7834cbefb82ed15a92e36983924efa23.zip
Bluetooth: Fix possible missing I-Frame acknowledgement
Make l2cap_ertm_send return number of pending I-Frames transmitted instead of all (pending + retransmitted) I-Frames transmitted. As only pending I-Frames are considered as acknowledgement, this could lead to situation when no ACK was sent in __l2cap_send_ack (if only already transmitted I-Frames were retransmitted). Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> 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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index f1a6b3cbdba7..9add85271658 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1453,8 +1453,10 @@ static int l2cap_ertm_send(struct l2cap_chan *chan)
chan->next_tx_seq = __next_seq(chan, chan->next_tx_seq);
- if (bt_cb(skb)->retries == 1)
+ if (bt_cb(skb)->retries == 1) {
chan->unacked_frames++;
+ nsent++;
+ }
chan->frames_sent++;
@@ -1462,8 +1464,6 @@ static int l2cap_ertm_send(struct l2cap_chan *chan)
chan->tx_send_head = NULL;
else
chan->tx_send_head = skb_queue_next(&chan->tx_q, skb);
-
- nsent++;
}
return nsent;