Skip to content

Commit

Permalink
Bluetooth: Update buffer_seq before retransmit frames
Browse files Browse the repository at this point in the history
Updating buffer_seq first make us able to ack the last I-frame received.
This is also a requirement of the  Profile Tuning Suite software.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Gustavo F. Padovan authored and Marcel Holtmann committed Jul 21, 2010
1 parent 7fe9b29 commit 2ece368
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/bluetooth/l2cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -3931,17 +3931,17 @@ static inline int l2cap_data_channel_iframe(struct sock *sk, u16 rx_control, str
return 0;
}

err = l2cap_push_rx_skb(sk, skb, rx_control);
if (err < 0)
return 0;

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

err = l2cap_push_rx_skb(sk, skb, rx_control);
if (err < 0)
return 0;

__mod_ack_timer();

pi->num_acked = (pi->num_acked + 1) % num_to_ack;
Expand Down

0 comments on commit 2ece368

Please sign in to comment.