diff mbox

[1/4] mwifiex: add delay when tdls confirm frame is queued

Message ID 1456233379-12099-1-git-send-email-akarwar@marvell.com (mailing list archive)
State Accepted
Delegated to: Kalle Valo
Headers show

Commit Message

Amitkumar Karwar Feb. 23, 2016, 1:16 p.m. UTC
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(+)

Comments

Kalle Valo March 7, 2016, 12:27 p.m. UTC | #1
> 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>

Thanks, 4 patches applied to wireless-drivers-next.git:

de651ce3d750 mwifiex: add delay when tdls confirm frame is queued
a6139b6271f9 mwifiex: fix corner case association failure
8b7ef8b66eb9 mwifiex: add sdio multiport aggregation debug information
0cb52aac4d19 mwifiex: do not set multiport flag for tx/rx single packet

Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;
 }