Thread (6 messages) 6 messages, 3 authors, 2015-03-30
STALE4134d REVIEWED: 1 (0M)

[PATCH] mac80211: stop scan before connection

From: Emmanuel Grumbach <hidden>
Date: 2015-03-17 17:58:42
Subsystem: mac80211, the rest · Maintainers: Johannes Berg, Linus Torvalds

From: David Spinadel <redacted>

Stop scan before authentication or association to make sure
that nothing interferes with connection flow.

Currently mac80211 defers RX auth and assoc packets (among other ones)
until after the scan is complete, so auth during scan is likely to fail
if scan took too much time.

Signed-off-by: David Spinadel <redacted>
Reviewed-by: Luciano Coelho <redacted>
---
 net/mac80211/mlme.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index d77150d..3f3ac3e 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -4458,6 +4458,10 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,
 	} else
 		WARN_ON_ONCE(!ether_addr_equal(ifmgd->bssid, cbss->bssid));
 
+	/* Cancel scan to ensure that nothing interferes with connection */
+	if (local->scanning)
+		ieee80211_scan_cancel(local);
+
 	return 0;
 }
 
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help