drivers/net/wireless/intel/iwlegacy/commands.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlegacy/commands.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlegacy/commands.h- Extension
.h- Size
- 113611 bytes
- Lines
- 3391
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source 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 or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/ieee80211.h
Detected Declarations
struct il_privstruct il_cmd_headerstruct il3945_tx_powerstruct il3945_power_per_ratestruct tx_power_dual_streamstruct il4965_tx_power_dbstruct il_init_alive_respstruct il_alive_respstruct il_error_respstruct il3945_rxon_cmdstruct il4965_rxon_cmdstruct il_rxon_cmdstruct il3945_rxon_assoc_cmdstruct il4965_rxon_assoc_cmdstruct il_rxon_time_cmdstruct il3945_channel_switch_cmdstruct il4965_channel_switch_cmdstruct il_csa_notificationstruct il_ac_qosstruct il_qosparam_cmdstruct il4965_keyinfostruct sta_id_modifystruct il3945_addsta_cmdstruct il4965_addsta_cmdstruct il_addsta_cmdstruct il_add_sta_respstruct il_rem_sta_respstruct il_rem_sta_cmdstruct il_wep_keystruct il_wep_cmdstruct il3945_rx_frame_statsstruct il3945_rx_frame_hdrstruct il3945_rx_frame_endstruct il3945_rx_framestruct il4965_rx_non_cfg_phystruct il_rx_phy_resstruct il_rx_mpdu_res_startstruct il3945_tx_cmdstruct il3945_tx_respstruct il_dram_scratchstruct il_tx_cmdstruct agg_tx_statusstruct il4965_tx_resp_hdrstruct il4965_tx_respstruct il4965_tx_resp_hdrstruct il_compressed_ba_respstruct il3945_txpowertable_cmdstruct il4965_txpowertable_cmd
Annotated Snippet
struct il_cmd_header {
u8 cmd; /* Command ID: C_RXON, etc. */
u8 flags; /* 0:5 reserved, 6 abort, 7 internal */
/*
* The driver sets up the sequence number to values of its choosing.
* uCode does not use this value, but passes it back to the driver
* when sending the response to each driver-originated command, so
* the driver can match the response to the command. Since the values
* don't get used by uCode, the driver may set up an arbitrary format.
*
* There is one exception: uCode sets bit 15 when it originates
* the response/notification, i.e. when the response/notification
* is not a direct response to a command sent by the driver. For
* example, uCode issues N_3945_RX when it sends a received frame
* to the driver; it is not a direct response to any driver command.
*
* The Linux driver uses the following format:
*
* 0:7 tfd idx - position within TX queue
* 8:12 TX queue id
* 13 reserved
* 14 huge - driver sets this to indicate command is in the
* 'huge' storage at the end of the command buffers
* 15 unsolicited RX or uCode-originated notification
*/
__le16 sequence;
} __packed;
/**
* struct il3945_tx_power
*
* Used in C_TX_PWR_TBL, C_SCAN, C_CHANNEL_SWITCH
*
* Each entry contains two values:
* 1) DSP gain (or sometimes called DSP attenuation). This is a fine-grained
* linear value that multiplies the output of the digital signal processor,
* before being sent to the analog radio.
* 2) Radio gain. This sets the analog gain of the radio Tx path.
* It is a coarser setting, and behaves in a logarithmic (dB) fashion.
*
* Driver obtains values from struct il3945_tx_power power_gain_table[][].
*/
struct il3945_tx_power {
u8 tx_gain; /* gain for analog radio */
u8 dsp_atten; /* gain for DSP */
} __packed;
/**
* struct il3945_power_per_rate
*
* Used in C_TX_PWR_TBL, C_CHANNEL_SWITCH
*/
struct il3945_power_per_rate {
u8 rate; /* plcp */
struct il3945_tx_power tpc;
u8 reserved;
} __packed;
/**
* iwl4965 rate_n_flags bit fields
*
* rate_n_flags format is used in following iwl4965 commands:
* N_RX (response only)
* N_RX_MPDU (response only)
* C_TX (both command and response)
* C_TX_LINK_QUALITY_CMD
*
* High-throughput (HT) rate format for bits 7:0 (bit 8 must be "1"):
* 2-0: 0) 6 Mbps
* 1) 12 Mbps
* 2) 18 Mbps
* 3) 24 Mbps
* 4) 36 Mbps
* 5) 48 Mbps
* 6) 54 Mbps
* 7) 60 Mbps
*
* 4-3: 0) Single stream (SISO)
* 1) Dual stream (MIMO)
* 2) Triple stream (MIMO)
*
* 5: Value of 0x20 in bits 7:0 indicates 6 Mbps HT40 duplicate data
*
* Legacy OFDM rate format for bits 7:0 (bit 8 must be "0", bit 9 "0"):
* 3-0: 0xD) 6 Mbps
* 0xF) 9 Mbps
* 0x5) 12 Mbps
* 0x7) 18 Mbps
* 0x9) 24 Mbps
* 0xB) 36 Mbps
Annotation
- Immediate include surface: `linux/ieee80211.h`.
- Detected declarations: `struct il_priv`, `struct il_cmd_header`, `struct il3945_tx_power`, `struct il3945_power_per_rate`, `struct tx_power_dual_stream`, `struct il4965_tx_power_db`, `struct il_init_alive_resp`, `struct il_alive_resp`, `struct il_error_resp`, `struct il3945_rxon_cmd`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
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.