aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vasanth@atheros.com>2009-02-02 23:39:49 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-09 15:03:48 -0500
commitd43e87868f67c5b52defd8d82bc3f54347ed2408 (patch)
treecc8a150a580bcdbadbaab64165c6e2ad4f84d7a3 /net/mac80211
parentde9f97efb2ea2a32a610932d881e4d3653e0f932 (diff)
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: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/mlme.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 73808780f538..57967d32e5fd 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1042,6 +1042,7 @@ static void ieee80211_associated(struct ieee80211_sub_if_data *sdata,
1042 struct ieee80211_local *local = sdata->local; 1042 struct ieee80211_local *local = sdata->local;
1043 struct sta_info *sta; 1043 struct sta_info *sta;
1044 int disassoc; 1044 int disassoc;
1045 bool remove_bss = false;
1045 1046
1046 /* TODO: start monitoring current AP signal quality and number of 1047 /* TODO: start monitoring current AP signal quality and number of
1047 * missed beacons. Scan other channels every now and then and search 1048 * 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,
1067 "range\n", 1068 "range\n",
1068 sdata->dev->name, ifsta->bssid); 1069 sdata->dev->name, ifsta->bssid);
1069 disassoc = 1; 1070 disassoc = 1;
1071 remove_bss = true;
1070 } else 1072 } else
1071 ieee80211_send_probe_req(sdata, ifsta->bssid, 1073 ieee80211_send_probe_req(sdata, ifsta->bssid,
1072 ifsta->ssid, 1074 ifsta->ssid,
@@ -1086,12 +1088,24 @@ static void ieee80211_associated(struct ieee80211_sub_if_data *sdata,
1086 1088
1087 rcu_read_unlock(); 1089 rcu_read_unlock();
1088 1090
1089 if (disassoc) 1091 if (disassoc) {
1090 ieee80211_set_disassoc(sdata, ifsta, true, true, 1092 ieee80211_set_disassoc(sdata, ifsta, true, true,
1091 WLAN_REASON_PREV_AUTH_NOT_VALID); 1093 WLAN_REASON_PREV_AUTH_NOT_VALID);
1092 else 1094 if (remove_bss) {
1095 struct ieee80211_bss *bss;
1096
1097 bss = ieee80211_rx_bss_get(local, ifsta->bssid,
1098 local->hw.conf.channel->center_freq,
1099 ifsta->ssid, ifsta->ssid_len);
1100 if (bss) {
1101 atomic_dec(&bss->users);
1102 ieee80211_rx_bss_put(local, bss);
1103 }
1104 }
1105 } else {
1093 mod_timer(&ifsta->timer, jiffies + 1106 mod_timer(&ifsta->timer, jiffies +
1094 IEEE80211_MONITORING_INTERVAL); 1107 IEEE80211_MONITORING_INTERVAL);
1108 }
1095} 1109}
1096 1110
1097 1111