From: Suraj Sumangala Date: Wed, 9 Mar 2011 09:14:05 +0000 (+0530) Subject: Bluetooth: Increment unacked_frames count only the first transmit X-Git-Tag: v3.0-rc2~7^2~16^2~536^2~9^2~5 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=23e9fde2b344c22c5176c7fd37b52c3776ef5aba;p=~emulex%2Finfiniband.git 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 Signed-off-by: Gustavo F. Padovan --- diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index c9f9cecca52..ca27f3a4153 100644 --- a/net/bluetooth/l2cap_core.c +++ b/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))