drivers/net/wireless/intel/iwlwifi/iwl-trans.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/iwl-trans.h- Extension
.h- Size
- 36155 bytes
- Lines
- 1210
- 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.hlinux/mm.hlinux/lockdep.hlinux/kernel.hiwl-debug.hiwl-config.hfw/img.hiwl-op-mode.hlinux/firmware.hfw/api/cmdhdr.hfw/api/txq.hfw/api/dbg-tlv.hiwl-dbg-tlv.h
Detected Declarations
struct iwl_rx_packetstruct iwl_device_cmdstruct iwl_device_tx_cmdstruct iwl_host_cmdstruct iwl_rx_cmd_bufferstruct iwl_hcmd_namesstruct iwl_hcmd_arrstruct iwl_dump_sanitize_opsstruct iwl_trans_configstruct iwl_trans_dump_datastruct iwl_transstruct iwl_trans_txq_scd_cfgstruct iwl_trans_rxq_dma_datastruct iwl_pnvm_imagestruct iwl_dram_datastruct iwl_dram_regionsstruct iwl_fw_monstruct iwl_self_init_dramstruct iwl_imr_datastruct iwl_pc_datastruct iwl_trans_debugstruct iwl_dma_ptrstruct iwl_cmd_metastruct iwl_trans_infostruct iwl_transenum CMD_MODEenum iwl_hcmd_dataflagenum iwl_error_event_table_statusenum iwl_trans_statusenum iwl_trans_stateenum iwl_ini_cfg_stateenum iwl_reset_modefunction iwl_rx_packet_lenfunction iwl_rx_packet_payload_lenfunction iwl_free_respfunction rxb_offsetfunction iwl_free_rxbfunction iwl_trans_get_rb_size_orderfunction iwl_trans_get_rb_sizefunction iwl_trans_txq_enablefunction iwl_trans_ac_txq_enablefunction iwl_trans_read_mem_bytes_no_grabfunction iwl_trans_read_mem32function iwl_trans_write_mem32function iwl_trans_schedule_resetfunction iwl_trans_fw_errorfunction iwl_trans_opmode_sw_resetfunction iwl_trans_fw_running
Annotated Snippet
struct iwl_rx_packet {
/*
* The first 4 bytes of the RX frame header contain both the RX frame
* size and some flags.
* Bit fields:
* 31: flag flush RB request
* 30: flag ignore TC (terminal counter) request
* 29: flag fast IRQ request
* 28-27: Reserved
* 26: RADA enabled
* 25: Offload enabled
* 24: RPF enabled
* 23: RSS enabled
* 22: Checksum enabled
* 21-16: RX queue
* 15-14: Reserved
* 13-00: RX frame size
*/
__le32 len_n_flags;
struct iwl_cmd_header hdr;
u8 data[];
} __packed;
static inline u32 iwl_rx_packet_len(const struct iwl_rx_packet *pkt)
{
return le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK;
}
static inline u32 iwl_rx_packet_payload_len(const struct iwl_rx_packet *pkt)
{
return iwl_rx_packet_len(pkt) - sizeof(pkt->hdr);
}
/**
* enum CMD_MODE - how to send the host commands ?
*
* @CMD_ASYNC: Return right away and don't wait for the response
* @CMD_WANT_SKB: Not valid with CMD_ASYNC. The caller needs the buffer of
* the response. The caller needs to call iwl_free_resp when done.
* @CMD_SEND_IN_RFKILL: Send the command even if the NIC is in RF-kill.
* @CMD_BLOCK_TXQS: Block TXQs while the comment is executing.
*/
enum CMD_MODE {
CMD_ASYNC = BIT(0),
CMD_WANT_SKB = BIT(1),
CMD_SEND_IN_RFKILL = BIT(2),
CMD_BLOCK_TXQS = BIT(3),
};
#define CMD_MODE_BITS 5
#define DEF_CMD_PAYLOAD_SIZE 320
/**
* struct iwl_device_cmd - device command structure
*
* For allocation of the command and tx queues, this establishes the overall
* size of the largest command we send to uCode, except for commands that
* aren't fully copied and use other TFD space.
*
* @hdr: command header
* @payload: payload for the command
* @hdr_wide: wide command header
* @payload_wide: payload for the wide command
*/
struct iwl_device_cmd {
union {
struct {
struct iwl_cmd_header hdr; /* uCode API */
u8 payload[DEF_CMD_PAYLOAD_SIZE];
};
struct {
struct iwl_cmd_header_wide hdr_wide;
u8 payload_wide[DEF_CMD_PAYLOAD_SIZE -
sizeof(struct iwl_cmd_header_wide) +
sizeof(struct iwl_cmd_header)];
};
};
} __packed;
/**
* struct iwl_device_tx_cmd - buffer for TX command
* @hdr: the header
* @payload: the payload placeholder
*
* The actual structure is sized dynamically according to need.
*/
struct iwl_device_tx_cmd {
struct iwl_cmd_header hdr;
u8 payload[];
} __packed;
Annotation
- Immediate include surface: `linux/ieee80211.h`, `linux/mm.h`, `linux/lockdep.h`, `linux/kernel.h`, `iwl-debug.h`, `iwl-config.h`, `fw/img.h`, `iwl-op-mode.h`.
- Detected declarations: `struct iwl_rx_packet`, `struct iwl_device_cmd`, `struct iwl_device_tx_cmd`, `struct iwl_host_cmd`, `struct iwl_rx_cmd_buffer`, `struct iwl_hcmd_names`, `struct iwl_hcmd_arr`, `struct iwl_dump_sanitize_ops`, `struct iwl_trans_config`, `struct iwl_trans_dump_data`.
- 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.