summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJintao Lin <jintaolin@chromium.org>2023-04-20 21:36:40 +0000
committerJouni Malinen <j@w1.fi>2023-04-28 21:06:10 +0300
commit73372322038d2617f2be4542c0f2a5fa846fe911 (patch)
tree1d8252eb6c3ce432c440e2128c9931f9f94d37b4
parentf45cf609c7573286db5cfbe9f8674d9b3098506d (diff)
downloadhostap-73372322038d2617f2be4542c0f2a5fa846fe911.tar.gz
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 <jintaolin@chromium.org>
-rw-r--r--wpa_supplicant/wpa_supplicant.c3
1 files changed, 2 insertions, 1 deletions
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