From ea26545cc573ff7e1f69c7cecaf6773e628b6aac Mon Sep 17 00:00:00 2001 From: Mikhail Pchelin Date: Fri, 14 Apr 2023 18:16:29 +0300 Subject: [PATCH] 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 --- sys/net80211/ieee80211_ht.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index 2fbb5a10feb..f98316bc508 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; }