Browse 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 14 years ago
parent
commit
4d611e4d3d
1 changed files with 2 additions and 1 deletions
  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;