#include <linux/module.h>
#include <linux/rtnetlink.h>
#include <linux/vmalloc.h>
#include <net/mac80211.h>
#include "fw/notif-wait.h"
#include "iwl-trans.h"
#include "iwl-op-mode.h"
#include "fw/img.h"
#include "iwl-debug.h"
#include "iwl-drv.h"
#include "iwl-modparams.h"
#include "mvm.h"
#include "iwl-phy-db.h"
#include "iwl-nvm-utils.h"
#include "iwl-csr.h"
#include "iwl-io.h"
#include "iwl-prph.h"
#include "rs.h"
#include "fw/api/scan.h"
#include "fw/api/rfi.h"
#include "time-event.h"
#include "fw-api.h"
#include "fw/acpi.h"
#include "fw/uefi.h"
#include "time-sync.h"
#define DRV_DESCRIPTION …
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;
MODULE_IMPORT_NS(…);
static const struct iwl_op_mode_ops iwl_mvm_ops;
static const struct iwl_op_mode_ops iwl_mvm_ops_mq;
struct iwl_mvm_mod_params iwlmvm_mod_params = …;
module_param_named(power_scheme, iwlmvm_mod_params.power_scheme, int, 0444);
MODULE_PARM_DESC(…) …;
static int __init iwl_mvm_init(void)
{ … }
module_init(…) …;
static void __exit iwl_mvm_exit(void)
{ … }
module_exit(iwl_mvm_exit);
static void iwl_mvm_nic_config(struct iwl_op_mode *op_mode)
{ … }
static void iwl_mvm_rx_esr_mode_notif(struct iwl_mvm *mvm,
struct iwl_rx_cmd_buffer *rxb)
{ … }
static void iwl_mvm_rx_monitor_notif(struct iwl_mvm *mvm,
struct iwl_rx_cmd_buffer *rxb)
{ … }
void iwl_mvm_update_link_smps(struct ieee80211_vif *vif,
struct ieee80211_bss_conf *link_conf)
{ … }
static void iwl_mvm_intf_dual_chain_req(void *data, u8 *mac,
struct ieee80211_vif *vif)
{ … }
static void iwl_mvm_rx_thermal_dual_chain_req(struct iwl_mvm *mvm,
struct iwl_rx_cmd_buffer *rxb)
{ … }
enum iwl_rx_handler_context { … };
struct iwl_rx_handlers { … };
#define RX_HANDLER_NO_SIZE(_cmd_id, _fn, _context) …
#define RX_HANDLER_GRP_NO_SIZE(_grp, _cmd, _fn, _context) …
#define RX_HANDLER …
#define RX_HANDLER_GRP …
static const struct iwl_rx_handlers iwl_mvm_rx_handlers[] = …;
#undef RX_HANDLER
#undef RX_HANDLER_GRP
static const struct iwl_hcmd_names iwl_mvm_legacy_names[] = …;
static const struct iwl_hcmd_names iwl_mvm_system_names[] = …;
static const struct iwl_hcmd_names iwl_mvm_mac_conf_names[] = …;
static const struct iwl_hcmd_names iwl_mvm_phy_names[] = …;
static const struct iwl_hcmd_names iwl_mvm_data_path_names[] = …;
static const struct iwl_hcmd_names iwl_mvm_statistics_names[] = …;
static const struct iwl_hcmd_names iwl_mvm_debug_names[] = …;
static const struct iwl_hcmd_names iwl_mvm_scan_names[] = …;
static const struct iwl_hcmd_names iwl_mvm_location_names[] = …;
static const struct iwl_hcmd_names iwl_mvm_prot_offload_names[] = …;
static const struct iwl_hcmd_names iwl_mvm_regulatory_and_nvm_names[] = …;
static const struct iwl_hcmd_arr iwl_mvm_groups[] = …;
static void iwl_mvm_async_handlers_wk(struct work_struct *wk);
static void iwl_mvm_async_handlers_wiphy_wk(struct wiphy *wiphy,
struct wiphy_work *work);
static u32 iwl_mvm_min_backoff(struct iwl_mvm *mvm)
{ … }
static void iwl_mvm_tx_unblock_dwork(struct work_struct *work)
{ … }
static void iwl_mvm_fwrt_dump_start(void *ctx)
{ … }
static void iwl_mvm_fwrt_dump_end(void *ctx)
{ … }
static int iwl_mvm_fwrt_send_hcmd(void *ctx, struct iwl_host_cmd *host_cmd)
{ … }
static bool iwl_mvm_d3_debug_enable(void *ctx)
{ … }
static const struct iwl_fw_runtime_ops iwl_mvm_fwrt_ops = …;
static int iwl_mvm_start_get_nvm(struct iwl_mvm *mvm)
{ … }
static int iwl_mvm_start_post_nvm(struct iwl_mvm *mvm)
{ … }
struct iwl_mvm_frob_txf_data { … };
static void iwl_mvm_frob_txf_key_iter(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta,
struct ieee80211_key_conf *key,
void *data)
{ … }
static void iwl_mvm_frob_txf(void *ctx, void *buf, size_t buflen)
{ … }
static void iwl_mvm_frob_hcmd(void *ctx, void *hcmd, size_t len)
{ … }
static void iwl_mvm_frob_mem(void *ctx, u32 mem_addr, void *mem, size_t buflen)
{ … }
static const struct iwl_dump_sanitize_ops iwl_mvm_sanitize_ops = …;
static void iwl_mvm_me_conn_status(void *priv, const struct iwl_mei_conn_info *conn_info)
{ … }
static void iwl_mvm_mei_rfkill(void *priv, bool blocked,
bool csme_taking_ownership)
{ … }
static void iwl_mvm_mei_roaming_forbidden(void *priv, bool forbidden)
{ … }
static void iwl_mvm_sap_connected_wk(struct work_struct *wk)
{ … }
static void iwl_mvm_mei_sap_connected(void *priv)
{ … }
static void iwl_mvm_mei_nic_stolen(void *priv)
{ … }
static const struct iwl_mei_ops mei_ops = …;
static void iwl_mvm_find_link_selection_vif(void *_data, u8 *mac,
struct ieee80211_vif *vif)
{ … }
static void iwl_mvm_trig_link_selection(struct wiphy *wiphy,
struct wiphy_work *wk)
{ … }
static struct iwl_op_mode *
iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
const struct iwl_fw *fw, struct dentry *dbgfs_dir)
{ … }
void iwl_mvm_stop_device(struct iwl_mvm *mvm)
{ … }
static void iwl_op_mode_mvm_stop(struct iwl_op_mode *op_mode)
{ … }
struct iwl_async_handler_entry { … };
void iwl_mvm_async_handlers_purge(struct iwl_mvm *mvm)
{ … }
static void iwl_mvm_async_handlers_by_context(struct iwl_mvm *mvm,
u8 contexts)
{ … }
static void iwl_mvm_async_handlers_wiphy_wk(struct wiphy *wiphy,
struct wiphy_work *wk)
{ … }
static void iwl_mvm_async_handlers_wk(struct work_struct *wk)
{ … }
static inline void iwl_mvm_rx_check_trigger(struct iwl_mvm *mvm,
struct iwl_rx_packet *pkt)
{ … }
static void iwl_mvm_rx_common(struct iwl_mvm *mvm,
struct iwl_rx_cmd_buffer *rxb,
struct iwl_rx_packet *pkt)
{ … }
static void iwl_mvm_rx(struct iwl_op_mode *op_mode,
struct napi_struct *napi,
struct iwl_rx_cmd_buffer *rxb)
{ … }
void iwl_mvm_rx_mq(struct iwl_op_mode *op_mode,
struct napi_struct *napi,
struct iwl_rx_cmd_buffer *rxb)
{ … }
static int iwl_mvm_is_static_queue(struct iwl_mvm *mvm, int queue)
{ … }
static void iwl_mvm_queue_state_change(struct iwl_op_mode *op_mode,
int hw_queue, bool start)
{ … }
static void iwl_mvm_stop_sw_queue(struct iwl_op_mode *op_mode, int hw_queue)
{ … }
static void iwl_mvm_wake_sw_queue(struct iwl_op_mode *op_mode, int hw_queue)
{ … }
static void iwl_mvm_set_rfkill_state(struct iwl_mvm *mvm)
{ … }
void iwl_mvm_set_hw_ctkill_state(struct iwl_mvm *mvm, bool state)
{ … }
struct iwl_mvm_csme_conn_info *iwl_mvm_get_csme_conn_info(struct iwl_mvm *mvm)
{ … }
static bool iwl_mvm_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state)
{ … }
static void iwl_mvm_free_skb(struct iwl_op_mode *op_mode, struct sk_buff *skb)
{ … }
struct iwl_mvm_reprobe { … };
static void iwl_mvm_reprobe_wk(struct work_struct *wk)
{ … }
void iwl_mvm_nic_restart(struct iwl_mvm *mvm, bool fw_error)
{ … }
static void iwl_mvm_nic_error(struct iwl_op_mode *op_mode, bool sync)
{ … }
static void iwl_mvm_cmd_queue_full(struct iwl_op_mode *op_mode)
{ … }
static void iwl_op_mode_mvm_time_point(struct iwl_op_mode *op_mode,
enum iwl_fw_ini_time_point tp_id,
union iwl_dbg_tlv_tp_data *tp_data)
{ … }
#define IWL_MVM_COMMON_OPS …
static const struct iwl_op_mode_ops iwl_mvm_ops = …;
static void iwl_mvm_rx_mq_rss(struct iwl_op_mode *op_mode,
struct napi_struct *napi,
struct iwl_rx_cmd_buffer *rxb,
unsigned int queue)
{ … }
static const struct iwl_op_mode_ops iwl_mvm_ops_mq = …;