linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: stop scan before connection
@ 2015-03-17 17:58 Emmanuel Grumbach
  2015-03-18  9:36 ` Eliad Peller
  2015-03-30  8:19 ` Johannes Berg
  0 siblings, 2 replies; 6+ messages in thread
From: Emmanuel Grumbach @ 2015-03-17 17:58 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, David Spinadel

From: David Spinadel <david.spinadel@intel.com>

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 <david.spinadel@intel.com>
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
---
 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


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

end of thread, other threads:[~2015-03-30  8:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-17 17:58 [PATCH] mac80211: stop scan before connection Emmanuel Grumbach
2015-03-18  9:36 ` Eliad Peller
2015-03-18  9:46   ` Johannes Berg
2015-03-18 10:11     ` Eliad Peller
2015-03-18 19:22       ` Johannes Berg
2015-03-30  8:19 ` Johannes Berg

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