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