From: Jintao Lin Date: Thu, 20 Apr 2023 21:36:40 +0000 (+0000) Subject: wpa_supplicant: Skip scan before starting a BSS in AP mode X-Git-Tag: hostap_2_11~1179 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73372322038d2617f2be4542c0f2a5fa846fe911;p=thirdparty%2Fhostap.git wpa_supplicant: Skip scan before starting a BSS in AP mode 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 --- diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 651c0ce9e..909a4bcfe 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -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