提交 8ed7a0ae 编写于 作者: S Szymon Janc 提交者: Johan Hedberg

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: NSzymon Janc <szymon.janc@tieto.com>
Signed-off-by: NLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Acked-by: NGustavo F. Padovan <padovan@profusion.mobi>
Acked-by: NMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
上级 6d5922b0
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册