Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7fe9b298 authored by Gustavo Padovan's avatar Gustavo Padovan Committed by Marcel Holtmann
Browse files

Bluetooth: Stop ack_timer if ERTM enters in Local Busy or SREJ_SENT



The ack_timer is implemation specific, disabling it in such situation
avoids some potencial errors in the ERTM protocol.

Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
Reviewed-by: default avatarJoão Paulo Rechi Vita <jprvita@profusion.mobi>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent f8df39f1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3665,6 +3665,8 @@ static int l2cap_push_rx_skb(struct sock *sk, struct sk_buff *skb, u16 control)

	pi->conn_state |= L2CAP_CONN_RNR_SENT;

	del_timer(&pi->ack_timer);

	queue_work(_busy_wq, &pi->busy_work);

	return err;
@@ -3914,6 +3916,8 @@ static inline int l2cap_data_channel_iframe(struct sock *sk, u16 rx_control, str
		pi->conn_state |= L2CAP_CONN_SEND_PBIT;

		l2cap_send_srejframe(sk, tx_seq);

		del_timer(&pi->ack_timer);
	}
	return 0;