1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Wed, 11 Jan 2017 23:30:20 +0100
3 Subject: [PATCH] mac80211: initialize SMPS field in HT capabilities
5 ibss and mesh modes copy the ht capabilites from the band without
6 overriding the SMPS state. Unfortunately the default value 0 for the
7 SMPS field means static SMPS instead of disabled.
9 This results in HT ibss and mesh setups using only single-stream rates,
10 even though SMPS is not supposed to be active.
12 Initialize SMPS to disabled for all bands on ieee80211_hw_register to
13 ensure that the value is sane where it is not overriden with the real
16 Reported-by: Elektra Wagenrad <onelektra@gmx.net>
17 Signed-off-by: Felix Fietkau <nbd@nbd.name>
20 --- a/net/mac80211/main.c
21 +++ b/net/mac80211/main.c
22 @@ -908,10 +908,15 @@ int ieee80211_register_hw(struct ieee802
23 supp_ht = supp_ht || sband->ht_cap.ht_supported;
24 supp_vht = supp_vht || sband->vht_cap.vht_supported;
26 - if (sband->ht_cap.ht_supported)
28 - max(ieee80211_mcs_to_chains(&sband->ht_cap.mcs),
30 + if (!sband->ht_cap.ht_supported)
34 + max(ieee80211_mcs_to_chains(&sband->ht_cap.mcs),
37 + sband->ht_cap.cap |= WLAN_HT_CAP_SM_PS_DISABLED <<
38 + IEEE80211_HT_CAP_SM_PS_SHIFT;
40 /* TODO: consider VHT for RX chains, hopefully it's the same */