Skip to content

Commit 40b052f

Browse files
author
Narpat Mali
committed
wifi: rtw89: limit the PPDU length for VHT rate to 0x40000
JIRA: https://issues.redhat.com/browse/RHEL-35542 commit 1244109 Author: Chia-Yuan Li <[email protected]> Date: Thu Aug 15 21:40:54 2024 +0800 wifi: rtw89: limit the PPDU length for VHT rate to 0x40000 If the PPDU length for VHT rate exceeds 0x40000, calculating the PSDU length will overflow. TMAC will determine the length to be too small and as a result, all packets will be sent as ZLD (Zero Length Delimiter). Fixes: 5f7e92c ("wifi: rtw89: 8852b: set AMSDU limit to 5000") Signed-off-by: Chia-Yuan Li <[email protected]> Signed-off-by: Ping-Ke Shih <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Narpat Mali <[email protected]>
1 parent 477e475 commit 40b052f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

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

0 commit comments

Comments
 (0)