#include <linux/if_arp.h>
#include "cam.h"
#include "chan.h"
#include "coex.h"
#include "debug.h"
#include "fw.h"
#include "mac.h"
#include "phy.h"
#include "ps.h"
#include "reg.h"
#include "util.h"
#include "wow.h"
struct rtw89_eapol_2_of_2 { … } __packed;
struct rtw89_sa_query { … } __packed;
struct rtw89_arp_rsp { … } __packed;
static const u8 mss_signature[] = …;
rtw89_fw_element_arg;
struct rtw89_fw_element_handler { … };
static void rtw89_fw_c2h_cmd_handle(struct rtw89_dev *rtwdev,
struct sk_buff *skb);
static int rtw89_h2c_tx_and_wait(struct rtw89_dev *rtwdev, struct sk_buff *skb,
struct rtw89_wait_info *wait, unsigned int cond);
static struct sk_buff *rtw89_fw_h2c_alloc_skb(struct rtw89_dev *rtwdev, u32 len,
bool header)
{ … }
struct sk_buff *rtw89_fw_h2c_alloc_skb_with_hdr(struct rtw89_dev *rtwdev, u32 len)
{ … }
struct sk_buff *rtw89_fw_h2c_alloc_skb_no_hdr(struct rtw89_dev *rtwdev, u32 len)
{ … }
int rtw89_fw_check_rdy(struct rtw89_dev *rtwdev, enum rtw89_fwdl_check_type type)
{ … }
static int rtw89_fw_hdr_parser_v0(struct rtw89_dev *rtwdev, const u8 *fw, u32 len,
struct rtw89_fw_bin_info *info)
{ … }
static int __get_mssc_key_idx(struct rtw89_dev *rtwdev,
const struct rtw89_fw_mss_pool_hdr *mss_hdr,
u32 rmp_tbl_size, u32 *key_idx)
{ … }
static int __parse_formatted_mssc(struct rtw89_dev *rtwdev,
struct rtw89_fw_bin_info *info,
struct rtw89_fw_hdr_section_info *section_info,
const struct rtw89_fw_hdr_section_v1 *section,
const void *content,
u32 *mssc_len)
{ … }
static int __parse_security_section(struct rtw89_dev *rtwdev,
struct rtw89_fw_bin_info *info,
struct rtw89_fw_hdr_section_info *section_info,
const struct rtw89_fw_hdr_section_v1 *section,
const void *content,
u32 *mssc_len)
{ … }
static int rtw89_fw_hdr_parser_v1(struct rtw89_dev *rtwdev, const u8 *fw, u32 len,
struct rtw89_fw_bin_info *info)
{ … }
static int rtw89_fw_hdr_parser(struct rtw89_dev *rtwdev,
const struct rtw89_fw_suit *fw_suit,
struct rtw89_fw_bin_info *info)
{ … }
static
int rtw89_mfw_recognize(struct rtw89_dev *rtwdev, enum rtw89_fw_type type,
struct rtw89_fw_suit *fw_suit, bool nowarn)
{ … }
static u32 rtw89_mfw_get_size(struct rtw89_dev *rtwdev)
{ … }
static void rtw89_fw_update_ver_v0(struct rtw89_dev *rtwdev,
struct rtw89_fw_suit *fw_suit,
const struct rtw89_fw_hdr *hdr)
{ … }
static void rtw89_fw_update_ver_v1(struct rtw89_dev *rtwdev,
struct rtw89_fw_suit *fw_suit,
const struct rtw89_fw_hdr_v1 *hdr)
{ … }
static int rtw89_fw_update_ver(struct rtw89_dev *rtwdev,
enum rtw89_fw_type type,
struct rtw89_fw_suit *fw_suit)
{ … }
static
int __rtw89_fw_recognize(struct rtw89_dev *rtwdev, enum rtw89_fw_type type,
bool nowarn)
{ … }
static
int __rtw89_fw_recognize_from_elm(struct rtw89_dev *rtwdev,
const struct rtw89_fw_element_hdr *elm,
const union rtw89_fw_element_arg arg)
{ … }
#define __DEF_FW_FEAT_COND(__cond, __op) …
__DEF_FW_FEAT_COND(ge, >=);
__DEF_FW_FEAT_COND(le, <=);
__DEF_FW_FEAT_COND(lt, <);
struct __fw_feat_cfg { … };
#define __CFG_FW_FEAT(_chip, _cond, _maj, _min, _sub, _idx, _feat) …
static const struct __fw_feat_cfg fw_feat_tbl[] = …;
static void rtw89_fw_iterate_feature_cfg(struct rtw89_fw_info *fw,
const struct rtw89_chip_info *chip,
u32 ver_code)
{ … }
static void rtw89_fw_recognize_features(struct rtw89_dev *rtwdev)
{ … }
const struct firmware *
rtw89_early_fw_feature_recognize(struct device *device,
const struct rtw89_chip_info *chip,
struct rtw89_fw_info *early_fw,
int *used_fw_format)
{ … }
int rtw89_fw_recognize(struct rtw89_dev *rtwdev)
{ … }
static
int rtw89_build_phy_tbl_from_elm(struct rtw89_dev *rtwdev,
const struct rtw89_fw_element_hdr *elm,
const union rtw89_fw_element_arg arg)
{ … }
static
int rtw89_fw_recognize_txpwr_from_elm(struct rtw89_dev *rtwdev,
const struct rtw89_fw_element_hdr *elm,
const union rtw89_fw_element_arg arg)
{ … }
static
int rtw89_build_txpwr_trk_tbl_from_elm(struct rtw89_dev *rtwdev,
const struct rtw89_fw_element_hdr *elm,
const union rtw89_fw_element_arg arg)
{ … }
static
int rtw89_build_rfk_log_fmt_from_elm(struct rtw89_dev *rtwdev,
const struct rtw89_fw_element_hdr *elm,
const union rtw89_fw_element_arg arg)
{ … }
static const struct rtw89_fw_element_handler __fw_element_handlers[] = …;
int rtw89_fw_recognize_elements(struct rtw89_dev *rtwdev)
{ … }
void rtw89_h2c_pkt_set_hdr(struct rtw89_dev *rtwdev, struct sk_buff *skb,
u8 type, u8 cat, u8 class, u8 func,
bool rack, bool dack, u32 len)
{ … }
static void rtw89_h2c_pkt_set_hdr_fwdl(struct rtw89_dev *rtwdev,
struct sk_buff *skb,
u8 type, u8 cat, u8 class, u8 func,
u32 len)
{ … }
static u32 __rtw89_fw_download_tweak_hdr_v0(struct rtw89_dev *rtwdev,
struct rtw89_fw_bin_info *info,
struct rtw89_fw_hdr *fw_hdr)
{ … }
static u32 __rtw89_fw_download_tweak_hdr_v1(struct rtw89_dev *rtwdev,
struct rtw89_fw_bin_info *info,
struct rtw89_fw_hdr_v1 *fw_hdr)
{ … }
static int __rtw89_fw_download_hdr(struct rtw89_dev *rtwdev,
const struct rtw89_fw_suit *fw_suit,
struct rtw89_fw_bin_info *info)
{ … }
static int rtw89_fw_download_hdr(struct rtw89_dev *rtwdev,
const struct rtw89_fw_suit *fw_suit,
struct rtw89_fw_bin_info *info)
{ … }
static int __rtw89_fw_download_main(struct rtw89_dev *rtwdev,
struct rtw89_fw_hdr_section_info *info)
{ … }
static enum rtw89_fwdl_check_type
rtw89_fw_get_fwdl_chk_type_from_suit(struct rtw89_dev *rtwdev,
const struct rtw89_fw_suit *fw_suit)
{ … }
static int rtw89_fw_download_main(struct rtw89_dev *rtwdev,
const struct rtw89_fw_suit *fw_suit,
struct rtw89_fw_bin_info *info)
{ … }
static void rtw89_fw_prog_cnt_dump(struct rtw89_dev *rtwdev)
{ … }
static void rtw89_fw_dl_fail_dump(struct rtw89_dev *rtwdev)
{ … }
static int rtw89_fw_download_suit(struct rtw89_dev *rtwdev,
struct rtw89_fw_suit *fw_suit)
{ … }
static
int __rtw89_fw_download(struct rtw89_dev *rtwdev, enum rtw89_fw_type type,
bool include_bb)
{ … }
int rtw89_fw_download(struct rtw89_dev *rtwdev, enum rtw89_fw_type type,
bool include_bb)
{ … }
int rtw89_wait_firmware_completion(struct rtw89_dev *rtwdev)
{ … }
static int rtw89_load_firmware_req(struct rtw89_dev *rtwdev,
struct rtw89_fw_req_info *req,
const char *fw_name, bool nowarn)
{ … }
void rtw89_load_firmware_work(struct work_struct *work)
{ … }
static void rtw89_free_phy_tbl_from_elm(struct rtw89_phy_table *tbl)
{ … }
static void rtw89_unload_firmware_elements(struct rtw89_dev *rtwdev)
{ … }
void rtw89_unload_firmware(struct rtw89_dev *rtwdev)
{ … }
static u32 rtw89_fw_log_get_fmt_idx(struct rtw89_dev *rtwdev, u32 fmt_id)
{ … }
static int rtw89_fw_log_create_fmts_dict(struct rtw89_dev *rtwdev)
{ … }
int rtw89_fw_log_prepare(struct rtw89_dev *rtwdev)
{ … }
static void rtw89_fw_log_dump_data(struct rtw89_dev *rtwdev,
const struct rtw89_fw_c2h_log_fmt *log_fmt,
u32 fmt_idx, u8 para_int, bool raw_data)
{ … }
void rtw89_fw_log_dump(struct rtw89_dev *rtwdev, u8 *buf, u32 len)
{ … }
#define H2C_CAM_LEN …
int rtw89_fw_h2c_cam(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif,
struct rtw89_sta *rtwsta, const u8 *scan_mac_addr)
{ … }
int rtw89_fw_h2c_dctl_sec_cam_v1(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif,
struct rtw89_sta *rtwsta)
{ … }
EXPORT_SYMBOL(…);
int rtw89_fw_h2c_dctl_sec_cam_v2(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif,
struct rtw89_sta *rtwsta)
{ … }
EXPORT_SYMBOL(…);
int rtw89_fw_h2c_default_dmac_tbl_v2(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif,
struct rtw89_sta *rtwsta)
{ … }
EXPORT_SYMBOL(…);
int rtw89_fw_h2c_ba_cam(struct rtw89_dev *rtwdev, struct rtw89_sta *rtwsta,
bool valid, struct ieee80211_ampdu_params *params)
{ … }
EXPORT_SYMBOL(…);
static int rtw89_fw_h2c_init_ba_cam_v0_ext(struct rtw89_dev *rtwdev,
u8 entry_idx, u8 uid)
{ … }
void rtw89_fw_h2c_init_dynamic_ba_cam_v0_ext(struct rtw89_dev *rtwdev)
{ … }
int rtw89_fw_h2c_ba_cam_v1(struct rtw89_dev *rtwdev, struct rtw89_sta *rtwsta,
bool valid, struct ieee80211_ampdu_params *params)
{ … }
EXPORT_SYMBOL(…);
int rtw89_fw_h2c_init_ba_cam_users(struct rtw89_dev *rtwdev, u8 users,
u8 offset, u8 mac_idx)
{ … }
#define H2C_LOG_CFG_LEN …
int rtw89_fw_h2c_fw_log(struct rtw89_dev *rtwdev, bool enable)
{ … }
static struct sk_buff *rtw89_eapol_get(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif)
{ … }
static struct sk_buff *rtw89_sa_query_get(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif)
{ … }
static struct sk_buff *rtw89_arp_response_get(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif)
{ … }
static int rtw89_fw_h2c_add_general_pkt(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif,
enum rtw89_fw_pkt_ofld_type type,
u8 *id)
{ … }
void rtw89_fw_release_general_pkt_list_vif(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif, bool notify_fw)
{ … }
void rtw89_fw_release_general_pkt_list(struct rtw89_dev *rtwdev, bool notify_fw)
{ … }
#define H2C_GENERAL_PKT_LEN …
#define H2C_GENERAL_PKT_ID_UND …
int rtw89_fw_h2c_general_pkt(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif, u8 macid)
{ … }
#define H2C_LPS_PARM_LEN …
int rtw89_fw_h2c_lps_parm(struct rtw89_dev *rtwdev,
struct rtw89_lps_parm *lps_param)
{ … }
int rtw89_fw_h2c_lps_ch_info(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif)
{ … }
#define H2C_P2P_ACT_LEN …
int rtw89_fw_h2c_p2p_act(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif,
struct ieee80211_p2p_noa_desc *desc,
u8 act, u8 noa_id)
{ … }
static void __rtw89_fw_h2c_set_tx_path(struct rtw89_dev *rtwdev,
struct sk_buff *skb)
{ … }
#define H2C_CMC_TBL_LEN …
int rtw89_fw_h2c_default_cmac_tbl(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif,
struct rtw89_sta *rtwsta)
{ … }
EXPORT_SYMBOL(…);
int rtw89_fw_h2c_default_cmac_tbl_g7(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif,
struct rtw89_sta *rtwsta)
{ … }
EXPORT_SYMBOL(…);
static void __get_sta_he_pkt_padding(struct rtw89_dev *rtwdev,
struct ieee80211_sta *sta, u8 *pads)
{ … }
int rtw89_fw_h2c_assoc_cmac_tbl(struct rtw89_dev *rtwdev,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta)
{ … }
EXPORT_SYMBOL(…);
static void __get_sta_eht_pkt_padding(struct rtw89_dev *rtwdev,
struct ieee80211_sta *sta, u8 *pads)
{ … }
int rtw89_fw_h2c_assoc_cmac_tbl_g7(struct rtw89_dev *rtwdev,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta)
{ … }
EXPORT_SYMBOL(…);
int rtw89_fw_h2c_ampdu_cmac_tbl_g7(struct rtw89_dev *rtwdev,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta)
{ … }
EXPORT_SYMBOL(…);
int rtw89_fw_h2c_txtime_cmac_tbl(struct rtw89_dev *rtwdev,
struct rtw89_sta *rtwsta)
{ … }
int rtw89_fw_h2c_txpath_cmac_tbl(struct rtw89_dev *rtwdev,
struct rtw89_sta *rtwsta)
{ … }
int rtw89_fw_h2c_update_beacon(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif)
{ … }
EXPORT_SYMBOL(…);
int rtw89_fw_h2c_update_beacon_be(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif)
{ … }
EXPORT_SYMBOL(…);
#define H2C_ROLE_MAINTAIN_LEN …
int rtw89_fw_h2c_role_maintain(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif,
struct rtw89_sta *rtwsta,
enum rtw89_upd_mode upd_mode)
{ … }
static enum rtw89_fw_sta_type
rtw89_fw_get_sta_type(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif,
struct rtw89_sta *rtwsta)
{ … }
int rtw89_fw_h2c_join_info(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif,
struct rtw89_sta *rtwsta, bool dis_conn)
{ … }
int rtw89_fw_h2c_notify_dbcc(struct rtw89_dev *rtwdev, bool en)
{ … }
int rtw89_fw_h2c_macid_pause(struct rtw89_dev *rtwdev, u8 sh, u8 grp,
bool pause)
{ … }
#define H2C_EDCA_LEN …
int rtw89_fw_h2c_set_edca(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif,
u8 ac, u32 val)
{ … }
#define H2C_TSF32_TOGL_LEN …
int rtw89_fw_h2c_tsf32_toggle(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif,
bool en)
{ … }
#define H2C_OFLD_CFG_LEN …
int rtw89_fw_h2c_set_ofld_cfg(struct rtw89_dev *rtwdev)
{ … }
int rtw89_fw_h2c_set_bcn_fltr_cfg(struct rtw89_dev *rtwdev,
struct ieee80211_vif *vif,
bool connect)
{ … }
int rtw89_fw_h2c_rssi_offload(struct rtw89_dev *rtwdev,
struct rtw89_rx_phy_ppdu *phy_ppdu)
{ … }
int rtw89_fw_h2c_tp_offload(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif)
{ … }
int rtw89_fw_h2c_ra(struct rtw89_dev *rtwdev, struct rtw89_ra_info *ra, bool csi)
{ … }
int rtw89_fw_h2c_cxdrv_init(struct rtw89_dev *rtwdev, u8 type)
{ … }
int rtw89_fw_h2c_cxdrv_init_v7(struct rtw89_dev *rtwdev, u8 type)
{ … }
#define PORT_DATA_OFFSET …
#define H2C_LEN_CXDRVINFO_ROLE_DBCC_LEN …
#define H2C_LEN_CXDRVINFO_ROLE_SIZE(max_role_num) …
int rtw89_fw_h2c_cxdrv_role(struct rtw89_dev *rtwdev, u8 type)
{ … }
#define H2C_LEN_CXDRVINFO_ROLE_SIZE_V1(max_role_num) …
int rtw89_fw_h2c_cxdrv_role_v1(struct rtw89_dev *rtwdev, u8 type)
{ … }
#define H2C_LEN_CXDRVINFO_ROLE_SIZE_V2(max_role_num) …
int rtw89_fw_h2c_cxdrv_role_v2(struct rtw89_dev *rtwdev, u8 type)
{ … }
int rtw89_fw_h2c_cxdrv_role_v7(struct rtw89_dev *rtwdev, u8 type)
{ … }
int rtw89_fw_h2c_cxdrv_role_v8(struct rtw89_dev *rtwdev, u8 type)
{ … }
#define H2C_LEN_CXDRVINFO_CTRL …
int rtw89_fw_h2c_cxdrv_ctrl(struct rtw89_dev *rtwdev, u8 type)
{ … }
int rtw89_fw_h2c_cxdrv_ctrl_v7(struct rtw89_dev *rtwdev, u8 type)
{ … }
#define H2C_LEN_CXDRVINFO_TRX …
int rtw89_fw_h2c_cxdrv_trx(struct rtw89_dev *rtwdev, u8 type)
{ … }
#define H2C_LEN_CXDRVINFO_RFK …
int rtw89_fw_h2c_cxdrv_rfk(struct rtw89_dev *rtwdev, u8 type)
{ … }
#define H2C_LEN_PKT_OFLD …
int rtw89_fw_h2c_del_pkt_offload(struct rtw89_dev *rtwdev, u8 id)
{ … }
int rtw89_fw_h2c_add_pkt_offload(struct rtw89_dev *rtwdev, u8 *id,
struct sk_buff *skb_ofld)
{ … }
int rtw89_fw_h2c_scan_list_offload(struct rtw89_dev *rtwdev, int ch_num,
struct list_head *chan_list)
{ … }
int rtw89_fw_h2c_scan_list_offload_be(struct rtw89_dev *rtwdev, int ch_num,
struct list_head *chan_list)
{ … }
#define RTW89_SCAN_DELAY_TSF_UNIT …
int rtw89_fw_h2c_scan_offload_ax(struct rtw89_dev *rtwdev,
struct rtw89_scan_option *option,
struct rtw89_vif *rtwvif,
bool wowlan)
{ … }
static void rtw89_scan_get_6g_disabled_chan(struct rtw89_dev *rtwdev,
struct rtw89_scan_option *option)
{ … }
int rtw89_fw_h2c_scan_offload_be(struct rtw89_dev *rtwdev,
struct rtw89_scan_option *option,
struct rtw89_vif *rtwvif,
bool wowlan)
{ … }
int rtw89_fw_h2c_rf_reg(struct rtw89_dev *rtwdev,
struct rtw89_fw_h2c_rf_reg_info *info,
u16 len, u8 page)
{ … }
int rtw89_fw_h2c_rf_ntfy_mcc(struct rtw89_dev *rtwdev)
{ … }
EXPORT_SYMBOL(…);
int rtw89_fw_h2c_rf_pre_ntfy(struct rtw89_dev *rtwdev,
enum rtw89_phy_idx phy_idx)
{ … }
int rtw89_fw_h2c_rf_tssi(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx,
const struct rtw89_chan *chan, enum rtw89_tssi_mode tssi_mode)
{ … }
int rtw89_fw_h2c_rf_iqk(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx,
const struct rtw89_chan *chan)
{ … }
int rtw89_fw_h2c_rf_dpk(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx,
const struct rtw89_chan *chan)
{ … }
int rtw89_fw_h2c_rf_txgapk(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx,
const struct rtw89_chan *chan)
{ … }
int rtw89_fw_h2c_rf_dack(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx,
const struct rtw89_chan *chan)
{ … }
int rtw89_fw_h2c_rf_rxdck(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx,
const struct rtw89_chan *chan)
{ … }
int rtw89_fw_h2c_raw_with_hdr(struct rtw89_dev *rtwdev,
u8 h2c_class, u8 h2c_func, u8 *buf, u16 len,
bool rack, bool dack)
{ … }
int rtw89_fw_h2c_raw(struct rtw89_dev *rtwdev, const u8 *buf, u16 len)
{ … }
void rtw89_fw_send_all_early_h2c(struct rtw89_dev *rtwdev)
{ … }
void rtw89_fw_free_all_early_h2c(struct rtw89_dev *rtwdev)
{ … }
static void rtw89_fw_c2h_parse_attr(struct sk_buff *c2h)
{ … }
static bool rtw89_fw_c2h_chk_atomic(struct rtw89_dev *rtwdev,
struct sk_buff *c2h)
{ … }
void rtw89_fw_c2h_irqsafe(struct rtw89_dev *rtwdev, struct sk_buff *c2h)
{ … }
static void rtw89_fw_c2h_cmd_handle(struct rtw89_dev *rtwdev,
struct sk_buff *skb)
{ … }
void rtw89_fw_c2h_work(struct work_struct *work)
{ … }
static int rtw89_fw_write_h2c_reg(struct rtw89_dev *rtwdev,
struct rtw89_mac_h2c_info *info)
{ … }
static int rtw89_fw_read_c2h_reg(struct rtw89_dev *rtwdev,
struct rtw89_mac_c2h_info *info)
{ … }
int rtw89_fw_msg_reg(struct rtw89_dev *rtwdev,
struct rtw89_mac_h2c_info *h2c_info,
struct rtw89_mac_c2h_info *c2h_info)
{ … }
void rtw89_fw_st_dbg_dump(struct rtw89_dev *rtwdev)
{ … }
static void rtw89_release_pkt_list(struct rtw89_dev *rtwdev)
{ … }
static bool rtw89_is_6ghz_wildcard_probe_req(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif,
struct rtw89_pktofld_info *info,
enum nl80211_band band, u8 ssid_idx)
{ … }
static int rtw89_append_probe_req_ie(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif,
struct sk_buff *skb, u8 ssid_idx)
{ … }
static int rtw89_hw_scan_update_probe_req(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif)
{ … }
static int rtw89_update_6ghz_rnr_chan(struct rtw89_dev *rtwdev,
struct cfg80211_scan_request *req,
struct rtw89_mac_chinfo *ch_info)
{ … }
static void rtw89_pno_scan_add_chan_ax(struct rtw89_dev *rtwdev,
int chan_type, int ssid_num,
struct rtw89_mac_chinfo *ch_info)
{ … }
static void rtw89_hw_scan_add_chan(struct rtw89_dev *rtwdev, int chan_type,
int ssid_num,
struct rtw89_mac_chinfo *ch_info)
{ … }
static void rtw89_pno_scan_add_chan_be(struct rtw89_dev *rtwdev, int chan_type,
int ssid_num,
struct rtw89_mac_chinfo_be *ch_info)
{ … }
static void rtw89_hw_scan_add_chan_be(struct rtw89_dev *rtwdev, int chan_type,
int ssid_num,
struct rtw89_mac_chinfo_be *ch_info)
{ … }
int rtw89_pno_scan_add_chan_list_ax(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif)
{ … }
int rtw89_hw_scan_add_chan_list_ax(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif, bool connected)
{ … }
int rtw89_pno_scan_add_chan_list_be(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif)
{ … }
int rtw89_hw_scan_add_chan_list_be(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif, bool connected)
{ … }
static int rtw89_hw_scan_prehandle(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif, bool connected)
{ … }
void rtw89_hw_scan_start(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif,
struct ieee80211_scan_request *scan_req)
{ … }
void rtw89_hw_scan_complete(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif,
bool aborted)
{ … }
void rtw89_hw_scan_abort(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif)
{ … }
static bool rtw89_is_any_vif_connected_or_connecting(struct rtw89_dev *rtwdev)
{ … }
int rtw89_hw_scan_offload(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif,
bool enable)
{ … }
#define H2C_FW_CPU_EXCEPTION_LEN …
#define H2C_FW_CPU_EXCEPTION_TYPE_DEF …
int rtw89_fw_h2c_trigger_cpu_exception(struct rtw89_dev *rtwdev)
{ … }
#define H2C_PKT_DROP_LEN …
int rtw89_fw_h2c_pkt_drop(struct rtw89_dev *rtwdev,
const struct rtw89_pkt_drop_params *params)
{ … }
#define H2C_KEEP_ALIVE_LEN …
int rtw89_fw_h2c_keep_alive(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif,
bool enable)
{ … }
int rtw89_fw_h2c_arp_offload(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif,
bool enable)
{ … }
#define H2C_DISCONNECT_DETECT_LEN …
int rtw89_fw_h2c_disconnect_detect(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif, bool enable)
{ … }
int rtw89_fw_h2c_cfg_pno(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif,
bool enable)
{ … }
int rtw89_fw_h2c_wow_global(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif,
bool enable)
{ … }
#define H2C_WAKEUP_CTRL_LEN …
int rtw89_fw_h2c_wow_wakeup_ctrl(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif,
bool enable)
{ … }
#define H2C_WOW_CAM_UPD_LEN …
int rtw89_fw_wow_cam_update(struct rtw89_dev *rtwdev,
struct rtw89_wow_cam_info *cam_info)
{ … }
int rtw89_fw_h2c_wow_gtk_ofld(struct rtw89_dev *rtwdev,
struct rtw89_vif *rtwvif,
bool enable)
{ … }
int rtw89_fw_h2c_fwips(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif,
bool enable)
{ … }
int rtw89_fw_h2c_wow_request_aoac(struct rtw89_dev *rtwdev)
{ … }
static int rtw89_h2c_tx_and_wait(struct rtw89_dev *rtwdev, struct sk_buff *skb,
struct rtw89_wait_info *wait, unsigned int cond)
{ … }
#define H2C_ADD_MCC_LEN …
int rtw89_fw_h2c_add_mcc(struct rtw89_dev *rtwdev,
const struct rtw89_fw_mcc_add_req *p)
{ … }
#define H2C_START_MCC_LEN …
int rtw89_fw_h2c_start_mcc(struct rtw89_dev *rtwdev,
const struct rtw89_fw_mcc_start_req *p)
{ … }
#define H2C_STOP_MCC_LEN …
int rtw89_fw_h2c_stop_mcc(struct rtw89_dev *rtwdev, u8 group, u8 macid,
bool prev_groups)
{ … }
#define H2C_DEL_MCC_GROUP_LEN …
int rtw89_fw_h2c_del_mcc_group(struct rtw89_dev *rtwdev, u8 group,
bool prev_groups)
{ … }
#define H2C_RESET_MCC_GROUP_LEN …
int rtw89_fw_h2c_reset_mcc_group(struct rtw89_dev *rtwdev, u8 group)
{ … }
#define H2C_MCC_REQ_TSF_LEN …
int rtw89_fw_h2c_mcc_req_tsf(struct rtw89_dev *rtwdev,
const struct rtw89_fw_mcc_tsf_req *req,
struct rtw89_mac_mcc_tsf_rpt *rpt)
{ … }
#define H2C_MCC_MACID_BITMAP_DSC_LEN …
int rtw89_fw_h2c_mcc_macid_bitmap(struct rtw89_dev *rtwdev, u8 group, u8 macid,
u8 *bitmap)
{ … }
#define H2C_MCC_SYNC_LEN …
int rtw89_fw_h2c_mcc_sync(struct rtw89_dev *rtwdev, u8 group, u8 source,
u8 target, u8 offset)
{ … }
#define H2C_MCC_SET_DURATION_LEN …
int rtw89_fw_h2c_mcc_set_duration(struct rtw89_dev *rtwdev,
const struct rtw89_fw_mcc_duration *p)
{ … }
static
u32 rtw89_fw_h2c_mrc_add_slot(struct rtw89_dev *rtwdev,
const struct rtw89_fw_mrc_add_slot_arg *slot_arg,
struct rtw89_h2c_mrc_add_slot *slot_h2c)
{ … }
int rtw89_fw_h2c_mrc_add(struct rtw89_dev *rtwdev,
const struct rtw89_fw_mrc_add_arg *arg)
{ … }
int rtw89_fw_h2c_mrc_start(struct rtw89_dev *rtwdev,
const struct rtw89_fw_mrc_start_arg *arg)
{ … }
int rtw89_fw_h2c_mrc_del(struct rtw89_dev *rtwdev, u8 sch_idx, u8 slot_idx)
{ … }
int rtw89_fw_h2c_mrc_req_tsf(struct rtw89_dev *rtwdev,
const struct rtw89_fw_mrc_req_tsf_arg *arg,
struct rtw89_mac_mrc_tsf_rpt *rpt)
{ … }
int rtw89_fw_h2c_mrc_upd_bitmap(struct rtw89_dev *rtwdev,
const struct rtw89_fw_mrc_upd_bitmap_arg *arg)
{ … }
int rtw89_fw_h2c_mrc_sync(struct rtw89_dev *rtwdev,
const struct rtw89_fw_mrc_sync_arg *arg)
{ … }
int rtw89_fw_h2c_mrc_upd_duration(struct rtw89_dev *rtwdev,
const struct rtw89_fw_mrc_upd_duration_arg *arg)
{ … }
static bool __fw_txpwr_entry_zero_ext(const void *ext_ptr, u8 ext_len)
{ … }
#define __fw_txpwr_entry_acceptable(e, cursor, ent_sz) …
static bool
fw_txpwr_byrate_entry_valid(const struct rtw89_fw_txpwr_byrate_entry *e,
const void *cursor,
const struct rtw89_txpwr_conf *conf)
{ … }
static
void rtw89_fw_load_txpwr_byrate(struct rtw89_dev *rtwdev,
const struct rtw89_txpwr_table *tbl)
{ … }
static bool
fw_txpwr_lmt_2ghz_entry_valid(const struct rtw89_fw_txpwr_lmt_2ghz_entry *e,
const void *cursor,
const struct rtw89_txpwr_conf *conf)
{ … }
static
void rtw89_fw_load_txpwr_lmt_2ghz(struct rtw89_txpwr_lmt_2ghz_data *data)
{ … }
static bool
fw_txpwr_lmt_5ghz_entry_valid(const struct rtw89_fw_txpwr_lmt_5ghz_entry *e,
const void *cursor,
const struct rtw89_txpwr_conf *conf)
{ … }
static
void rtw89_fw_load_txpwr_lmt_5ghz(struct rtw89_txpwr_lmt_5ghz_data *data)
{ … }
static bool
fw_txpwr_lmt_6ghz_entry_valid(const struct rtw89_fw_txpwr_lmt_6ghz_entry *e,
const void *cursor,
const struct rtw89_txpwr_conf *conf)
{ … }
static
void rtw89_fw_load_txpwr_lmt_6ghz(struct rtw89_txpwr_lmt_6ghz_data *data)
{ … }
static bool
fw_txpwr_lmt_ru_2ghz_entry_valid(const struct rtw89_fw_txpwr_lmt_ru_2ghz_entry *e,
const void *cursor,
const struct rtw89_txpwr_conf *conf)
{ … }
static
void rtw89_fw_load_txpwr_lmt_ru_2ghz(struct rtw89_txpwr_lmt_ru_2ghz_data *data)
{ … }
static bool
fw_txpwr_lmt_ru_5ghz_entry_valid(const struct rtw89_fw_txpwr_lmt_ru_5ghz_entry *e,
const void *cursor,
const struct rtw89_txpwr_conf *conf)
{ … }
static
void rtw89_fw_load_txpwr_lmt_ru_5ghz(struct rtw89_txpwr_lmt_ru_5ghz_data *data)
{ … }
static bool
fw_txpwr_lmt_ru_6ghz_entry_valid(const struct rtw89_fw_txpwr_lmt_ru_6ghz_entry *e,
const void *cursor,
const struct rtw89_txpwr_conf *conf)
{ … }
static
void rtw89_fw_load_txpwr_lmt_ru_6ghz(struct rtw89_txpwr_lmt_ru_6ghz_data *data)
{ … }
static bool
fw_tx_shape_lmt_entry_valid(const struct rtw89_fw_tx_shape_lmt_entry *e,
const void *cursor,
const struct rtw89_txpwr_conf *conf)
{ … }
static
void rtw89_fw_load_tx_shape_lmt(struct rtw89_tx_shape_lmt_data *data)
{ … }
static bool
fw_tx_shape_lmt_ru_entry_valid(const struct rtw89_fw_tx_shape_lmt_ru_entry *e,
const void *cursor,
const struct rtw89_txpwr_conf *conf)
{ … }
static
void rtw89_fw_load_tx_shape_lmt_ru(struct rtw89_tx_shape_lmt_ru_data *data)
{ … }
const struct rtw89_rfe_parms *
rtw89_load_rfe_data_from_fw(struct rtw89_dev *rtwdev,
const struct rtw89_rfe_parms *init)
{ … }