diff options
author | Felix Fietkau <nbd@nbd.name> | 2017-01-11 23:35:19 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2017-01-13 10:22:22 +0100 |
commit | 2b6284f5a8fa12e1b3241f0651859d4e45537eb5 (patch) | |
tree | 098756fa26b5c29ee9e644f9bf0eeebb7416d2e5 /package/kernel/mac80211/patches/348-mac80211-initialize-SMPS-field-in-HT-capabilities.patch | |
parent | 544dee575d1d879172620b1c20712ea61a3e0c21 (diff) | |
download | upstream-2b6284f5a8fa12e1b3241f0651859d4e45537eb5.tar.gz upstream-2b6284f5a8fa12e1b3241f0651859d4e45537eb5.tar.bz2 upstream-2b6284f5a8fa12e1b3241f0651859d4e45537eb5.zip |
mac80211: fix broken spatial multiplexing defaults
Most mac80211 drivers leave the SMPS field in the HT capabilities
uninitialized (unfortunately defaults to static SMPS), which leads to
some devices limiting themselves to single-stream rates in some modes
(mostly mesh and IBSS).
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211/patches/348-mac80211-initialize-SMPS-field-in-HT-capabilities.patch')
-rw-r--r-- | package/kernel/mac80211/patches/348-mac80211-initialize-SMPS-field-in-HT-capabilities.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/348-mac80211-initialize-SMPS-field-in-HT-capabilities.patch b/package/kernel/mac80211/patches/348-mac80211-initialize-SMPS-field-in-HT-capabilities.patch new file mode 100644 index 0000000000..118f535716 --- /dev/null +++ b/package/kernel/mac80211/patches/348-mac80211-initialize-SMPS-field-in-HT-capabilities.patch @@ -0,0 +1,41 @@ +From: Felix Fietkau <nbd@nbd.name> +Date: Wed, 11 Jan 2017 23:30:20 +0100 +Subject: [PATCH] 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> +--- + +--- a/net/mac80211/main.c ++++ b/net/mac80211/main.c +@@ -908,10 +908,15 @@ int ieee80211_register_hw(struct ieee802 + supp_ht = supp_ht || sband->ht_cap.ht_supported; + supp_vht = supp_vht || sband->vht_cap.vht_supported; + +- if (sband->ht_cap.ht_supported) +- local->rx_chains = +- max(ieee80211_mcs_to_chains(&sband->ht_cap.mcs), +- local->rx_chains); ++ if (!sband->ht_cap.ht_supported) ++ continue; ++ ++ local->rx_chains = ++ max(ieee80211_mcs_to_chains(&sband->ht_cap.mcs), ++ local->rx_chains); ++ ++ sband->ht_cap.cap |= WLAN_HT_CAP_SM_PS_DISABLED << ++ IEEE80211_HT_CAP_SM_PS_SHIFT; + + /* TODO: consider VHT for RX chains, hopefully it's the same */ + } |