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

Commit 05fbd89d authored by Gustavo Padovan's avatar Gustavo Padovan Committed by Marcel Holtmann
Browse files

Bluetooth: Finish implementation for Rec RR (P=1) on ERTM



Now the code handles the case under SREJ_SENT state.

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 8abb52ee
Loading
Loading
Loading
Loading
+11 −2
Original line number Original line Diff line number Diff line
@@ -3499,8 +3499,17 @@ static inline void l2cap_data_channel_rrframe(struct sock *sk, u16 rx_control)
	l2cap_drop_acked_frames(sk);
	l2cap_drop_acked_frames(sk);


	if (rx_control & L2CAP_CTRL_POLL) {
	if (rx_control & L2CAP_CTRL_POLL) {
		if (pi->conn_state & L2CAP_CONN_SREJ_SENT) {
			if ((pi->conn_state & L2CAP_CONN_REMOTE_BUSY) &&
					(pi->unacked_frames > 0))
				__mod_retrans_timer();

			pi->conn_state &= ~L2CAP_CONN_REMOTE_BUSY;
			l2cap_send_srejtail(sk);
		} else {
			l2cap_send_i_or_rr_or_rnr(sk);
			l2cap_send_i_or_rr_or_rnr(sk);
			pi->conn_state &= ~L2CAP_CONN_REMOTE_BUSY;
			pi->conn_state &= ~L2CAP_CONN_REMOTE_BUSY;
		}


	} else if (rx_control & L2CAP_CTRL_FINAL) {
	} else if (rx_control & L2CAP_CTRL_FINAL) {
		pi->conn_state &= ~L2CAP_CONN_REMOTE_BUSY;
		pi->conn_state &= ~L2CAP_CONN_REMOTE_BUSY;