STRUCT IWL_TRANS_PCIE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct iwl_trans_pcie(9) β€” the PCIe transport's whole personality, bestie

okay so like. this is the Kernel API Manual page. the struct lives in ./drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/internal.h and honestly it's giving main character energy β€” it holds literally every scrap of PCIe-transport-specific data. buckle up πŸŽ€


✨ NAME ✨

struct iwl_trans_pcie β€” PCIe transport specific data. that's it. that's the vibe. πŸ’…


🌸 SYNOPSIS 🌸

struct iwl_trans_pcie {
    struct iwl_rxq *rxq;
    struct iwl_rx_mem_buffer *rx_pool;
    struct iwl_rx_mem_buffer **global_table;
    struct iwl_rb_allocator rba;
    union {
      struct iwl_context_info *ctxt_info;
      struct iwl_context_info_v2 *ctxt_info_v2;
    };
    struct iwl_prph_info *prph_info;
    struct iwl_prph_scratch *prph_scratch;
    void *iml;
    size_t iml_len;
    dma_addr_t ctxt_info_dma_addr;
    dma_addr_t prph_info_dma_addr;
    dma_addr_t prph_scratch_dma_addr;
    dma_addr_t iml_dma_addr;
    struct iwl_trans *trans;
    struct net_device *napi_dev;
    __le32 *ict_tbl;
    dma_addr_t ict_tbl_dma;
    int ict_index;
    bool use_ict;
    bool is_down, opmode_down;
    s8 debug_rfkill;
    struct isr_statistics isr_stats;
    spinlock_t irq_lock;
    struct mutex mutex;
    u32 inta_mask;
    u32 scd_base_addr;
    struct iwl_dma_ptr kw;
    struct iwl_dram_regions pnvm_data;
    struct iwl_dram_regions reduced_tables_data;
    struct iwl_txq *txq_memory;
    struct pci_dev *pci_dev;
    u8 __iomem *hw_base;
    bool ucode_write_complete;
    enum {
      IWL_SX_INVALID = 0,
      IWL_SX_WAITING,
      IWL_SX_ERROR,
      IWL_SX_COMPLETE,
    } sx_state;
    wait_queue_head_t ucode_write_waitq;
    wait_queue_head_t sx_waitq;
    u16 num_rx_bufs;
    u32 rx_page_order;
    u32 rx_buf_bytes;
    u32 supported_dma_mask;
    spinlock_t alloc_page_lock;
    struct page *alloc_page;
    u32 alloc_page_used;
    spinlock_t reg_lock;
    bool cmd_hold_nic_awake;
  #ifdef CONFIG_IWLWIFI_DEBUGFS;
    struct cont_rec fw_mon_data;
  #endif;
    struct msix_entry msix_entries[IWL_MAX_RX_HW_QUEUES];
    bool msix_enabled;
    u8 shared_vec_mask;
    u32 alloc_vecs;
    u32 def_irq;
    u32 fh_init_mask;
    u32 hw_init_mask;
    u32 fh_mask;
    u32 hw_mask;
    cpumask_t affinity_mask[IWL_MAX_RX_HW_QUEUES];
    u16 tx_cmd_queue_size;
    bool in_rescan;
    void *base_rb_stts;
    dma_addr_t base_rb_stts_dma;
    enum iwl_pcie_fw_reset_state fw_reset_state;
    wait_queue_head_t fw_reset_waitq;
    enum iwl_pcie_imr_status imr_status;
    wait_queue_head_t imr_waitq;
    char rf_name[32];
    struct iwl_pcie_txqs txqs;
    s8 me_present;
    struct delayed_work me_recheck_wk;
    struct iwl_dma_ptr invalid_tx_cmd;
    wait_queue_head_t wait_command_queue;
    struct kmem_cache *dev_cmd_pool;
    char dev_cmd_pool_name[50];
    bool pm_support;
    bool ltr_enabled;
 };

πŸ¦‹ Members πŸ¦‹

