]> git.baikalelectronics.ru Git - kernel.git/commit
rtw88: decompose while(1) loop of power sequence polling command
authorPing-Ke Shih <pkshih@realtek.com>
Wed, 22 Apr 2020 03:46:03 +0000 (11:46 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 23 Apr 2020 04:47:23 +0000 (07:47 +0300)
commit7e735efdf644404ebeea17997a0b5e00a5b3d1ca
tree671c42b33ed3d8eecd30546118d21b91295ee78c
parent9ee9682960f3911d5eee7b04e993fed2e9157a9e
rtw88: decompose while(1) loop of power sequence polling command

The power polling command is one kind of power sequence commands. It's used
to check hardware situation, and subsequent comamnds will be executed if
hardware is ready. A special case is PCIE must toggle BIT_PFM_WOWL and try
again if first try is failed.

In order to reduce indentation to understand the code easier, move polling
part to a separate function. Then, the 'while (1)...loop' is replaced by
two statements to do first try and retry.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200422034607.28747-5-yhchuang@realtek.com
drivers/net/wireless/realtek/rtw88/mac.c