aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Pchelin <misha@FreeBSD.org>2023-04-14 15:16:29 +0000
committerMikhail Pchelin <misha@FreeBSD.org>2023-04-14 15:16:29 +0000
commitea26545cc573ff7e1f69c7cecaf6773e628b6aac (patch)
tree3705f9fd87aa026ec8b531847f6893d4d5492175
parentd1b6271118188dd25a18f2372ab1d3004335ea3c (diff)
downloadsrc-ea26545cc573ff7e1f69c7cecaf6773e628b6aac.tar.gz
src-ea26545cc573ff7e1f69c7cecaf6773e628b6aac.zip
net80211: wrong transmit MCS set in HT cap IE
Current code checks whether or not txstreams are equal to rxstreams and if it isn't - sets needed bits in "Transmit MCS Set". But if they are equal it sets whole set to zero, which contradicts the standard, if tx and rx streams are equal 'Tx MCS Set Defined' (table 9-186, IEEE Std 802.11-2020) must be set to one. Reviewed by: bz Approved by: bz Sponsored by: Serenity Cybersecurity, LLC Differential Revision: https://reviews.freebsd.org/D39476
-rw-r--r--sys/net80211/ieee80211_ht.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c
index 2fbb5a10febf..f98316bc5088 100644
--- a/sys/net80211/ieee80211_ht.c
+++ b/sys/net80211/ieee80211_ht.c
@@ -3209,14 +3209,14 @@ ieee80211_set_mcsset(struct ieee80211com *ic, uint8_t *frm)
}
}
+ txparams = 0x1; /* TX MCS set defined */
if (ic->ic_rxstream != ic->ic_txstream) {
- txparams = 0x1; /* TX MCS set defined */
txparams |= 0x2; /* TX RX MCS not equal */
txparams |= (ic->ic_txstream - 1) << 2; /* num TX streams */
if (ic->ic_htcaps & IEEE80211_HTC_TXUNEQUAL)
txparams |= 0x16; /* TX unequal modulation sup */
- } else
- txparams = 0;
+ }
+
frm[12] = txparams;
}