okay bestie, here's the full tour, no skipping, we're doing ALL of them πŸ’–

  • rxq β€” all the RX queue data. every single queue's whole deal lives here ✨
  • rx_pool β€” the initial pool of iwl_rx_mem_buffer for all the queues
  • global_table β€” table mapping the received VID from hw to rxb
  • rba β€” the allocator for RX replenishing
  • {unnamed_union} β€” anonymous. mysterious. we don't know her name. 🫢
  • ctxt_info β€” context information for FW self init
  • ctxt_info_v2 β€” context information for v1 devices
  • prph_info β€” prph info for self init
  • prph_scratch β€” prph scratch for self init
  • iml β€” image loader image virtual address
  • iml_len β€” image loader image size
  • ctxt_info_dma_addr β€” dma addr of context information
  • prph_info_dma_addr β€” dma addr of prph info
  • prph_scratch_dma_addr β€” dma addr of prph scratch
  • iml_dma_addr β€” image loader image DMA address
  • trans β€” pointer to the generic transport area
  • napi_dev β€” the (fake) netdev for NAPI registration. fake it till you make it πŸ’…
  • ict_tbl β€” ICT table pointer
  • ict_tbl_dma β€” ICT table DMA address
  • ict_index β€” current ICT read index
  • use_ict β€” whether or not ICT (interrupt table) is used
  • is_down β€” indicates the NIC is down
  • opmode_down β€” indicates opmode went away
  • debug_rfkill β€” RF-kill debugging state, -1 for unset, 0/1 for radio enable/disable
  • isr_stats β€” interrupt statistics
  • irq_lock β€” lock to synchronize IRQ handling
  • mutex β€” to protect stop_device / start_fw / start_hw
  • inta_mask β€” interrupt (INT-A) mask
  • scd_base_addr β€” scheduler sram base address in SRAM
  • kw β€” keep warm address πŸ”₯
  • pnvm_data β€” holds info about pnvm payloads allocated in DRAM
  • reduced_tables_data β€” holds info about power reduced tablse payloads allocated in DRAM (yes, "tablse" β€” word for word, we don't edit the original's typo, that's the author's child 😭)
  • txq_memory β€” TXQ allocation array
  • pci_dev β€” basic pci-network driver stuff
  • hw_base β€” pci hardware address support
  • ucode_write_complete β€” indicates that the ucode has been copied. βœ…
  • sx_state β€” state tracking Sx transitions
  • ucode_write_waitq β€” wait queue for uCode load
  • sx_waitq β€” waitqueue for Sx transitions
  • num_rx_bufs β€” number of RX buffers to allocate/use
  • rx_page_order β€” page order for receive buffer size
  • rx_buf_bytes β€” RX buffer (RB) size in bytes
  • supported_dma_mask β€” DMA mask to validate the actual address against, will be DMA_BIT_MASK(11) or DMA_BIT_MASK(12) depending on the device
  • alloc_page_lock β€” spinlock for the page allocator
  • alloc_page β€” allocated page to still use parts of
  • alloc_page_used β€” how much of the allocated page was already used (bytes)
  • reg_lock β€” protect hw register access
  • cmd_hold_nic_awake β€” indicates NIC is held awake for APMG workaround during commands in flight
  • fw_mon_data β€” fw continuous recording data
  • msix_entries β€” array of MSI-X entries
  • msix_enabled β€” true if managed to enable MSI-X
  • shared_vec_mask β€” the type of causes the shared vector handles (see iwl_shared_irq_flags).
  • alloc_vecs β€” the number of interrupt vectors allocated by the OS
  • def_irq β€” default irq for non rx causes
  • fh_init_mask β€” initial unmasked fh causes
  • hw_init_mask β€” initial unmasked hw causes
  • fh_mask β€” current unmasked fh causes
  • hw_mask β€” current unmasked hw causes
  • affinity_mask β€” IRQ affinity mask for each RX queue
  • in_rescan β€” true if we have triggered a device rescan
  • base_rb_stts β€” base virtual address of receive buffer status for all queues
  • base_rb_stts_dma β€” base physical address of receive buffer status
  • fw_reset_state β€” state of FW reset handshake
  • fw_reset_waitq β€” waitqueue for FW reset handshake
  • imr_status β€” imr dma state machine
  • imr_waitq β€” imr wait queue for dma completion
  • rf_name β€” name/version of the CRF, if any
  • txqs β€” transport tx queues data.
  • me_present β€” WiAMT/CSME is detected as present (1), not present (0) or unknown (-1, so can still use it as a boolean safely)
  • me_recheck_wk β€” worker to recheck WiAMT/CSME presence
  • invalid_tx_cmd β€” invalid TX command buffer
  • wait_command_queue β€” wait queue for sync commands
  • dev_cmd_pool β€” pool for Tx cmd allocation β€” for internal use only. The user should use iwl_trans_{alloc,free}_tx_cmd. πŸ”’ no touching, that's an internal-use-only situation
  • dev_cmd_pool_name β€” name for the TX command allocation pool
  • pm_support β€” set to true in start_hw if link pm is supported
  • ltr_enabled β€” set to true if the LTR is enabled
also lowkey note: tx_cmd_queue_size is chillin' in the struct up there but the Members list doesn't describe it, so we're not gonna make anything up about it. we respect the mystery πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, fr fr:

  • Kernel file ./drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/internal.h
  • struct iwl_rx_mem_buffer(9)
  • struct iwl_rx_transfer_desc(9)
  • struct iwl_rx_completion_desc(9)
  • struct iwl_rx_completion_desc_bz(9)
  • struct iwl_rxq(9)
  • struct iwl_rb_allocator(9)
  • iwl_get_closed_rb_stts(9)
  • enum iwl_fw_mon_dbgfs_state(9)
  • enum iwl_shared_irq_flags(9)
  • enum iwl_image_response_code(9)
  • struct cont_rec(9)
  • enum iwl_pcie_imr_status(9)
  • struct iwl_txq(9)
  • struct iwl_pcie_txqs(9)
  • iwl_txq_inc_wrap(9)
  • iwl_txq_dec_wrap(9)

and that's the whole page bestie, you ate it up πŸ’œ this dropped from ./drivers/net/wireless/intel/i... back in October 2026, and it's titled struct iwl_trans_pcie(9) β€” go forth and read the source, ily, bye πŸ¦‹βœ¨πŸŽ€

πŸ“¦ where this page comes from