Commit e4569c43 authored by Lyle Zhu's avatar Lyle Zhu Committed by Daniel DeGrasse
Browse files

Bluetooth: Classic: L2CAP: Fix retransmission timer restarting



When received the valid S frame, the retransmission timer should not
be restarted if unacknowledged I-frames have been sent but the
retransmission timer has not elapsed.

Signed-off-by: default avatarLyle Zhu <lyle.zhu@nxp.com>
parent f6495d8b
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -652,7 +652,12 @@ static int bt_l2cap_br_update_req_seq_direct(struct bt_l2cap_br_chan *br_chan, u

	if (!atomic_test_bit(br_chan->flags, L2CAP_FLAG_RECV_FRAME_R)) {
		if (bt_l2cap_br_get_outstanding_count(br_chan)) {
			l2cap_br_start_timer(br_chan, BT_L2CAP_BR_TIMER_RET, true);
			/*
			 * If unacknowledged I-frames have been sent but the retransmission
			 * timer has not elapsed, then the ongoing retransmission timer should
			 * not be restarted.
			 */
			l2cap_br_start_timer(br_chan, BT_L2CAP_BR_TIMER_RET, false);
		} else {
			l2cap_br_start_timer(br_chan, BT_L2CAP_BR_TIMER_MONITOR, false);
		}