Skip to content

Commit

Permalink
Bluetooth: Fix possible missing I-Frame acknowledgement
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Szymon Janc authored and Johan Hedberg committed Feb 13, 2012
1 parent 6d5922b commit 8ed7a0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/bluetooth/l2cap_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1453,17 +1453,17 @@ 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++;

if (skb_queue_is_last(&chan->tx_q, skb))
chan->tx_send_head = NULL;
else
chan->tx_send_head = skb_queue_next(&chan->tx_q, skb);

nsent++;
}

return nsent;
Expand Down

0 comments on commit 8ed7a0a

Please sign in to comment.