linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] mwifiex: add delay when tdls confirm frame is queued
@ 2016-02-23 13:16 Amitkumar Karwar
  2016-02-23 13:16 ` [PATCH 2/4] mwifiex: fix corner case association failure Amitkumar Karwar
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Amitkumar Karwar @ 2016-02-23 13:16 UTC (permalink / raw)
  To: linux-wireless
  Cc: Cathy Luo, Nishant Sarmukadam, Xinming Hu, Amitkumar Karwar

From: Xinming Hu <huxm@marvell.com>

It is observed that driver may send the data packet to tdls peer
before tdls peer receives tdls setup confirm frame.
Similar race condition exists during tdls teardown procedure also.
This patch adds 10 milliseconds delay to resolve the race.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
---
 drivers/net/wireless/marvell/mwifiex/tdls.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/wireless/marvell/mwifiex/tdls.c b/drivers/net/wireless/marvell/mwifiex/tdls.c
index 9275f9c..1506496 100644
--- a/drivers/net/wireless/marvell/mwifiex/tdls.c
+++ b/drivers/net/wireless/marvell/mwifiex/tdls.c
@@ -680,6 +680,13 @@ int mwifiex_send_tdls_data_frame(struct mwifiex_private *priv, const u8 *peer,
 	__net_timestamp(skb);
 	mwifiex_queue_tx_pkt(priv, skb);
 
+	/* Delay 10ms to make sure tdls setup confirm/teardown frame
+	 * is received by peer
+	*/
+	if (action_code == WLAN_TDLS_SETUP_CONFIRM ||
+	    action_code == WLAN_TDLS_TEARDOWN)
+		msleep_interruptible(10);
+
 	return 0;
 }
 
-- 
1.8.1.4


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

end of thread, other threads:[~2016-03-07 12:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-23 13:16 [PATCH 1/4] mwifiex: add delay when tdls confirm frame is queued Amitkumar Karwar
2016-02-23 13:16 ` [PATCH 2/4] mwifiex: fix corner case association failure Amitkumar Karwar
2016-02-23 13:16 ` [PATCH 3/4] mwifiex: add sdio multiport aggregation debug information Amitkumar Karwar
2016-02-23 13:16 ` [PATCH 4/4] mwifiex: do not set multiport flag for tx/rx single packet Amitkumar Karwar
2016-03-07 12:27 ` [1/4] mwifiex: add delay when tdls confirm frame is queued Kalle Valo

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).