]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_supplicant: Skip scan before starting a BSS in AP mode
authorJintao Lin <jintaolin@chromium.org>
Thu, 20 Apr 2023 21:36:40 +0000 (21:36 +0000)
committerJouni Malinen <j@w1.fi>
Fri, 28 Apr 2023 18:06:10 +0000 (21:06 +0300)
When starting a new BSS as AP mode, the network configs have been passed
in from the BSS config. There is no need to scan before creating a new
BSS. Reuse connect_without_scan structure member to bypass scan when the
mode is WPAS_MODE_AP.

Signed-off-by: Jintao Lin <jintaolin@chromium.org>
wpa_supplicant/wpa_supplicant.c

index 651c0ce9e208127494455a91e8f5adfcdfdae946..909a4bcfe48007a185fdabffc0161ba98334c918 100644 (file)
@@ -4813,7 +4813,8 @@ void wpa_supplicant_select_network(struct wpa_supplicant *wpa_s,
                wpa_s->current_ssid = ssid;
                eapol_sm_notify_config(wpa_s->eapol, NULL, NULL);
                wpa_s->connect_without_scan =
-                       (ssid->mode == WPAS_MODE_MESH) ? ssid : NULL;
+                       (ssid->mode == WPAS_MODE_MESH ||
+                        ssid->mode == WPAS_MODE_AP) ? ssid : NULL;
 
                /*
                 * Don't optimize next scan freqs since a new ESS has been