RE: [PATCH rtw-next 5/5] wifi: rtlwifi: rtl8192d: let the firmware use all rates
From: Ping-Ke Shih
Date: Sun Nov 08 2026 - 20:56:30 EST
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 ?
> 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?
> 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.
>
> 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.
> break;
> case WIRELESS_MODE_A:
> ratr_index = RATR_INX_WIRELESS_G;
> @@ -922,7 +922,7 @@ static void rtl92d_update_hal_rate_mask(struct ieee80211_hw *hw,
> else if (rssi_level == 2)
> ratr_bitmap &= 0x0007f000;
> else
> - ratr_bitmap &= 0x0007f005;
> + ratr_bitmap &= 0x000fffff;
For N mode, it wants to jump to MCS rate quickly I guess.
> } else {
> if (rtlphy->rf_type == RF_1T2R ||
> rtlphy->rf_type == RF_1T1R) {
[...]