1 From 86d04f8f991a0509e318fe886d5a1cf795736c7d Mon Sep 17 00:00:00 2001
2 From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
3 Date: Tue, 18 Feb 2025 01:29:52 +0200
4 Subject: [PATCH] wifi: rtw88: Fix rtw_desc_to_mcsrate() to handle MCS16-31
6 This function translates the rate number reported by the hardware into
7 something mac80211 can understand. It was ignoring the 3SS and 4SS HT
8 rates. Translate them too.
10 Also set *nss to 0 for the HT rates, just to make sure it's
13 Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
14 Acked-by: Ping-Ke Shih <pkshih@realtek.com>
15 Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
16 Link: https://patch.msgid.link/d0a5a86b-4869-47f6-a5a7-01c0f987cc7f@gmail.com
18 drivers/net/wireless/realtek/rtw88/util.c | 3 ++-
19 1 file changed, 2 insertions(+), 1 deletion(-)
21 --- a/drivers/net/wireless/realtek/rtw88/util.c
22 +++ b/drivers/net/wireless/realtek/rtw88/util.c
23 @@ -101,7 +101,8 @@ void rtw_desc_to_mcsrate(u16 rate, u8 *m
25 *mcs = rate - DESC_RATEVHT4SS_MCS0;
26 } else if (rate >= DESC_RATEMCS0 &&
27 - rate <= DESC_RATEMCS15) {
28 + rate <= DESC_RATEMCS31) {
30 *mcs = rate - DESC_RATEMCS0;