drivers/net/wireless/intel/iwlwifi/iwl-drv.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/iwl-drv.c- Extension
.c- Size
- 62544 bytes
- Lines
- 2210
- 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/completion.hlinux/dma-mapping.hlinux/firmware.hlinux/module.hlinux/vmalloc.hiwl-drv.hiwl-csr.hiwl-debug.hiwl-trans.hiwl-op-mode.hiwl-agn-hw.hfw/img.hiwl-dbg-tlv.hiwl-config.hiwl-modparams.hfw/api/alive.hfw/api/mac.hfw/api/mac-cfg.h
Detected Declarations
struct iwl_drvstruct fw_secstruct fw_img_parsingstruct fw_sec_parsingstruct iwl_tlv_calib_datastruct iwl_firmware_piecesfunction iwl_free_fw_descfunction iwl_free_fw_imgfunction iwl_dealloc_ucodefunction iwl_alloc_fw_descfunction iwl_drv_get_stepfunction iwl_drv_is_wifi7_supportedfunction iwl_get_ucode_api_versionsfunction iwl_request_firmwarefunction alloc_sec_datafunction set_sec_datafunction set_sec_sizefunction get_sec_sizefunction set_sec_offsetfunction iwl_store_ucode_secfunction iwl_set_default_calibfunction iwl_set_ucode_api_flagsfunction iwl_set_ucode_capabilitiesfunction iwl_parse_v1_v2_firmwarefunction iwl_drv_set_dump_excludefunction iwl_parse_dbg_tlv_assert_tablesfunction iwl_parse_tlv_firmwarefunction iwl_alloc_ucode_memfunction iwl_alloc_ucodefunction validate_sec_sizesfunction _iwl_op_mode_startfunction _iwl_op_mode_stopfunction fetchfunction iwl_drv_stopfunction iwl_opmode_registerfunction iwl_opmode_deregisterfunction iwl_drv_initfunction iwl_drv_exitmodule init iwl_drv_init
Annotated Snippet
module_init(iwl_drv_init);
static void __exit iwl_drv_exit(void)
{
iwl_pci_unregister_driver();
iwl_trans_free_restart_list();
#ifdef CONFIG_IWLWIFI_DEBUGFS
debugfs_remove_recursive(iwl_dbgfs_root);
#endif
}
module_exit(iwl_drv_exit);
#ifdef CONFIG_IWLWIFI_DEBUG
module_param_named(debug, iwlwifi_mod_params.debug_level, uint, 0644);
MODULE_PARM_DESC(debug, "debug output mask");
#endif
module_param_named(swcrypto, iwlwifi_mod_params.swcrypto, int, 0444);
MODULE_PARM_DESC(swcrypto, "using crypto in software (default 0 [hardware])");
module_param_named(11n_disable, iwlwifi_mod_params.disable_11n, uint, 0444);
MODULE_PARM_DESC(11n_disable,
"disable 11n functionality, bitmap: 1: full, 2: disable agg TX, 4: disable agg RX, 8 enable agg TX");
module_param_named(amsdu_size, iwlwifi_mod_params.amsdu_size, int, 0444);
MODULE_PARM_DESC(amsdu_size,
"amsdu size 0: 12K for multi Rx queue devices, 2K for AX210 devices, "
"4K for other devices 1:4K 2:8K 3:12K (16K buffers) 4: 2K (default 0)");
module_param_named(fw_restart, iwlwifi_mod_params.fw_restart, bool, 0444);
MODULE_PARM_DESC(fw_restart, "restart firmware in case of error (default true)");
module_param_named(nvm_file, iwlwifi_mod_params.nvm_file, charp, 0444);
MODULE_PARM_DESC(nvm_file, "NVM file name");
module_param_named(uapsd_disable, iwlwifi_mod_params.uapsd_disable, uint, 0644);
MODULE_PARM_DESC(uapsd_disable,
"disable U-APSD functionality bitmap 1: BSS 2: P2P Client (default: 3)");
module_param_named(enable_ini, iwlwifi_mod_params.enable_ini, uint, 0444);
MODULE_PARM_DESC(enable_ini,
"0:disable, 1-15:FW_DBG_PRESET Values, 16:enabled without preset value defined,"
"Debug INI TLV FW debug infrastructure (default: 16)");
/*
* set bt_coex_active to true, uCode will do kill/defer
* every time the priority line is asserted (BT is sending signals on the
* priority line in the PCIx).
* set bt_coex_active to false, uCode will ignore the BT activity and
* perform the normal operation
*
* User might experience transmit issue on some platform due to WiFi/BT
* co-exist problem. The possible behaviors are:
* Able to scan and finding all the available AP
* Not able to associate with any AP
* On those platforms, WiFi communication can be restored by set
* "bt_coex_active" module parameter to "false"
*
* default: bt_coex_active = true (BT_COEX_ENABLE)
*/
module_param_named(bt_coex_active, iwlwifi_mod_params.bt_coex_active,
bool, 0444);
MODULE_PARM_DESC(bt_coex_active, "enable wifi/bt co-exist (default: enable)");
module_param_named(led_mode, iwlwifi_mod_params.led_mode, int, 0444);
MODULE_PARM_DESC(led_mode, "0=system default, "
"1=On(RF On)/Off(RF Off), 2=blinking, 3=Off (default: 0)");
module_param_named(power_save, iwlwifi_mod_params.power_save, bool, 0444);
MODULE_PARM_DESC(power_save,
"enable WiFi power management (default: disable)");
module_param_named(power_level, iwlwifi_mod_params.power_level, int, 0444);
MODULE_PARM_DESC(power_level,
"default power save level (range from 1 - 5, default: 1)");
module_param_named(disable_11ac, iwlwifi_mod_params.disable_11ac, bool, 0444);
MODULE_PARM_DESC(disable_11ac, "Disable VHT capabilities (default: false)");
module_param_named(remove_when_gone,
iwlwifi_mod_params.remove_when_gone, bool,
0444);
MODULE_PARM_DESC(remove_when_gone,
"Remove dev from PCIe bus if it is deemed inaccessible (default: false)");
module_param_named(disable_11ax, iwlwifi_mod_params.disable_11ax, bool,
S_IRUGO);
MODULE_PARM_DESC(disable_11ax, "Disable HE capabilities (default: false)");
module_param_named(disable_11be, iwlwifi_mod_params.disable_11be, bool, 0444);
MODULE_PARM_DESC(disable_11be, "Disable EHT capabilities (default: false)");
Annotation
- Immediate include surface: `linux/completion.h`, `linux/dma-mapping.h`, `linux/firmware.h`, `linux/module.h`, `linux/vmalloc.h`, `iwl-drv.h`, `iwl-csr.h`, `iwl-debug.h`.
- Detected declarations: `struct iwl_drv`, `struct fw_sec`, `struct fw_img_parsing`, `struct fw_sec_parsing`, `struct iwl_tlv_calib_data`, `struct iwl_firmware_pieces`, `function iwl_free_fw_desc`, `function iwl_free_fw_img`, `function iwl_dealloc_ucode`, `function iwl_alloc_fw_desc`.
- 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.