correct use of IEEE80211_VHT_CAP_RXSTBC_X
Subsystems (2)
cover correct use of IEEE80211_VHT_CAP_RXSTBC_X
Fix two slightly different problematic usages of IEEE80211_VHT_CAP_RXSTBC_[1234] as discussed on the list.
Danek Duvall (2):
mac80211: correct use of IEEE80211_VHT_CAP_RXSTBC_X
mac80211_hwsim: correct use of IEEE80211_VHT_CAP_RXSTBC_X
drivers/net/wireless/mac80211_hwsim.c | 3 --- net/mac80211/main.c | 5 +---- 2 files changed, 1 insertion(+), 7 deletions(-)
Signature · 1 line
2.11.0
PATCH 1/2 mac80211: correct use of IEEE80211_VHT_CAP_RXSTBC_X
The mod mask for VHT capabilities intends to say that you can override the number of STBC receive streams, and it does, but only by accident. The IEEE80211_VHT_CAP_RXSTBC_X aren't bits to be set, but values (albeit left-shifted). ORing the bits together gets the right answer, but we should use the _MASK macro here instead.
--- net/mac80211/main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
net/mac80211/main.c +1 -4
@@ -471,10 +471,7 @@ static const struct ieee80211_vht_cap mac80211_vht_capa_mod_mask = { cpu_to_le32(IEEE80211_VHT_CAP_RXLDPC | IEEE80211_VHT_CAP_SHORT_GI_80 | IEEE80211_VHT_CAP_SHORT_GI_160 | - IEEE80211_VHT_CAP_RXSTBC_1 | - IEEE80211_VHT_CAP_RXSTBC_2 | - IEEE80211_VHT_CAP_RXSTBC_3 | - IEEE80211_VHT_CAP_RXSTBC_4 | + IEEE80211_VHT_CAP_RXSTBC_MASK | IEEE80211_VHT_CAP_TXSTBC | IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE | IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE |
Signature · 1 line
2.11.0
PATCH 2/2 mac80211_hwsim: correct use of IEEE80211_VHT_CAP_RXSTBC_X
In reply to Danek DuvallThe mac80211_hwsim driver intends to say that it supports up to four STBC receive streams, but instead it ends up saying something undefined. The IEEE80211_VHT_CAP_RXSTBC_X macros aren't independent bits that can be ORed together, but values. In this case, _4 is the appropriate one to use.
--- drivers/net/wireless/mac80211_hwsim.c | 3 --- 1 file changed, 3 deletions(-)
drivers/net/wireless/mac80211_hwsim.c +0 -3
@@ -2820,9 +2820,6 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,IEEE80211_VHT_CAP_SHORT_GI_80 |IEEE80211_VHT_CAP_SHORT_GI_160 |IEEE80211_VHT_CAP_TXSTBC | -IEEE80211_VHT_CAP_RXSTBC_1 | -IEEE80211_VHT_CAP_RXSTBC_2 | -IEEE80211_VHT_CAP_RXSTBC_3 |IEEE80211_VHT_CAP_RXSTBC_4 |IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK ; sband->vht_cap.vht_mcs.rx_mcs_map =
Signature · 1 line
2.11.0