drivers/net/wireless/ath/ath12k/dp.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath12k/dp.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/ath12k/dp.h- Extension
.h- Size
- 20909 bytes
- Lines
- 705
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
hw.hdp_htt.hdp_cmn.hlinux/rhashtable.h
Detected Declarations
struct ath12k_basestruct ath12k_dp_link_peerstruct ath12k_dpstruct ath12k_vifstruct ath12k_link_vifstruct ath12k_ext_irq_grpstruct ath12k_dp_rx_tidstruct ath12k_dp_rx_tid_rxqstruct dp_srngstruct dp_rxdma_mon_ringstruct dp_rxdma_ringstruct dp_tx_ringstruct ath12k_pdev_mon_statsstruct dp_link_desc_bankstruct dp_mon_mpdustruct ath12k_mon_datastruct ath12k_pdev_dpstruct ath12k_dp_tx_bank_profilestruct ath12k_hp_update_timerstruct ath12k_rx_desc_infostruct ath12k_tx_desc_infostruct ath12k_tx_desc_paramsstruct ath12k_spt_infostruct ath12k_reo_queue_refstruct ath12k_reo_q_addr_lutstruct ath12k_link_statsstruct ath12k_dp_arch_opsstruct ath12k_device_dp_tx_err_statsstruct ath12k_device_dp_statsstruct ath12k_dpenum dp_mon_status_buf_stateenum ath12k_dp_ppdu_statefunction ath12k_dp_arch_tx_get_vdev_bank_configfunction ath12k_dp_arch_reo_cmd_sendfunction ath12k_dp_arch_setup_pn_check_reo_cmdfunction ath12k_dp_arch_rx_peer_tid_deletefunction ath12k_dp_arch_reo_cache_flushfunction ath12k_dp_arch_rx_link_desc_returnfunction ath12k_dp_arch_rx_frags_cleanupfunction ath12k_dp_arch_peer_rx_tid_reo_updatefunction ath12k_dp_arch_rx_assign_reoqfunction ath12k_dp_arch_peer_rx_tid_qref_setupfunction ath12k_dp_arch_peer_rx_tid_qref_resetfunction ath12k_dp_arch_rx_tid_delete_handlerfunction ath12k_dp_get_mac_addrfunction ath12k_dp_hw_grp_to_dpfunction ath12k_dp_service_srngfunction ath12k_pdev_dp_to_hw
Annotated Snippet
struct dp_srng {
u32 *vaddr_unaligned;
u32 *vaddr;
dma_addr_t paddr_unaligned;
dma_addr_t paddr;
int size;
u32 ring_id;
};
struct dp_rxdma_mon_ring {
struct dp_srng refill_buf_ring;
struct idr bufs_idr;
/* Protects bufs_idr */
spinlock_t idr_lock;
int bufs_max;
};
struct dp_rxdma_ring {
struct dp_srng refill_buf_ring;
int bufs_max;
};
#define ATH12K_TX_COMPL_NEXT(ab, x) (((x) + 1) % DP_TX_COMP_RING_SIZE(ab))
struct dp_tx_ring {
u8 tcl_data_ring_id;
struct dp_srng tcl_data_ring;
struct dp_srng tcl_comp_ring;
struct hal_wbm_completion_ring_tx *tx_status;
int tx_status_head;
int tx_status_tail;
};
struct ath12k_pdev_mon_stats {
u32 status_ppdu_state;
u32 status_ppdu_start;
u32 status_ppdu_end;
u32 status_ppdu_compl;
u32 status_ppdu_start_mis;
u32 status_ppdu_end_mis;
u32 status_ppdu_done;
u32 dest_ppdu_done;
u32 dest_mpdu_done;
u32 dest_mpdu_drop;
u32 dup_mon_linkdesc_cnt;
u32 dup_mon_buf_cnt;
u32 dest_mon_stuck;
u32 dest_mon_not_reaped;
};
enum dp_mon_status_buf_state {
DP_MON_STATUS_MATCH,
DP_MON_STATUS_NO_DMA,
DP_MON_STATUS_LAG,
DP_MON_STATUS_LEAD,
DP_MON_STATUS_REPLINISH,
};
struct dp_link_desc_bank {
void *vaddr_unaligned;
void *vaddr;
dma_addr_t paddr_unaligned;
dma_addr_t paddr;
u32 size;
};
/* Size to enforce scatter idle list mode */
#define DP_LINK_DESC_ALLOC_SIZE_THRESH 0x200000
#define DP_LINK_DESC_BANKS_MAX 8
#define DP_LINK_DESC_START 0x4000
#define DP_LINK_DESC_SHIFT 3
#define DP_LINK_DESC_COOKIE_SET(id, page) \
((((id) + DP_LINK_DESC_START) << DP_LINK_DESC_SHIFT) | (page))
#define DP_LINK_DESC_BANK_MASK GENMASK(2, 0)
#define DP_RX_DESC_COOKIE_INDEX_MAX 0x3ffff
#define DP_RX_DESC_COOKIE_POOL_ID_MAX 0x1c0000
#define DP_RX_DESC_COOKIE_MAX \
(DP_RX_DESC_COOKIE_INDEX_MAX | DP_RX_DESC_COOKIE_POOL_ID_MAX)
#define DP_NOT_PPDU_ID_WRAP_AROUND 20000
enum ath12k_dp_ppdu_state {
DP_PPDU_STATUS_START,
DP_PPDU_STATUS_DONE,
};
struct dp_mon_mpdu {
Annotation
- Immediate include surface: `hw.h`, `dp_htt.h`, `dp_cmn.h`, `linux/rhashtable.h`.
- Detected declarations: `struct ath12k_base`, `struct ath12k_dp_link_peer`, `struct ath12k_dp`, `struct ath12k_vif`, `struct ath12k_link_vif`, `struct ath12k_ext_irq_grp`, `struct ath12k_dp_rx_tid`, `struct ath12k_dp_rx_tid_rxq`, `struct dp_srng`, `struct dp_rxdma_mon_ring`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source 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.