summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSuraj Sumangala <suraj@atheros.com>2011-03-09 10:14:05 +0100
committerGustavo F. Padovan <padovan@profusion.mobi>2011-03-24 21:04:43 +0100
commit52cb1c0d208565d8f06b743cdc6596d744f92e3b (patch)
treeb20b49167311a532ede5a806a1c81332dba5fecf /net
parentBluetooth: add support for Apple MacBook Pro 8,2 (diff)
downloadlinux-52cb1c0d208565d8f06b743cdc6596d744f92e3b.tar.xz
linux-52cb1c0d208565d8f06b743cdc6596d744f92e3b.zip
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>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/l2cap_core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index c9f9cecca527..ca27f3a41536 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))