From: Ho Jie Feng <hjf3108@gmail.com>
To: Ping-Ke Shih <pkshih@realtek.com>, linux-wireless@vger.kernel.org
Cc: Bitterblue Smith <rtl8821cerfe2@gmail.com>, linux-kernel@vger.kernel.org
Subject: [PATCH rtw-next 5/5] wifi: rtlwifi: rtl8192d: let the firmware use all rates
Date: Tue, 3 Nov 2026 17:52:54 +0800 [thread overview]
Message-ID: <20261103095256.949327-6-hjf3108@gmail.com> (raw)
In-Reply-To: <20261103095256.949327-1-hjf3108@gmail.com>
The rate mask is chosen based on rssi_level, however rssi_level
is always 0, 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
RX 32.0 39.1
Signed-off-by: Ho Jie Feng <hjf3108@gmail.com>
---
.../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;
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;
} else {
if (rtlphy->rf_type == RF_1T2R ||
rtlphy->rf_type == RF_1T1R) {
@@ -932,14 +932,14 @@ static void rtl92d_update_hal_rate_mask(struct ieee80211_hw *hw,
else if (rssi_level == 2)
ratr_bitmap &= 0x000ff000;
else
- ratr_bitmap &= 0x000ff015;
+ ratr_bitmap &= 0x000fffff;
} else {
if (rssi_level == 1)
ratr_bitmap &= 0x000f0000;
else if (rssi_level == 2)
ratr_bitmap &= 0x000ff000;
else
- ratr_bitmap &= 0x000ff005;
+ ratr_bitmap &= 0x000fffff;
}
} else {
if (curtxbw_40mhz) {
@@ -948,14 +948,14 @@ static void rtl92d_update_hal_rate_mask(struct ieee80211_hw *hw,
else if (rssi_level == 2)
ratr_bitmap &= 0x0f0ff000;
else
- ratr_bitmap &= 0x0f0ff015;
+ ratr_bitmap &= 0x0fffffff;
} else {
if (rssi_level == 1)
ratr_bitmap &= 0x0f0f0000;
else if (rssi_level == 2)
ratr_bitmap &= 0x0f0ff000;
else
- ratr_bitmap &= 0x0f0ff005;
+ ratr_bitmap &= 0x0fffffff;
}
}
}
--
2.53.0
next prev parent reply other threads:[~2026-11-03 9:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 9:52 [PATCH rtw-next 0/5] wifi: rtlwifi: rtl8192du fixes and additional support Ho Jie Feng
2026-11-03 9:52 ` [PATCH rtw-next 1/5] wifi: rtlwifi: rc: start no BA session for QoS null frames Ho Jie Feng
2026-11-08 4:08 ` Ping-Ke Shih
2026-11-08 18:11 ` Jie Feng
2026-11-09 2:49 ` Ping-Ke Shih
2026-11-03 9:52 ` [PATCH rtw-next 2/5] wifi: rtlwifi: rtl8192d: report no signal for frames without PHY status Ho Jie Feng
2026-11-08 4:13 ` Ping-Ke Shih
2026-11-08 18:12 ` Jie Feng
2026-11-09 2:51 ` Ping-Ke Shih
2026-11-03 9:52 ` [PATCH rtw-next 3/5] wifi: rtlwifi: usb: unify the RX code path Ho Jie Feng
2026-11-09 0:40 ` Ping-Ke Shih
2026-11-03 9:52 ` [PATCH rtw-next 4/5] wifi: rtlwifi: rtl8192du: enable USB RX aggregation Ho Jie Feng
2026-11-09 1:44 ` Ping-Ke Shih
2026-11-09 1:53 ` Jie Feng
2026-11-09 2:02 ` Ping-Ke Shih
2026-11-03 9:52 ` Ho Jie Feng [this message]
2026-11-09 1:56 ` [PATCH rtw-next 5/5] wifi: rtlwifi: rtl8192d: let the firmware use all rates Ping-Ke Shih
2026-11-09 2:44 ` Jie Feng
2026-11-09 2:58 ` Ping-Ke Shih
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261103095256.949327-6-hjf3108@gmail.com \
--to=hjf3108@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.com \
--cc=rtl8821cerfe2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.