aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2018-10-12 16:33:51 (GMT)
committerJouni Malinen <j@w1.fi>2018-10-12 16:59:26 (GMT)
commita5e6270f2516ba2112bd7ac479c8f52c90e48efd (patch)
tree952156ca59265fc4dcf54a94030a5386dad37df8 /wpa_supplicant
parent91073ccaaa9b3d7e3af750ea9a0d18f097df0d4c (diff)
downloadhostap-a5e6270f2516ba2112bd7ac479c8f52c90e48efd.zip
hostap-a5e6270f2516ba2112bd7ac479c8f52c90e48efd.tar.gz
hostap-a5e6270f2516ba2112bd7ac479c8f52c90e48efd.tar.bz2
OWE: Use shorter scan interval during transition mode search
Start scans more quickly if an open BSS advertising OWE transition mode is found, but the matching OWE BSS has not yet been seen. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/events.c13
-rw-r--r--wpa_supplicant/wpa_supplicant_i.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 1159131..860b279 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -716,6 +716,7 @@ static int wpa_supplicant_ssid_bss_match(struct wpa_supplicant *wpa_s,
" skip OWE transition BSS (selection count %d does not exceed %d)",
ssid->owe_transition_bss_select_count,
MAX_OWE_TRANSITION_BSS_SELECT_COUNT);
+ wpa_s->owe_transition_search = 1;
return 0;
}
if (debug_print)
@@ -1953,6 +1954,7 @@ static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s,
if (wpa_s->p2p_mgmt)
return 0; /* no normal connection on p2p_mgmt interface */
+ wpa_s->owe_transition_search = 0;
selected = wpa_supplicant_pick_network(wpa_s, &ssid);
#ifdef CONFIG_MESH
@@ -2054,6 +2056,17 @@ static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s,
return 0;
}
#endif /* CONFIG_WPS */
+#ifdef CONFIG_OWE
+ if (wpa_s->owe_transition_search) {
+ wpa_dbg(wpa_s, MSG_DEBUG,
+ "OWE: Use shorter wait during transition mode search");
+ timeout_sec = 0;
+ timeout_usec = 500000;
+ wpa_supplicant_req_new_scan(wpa_s, timeout_sec,
+ timeout_usec);
+ return 0;
+ }
+#endif /* CONFIG_OWE */
if (wpa_supplicant_req_sched_scan(wpa_s))
wpa_supplicant_req_new_scan(wpa_s, timeout_sec,
timeout_usec);
diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
index 271f377..6a521f0 100644
--- a/wpa_supplicant/wpa_supplicant_i.h
+++ b/wpa_supplicant/wpa_supplicant_i.h
@@ -744,6 +744,7 @@ struct wpa_supplicant {
unsigned int added_vif:1;
unsigned int wnmsleep_used:1;
unsigned int owe_transition_select:1;
+ unsigned int owe_transition_search:1;
struct os_reltime last_mac_addr_change;
int last_mac_addr_style;