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)
commitfd9ead385102652b43f628ca700810d343c52437
tree671c42b33ed3d8eecd30546118d21b91295ee78c
parent4e223a5f5342fab01ccebf87714401f559dcc791
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