Do not add BSS to blacklist on local disconnection request

There is no point in marking a BSS temporarily blacklisted based on a
connection failure or disconnection case if that happens as a result of
a local request to disconnect. The blacklist entry could result on
unexpected BSS getting selected on the next connection attempt. In
addition, the code to try to find another BSS within the ESS could
result in scanning a single channel on the next attempt. Fix these
issues by handling the connection failure events only if we are not in
disconnected state (i.e., would try to reconnect after this
automatically).

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

View file

@ -3525,6 +3525,17 @@ void wpas_connection_failed(struct wpa_supplicant *wpa_s, const u8 *bssid)
*/ */
eloop_cancel_timeout(wpa_supplicant_timeout, wpa_s, NULL); eloop_cancel_timeout(wpa_supplicant_timeout, wpa_s, NULL);
if (wpa_s->disconnected) {
/*
* There is no point in blacklisting the AP if this event is
* generated based on local request to disconnect.
*/
wpa_dbg(wpa_s, MSG_DEBUG, "Ignore connection failure "
"indication since interface has been put into "
"disconnected state");
return;
}
/* /*
* Add the failed BSSID into the blacklist and speed up next scan * Add the failed BSSID into the blacklist and speed up next scan
* attempt if there could be other APs that could accept association. * attempt if there could be other APs that could accept association.