summaryrefslogtreecommitdiff
path: root/net/mac80211/chan.c
diff options
context:
space:
mode:
authorIlan Peer <ilan.peer@intel.com>2015-12-13 13:41:43 +0200
committerJohannes Berg <johannes.berg@intel.com>2016-02-24 09:04:19 +0100
commita7201a6c5ea0157e96d17240d185a538bfdb7038 (patch)
tree83db0d468d7db0d7a1cb290b903e820baa987402 /net/mac80211/chan.c
parent178830481eee5eea147a1c8fab67a96e09d80345 (diff)
downloadlinux-sh-a7201a6c5ea0157e96d17240d185a538bfdb7038.tar.gz
mac80211: Recalc min chandef when station is associated
The minimum chandef bandwidth calculation was done only in case a new station was inserted (or when an existing station was removed). However, it is possible that stations are inserted before they are associated, e.g., when FULL_AP_CLIENT_STATE is supported and user space adds stations unassociated. Fix this by calling ieee80211_recalc_min_chandef() whenever a station transitions in/out the associated state, and only consider station marked as associated. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/chan.c')
-rw-r--r--net/mac80211/chan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index 1d1b9b7bdefe..283981108ca8 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -231,7 +231,7 @@ ieee80211_get_max_required_bw(struct ieee80211_sub_if_data *sdata)
!(sta->sdata->bss && sta->sdata->bss == sdata->bss))
continue;
- if (!sta->uploaded)
+ if (!sta->uploaded || !test_sta_flag(sta, WLAN_STA_ASSOC))
continue;
max_bw = max(max_bw, ieee80211_get_sta_bw(&sta->sta));