Give adhoc associations a bit more time

Depending on how the driver implements IBSS searching and creation, it
may need to perform one or more scans before successfully completing the
association operation.  Therefore, increase the timeout for IBSS
association operations so that the supplicant doesn't interrupt the
driver as much.
This commit is contained in:
Dan Williams 2008-06-04 21:00:09 +03:00 committed by Jouni Malinen
parent 59c9707863
commit 1d3c75b3b6

View file

@ -1090,13 +1090,15 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
wpa_supplicant_set_state(wpa_s, WPA_COMPLETED); wpa_supplicant_set_state(wpa_s, WPA_COMPLETED);
} else { } else {
/* Timeout for IEEE 802.11 authentication and association */ /* Timeout for IEEE 802.11 authentication and association */
int timeout; int timeout = 60;
if (assoc_failed)
timeout = 5; if (assoc_failed) {
else if (wpa_s->conf->ap_scan == 1) /* give IBSS a bit more time */
timeout = 10; timeout = ssid->mode ? 10 : 5;
else } else if (wpa_s->conf->ap_scan == 1) {
timeout = 60; /* give IBSS a bit more time */
timeout = ssid->mode ? 20 : 10;
}
wpa_supplicant_req_auth_timeout(wpa_s, timeout, 0); wpa_supplicant_req_auth_timeout(wpa_s, timeout, 0);
} }