wifi: rtw88: 8822c: replace msleep() with fsleep() for DPK delays

Replace msleep() with fsleep(), because msleep() may oversleep
to as much as 20 ms when used for a 10 ms delay.
According to the kernel documentation, fsleep() is more suitable
and aligns better with modern kernel style.

Signed-off-by: Chen Jung Ku <ku.loong@gapp.nthu.edu.tw>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260613170434.23645-1-ku.loong@gapp.nthu.edu.tw
This commit is contained in:
Chen Jung Ku
2026-06-14 01:04:34 +08:00
committed by Ping-Ke Shih
parent 2c0810030c
commit 000e63e67a

View File

@@ -3405,7 +3405,7 @@ static u8 rtw8822c_dpk_one_shot(struct rtw_dev *rtwdev, u8 path, u8 action)
rtw_write32_mask(rtwdev, REG_DPD_CTL0, BIT(12), 0x1);
rtw_write32_mask(rtwdev, REG_DPD_CTL0, BIT(12), 0x0);
rtw_write32_mask(rtwdev, REG_RXSRAM_CTL, BIT_RPT_SEL, 0x0);
msleep(10);
fsleep(10000);
if (!check_hw_ready(rtwdev, REG_STAT_RPT, BIT(31), 0x1)) {
result = 1;
rtw_dbg(rtwdev, RTW_DBG_RFK, "[DPK] one-shot over 20ms\n");
@@ -3418,7 +3418,7 @@ static u8 rtw8822c_dpk_one_shot(struct rtw_dev *rtwdev, u8 path, u8 action)
dpk_cmd = rtw8822c_dpk_get_cmd(rtwdev, action, path);
rtw_write32(rtwdev, REG_NCTL0, dpk_cmd);
rtw_write32(rtwdev, REG_NCTL0, dpk_cmd + 1);
msleep(10);
fsleep(10000);
if (!check_hw_ready(rtwdev, 0x2d9c, 0xff, 0x55)) {
result = 1;
rtw_dbg(rtwdev, RTW_DBG_RFK, "[DPK] one-shot over 20ms\n");