aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/bluetooth/l2cap.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 06687e264703..36cd4e4e6ad1 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -3364,6 +3364,13 @@ static inline int l2cap_data_channel_iframe(struct sock *sk, u16 rx_control, str
3364 3364
3365 BT_DBG("sk %p rx_control 0x%4.4x len %d", sk, rx_control, skb->len); 3365 BT_DBG("sk %p rx_control 0x%4.4x len %d", sk, rx_control, skb->len);
3366 3366
3367 if (L2CAP_CTRL_FINAL & rx_control) {
3368 del_timer(&pi->monitor_timer);
3369 if (pi->unacked_frames > 0)
3370 __mod_retrans_timer();
3371 pi->conn_state &= ~L2CAP_CONN_WAIT_F;
3372 }
3373
3367 pi->expected_ack_seq = req_seq; 3374 pi->expected_ack_seq = req_seq;
3368 l2cap_drop_acked_frames(sk); 3375 l2cap_drop_acked_frames(sk);
3369 3376
@@ -3453,6 +3460,13 @@ static inline int l2cap_data_channel_sframe(struct sock *sk, u16 rx_control, str
3453 3460
3454 BT_DBG("sk %p rx_control 0x%4.4x len %d", sk, rx_control, skb->len); 3461 BT_DBG("sk %p rx_control 0x%4.4x len %d", sk, rx_control, skb->len);
3455 3462
3463 if (L2CAP_CTRL_FINAL & rx_control) {
3464 del_timer(&pi->monitor_timer);
3465 if (pi->unacked_frames > 0)
3466 __mod_retrans_timer();
3467 pi->conn_state &= ~L2CAP_CONN_WAIT_F;
3468 }
3469
3456 switch (rx_control & L2CAP_CTRL_SUPERVISE) { 3470 switch (rx_control & L2CAP_CTRL_SUPERVISE) {
3457 case L2CAP_SUPER_RCV_READY: 3471 case L2CAP_SUPER_RCV_READY:
3458 if (rx_control & L2CAP_CTRL_POLL) { 3472 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 l2cap_ertm_send(sk); 3486 l2cap_ertm_send(sk);
3473 } 3487 }
3474 3488
3475 if (!(pi->conn_state & L2CAP_CONN_WAIT_F))
3476 break;
3477
3478 pi->conn_state &= ~L2CAP_CONN_WAIT_F;
3479 del_timer(&pi->monitor_timer);
3480
3481 if (pi->unacked_frames > 0)
3482 __mod_retrans_timer();
3483 } else { 3489 } else {
3484 pi->expected_ack_seq = tx_seq; 3490 pi->expected_ack_seq = tx_seq;
3485 l2cap_drop_acked_frames(sk); 3491 l2cap_drop_acked_frames(sk);