diff options
author | Ping-Ke Shih <pkshih@realtek.com> | 2023-03-20 21:06:05 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2023-04-14 15:13:59 +0300 |
commit | b80ad23a8f2e0b63384cadc0aa2c1135b1dc03eb (patch) | |
tree | 811ecd64b891335ce6c0477414824c292c5e8723 /drivers/net/wireless/realtek/rtw89/core.h | |
parent | 639ec6d63588b7e7c2dfae1df447daf243fb8342 (diff) |
wifi: rtw89: use schedule_work to request firmware
Since we are going to load more than one firmware and some are not
presented or optional, using asynchronous API request_firmware_nowait()
will become complicated. Also, we want to use firmware_request_nowarn()
to avoid warning messages when loading optional files. So, use
schedule_work to be simpler.
To abstract loading a firmware or file, define a struct rtw89_fw_req_info
containing a struct firmware and a completion to ensure this firmware is
loaded completely.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230320130606.20777-3-pkshih@realtek.com
Diffstat (limited to 'drivers/net/wireless/realtek/rtw89/core.h')
-rw-r--r-- | drivers/net/wireless/realtek/rtw89/core.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/realtek/rtw89/core.h b/drivers/net/wireless/realtek/rtw89/core.h index 39083a0e6ce3..bd5578ca1636 100644 --- a/drivers/net/wireless/realtek/rtw89/core.h +++ b/drivers/net/wireless/realtek/rtw89/core.h @@ -3297,10 +3297,13 @@ struct rtw89_fw_suit { GET_FW_HDR_SUBVERSION(fw_hdr), \ GET_FW_HDR_SUBINDEX(fw_hdr)) -struct rtw89_fw_info { +struct rtw89_fw_req_info { const struct firmware *firmware; - struct rtw89_dev *rtwdev; struct completion completion; +}; + +struct rtw89_fw_info { + struct rtw89_fw_req_info req; u8 h2c_seq; u8 rec_seq; u8 h2c_counter; @@ -4018,6 +4021,7 @@ struct rtw89_dev { struct sk_buff_head c2h_queue; struct work_struct c2h_work; struct work_struct ips_work; + struct work_struct load_firmware_work; struct list_head early_h2c_list; |