diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/mlme.c | 18 |
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 | ||