diff options
author | Kai-Heng Feng <kai.heng.feng@canonical.com> | 2020-04-23 10:30:07 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-05-06 11:30:34 +0300 |
commit | fd5d781964b05ab586e690923dba6eca3cc16723 (patch) | |
tree | 83f969c18484d68ec8403442e6e6a2eb721e1176 /drivers/net/wireless/realtek | |
parent | 57a29df341466b5cca43ba3d2d7064426727d7c3 (diff) | |
download | linux-fd5d781964b05ab586e690923dba6eca3cc16723.tar.xz |
rtw88: Use udelay instead of usleep in atomic context
It's incorrect to use usleep in atomic context.
Switch to a macro which uses udelay instead of usleep to prevent the issue.
Fixes: 6343a6d4b213 ("rtw88: Add delay on polling h2c command status bit")
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200423073007.3566-1-kai.heng.feng@canonical.com
Diffstat (limited to 'drivers/net/wireless/realtek')
-rw-r--r-- | drivers/net/wireless/realtek/rtw88/fw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/fw.c b/drivers/net/wireless/realtek/rtw88/fw.c index dde7823143ea..5e981fdeee3c 100644 --- a/drivers/net/wireless/realtek/rtw88/fw.c +++ b/drivers/net/wireless/realtek/rtw88/fw.c @@ -228,9 +228,9 @@ static void rtw_fw_send_h2c_command(struct rtw_dev *rtwdev, goto out; } - ret = read_poll_timeout(rtw_read8, box_state, - !((box_state >> box) & 0x1), 100, 3000, false, - rtwdev, REG_HMETFR); + ret = read_poll_timeout_atomic(rtw_read8, box_state, + !((box_state >> box) & 0x1), 100, 3000, + false, rtwdev, REG_HMETFR); if (ret) { rtw_err(rtwdev, "failed to send h2c command\n"); |