rtw89: 8852c: modify PCIE prebkf time

Prebkf time is to inform generating tx command if remaining backoff
time less than this setting value.
It might cause SER if generating tx command early in security mode.

Signed-off-by: Chia-Yuan Li <leo.li@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220704023453.19935-6-pkshih@realtek.com
This commit is contained in:
Chia-Yuan Li 2022-07-04 10:34:52 +08:00 committed by Kalle Valo
parent 8676031bae
commit 60b2ede9dd

View file

@ -1747,6 +1747,7 @@ static int scheduler_init(struct rtw89_dev *rtwdev, u8 mac_idx)
{
u32 ret;
u32 reg;
u32 val;
ret = rtw89_mac_check_mac_en(rtwdev, mac_idx, RTW89_CMAC_SEL);
if (ret)
@ -1764,7 +1765,16 @@ static int scheduler_init(struct rtw89_dev *rtwdev, u8 mac_idx)
rtw89_write32_clr(rtwdev, reg, B_AX_BTCCA_EN);
reg = rtw89_mac_reg_by_idx(R_AX_PREBKF_CFG_0, mac_idx);
rtw89_write32_mask(rtwdev, reg, B_AX_PREBKF_TIME_MASK, SCH_PREBKF_24US);
if (rtwdev->chip->chip_id == RTL8852C) {
val = rtw89_read32_mask(rtwdev, R_AX_SEC_ENG_CTRL,
B_AX_TX_PARTIAL_MODE);
if (!val)
rtw89_write32_mask(rtwdev, reg, B_AX_PREBKF_TIME_MASK,
SCH_PREBKF_24US);
} else {
rtw89_write32_mask(rtwdev, reg, B_AX_PREBKF_TIME_MASK,
SCH_PREBKF_24US);
}
return 0;
}