aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-07-18 03:32:25 (GMT)
committerJouni Malinen <j@w1.fi>2010-07-18 16:39:52 (GMT)
commit9a3e19d985801c4b8e057acb792bc95a3c5fe824 (patch)
tree019013921a348be4e8467e4019c19b4a853c8c0b
parenta08be7d60d2887271b63bb4ea2c91a27f63bf2ca (diff)
downloadhostap-07-9a3e19d985801c4b8e057acb792bc95a3c5fe824.zip
hostap-07-9a3e19d985801c4b8e057acb792bc95a3c5fe824.tar.gz
hostap-07-9a3e19d985801c4b8e057acb792bc95a3c5fe824.tar.bz2
Ignore scan results in wpa_supplicant AP mode
This is needed to avoid trying to reassociate based on new scan results when using wpa_supplicant to control AP mode. This could happen if something external triggered the driver to run a scan. (cherry picked from commit 5bc0cdb7212cb53b82f0ac705bdef6088e24a71f)
-rw-r--r--wpa_supplicant/events.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 0c1b3c8..b20c440 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -884,6 +884,12 @@ static void wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
struct wpa_bss *selected;
struct wpa_ssid *ssid = NULL;
struct wpa_scan_results *scan_res;
+ int ap = 0;
+
+#ifdef CONFIG_AP
+ if (wpa_s->ap_iface)
+ ap = 1;
+#endif /* CONFIG_AP */
wpa_supplicant_notify_scanning(wpa_s, 0);
@@ -891,7 +897,7 @@ static void wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
data ? &data->scan_info :
NULL, 1);
if (scan_res == NULL) {
- if (wpa_s->conf->ap_scan == 2)
+ if (wpa_s->conf->ap_scan == 2 || ap)
return;
wpa_printf(MSG_DEBUG, "Failed to get scan results - try "
"scanning again");
@@ -906,6 +912,12 @@ static void wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
return;
}
+ if (ap) {
+ wpa_printf(MSG_DEBUG, "Ignore scan results in AP mode");
+ wpa_scan_results_free(scan_res);
+ return;
+ }
+
/*
* Don't post the results if this was the initial cached
* and there were no results.