Message ID | 9bb25bb0-ee46-4390-af6c-6bbd9edf3121@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | wifi: rtw88: Prepare to support RTL8814AU (part 2/2) | expand |
Bitterblue Smith <rtl8821cerfe2@gmail.com> 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. Translate them too. > > Also set *nss to 0 for the HT rates, just to make sure it's > initialised. > > Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> > --- > v2: > - Set *nss for the HT rates. > --- > drivers/net/wireless/realtek/rtw88/util.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/realtek/rtw88/util.c b/drivers/net/wireless/realtek/rtw88/util.c > index e222d3c01a77..9baafea65d64 100644 > --- a/drivers/net/wireless/realtek/rtw88/util.c > +++ b/drivers/net/wireless/realtek/rtw88/util.c > @@ -101,8 +101,9 @@ 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; > + *nss = 0; nit: In other branches, set *nss first and then *mcs. Please help keep the same order. > } > } > > -- > 2.48.1
diff --git a/drivers/net/wireless/realtek/rtw88/util.c b/drivers/net/wireless/realtek/rtw88/util.c index e222d3c01a77..9baafea65d64 100644 --- a/drivers/net/wireless/realtek/rtw88/util.c +++ b/drivers/net/wireless/realtek/rtw88/util.c @@ -101,8 +101,9 @@ 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; + *nss = 0; } }
This function translates the rate number reported by the hardware into something mac80211 can understand. It was ignoring the 3SS and 4SS HT rates. Translate them too. Also set *nss to 0 for the HT rates, just to make sure it's initialised. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> --- v2: - Set *nss for the HT rates. --- drivers/net/wireless/realtek/rtw88/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)