mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 08:15:07 -04:00
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:
committed by
Ping-Ke Shih
parent
2c0810030c
commit
000e63e67a
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user