]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: rtw88: Handle C2H_ADAPTIVITY in rtw_fw_c2h_cmd_handle()
authorBitterblue Smith <rtl8821cerfe2@gmail.com>
Wed, 18 Dec 2024 22:34:42 +0000 (00:34 +0200)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 23 Dec 2024 08:05:49 +0000 (16:05 +0800)
commit13221be72034d1c34630ab124c43438aefe7e656
tree0dfdd00ba21d1669f3cde1b4635ae394dabf2b2c
parente9048e2935f7d797c2ba047c15b705b57c2fa99a
wifi: rtw88: Handle C2H_ADAPTIVITY in rtw_fw_c2h_cmd_handle()

The firmware message C2H_ADAPTIVITY is currently handled in
rtw_fw_c2h_cmd_rx_irqsafe(), which runs in the RX workqueue, but it's
not "irqsafe" with USB because it sleeps (reads hardware registers).
This becomes a problem after the next patch, which will create the RX
workqueue with the flag WQ_BH.

To avoid sleeping when it's not allowed, handle C2H_ADAPTIVITY in
rtw_fw_c2h_cmd_handle(), which runs in the c2h workqueue.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/96e52b03-be8d-4050-ae71-bfdb478ff42f@gmail.com
drivers/net/wireless/realtek/rtw88/fw.c