aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-07-22 08:50:47 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-08-15 08:38:08 -0400
commita74a8c846fb699f3277c0c21278bd4c414074b4a (patch)
tree35650df83624505b2a90a4195f350f0e3ecb3800 /net/mac80211/cfg.c
parentc9d26423e56ce1ab4d786f92aebecf859d419293 (diff)
mac80211: don't duplicate station QoS capability data
We currently track the QoS capability twice: for all peer stations in the WLAN_STA_WME flag, and for any clients associated to an AP interface separately for drivers in the sta->sta.wme field. Remove the WLAN_STA_WME flag and track the capability only in the driver-visible field, getting rid of the limitation that the field is only valid in AP mode. Reviewed-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 927b4ea0128b..4d8989b87960 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1011,15 +1011,8 @@ static int sta_apply_parameters(struct ieee80211_local *local,
1011 clear_sta_flag(sta, WLAN_STA_SHORT_PREAMBLE); 1011 clear_sta_flag(sta, WLAN_STA_SHORT_PREAMBLE);
1012 } 1012 }
1013 1013
1014 if (mask & BIT(NL80211_STA_FLAG_WME)) { 1014 if (mask & BIT(NL80211_STA_FLAG_WME))
1015 if (set & BIT(NL80211_STA_FLAG_WME)) { 1015 sta->sta.wme = set & BIT(NL80211_STA_FLAG_WME);
1016 set_sta_flag(sta, WLAN_STA_WME);
1017 sta->sta.wme = true;
1018 } else {
1019 clear_sta_flag(sta, WLAN_STA_WME);
1020 sta->sta.wme = false;
1021 }
1022 }
1023 1016
1024 if (mask & BIT(NL80211_STA_FLAG_MFP)) { 1017 if (mask & BIT(NL80211_STA_FLAG_MFP)) {
1025 if (set & BIT(NL80211_STA_FLAG_MFP)) 1018 if (set & BIT(NL80211_STA_FLAG_MFP))
@@ -3352,7 +3345,7 @@ static int ieee80211_probe_client(struct wiphy *wiphy, struct net_device *dev,
3352 band = chanctx_conf->def.chan->band; 3345 band = chanctx_conf->def.chan->band;
3353 sta = sta_info_get_bss(sdata, peer); 3346 sta = sta_info_get_bss(sdata, peer);
3354 if (sta) { 3347 if (sta) {
3355 qos = test_sta_flag(sta, WLAN_STA_WME); 3348 qos = sta->sta.wme;
3356 } else { 3349 } else {
3357 rcu_read_unlock(); 3350 rcu_read_unlock();
3358 return -ENOLINK; 3351 return -ENOLINK;