wifi: rtw89: scan offload wait for FW done ACK
authorZong-Zhe Yang <kevin_yang@realtek.com>
Wed, 19 Apr 2023 11:46:03 +0000 (11:46 +0000)
committerKalle Valo <kvalo@kernel.org>
Fri, 5 May 2023 11:59:34 +0000 (14:59 +0300)
commitb9b632f43f1c8b59ea3d23f7ea941616322dab5a
tree652a0767e18f48cd9d983ef470cd9222b3a1efb6
parent32bb12eb73dceeb78c04a46c333f6f319cf1cebd
wifi: rtw89: scan offload wait for FW done ACK

The following are scan offload related H2C (host to chip) function types.
* H2C_FUNC_ADD_SCANOFLD_CH
* H2C_FUNC_SCANOFLD
Before doing FW scan, we will continuously send multiple H2Cs with above
types which are used to tell FW the scan configuration of this time. But,
if FW doesn't handle one of these H2Cs well, the FW scan process might
not run as expected and driver should notice it early.

So, this commits makes scan offload related H2Cs wait for FW done ACK via
rtw89_wait_for_cond() and rtw89_complete_cond(). And, we check the return
code of these H2Cs from FW.

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/a15f4bd594f71d7602ea67698b035805143700c9.camel@realtek.com
drivers/net/wireless/realtek/rtw89/fw.c
drivers/net/wireless/realtek/rtw89/fw.h
drivers/net/wireless/realtek/rtw89/mac.c