summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorDavid Spinadel <david.spinadel@intel.com>2016-05-03 09:05:02 -0400
committerJohannes Berg <johannes.berg@intel.com>2016-05-12 05:14:23 -0400
commit20eb7ea93f7ffaaa24b19b8bfc411b1f7605759f (patch)
tree6cc8b54ed8980c2f44e9400e2e4503795cf15643 /net/mac80211/mlme.c
parent866daf6eaae36b414764c4830ed197da9801a361 (diff)
mac80211: remove disconnected APs from BSS table
In some cases, after a sudden AP disappearing and reconnection to another AP in the same ESS, user space gets the old AP in scan results (cached). User space may decide to roam to that old AP which will cause a disconnection and longer recovery. Remove APs that are probably out of range from BSS table. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 885f4ca0888d..8d426f637f58 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2399,6 +2399,11 @@ static void __ieee80211_disconnect(struct ieee80211_sub_if_data *sdata)
2399 return; 2399 return;
2400 } 2400 }
2401 2401
2402 /* AP is probably out of range (or not reachable for another reason) so
2403 * remove the bss struct for that AP.
2404 */
2405 cfg80211_unlink_bss(local->hw.wiphy, ifmgd->associated);
2406
2402 ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, 2407 ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH,
2403 WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY, 2408 WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY,
2404 true, frame_buf); 2409 true, frame_buf);