wifi: rtw89: check if atomic before queuing c2h
authorZong-Zhe Yang <kevin_yang@realtek.com>
Tue, 29 Nov 2022 08:31:26 +0000 (16:31 +0800)
committerKalle Valo <kvalo@kernel.org>
Thu, 1 Dec 2022 11:04:26 +0000 (13:04 +0200)
commit860e8263ae92667a2002163886fd2ebd8c67f699
tree17efb9a928303432b865edf5308446362f678b46
parent38f25dec521edfa289fa0b829676927b13fede91
wifi: rtw89: check if atomic before queuing c2h

Before queuing C2H work, we check atomicity of the C2H's handler first now.
If atomic or lock-free, handle it directly; otherwise, handle it with mutex
in work as previous. This prepares for MAC MCC C2Hs which require to be
processed directly. And, their handlers will be functions which can be
considered atomic.

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/20221129083130.45708-3-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/fw.c
drivers/net/wireless/realtek/rtw89/fw.h
drivers/net/wireless/realtek/rtw89/mac.c
drivers/net/wireless/realtek/rtw89/mac.h