drivers/net/wireless/intel/iwlwifi/mvm/ops.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/mvm/ops.c- Extension
.c- Size
- 63045 bytes
- Lines
- 2150
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/rtnetlink.hlinux/vmalloc.hnet/mac80211.hfw/notif-wait.hiwl-trans.hiwl-op-mode.hfw/img.hiwl-debug.hiwl-drv.hiwl-modparams.hmvm.hiwl-phy-db.hiwl-nvm-utils.hiwl-csr.hiwl-io.hiwl-prph.hrs.hfw/api/scan.hfw/api/rfi.htime-event.hfw-api.hfw/acpi.hfw/uefi.htime-sync.h
Detected Declarations
struct iwl_rx_handlersstruct iwl_mvm_frob_txf_datastruct iwl_async_handler_entryenum iwl_rx_handler_contextfunction iwl_mvm_initfunction iwl_mvm_exitfunction iwl_mvm_nic_configfunction iwl_mvm_rx_monitor_notiffunction iwl_mvm_update_link_smpsfunction iwl_mvm_intf_dual_chain_reqfunction iwl_mvm_rx_thermal_dual_chain_reqfunction iwl_mvm_min_backofffunction iwl_mvm_tx_unblock_dworkfunction iwl_mvm_fwrt_dump_startfunction iwl_mvm_fwrt_dump_endfunction iwl_mvm_fwrt_send_hcmdfunction iwl_mvm_d3_debug_enablefunction iwl_mvm_start_get_nvmfunction iwl_mvm_start_post_nvmfunction iwl_mvm_frob_txf_key_iterfunction iwl_mvm_frob_txffunction iwl_mvm_frob_hcmdfunction iwl_mvm_frob_memfunction iwl_mvm_me_conn_statusfunction iwl_mvm_mei_rfkillfunction iwl_mvm_mei_roaming_forbiddenfunction iwl_mvm_sap_connected_wkfunction iwl_mvm_mei_sap_connectedfunction iwl_mvm_mei_nic_stolenfunction iwl_op_mode_mvm_startfunction iwl_mvm_stop_devicefunction iwl_op_mode_mvm_stopfunction iwl_mvm_async_handlers_purgefunction iwl_mvm_async_handlers_by_contextfunction list_for_each_entry_safefunction iwl_mvm_async_handlers_wiphy_wkfunction iwl_mvm_async_handlers_wkfunction iwl_mvm_rx_check_triggerfunction iwl_mvm_rx_commonfunction iwl_mvm_rxfunction iwl_mvm_rx_mqfunction iwl_mvm_is_static_queuefunction iwl_mvm_queue_state_changefunction for_each_set_bitfunction iwl_mvm_stop_sw_queuefunction iwl_mvm_wake_sw_queuefunction iwl_mvm_set_rfkill_statefunction iwl_mvm_set_hw_ctkill_state
Annotated Snippet
module_init(iwl_mvm_init);
static void __exit iwl_mvm_exit(void)
{
iwl_opmode_deregister("iwlmvm");
iwl_mvm_rate_control_unregister();
}
module_exit(iwl_mvm_exit);
static void iwl_mvm_nic_config(struct iwl_op_mode *op_mode)
{
struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
u8 radio_cfg_type, radio_cfg_step, radio_cfg_dash;
u32 reg_val;
u32 phy_config = iwl_mvm_get_phy_config(mvm);
radio_cfg_type = (phy_config & FW_PHY_CFG_RADIO_TYPE) >>
FW_PHY_CFG_RADIO_TYPE_POS;
radio_cfg_step = (phy_config & FW_PHY_CFG_RADIO_STEP) >>
FW_PHY_CFG_RADIO_STEP_POS;
radio_cfg_dash = (phy_config & FW_PHY_CFG_RADIO_DASH) >>
FW_PHY_CFG_RADIO_DASH_POS;
IWL_DEBUG_INFO(mvm, "Radio type=0x%x-0x%x-0x%x\n", radio_cfg_type,
radio_cfg_step, radio_cfg_dash);
if (mvm->trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_AX210)
return;
/* SKU control */
reg_val = CSR_HW_REV_STEP_DASH(mvm->trans->info.hw_rev);
/* radio configuration */
reg_val |= radio_cfg_type << CSR_HW_IF_CONFIG_REG_POS_PHY_TYPE;
reg_val |= radio_cfg_step << CSR_HW_IF_CONFIG_REG_POS_PHY_STEP;
reg_val |= radio_cfg_dash << CSR_HW_IF_CONFIG_REG_POS_PHY_DASH;
WARN_ON((radio_cfg_type << CSR_HW_IF_CONFIG_REG_POS_PHY_TYPE) &
~CSR_HW_IF_CONFIG_REG_MSK_PHY_TYPE);
/*
* TODO: Bits 7-8 of CSR in 8000 HW family and higher set the ADC
* sampling, and shouldn't be set to any non-zero value.
* The same is supposed to be true of the other HW, but unsetting
* them (such as the 7260) causes automatic tests to fail on seemingly
* unrelated errors. Need to further investigate this, but for now
* we'll separate cases.
*/
if (mvm->trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_8000)
reg_val |= CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI;
if (iwl_fw_dbg_is_d3_debug_enabled(&mvm->fwrt))
reg_val |= CSR_HW_IF_CONFIG_REG_D3_DEBUG;
iwl_trans_set_bits_mask(mvm->trans, CSR_HW_IF_CONFIG_REG,
CSR_HW_IF_CONFIG_REG_MSK_MAC_STEP_DASH |
CSR_HW_IF_CONFIG_REG_MSK_PHY_TYPE |
CSR_HW_IF_CONFIG_REG_MSK_PHY_STEP |
CSR_HW_IF_CONFIG_REG_MSK_PHY_DASH |
CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI |
CSR_HW_IF_CONFIG_REG_BIT_MAC_SI |
CSR_HW_IF_CONFIG_REG_D3_DEBUG,
reg_val);
/*
* W/A : NIC is stuck in a reset state after Early PCIe power off
* (PCIe power is lost before PERST# is asserted), causing ME FW
* to lose ownership and not being able to obtain it back.
*/
if (!mvm->trans->mac_cfg->base->apmg_not_supported)
iwl_set_bits_mask_prph(mvm->trans, APMG_PS_CTRL_REG,
APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS,
~APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS);
}
static void iwl_mvm_rx_monitor_notif(struct iwl_mvm *mvm,
struct iwl_rx_cmd_buffer *rxb)
{
struct iwl_rx_packet *pkt = rxb_addr(rxb);
struct iwl_datapath_monitor_notif *notif = (void *)pkt->data;
struct ieee80211_supported_band *sband;
const struct ieee80211_sta_he_cap *he_cap;
struct ieee80211_vif *vif;
if (notif->type != cpu_to_le32(IWL_DP_MON_NOTIF_TYPE_EXT_CCA))
return;
/* FIXME: should fetch the link and not the vif */
vif = iwl_mvm_get_vif_by_macid(mvm, notif->link_id);
if (!vif || vif->type != NL80211_IFTYPE_STATION)
Annotation
- Immediate include surface: `linux/module.h`, `linux/rtnetlink.h`, `linux/vmalloc.h`, `net/mac80211.h`, `fw/notif-wait.h`, `iwl-trans.h`, `iwl-op-mode.h`, `fw/img.h`.
- Detected declarations: `struct iwl_rx_handlers`, `struct iwl_mvm_frob_txf_data`, `struct iwl_async_handler_entry`, `enum iwl_rx_handler_context`, `function iwl_mvm_init`, `function iwl_mvm_exit`, `function iwl_mvm_nic_config`, `function iwl_mvm_rx_monitor_notif`, `function iwl_mvm_update_link_smps`, `function iwl_mvm_intf_dual_chain_req`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.