OSDN Git Service

mac80211: allow overriding HT STBC capabilities
authorSergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Tue, 8 Jan 2019 20:31:49 +0000 (23:31 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Sat, 19 Jan 2019 08:53:49 +0000 (09:53 +0100)
commitd9bb410888ce1354ce29dcde671e1e21cc0c64cd
tree68d1befce8dff78404c5d6194adeddc68e895ed9
parentb4809e9484da147dc82a31b961df111eee72201a
mac80211: allow overriding HT STBC capabilities

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.

The reason why RX/TX STBC capabilities are not modified for mac80211
drivers is as follows. All drivers need to specify supported HT/VHT
overrides explicitly: see ht_capa_mod_mask and vht_capa_mod_mask fields
of wiphy structure. Only supported overrides will be passed to drivers by
cfg80211_connect and cfg80211_mlme_assoc operations: see bitwise 'AND'
performed by cfg80211_oper_and_ht_capa and cfg80211_oper_and_vht_capa.

This commit adds RX/TX STBC HT capabilities to mac80211_ht_capa_mod_mask,
allowing their modifications, as well as applies requested STBC
modifications in function ieee80211_apply_htcap_overrides.

Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/ht.c
net/mac80211/main.c