drivers/net/wireless/ath/ath12k/wifi7/dp.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath12k/wifi7/dp.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/ath12k/wifi7/dp.c- Extension
.c- Size
- 4958 bytes
- Lines
- 182
- 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.
- 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
../core.h../debug.h../dp_rx.h../dp_tx.hhal_desc.h../dp_mon.hdp_mon.h../dp_cmn.hdp_rx.hdp.hdp_tx.hhal.h
Detected Declarations
function Copyrightfunction ath12k_wifi7_dp_device_free
Annotated Snippet
if (ring_mask & BIT(id)) {
work_done =
ath12k_wifi7_dp_mon_process_ring(dp, id, napi,
budget,
0);
budget -= work_done;
tot_work_done += work_done;
if (budget <= 0)
goto done;
}
}
}
}
if (dp->hw_params->ring_mask->rx_mon_dest[grp_id]) {
monitor_mode = ATH12K_DP_RX_MONITOR_MODE;
ring_mask = dp->hw_params->ring_mask->rx_mon_dest[grp_id];
for (i = 0; i < dp->ab->num_radios; i++) {
for (j = 0; j < dp->hw_params->num_rxdma_per_pdev; j++) {
int id = i * dp->hw_params->num_rxdma_per_pdev + j;
if (ring_mask & BIT(id)) {
work_done =
ath12k_wifi7_dp_mon_process_ring(dp, id, napi,
budget,
monitor_mode);
budget -= work_done;
tot_work_done += work_done;
if (budget <= 0)
goto done;
}
}
}
}
if (dp->hw_params->ring_mask->tx_mon_dest[grp_id]) {
monitor_mode = ATH12K_DP_TX_MONITOR_MODE;
ring_mask = dp->hw_params->ring_mask->tx_mon_dest[grp_id];
for (i = 0; i < dp->ab->num_radios; i++) {
for (j = 0; j < dp->hw_params->num_rxdma_per_pdev; j++) {
int id = i * dp->hw_params->num_rxdma_per_pdev + j;
if (ring_mask & BIT(id)) {
work_done =
ath12k_wifi7_dp_mon_process_ring(dp, id,
napi, budget,
monitor_mode);
budget -= work_done;
tot_work_done += work_done;
if (budget <= 0)
goto done;
}
}
}
}
if (dp->hw_params->ring_mask->reo_status[grp_id])
ath12k_wifi7_dp_rx_process_reo_status(dp);
if (dp->hw_params->ring_mask->host2rxdma[grp_id]) {
struct dp_rxdma_ring *rx_ring = &dp->rx_refill_buf_ring;
LIST_HEAD(list);
ath12k_dp_rx_bufs_replenish(dp, rx_ring, &list, 0);
}
/* TODO: Implement handler for other interrupts */
done:
return tot_work_done;
}
static struct ath12k_dp_arch_ops ath12k_wifi7_dp_arch_ops = {
.service_srng = ath12k_wifi7_dp_service_srng,
.tx_get_vdev_bank_config = ath12k_wifi7_dp_tx_get_vdev_bank_config,
.reo_cmd_send = ath12k_wifi7_dp_reo_cmd_send,
.setup_pn_check_reo_cmd = ath12k_wifi7_dp_setup_pn_check_reo_cmd,
.rx_peer_tid_delete = ath12k_wifi7_dp_rx_peer_tid_delete,
.reo_cache_flush = ath12k_wifi7_dp_reo_cache_flush,
.rx_link_desc_return = ath12k_wifi7_dp_rx_link_desc_return,
.rx_frags_cleanup = ath12k_wifi7_dp_rx_frags_cleanup,
.peer_rx_tid_reo_update = ath12k_wifi7_peer_rx_tid_reo_update,
.rx_assign_reoq = ath12k_wifi7_dp_rx_assign_reoq,
.peer_rx_tid_qref_setup = ath12k_wifi7_peer_rx_tid_qref_setup,
.peer_rx_tid_qref_reset = ath12k_wifi7_peer_rx_tid_qref_reset,
.rx_tid_delete_handler = ath12k_wifi7_dp_rx_tid_delete_handler,
};
Annotation
- Immediate include surface: `../core.h`, `../debug.h`, `../dp_rx.h`, `../dp_tx.h`, `hal_desc.h`, `../dp_mon.h`, `dp_mon.h`, `../dp_cmn.h`.
- Detected declarations: `function Copyright`, `function ath12k_wifi7_dp_device_free`.
- 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.