Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(816)

Unified Diff: wpa_supplicant/events.c

Issue 5113003: CHROMIUMOS: wpa_supplicant: be smarter about blacklisting bssid on dissasoc/deauth (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/hostap.git@master
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: wpa_supplicant/events.c
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index c16ea58294df8203c2b50c3a9909a6f0454fb7eb..f37c898fe358cf28d01ccd7652b68495252ee5ba 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1278,7 +1278,13 @@ static void wpa_supplicant_event_disassoc(struct wpa_supplicant *wpa_s,
bssid = wpa_s->bssid;
if (is_zero_ether_addr(bssid))
bssid = wpa_s->pending_bssid;
- wpa_blacklist_add(wpa_s, bssid);
+ /*
+ * Don't blacklist the AP on normal/expected disconnects.
+ */
+ if (reason_code != WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY &&
+ reason_code != WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA &&
+ reason_code != WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA)
+ wpa_blacklist_add(wpa_s, bssid);
wpa_sm_notify_disassoc(wpa_s->wpa);
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_DISCONNECTED "bssid=" MACSTR
" reason=%d",
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698