Parcourir la source

Bluetooth: Only set ack_timer if we didn't send and ack

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Gustavo F. Padovan il y a 14 ans
Parent
commit
4d611e4d3d
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      net/bluetooth/l2cap_core.c

+ 2 - 1
net/bluetooth/l2cap_core.c

@@ -3928,11 +3928,12 @@ expected:
 			l2cap_retransmit_frames(chan);
 	}
 
-	__set_ack_timer(chan);
 
 	chan->num_acked = (chan->num_acked + 1) % num_to_ack;
 	if (chan->num_acked == num_to_ack - 1)
 		l2cap_send_ack(chan);
+	else
+		__set_ack_timer(chan);
 
 	return 0;