aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-12-26 19:00:48 +0200
committerSteve Kondik <shade@chemlab.org>2014-06-12 14:07:30 -0700
commit4fccad8c8015419c104900ef405424557826d656 (patch)
tree2f5613ed656cb3eb3c1aca38ea40a1b7ddd3065b
parent4590807ee8ab5828a6a423de063c14d8d9027bb4 (diff)
downloadandroid_external_wpa_supplicant_8-4fccad8c8015419c104900ef405424557826d656.tar.gz
android_external_wpa_supplicant_8-4fccad8c8015419c104900ef405424557826d656.tar.bz2
android_external_wpa_supplicant_8-4fccad8c8015419c104900ef405424557826d656.zip
Do not use results from externally requested scan for network selection
It may not always be desirable to trigger reassociation or network change based on scan results from externally to wpa_supplicant trigger scan operations. Skip network selection and roaming determination if the received scan result is known to be triggered by something external to wpa_supplicant. The control interface SCAN command can be used to request wpa_supplicant to determine the best network. CRs-Fixed: 570640 Git-commit: 015af91fea2ec780cb44914bfc0cbc39932cf60d Git-repo : git://w1.fi/srv/git/hostap.git Signed-hostap: Jouni Malinen <j@w1.fi> Change-Id: I9b2aba83dc5ecad36b426157ce0d4daa1d95fcbb
-rw-r--r--wpa_supplicant/events.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index d671b9bb..de891b52 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1249,6 +1249,12 @@ static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
wpas_notify_scan_done(wpa_s, 1);
+ if (!wpa_s->own_scan_running && wpa_s->external_scan_running) {
+ wpa_dbg(wpa_s, MSG_DEBUG, "Do not use results from externally requested scan operation for network selection");
+ wpa_scan_results_free(scan_res);
+ return 0;
+ }
+
if (sme_proc_obss_scan(wpa_s) > 0) {
wpa_scan_results_free(scan_res);
return 0;