Skip to content

Commit

Permalink
mac80211: remove disconnected APs from BSS table
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
  • Loading branch information
DavidSpinadel authored and jmberg-intel committed May 12, 2016
1 parent 866daf6 commit 20eb7ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -2399,6 +2399,11 @@ static void __ieee80211_disconnect(struct ieee80211_sub_if_data *sdata)
return;
}

/* AP is probably out of range (or not reachable for another reason) so
* remove the bss struct for that AP.
*/
cfg80211_unlink_bss(local->hw.wiphy, ifmgd->associated);

ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH,
WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY,
true, frame_buf);
Expand Down

0 comments on commit 20eb7ea

Please sign in to comment.