Re: [PATCH rtw-next 5/5] wifi: rtlwifi: rtl8192d: let the firmware use all rates
From: Jie Feng
Date: Sun Nov 08 2026 - 21:46:43 EST
On Mon, 9 Nov 2026 at 08:56, Ping-Ke Shih <pkshih@xxxxxxxxxxx> wrote:
>
> Ho Jie Feng <hjf3108@xxxxxxxxx> wrote:
> > The rate mask is chosen based on rssi_level, however rssi_level
> > is always 0,
>
> Should we fix it ?
The vendor driver for rtl8192du also doesn't do the rssi_level update
It is not compiled due to the #if 0
https://github.com/lwfinger/rtl8192du/blob/master/hal/rtl8192d_dm.c#L2624
Therefore, I'm not sure if it is okay to port it over.
> > since:
> > - for rtl8192de, call to rtl92d_dm_refresh_rate_adaptive_mask is
> > commented out and function is not implemented
> > - for rtl8192du, it is also not called.
> >
> > This makes the branch always choose less than optimal allowed MCS rates.
> > Enable all the rates.
> >
> > Test results (2.4 GHz):
> > before after
> > TX 6.4 12.6
>
> How about the rate before/after? I think the highest rate will be similar
> or the same?
Highest rate will be similar, but I saw it using more intermediate rates.
> > RX 32.0 39.1
>
> You change many rate masks for different wireless modes, so please provide
> more experiments. Especially you need tests for a clean & noisy environments.
So this patch by itself is more of an RFC, and I might drop it in v2
if it changes
behaviour too much in different circumstances.
> >
> > Signed-off-by: Ho Jie Feng <hjf3108@xxxxxxxxx>
> > ---
> > .../wireless/realtek/rtlwifi/rtl8192d/hw_common.c | 12 ++++++------
> > 1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c
> > b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c
> > index cfefbe86380fbc..0c921c049b5178 100644
> > --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c
> > +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c
> > @@ -903,7 +903,7 @@ static void rtl92d_update_hal_rate_mask(struct ieee80211_hw *hw,
> > else if (rssi_level == 2)
> > ratr_bitmap &= 0x00000ff0;
> > else
> > - ratr_bitmap &= 0x00000ff5;
> > + ratr_bitmap &= 0x00000fff;
>
> This mask means all 12 OFDM rates. I guess original design wants to select
> higher rate quickly.
> ...
> For N mode, it wants to jump to MCS rate quickly I guess.
That makes sense, I will leave it out for v2.
> > } else {
> > if (rtlphy->rf_type == RF_1T2R ||
> > rtlphy->rf_type == RF_1T1R) {
>
> [...]
>
>