diff options
-rw-r--r-- | net/bluetooth/l2cap.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 7e39d9ee0b9c..a9fdfe401f5b 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -3748,7 +3748,7 @@ static void l2cap_check_srej_gap(struct sock *sk, u8 tx_seq) | |||
3748 | l2cap_ertm_reassembly_sdu(sk, skb, control); | 3748 | l2cap_ertm_reassembly_sdu(sk, skb, control); |
3749 | l2cap_pi(sk)->buffer_seq_srej = | 3749 | l2cap_pi(sk)->buffer_seq_srej = |
3750 | (l2cap_pi(sk)->buffer_seq_srej + 1) % 64; | 3750 | (l2cap_pi(sk)->buffer_seq_srej + 1) % 64; |
3751 | tx_seq++; | 3751 | tx_seq = (tx_seq + 1) % 64; |
3752 | } | 3752 | } |
3753 | } | 3753 | } |
3754 | 3754 | ||
@@ -3784,10 +3784,11 @@ static void l2cap_send_srejframe(struct sock *sk, u8 tx_seq) | |||
3784 | l2cap_send_sframe(pi, control); | 3784 | l2cap_send_sframe(pi, control); |
3785 | 3785 | ||
3786 | new = kzalloc(sizeof(struct srej_list), GFP_ATOMIC); | 3786 | new = kzalloc(sizeof(struct srej_list), GFP_ATOMIC); |
3787 | new->tx_seq = pi->expected_tx_seq++; | 3787 | new->tx_seq = pi->expected_tx_seq; |
3788 | pi->expected_tx_seq = (pi->expected_tx_seq + 1) % 64; | ||
3788 | list_add_tail(&new->list, SREJ_LIST(sk)); | 3789 | list_add_tail(&new->list, SREJ_LIST(sk)); |
3789 | } | 3790 | } |
3790 | pi->expected_tx_seq++; | 3791 | pi->expected_tx_seq = (pi->expected_tx_seq + 1) % 64; |
3791 | } | 3792 | } |
3792 | 3793 | ||
3793 | static inline int l2cap_data_channel_iframe(struct sock *sk, u16 rx_control, struct sk_buff *skb) | 3794 | static inline int l2cap_data_channel_iframe(struct sock *sk, u16 rx_control, struct sk_buff *skb) |