Skip to content

Commit

Permalink
Bluetooth: Increment unacked_frames count only the first transmit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Suraj Sumangala authored and Gustavo F. Padovan committed Mar 24, 2011
1 parent 63a8588 commit 52cb1c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/bluetooth/l2cap_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 52cb1c0

Please sign in to comment.