Do not try auto connect mechanism in disconnected state

This cleans up debug log by not requesting the auto connect on
dissassociation event if we are already in disconnected state and would
not try to connect anyway.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2013-05-12 19:15:33 +03:00 committed by Jouni Malinen
parent 0cdb93fe9f
commit 3636b891b7

View file

@ -1964,8 +1964,9 @@ static void wpa_supplicant_event_disassoc_finish(struct wpa_supplicant *wpa_s,
"pre-shared key may be incorrect"); "pre-shared key may be incorrect");
wpas_auth_failed(wpa_s); wpas_auth_failed(wpa_s);
} }
if (!wpa_s->auto_reconnect_disabled || if (!wpa_s->disconnected &&
wpa_s->key_mgmt == WPA_KEY_MGMT_WPS) { (!wpa_s->auto_reconnect_disabled ||
wpa_s->key_mgmt == WPA_KEY_MGMT_WPS)) {
wpa_dbg(wpa_s, MSG_DEBUG, "Auto connect enabled: try to " wpa_dbg(wpa_s, MSG_DEBUG, "Auto connect enabled: try to "
"reconnect (wps=%d wpa_state=%d)", "reconnect (wps=%d wpa_state=%d)",
wpa_s->key_mgmt == WPA_KEY_MGMT_WPS, wpa_s->key_mgmt == WPA_KEY_MGMT_WPS,