]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Allow auto-connect to request scan in associating state
authorJouni Malinen <jouni.malinen@atheros.com>
Tue, 14 Sep 2010 07:07:54 +0000 (00:07 -0700)
committerJouni Malinen <j@w1.fi>
Tue, 14 Sep 2010 07:07:54 +0000 (00:07 -0700)
Disconnection event may be received while in associating state.
Previously, wpa_supplicant could get stuck not trying to reconnect
in that case at least with nl80211. Allow scan request in this
state to avoid the issue. This helps especially with APs that do
load balancing by sending Deauthentication frame as a response to
Reassociation Request frame after successful Authentication frame
exchange.

wpa_supplicant/events.c

index 0b26a9bce853aaf759d37b0eb752996e04591199..4be64751444a47ccf1817649adacb16b25c5a137 100644 (file)
@@ -1230,7 +1230,7 @@ static void wpa_supplicant_event_disassoc(struct wpa_supplicant *wpa_s,
                wpa_printf(MSG_DEBUG, "WPA: Auto connect enabled: try to "
                           "reconnect (wps=%d)",
                           wpa_s->key_mgmt == WPA_KEY_MGMT_WPS);
-               if (wpa_s->wpa_state >= WPA_ASSOCIATED)
+               if (wpa_s->wpa_state >= WPA_ASSOCIATING)
                        wpa_supplicant_req_scan(wpa_s, 0, 100000);
        } else {
                wpa_printf(MSG_DEBUG, "WPA: Auto connect disabled: do not try "