]> git.baikalelectronics.ru Git - kernel.git/commit
rtw88: use read_poll_timeout instead of fixed sleep
authorChin-Yen Lee <timlee@realtek.com>
Wed, 28 Jul 2021 01:43:31 +0000 (09:43 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Sat, 21 Aug 2021 19:19:14 +0000 (22:19 +0300)
commita0579361b6c1cab03783d65426e9aa5c17304753
tree371c83af30d2e948bf74e226d4dd667e2192e210
parent8e696288f6a547542bd4334e01c17e694ad00119
rtw88: use read_poll_timeout instead of fixed sleep

In current wow flow, driver calls rtw_wow_fw_start and sleep for 100ms,
to wait firmware finish preliminary work and then update the value of
WOWLAN_WAKE_REASON register to zero. But later firmware will start wow
function with power-saving mode, in which mode the value of
WOWLAN_WAKE_REASON register is 0xea. So driver may get 0xea value and
return fail. We use read_poll_timeout instead to check the value to avoid
this issue.

Signed-off-by: Chin-Yen Lee <timlee@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210728014335.8785-2-pkshih@realtek.com
drivers/net/wireless/realtek/rtw88/wow.c