public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Drop frames without F-bit set when in WAIT_F state
@ 2012-02-14 13:56 Szymon Janc
  2012-02-14 15:41 ` Gustavo Padovan
  0 siblings, 1 reply; 6+ messages in thread
From: Szymon Janc @ 2012-02-14 13:56 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: kanak.gupta, Szymon Janc

When transmitter is in WAIT_F state any frames received without F-bit=1
should not be processed (With-Valid-F-bit condition is not true).

This was affecting TP/ERM/BI-05-C PTS test.

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

diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 8efac78..1a724c6 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -4190,6 +4190,11 @@ static int l2cap_ertm_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb)
 		goto drop;
 	}
 
+	/* drop frame without F-bit set when in WAIT_F state */
+	if (test_bit(CONN_WAIT_F, &chan->conn_state) &&
+			!__is_ctrl_final(chan, control))
+		goto drop;
+
 	if (!__is_sframe(chan, control)) {
 		if (len < 0) {
 			l2cap_send_disconn_req(chan->conn, chan, ECONNRESET);
-- 
on behalf of ST-Ericsson


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

end of thread, other threads:[~2012-02-17 19:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-14 13:56 [PATCH] Bluetooth: Drop frames without F-bit set when in WAIT_F state Szymon Janc
2012-02-14 15:41 ` Gustavo Padovan
2012-02-14 17:26   ` Ulisses Furquim
2012-02-15  9:34   ` Szymon Janc
2012-02-15 18:47     ` Mat Martineau
2012-02-17 19:11       ` Mat Martineau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox