aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/blacklist.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-11-25 20:00:04 (GMT)
committerJouni Malinen <j@w1.fi>2010-11-25 20:00:04 (GMT)
commit7e6646c794ccd1df8d38b9927d11e101c0d45517 (patch)
tree6973780467fccb5e4ceba9725266e961d710ac8e /wpa_supplicant/blacklist.c
parent3c85f144ce7aa3967f881a7584a5b125061ca436 (diff)
downloadhostap-7e6646c794ccd1df8d38b9927d11e101c0d45517.zip
hostap-7e6646c794ccd1df8d38b9927d11e101c0d45517.tar.gz
hostap-7e6646c794ccd1df8d38b9927d11e101c0d45517.tar.bz2
SME: Fix re-try after auth/assoc timeout/failure
There were various issues in how the SME (i.e., nl80211-based driver interface) handled various authentication and association timeouts and failures. Authentication failure was not handled at all (wpa_supplicant just stopped trying to connect completely), authentication timeout resulted in blacklisting not working in the expected way (i.e., the same BSS could be selected continuously), and association cases had similar problems. Use a common function to handle all these cases and fix the blacklist operation. Use smaller delay before trying to scan again during the initial cycle through the available APs to speed up connection. Add a special case for another-BSS-in-the-same-ESS being present to speed up recovery from networks with multiple APs doing load balancing in various odd ways that are deployed out there.
Diffstat (limited to 'wpa_supplicant/blacklist.c')
-rw-r--r--wpa_supplicant/blacklist.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/wpa_supplicant/blacklist.c b/wpa_supplicant/blacklist.c
index 4ffb220..8f12ac9 100644
--- a/wpa_supplicant/blacklist.c
+++ b/wpa_supplicant/blacklist.c
@@ -44,7 +44,7 @@ struct wpa_blacklist * wpa_blacklist_get(struct wpa_supplicant *wpa_s,
* wpa_blacklist_add - Add an BSSID to the blacklist
* @wpa_s: Pointer to wpa_supplicant data
* @bssid: BSSID to be added to the blacklist
- * Returns: 0 on success, -1 on failure
+ * Returns: Current blacklist count on success, -1 on failure
*
* This function adds the specified BSSID to the blacklist or increases the
* blacklist count if the BSSID was already listed. It should be called when
@@ -66,7 +66,7 @@ int wpa_blacklist_add(struct wpa_supplicant *wpa_s, const u8 *bssid)
wpa_printf(MSG_DEBUG, "BSSID " MACSTR " blacklist count "
"incremented to %d",
MAC2STR(bssid), e->count);
- return 0;
+ return e->count;
}
e = os_zalloc(sizeof(*e));
@@ -79,7 +79,7 @@ int wpa_blacklist_add(struct wpa_supplicant *wpa_s, const u8 *bssid)
wpa_printf(MSG_DEBUG, "Added BSSID " MACSTR " into blacklist",
MAC2STR(bssid));
- return 0;
+ return e->count;
}