diff options
author | Felix Fietkau <nbd@nbd.name> | 2017-01-13 05:28:25 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-01-13 05:31:26 -0500 |
commit | 43071d8fb3b7f589d72663c496a6880fb097533c (patch) | |
tree | c5e77fe5ca06dd4c5b9cb849674ea4abd3515b12 /net/mac80211/main.c | |
parent | d2941df8fbd9708035d66d889ada4d3d160170ce (diff) |
mac80211: initialize SMPS field in HT capabilities
ibss and mesh modes copy the ht capabilites from the band without
overriding the SMPS state. Unfortunately the default value 0 for the
SMPS field means static SMPS instead of disabled.
This results in HT ibss and mesh setups using only single-stream rates,
even though SMPS is not supposed to be active.
Initialize SMPS to disabled for all bands on ieee80211_hw_register to
ensure that the value is sane where it is not overriden with the real
SMPS state.
Reported-by: Elektra Wagenrad <onelektra@gmx.net>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
[move VHT TODO comment to a better place]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 1822c77f2b1c..56fb47953b72 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -913,12 +913,17 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) | |||
913 | supp_ht = supp_ht || sband->ht_cap.ht_supported; | 913 | supp_ht = supp_ht || sband->ht_cap.ht_supported; |
914 | supp_vht = supp_vht || sband->vht_cap.vht_supported; | 914 | supp_vht = supp_vht || sband->vht_cap.vht_supported; |
915 | 915 | ||
916 | if (sband->ht_cap.ht_supported) | 916 | if (!sband->ht_cap.ht_supported) |
917 | local->rx_chains = | 917 | continue; |
918 | max(ieee80211_mcs_to_chains(&sband->ht_cap.mcs), | ||
919 | local->rx_chains); | ||
920 | 918 | ||
921 | /* TODO: consider VHT for RX chains, hopefully it's the same */ | 919 | /* TODO: consider VHT for RX chains, hopefully it's the same */ |
920 | local->rx_chains = | ||
921 | max(ieee80211_mcs_to_chains(&sband->ht_cap.mcs), | ||
922 | local->rx_chains); | ||
923 | |||
924 | /* no need to mask, SM_PS_DISABLED has all bits set */ | ||
925 | sband->ht_cap.cap |= WLAN_HT_CAP_SM_PS_DISABLED << | ||
926 | IEEE80211_HT_CAP_SM_PS_SHIFT; | ||
922 | } | 927 | } |
923 | 928 | ||
924 | /* if low-level driver supports AP, we also support VLAN */ | 929 | /* if low-level driver supports AP, we also support VLAN */ |