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
This commit is contained in:
Mikhail Pchelin 2023-04-14 18:16:29 +03:00
parent d1b6271118
commit ea26545cc5

View File

@ -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;
}