Message ID | 20190108203149.9017-1-geomatsi@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Johannes Berg |
Headers | show |
Series | mac80211: allow overriding HT STBC capabilities | expand |
> From: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> > > Allow user to override STBC configuration for Rx and Tx spatial streams. > In practice RX/TX STBC settings can be modified using appropriate > options in wpa_supplicant configuration file: > tx_stbc=-1..1 > rx_stbc=-1..3 > > This functionality has been added to wpa_supplicant in commit cdeea70f59d0. > > In FullMAC case these STBC options are passed to drivers by cfg80211 > connect callback in fields of cfg80211_connect_params structure. > However for mac80211 drivers, e.g. for mac80211_hwsim, > overrides for STBC settings are ignored. ... > Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> > --- > net/mac80211/ht.c | 8 ++++++++ > net/mac80211/main.c | 2 ++ > 2 files changed, 10 insertions(+) FWIW, the accompanying RFC patch extending STBC tests in hwsim hostapd test suite has been posted to hostapd mailing list: http://lists.infradead.org/pipermail/hostap/2019-January/039274.html Regards, Sergey
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c index f849ea814993..e03c46ac8e4d 100644 --- a/net/mac80211/ht.c +++ b/net/mac80211/ht.c @@ -107,6 +107,14 @@ void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata, __check_htcap_enable(ht_capa, ht_capa_mask, ht_cap, IEEE80211_HT_CAP_40MHZ_INTOLERANT); + /* Allow user to enable TX STBC bit */ + __check_htcap_enable(ht_capa, ht_capa_mask, ht_cap, + IEEE80211_HT_CAP_TX_STBC); + + /* Allow user to configure RX STBC bits */ + if (ht_capa_mask->cap_info & IEEE80211_HT_CAP_RX_STBC) + ht_cap->cap |= ht_capa->cap_info & IEEE80211_HT_CAP_RX_STBC; + /* Allow user to decrease AMPDU factor */ if (ht_capa_mask->ampdu_params_info & IEEE80211_HT_AMPDU_PARM_FACTOR) { diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 87a729926734..1114ee217bd6 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -478,6 +478,8 @@ static const struct ieee80211_ht_cap mac80211_ht_capa_mod_mask = { IEEE80211_HT_CAP_MAX_AMSDU | IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_40 | + IEEE80211_HT_CAP_TX_STBC | + IEEE80211_HT_CAP_RX_STBC | IEEE80211_HT_CAP_LDPC_CODING | IEEE80211_HT_CAP_40MHZ_INTOLERANT), .mcs = {