Skip to content

Commit 43071d8

Browse files
nbd168jmberg-intel
authored andcommitted
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 <[email protected]> Signed-off-by: Felix Fietkau <[email protected]> [move VHT TODO comment to a better place] Signed-off-by: Johannes Berg <[email protected]>
1 parent d2941df commit 43071d8

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

net/mac80211/main.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -913,12 +913,17 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
913913
supp_ht = supp_ht || sband->ht_cap.ht_supported;
914914
supp_vht = supp_vht || sband->vht_cap.vht_supported;
915915

916-
if (sband->ht_cap.ht_supported)
917-
local->rx_chains =
918-
max(ieee80211_mcs_to_chains(&sband->ht_cap.mcs),
919-
local->rx_chains);
916+
if (!sband->ht_cap.ht_supported)
917+
continue;
920918

921919
/* 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;
922927
}
923928

924929
/* if low-level driver supports AP, we also support VLAN */

0 commit comments

Comments
 (0)