]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OWE: Use shorter scan interval during transition mode search
authorJouni Malinen <jouni@codeaurora.org>
Fri, 12 Oct 2018 16:33:51 +0000 (19:33 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 12 Oct 2018 16:59:26 +0000 (19:59 +0300)
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>
wpa_supplicant/events.c
wpa_supplicant/wpa_supplicant_i.h

index 115913106de8e831551e19f3dec60c2bac5dbe7f..860b2792cc53d4650b5013c19210776369e4145f 100644 (file)
@@ -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);
index 271f3776aa07c16fdd60512f4fa8976f8ce39308..6a521f0627ad4f25133ab766ce37d0a293e8abba 100644 (file)
@@ -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;