linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Bluetooth: Fix possible missing I-Frame acknowledgement
@ 2012-02-07 14:43 Szymon Janc
  2012-02-07 14:43 ` [PATCH 2/2] Bluetooth: Fix double acking I-Frames when sending pending I-Frames Szymon Janc
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Szymon Janc @ 2012-02-07 14:43 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: Luiz Augusto von Dentz, Ulisses Furquim, kanak.gupta, Szymon Janc

Make l2cap_ertm_send return number of pending I-Frames transmitted
instead of all (pending + retransmitted) I-Frames transmitted.

As only pending I-Frames are considered as acknowledgement, this could
lead to situation when no ACK was sent in __l2cap_send_ack (if only
already transmitted I-Frames were retransmitted).

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
---
 net/bluetooth/l2cap_core.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 09cd860..5bb298d 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1448,8 +1448,10 @@ static int l2cap_ertm_send(struct l2cap_chan *chan)
 
 		chan->next_tx_seq = __next_seq(chan, chan->next_tx_seq);
 
-		if (bt_cb(skb)->retries == 1)
+		if (bt_cb(skb)->retries == 1) {
 			chan->unacked_frames++;
+			nsent++;
+		}
 
 		chan->frames_sent++;
 
@@ -1457,8 +1459,6 @@ static int l2cap_ertm_send(struct l2cap_chan *chan)
 			chan->tx_send_head = NULL;
 		else
 			chan->tx_send_head = skb_queue_next(&chan->tx_q, skb);
-
-		nsent++;
 	}
 
 	return nsent;
-- 
on behalf of ST-Ericsson


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-02-09 15:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-07 14:43 [PATCH 1/2] Bluetooth: Fix possible missing I-Frame acknowledgement Szymon Janc
2012-02-07 14:43 ` [PATCH 2/2] Bluetooth: Fix double acking I-Frames when sending pending I-Frames Szymon Janc
2012-02-07 15:26   ` Ulisses Furquim
2012-02-07 15:50     ` Luiz Augusto von Dentz
2012-02-09 13:45   ` Marcel Holtmann
2012-02-07 15:47 ` [PATCH 1/2] Bluetooth: Fix possible missing I-Frame acknowledgement Luiz Augusto von Dentz
2012-02-08 16:40 ` Gustavo Padovan
2012-02-09 13:44 ` Marcel Holtmann
2012-02-09 15:28 ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).