Commit 1d8f5d16 authored by Gustavo F. Padovan's avatar Gustavo F. Padovan Committed by Marcel Holtmann

Bluetooth: Support case with F bit set under WAIT_F state.

On receipt of a F=1 under WAIT_F state ERTM shall stop monitor timer and
start retransmission timer (if there are unacked frames).
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 d5392c8f
...@@ -3364,6 +3364,13 @@ static inline int l2cap_data_channel_iframe(struct sock *sk, u16 rx_control, str ...@@ -3364,6 +3364,13 @@ static inline int l2cap_data_channel_iframe(struct sock *sk, u16 rx_control, str
BT_DBG("sk %p rx_control 0x%4.4x len %d", sk, rx_control, skb->len); BT_DBG("sk %p rx_control 0x%4.4x len %d", sk, rx_control, skb->len);
if (L2CAP_CTRL_FINAL & rx_control) {
del_timer(&pi->monitor_timer);
if (pi->unacked_frames > 0)
__mod_retrans_timer();
pi->conn_state &= ~L2CAP_CONN_WAIT_F;
}
pi->expected_ack_seq = req_seq; pi->expected_ack_seq = req_seq;
l2cap_drop_acked_frames(sk); l2cap_drop_acked_frames(sk);
...@@ -3453,6 +3460,13 @@ static inline int l2cap_data_channel_sframe(struct sock *sk, u16 rx_control, str ...@@ -3453,6 +3460,13 @@ static inline int l2cap_data_channel_sframe(struct sock *sk, u16 rx_control, str
BT_DBG("sk %p rx_control 0x%4.4x len %d", sk, rx_control, skb->len); BT_DBG("sk %p rx_control 0x%4.4x len %d", sk, rx_control, skb->len);
if (L2CAP_CTRL_FINAL & rx_control) {
del_timer(&pi->monitor_timer);
if (pi->unacked_frames > 0)
__mod_retrans_timer();
pi->conn_state &= ~L2CAP_CONN_WAIT_F;
}
switch (rx_control & L2CAP_CTRL_SUPERVISE) { switch (rx_control & L2CAP_CTRL_SUPERVISE) {
case L2CAP_SUPER_RCV_READY: case L2CAP_SUPER_RCV_READY:
if (rx_control & L2CAP_CTRL_POLL) { if (rx_control & L2CAP_CTRL_POLL) {
...@@ -3472,14 +3486,6 @@ static inline int l2cap_data_channel_sframe(struct sock *sk, u16 rx_control, str ...@@ -3472,14 +3486,6 @@ static inline int l2cap_data_channel_sframe(struct sock *sk, u16 rx_control, str
l2cap_ertm_send(sk); l2cap_ertm_send(sk);
} }
if (!(pi->conn_state & L2CAP_CONN_WAIT_F))
break;
pi->conn_state &= ~L2CAP_CONN_WAIT_F;
del_timer(&pi->monitor_timer);
if (pi->unacked_frames > 0)
__mod_retrans_timer();
} else { } else {
pi->expected_ack_seq = tx_seq; pi->expected_ack_seq = tx_seq;
l2cap_drop_acked_frames(sk); l2cap_drop_acked_frames(sk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment