On 13/02/2025 09:30, Ping-Ke Shih wrote: > Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx> wrote: >> This function translates the rate number reported by the hardware into >> something mac80211 can understand. It was ignoring the 3SS and 4SS HT >> rates. >> >> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx> >> --- >> drivers/net/wireless/realtek/rtw88/util.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/net/wireless/realtek/rtw88/util.c b/drivers/net/wireless/realtek/rtw88/util.c >> index e222d3c01a77..ba02ba72e104 100644 >> --- a/drivers/net/wireless/realtek/rtw88/util.c >> +++ b/drivers/net/wireless/realtek/rtw88/util.c >> @@ -101,7 +101,7 @@ void rtw_desc_to_mcsrate(u16 rate, u8 *mcs, u8 *nss) >> *nss = 4; >> *mcs = rate - DESC_RATEVHT4SS_MCS0; >> } else if (rate >= DESC_RATEMCS0 && >> - rate <= DESC_RATEMCS15) { >> + rate <= DESC_RATEMCS31) { >> *mcs = rate - DESC_RATEMCS0; > > Somehow, we don't set *nss in this case. The caller rtw_fw_ra_report_iter() > doesn't initialize nss, so there is potential problem. > > I assumed it's not needed because the MCS index implies the NSS, but I can add that: *nss = *mcs / 8 + 1;