summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorDavid Spinadel <david.spinadel@intel.com>2015-03-17 13:58:38 -0400
committerJohannes Berg <johannes.berg@intel.com>2015-03-30 04:19:13 -0400
commit7d830a198689bd33057923e0370147d43241c7f0 (patch)
treee43608fe1328d857965f6ff2ac3c9fca605cff20 /net/mac80211/mlme.c
parent21fea567313641b6be69e0c684dc36c871ac848c (diff)
mac80211: stop scan before connection
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> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 22b125913661..4a01a836f870 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -4439,6 +4439,10 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,
4439 } else 4439 } else
4440 WARN_ON_ONCE(!ether_addr_equal(ifmgd->bssid, cbss->bssid)); 4440 WARN_ON_ONCE(!ether_addr_equal(ifmgd->bssid, cbss->bssid));
4441 4441
4442 /* Cancel scan to ensure that nothing interferes with connection */
4443 if (local->scanning)
4444 ieee80211_scan_cancel(local);
4445
4442 return 0; 4446 return 0;
4443} 4447}
4444 4448