瀏覽代碼

Bluetooth: Increment unacked_frames count only the first transmit

This patch lets 'l2cap_pinfo.unacked_frames' be incremented only
the first time a frame is transmitted.

Previously it was being incremented for retransmitted packets
too resulting the value to cross the transmit window size.

Signed-off-by: Suraj Sumangala <suraj@atheros.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Suraj Sumangala 14 年之前
父節點
當前提交
52cb1c0d20
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      net/bluetooth/l2cap_core.c

+ 3 - 1
net/bluetooth/l2cap_core.c

@@ -1116,7 +1116,9 @@ int l2cap_ertm_send(struct sock *sk)
 		bt_cb(skb)->tx_seq = pi->next_tx_seq;
 		pi->next_tx_seq = (pi->next_tx_seq + 1) % 64;
 
-		pi->unacked_frames++;
+		if (bt_cb(skb)->retries == 1)
+			pi->unacked_frames++;
+
 		pi->frames_sent++;
 
 		if (skb_queue_is_last(TX_QUEUE(sk), skb))