Commit d43e8786 authored by Vasanthakumar Thiagarajan's avatar Vasanthakumar Thiagarajan Committed by John W. Linville

mac80211: Remove bss information of the current AP when it goes out of range

There is no point having the bss information of currently associated AP
when the AP is detected to be out of range.
Signed-off-by: default avatarVasanthakumar Thiagarajan <>
Signed-off-by: default avatarJohn W. Linville <>
parent de9f97ef
......@@ -1042,6 +1042,7 @@ static void ieee80211_associated(struct ieee80211_sub_if_data *sdata,
struct ieee80211_local *local = sdata->local;
struct sta_info *sta;
int disassoc;
bool remove_bss = false;
/* TODO: start monitoring current AP signal quality and number of
* missed beacons. Scan other channels every now and then and search
......@@ -1067,6 +1068,7 @@ static void ieee80211_associated(struct ieee80211_sub_if_data *sdata,
sdata->dev->name, ifsta->bssid);
disassoc = 1;
remove_bss = true;
} else
ieee80211_send_probe_req(sdata, ifsta->bssid,
......@@ -1086,12 +1088,24 @@ static void ieee80211_associated(struct ieee80211_sub_if_data *sdata,
if (disassoc)
if (disassoc) {
ieee80211_set_disassoc(sdata, ifsta, true, true,
if (remove_bss) {
struct ieee80211_bss *bss;
bss = ieee80211_rx_bss_get(local, ifsta->bssid,
ifsta->ssid, ifsta->ssid_len);
if (bss) {
ieee80211_rx_bss_put(local, bss);
} else {
mod_timer(&ifsta->timer, jiffies +
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment