Skip to content

Commit 2685881

Browse files
committed
Merge: wifi: rtw89: 8852b: Improve the TX throughput with Realtek RTL8852BE
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5199 JIRA: https://issues.redhat.com/browse/RHEL-35542 The WirelessAX/Wifi6 test with Realtek RTL8852BE controller are getting the 800\~850Mbps of speed instead of the required speed of 80% of 1200Mbps. Resolution: * Realtek has enlarge AMSDU (Aggregate MAC Service Data Unit) limit to improve MAC efficient to get better TX throughput from 851 to \~910Mbps. * No change for RX throughput \~902Mbps. KB for more details: https://access.redhat.com/solutions/7084331 Tested-by: Narpat Mali <[email protected]> Signed-off-by: Narpat Mali <[email protected]> Approved-by: José Ignacio Tornos Martínez <[email protected]> Approved-by: Michal Schmidt <[email protected]> Approved-by: CKI KWF Bot <[email protected]> Merged-by: Rado Vrbovsky <[email protected]>
2 parents e347423 + 40b052f commit 2685881

File tree

5 files changed

+23
-2
lines changed

5 files changed

+23
-2
lines changed

drivers/net/wireless/realtek/rtw89/core.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6076,6 +6076,16 @@ static inline bool rtw89_is_mlo_1_1(struct rtw89_dev *rtwdev)
60766076
}
60776077
}
60786078

6079+
static inline bool rtw89_is_rtl885xb(struct rtw89_dev *rtwdev)
6080+
{
6081+
enum rtw89_core_chip_id chip_id = rtwdev->chip->chip_id;
6082+
6083+
if (chip_id == RTL8852B || chip_id == RTL8851B)
6084+
return true;
6085+
6086+
return false;
6087+
}
6088+
60796089
int rtw89_core_tx_write(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif,
60806090
struct ieee80211_sta *sta, struct sk_buff *skb, int *qsel);
60816091
int rtw89_h2c_tx(struct rtw89_dev *rtwdev,

drivers/net/wireless/realtek/rtw89/mac.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2723,6 +2723,7 @@ bool rtw89_mac_is_qta_dbcc(struct rtw89_dev *rtwdev, enum rtw89_qta_mode mode)
27232723

27242724
static int ptcl_init_ax(struct rtw89_dev *rtwdev, u8 mac_idx)
27252725
{
2726+
enum rtw89_core_chip_id chip_id = rtwdev->chip->chip_id;
27262727
u32 val, reg;
27272728
int ret;
27282729

@@ -2761,6 +2762,12 @@ static int ptcl_init_ax(struct rtw89_dev *rtwdev, u8 mac_idx)
27612762
B_AX_SPE_RPT_PATH_MASK, FWD_TO_WLCPU);
27622763
}
27632764

2765+
if (chip_id == RTL8852A || rtw89_is_rtl885xb(rtwdev)) {
2766+
reg = rtw89_mac_reg_by_idx(rtwdev, R_AX_AGG_LEN_VHT_0, mac_idx);
2767+
rtw89_write32_mask(rtwdev, reg,
2768+
B_AX_AMPDU_MAX_LEN_VHT_MASK, 0x3FF80);
2769+
}
2770+
27642771
return 0;
27652772
}
27662773

drivers/net/wireless/realtek/rtw89/reg.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2435,6 +2435,10 @@
24352435
#define B_AX_RTS_TXTIME_TH_MASK GENMASK(15, 8)
24362436
#define B_AX_RTS_LEN_TH_MASK GENMASK(7, 0)
24372437

2438+
#define R_AX_AGG_LEN_VHT_0 0xC618
2439+
#define R_AX_AGG_LEN_VHT_0_C1 0xE618
2440+
#define B_AX_AMPDU_MAX_LEN_VHT_MASK GENMASK(19, 0)
2441+
24382442
#define S_AX_CTS2S_TH_SEC_256B 1
24392443
#define R_AX_SIFS_SETTING 0xC624
24402444
#define R_AX_SIFS_SETTING_C1 0xE624

drivers/net/wireless/realtek/rtw89/rtw8852b.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2575,7 +2575,7 @@ const struct rtw89_chip_info rtw8852b_chip_info = {
25752575
.fifo_size = 196608,
25762576
.small_fifo_size = true,
25772577
.dle_scc_rsvd_size = 98304,
2578-
.max_amsdu_limit = 3500,
2578+
.max_amsdu_limit = 5000,
25792579
.dis_2g_40m_ul_ofdma = true,
25802580
.rsvd_ple_ofst = 0x2f800,
25812581
.hfc_param_ini = rtw8852b_hfc_param_ini_pcie,

drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#define RTW8852B_RF_REL_VERSION 34
2121
#define RTW8852B_DPK_VER 0x0d
2222
#define RTW8852B_DPK_RF_PATH 2
23-
#define RTW8852B_DPK_KIP_REG_NUM 2
23+
#define RTW8852B_DPK_KIP_REG_NUM 3
2424

2525
#define _TSSI_DE_MASK GENMASK(21, 12)
2626
#define ADDC_T_AVG 100

0 commit comments

Comments
 (0)