drivers/net/wireless/intel/iwlegacy/4965-mac.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlegacy/4965-mac.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlegacy/4965-mac.c- Extension
.c- Size
- 188855 bytes
- Lines
- 6850
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- 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/kernel.hlinux/module.hlinux/init.hlinux/pci.hlinux/slab.hlinux/dma-mapping.hlinux/delay.hlinux/sched.hlinux/skbuff.hlinux/netdevice.hlinux/firmware.hlinux/etherdevice.hlinux/if_arp.hlinux/units.hnet/mac80211.hasm/div64.hcommon.h4965.h
Detected Declarations
struct il4965_firmware_piecesfunction il4965_check_abort_statusfunction il4965_rx_queue_resetfunction il4965_rx_initfunction il4965_set_pwr_vmainfunction il4965_hw_nic_initfunction il4965_dma_addr2rbd_ptrfunction il4965_rx_queue_restockfunction itemfunction il4965_rx_replenishfunction il4965_rx_replenish_nowfunction il4965_rx_queue_freefunction il4965_rxq_stopfunction il4965_hwrate_to_mac80211_idxfunction il4965_calc_rssifunction il4965_translate_rx_statusfunction il4965_pass_packet_to_mac80211function N_RX_MPDUfunction il_hdl_rxfunction il4965_get_channels_for_scanfunction il4965_toggle_tx_antfunction il4965_request_scanfunction il4965_manage_ibss_stationfunction il4965_free_tfds_in_queuefunction il4965_is_single_rx_streamfunction MIMOfunction il4965_get_idle_rx_chain_countfunction il4965_count_chain_bitmapfunction il4965_set_rxon_chainfunction il4965_get_fh_stringfunction il4965_dump_fhfunction il4965_hdl_missed_beaconfunction il4965_rx_calc_noisefunction il4965_accumulative_statsfunction il4965_hdl_statsfunction il4965_hdl_c_statsfunction il4965_get_ac_from_tidfunction il4965_get_fifo_from_tidfunction il4965_tx_cmd_build_basicfunction il4965_tx_cmd_build_ratefunction il4965_tx_cmd_build_hwcryptofunction il4965_tx_skbfunction il4965_alloc_dma_ptrfunction il4965_free_dma_ptrfunction il4965_hw_txq_ctx_freefunction il4965_txq_ctx_allocfunction il4965_txq_ctx_resetfunction il4965_txq_ctx_unmap
Annotated Snippet
static struct pci_driver il4965_driver = {
.name = DRV_NAME,
.id_table = il4965_hw_card_ids,
.probe = il4965_pci_probe,
.remove = il4965_pci_remove,
.driver.pm = IL_LEGACY_PM_OPS,
};
static int __init
il4965_init(void)
{
int ret;
pr_info(DRV_DESCRIPTION ", " DRV_VERSION "\n");
pr_info(DRV_COPYRIGHT "\n");
ret = il4965_rate_control_register();
if (ret) {
pr_err("Unable to register rate control algorithm: %d\n", ret);
return ret;
}
ret = pci_register_driver(&il4965_driver);
if (ret) {
pr_err("Unable to initialize PCI module\n");
goto error_register;
}
return ret;
error_register:
il4965_rate_control_unregister();
return ret;
}
static void __exit
il4965_exit(void)
{
pci_unregister_driver(&il4965_driver);
il4965_rate_control_unregister();
}
module_exit(il4965_exit);
module_init(il4965_init);
#ifdef CONFIG_IWLEGACY_DEBUG
module_param_named(debug, il_debug_level, uint, 0644);
MODULE_PARM_DESC(debug, "debug output mask");
#endif
module_param_named(swcrypto, il4965_mod_params.sw_crypto, int, 0444);
MODULE_PARM_DESC(swcrypto, "using crypto in software (default 0 [hardware])");
module_param_named(queues_num, il4965_mod_params.num_of_queues, int, 0444);
MODULE_PARM_DESC(queues_num, "number of hw queues.");
module_param_named(11n_disable, il4965_mod_params.disable_11n, int, 0444);
MODULE_PARM_DESC(11n_disable, "disable 11n functionality");
module_param_named(amsdu_size_8K, il4965_mod_params.amsdu_size_8K, int, 0444);
MODULE_PARM_DESC(amsdu_size_8K, "enable 8K amsdu size (default 0 [disabled])");
module_param_named(fw_restart, il4965_mod_params.restart_fw, int, 0444);
MODULE_PARM_DESC(fw_restart, "restart firmware in case of error");
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/init.h`, `linux/pci.h`, `linux/slab.h`, `linux/dma-mapping.h`, `linux/delay.h`, `linux/sched.h`.
- Detected declarations: `struct il4965_firmware_pieces`, `function il4965_check_abort_status`, `function il4965_rx_queue_reset`, `function il4965_rx_init`, `function il4965_set_pwr_vmain`, `function il4965_hw_nic_init`, `function il4965_dma_addr2rbd_ptr`, `function il4965_rx_queue_restock`, `function item`, `function il4965_rx_replenish`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.