]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Indicate scan completion in active AP mode even when ignoring results
authorJouni Malinen <j@w1.fi>
Sun, 15 Mar 2020 19:18:16 +0000 (21:18 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 15 Mar 2020 19:18:16 +0000 (21:18 +0200)
This is needed to avoid leaving external components (through control
interface or D-Bus) timing out while waiting for the scan completion
events. This was already taken care of for the scan-only case
("TYPE=only"), but the scan-and-allow-roaming case did not report the
scan completion event when operating in AP mode.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/events.c

index 6ec0da1f746e9e984cc1701953e36bf815ee94e3..2fc49932b3f2b2af95b0df6aaa00cf5c4bce9e99 100644 (file)
@@ -2024,15 +2024,6 @@ static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
                goto scan_work_done;
        }
 
-       if (ap) {
-               wpa_dbg(wpa_s, MSG_DEBUG, "Ignore scan results in AP mode");
-#ifdef CONFIG_AP
-               if (wpa_s->ap_iface->scan_cb)
-                       wpa_s->ap_iface->scan_cb(wpa_s->ap_iface);
-#endif /* CONFIG_AP */
-               goto scan_work_done;
-       }
-
        wpa_dbg(wpa_s, MSG_DEBUG, "New scan results available (own=%u ext=%u)",
                wpa_s->own_scan_running,
                data ? data->scan_info.external_scan : 0);
@@ -2049,6 +2040,15 @@ static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
 
        wpas_notify_scan_done(wpa_s, 1);
 
+       if (ap) {
+               wpa_dbg(wpa_s, MSG_DEBUG, "Ignore scan results in AP mode");
+#ifdef CONFIG_AP
+               if (wpa_s->ap_iface->scan_cb)
+                       wpa_s->ap_iface->scan_cb(wpa_s->ap_iface);
+#endif /* CONFIG_AP */
+               goto scan_work_done;
+       }
+
        if (data && data->scan_info.external_scan) {
                wpa_dbg(wpa_s, MSG_DEBUG, "Do not use results from externally requested scan operation for network selection");
                wpa_scan_results_free(scan_res);