drivers/net/wireless/ath/ath12k/dp_rx.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath12k/dp_rx.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/ath12k/dp_rx.c- Extension
.c- Size
- 49872 bytes
- Lines
- 1844
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- 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
linux/fips.hlinux/ieee80211.hlinux/kernel.hlinux/skbuff.hcore.hdebug.hhw.hdp_rx.hdp_tx.hpeer.hdp_mon.hdebugfs_htt_stats.h
Detected Declarations
function ath12k_dp_list_cut_nodesfunction list_for_eachfunction ath12k_dp_rx_enqueue_freefunction ath12k_dp_rx_bufs_replenishfunction ath12k_dp_rxdma_mon_buf_ring_freefunction ath12k_dp_rxdma_buf_freefunction ath12k_dp_rxdma_mon_ring_buf_setupfunction ath12k_dp_rxdma_ring_buf_setupfunction ath12k_dp_rxdma_buf_setupfunction ath12k_dp_rx_pdev_srng_freefunction ath12k_dp_rx_pdev_reo_cleanupfunction ath12k_dp_rx_pdev_reo_setupfunction ath12k_dp_rx_pdev_srng_allocfunction ath12k_dp_init_rx_tid_rxqfunction ath12k_dp_rx_tid_cleanupfunction ath12k_dp_rx_reo_cmd_list_cleanupfunction ath12k_dp_reo_cmd_freefunction ath12k_dp_rx_process_reo_cmd_update_rx_queue_listfunction list_for_each_entry_safefunction ath12k_dp_rx_tid_del_funcfunction ath12k_dp_rx_tid_delete_handlerfunction ath12k_dp_mark_tid_as_inactivefunction ath12k_dp_rx_peer_tid_cleanupfunction ath12k_dp_prepare_reo_update_elemfunction ath12k_dp_rx_peer_tid_setupfunction ath12k_dp_rx_ampdu_startfunction ath12k_dp_rx_ampdu_stopfunction ath12k_dp_rx_peer_pn_replay_configfunction skb_queue_walkfunction ath12k_dp_rx_crypto_mic_lenfunction ath12k_dp_rx_crypto_param_lenfunction ath12k_dp_rx_crypto_icv_lenfunction ath12k_dp_rx_h_undecap_nwififunction ath12k_dp_rx_h_undecap_rawfunction ath12k_get_dot11_hdr_from_rx_descfunction ath12k_dp_rx_h_undecap_ethfunction ath12k_dp_rx_h_undecapfunction ath12k_dp_rx_h_find_link_peerfunction ath12k_dp_rx_h_ratefunction ath12k_dp_rx_h_ppdufunction ath12k_dp_rx_deliver_msdufunction ath12k_dp_rx_check_nwifi_hdr_len_validfunction ath12k_dp_rx_frag_timerfunction ath12k_dp_rx_peer_frag_setupfunction ath12k_dp_rx_h_undecap_fragfunction ath12k_dp_rx_h_cmp_fragsfunction ath12k_dp_rx_h_sort_fragsfunction skb_queue_walk
Annotated Snippet
if (ret) {
ath12k_warn(ab,
"failed to setup HAL_RXDMA_MONITOR_STATUS\n");
return ret;
}
}
return 0;
}
static void ath12k_dp_rx_pdev_srng_free(struct ath12k *ar)
{
struct ath12k_pdev_dp *dp = &ar->dp;
struct ath12k_base *ab = ar->ab;
int i;
for (i = 0; i < ab->hw_params->num_rxdma_per_pdev; i++)
ath12k_dp_srng_cleanup(ab, &dp->rxdma_mon_dst_ring[i]);
}
void ath12k_dp_rx_pdev_reo_cleanup(struct ath12k_base *ab)
{
struct ath12k_dp *dp = ath12k_ab_to_dp(ab);
int i;
for (i = 0; i < DP_REO_DST_RING_MAX; i++)
ath12k_dp_srng_cleanup(ab, &dp->reo_dst_ring[i]);
}
int ath12k_dp_rx_pdev_reo_setup(struct ath12k_base *ab)
{
struct ath12k_dp *dp = ath12k_ab_to_dp(ab);
int ret;
int i;
for (i = 0; i < DP_REO_DST_RING_MAX; i++) {
ret = ath12k_dp_srng_setup(ab, &dp->reo_dst_ring[i],
HAL_REO_DST, i, 0,
DP_REO_DST_RING_SIZE);
if (ret) {
ath12k_warn(ab, "failed to setup reo_dst_ring\n");
goto err_reo_cleanup;
}
}
return 0;
err_reo_cleanup:
ath12k_dp_rx_pdev_reo_cleanup(ab);
return ret;
}
static int ath12k_dp_rx_pdev_srng_alloc(struct ath12k *ar)
{
struct ath12k_pdev_dp *dp = &ar->dp;
struct ath12k_base *ab = ar->ab;
int i;
int ret;
u32 mac_id = dp->mac_id;
for (i = 0; i < ab->hw_params->num_rxdma_per_pdev; i++) {
ret = ath12k_dp_srng_setup(ar->ab,
&dp->rxdma_mon_dst_ring[i],
HAL_RXDMA_MONITOR_DST,
0, mac_id + i,
DP_RXDMA_MONITOR_DST_RING_SIZE(ab));
if (ret) {
ath12k_warn(ar->ab,
"failed to setup HAL_RXDMA_MONITOR_DST\n");
return ret;
}
}
return 0;
}
void ath12k_dp_init_rx_tid_rxq(struct ath12k_dp_rx_tid_rxq *rx_tid_rxq,
struct ath12k_dp_rx_tid *rx_tid,
bool active)
{
rx_tid_rxq->tid = rx_tid->tid;
rx_tid_rxq->active = active;
rx_tid_rxq->qbuf = rx_tid->qbuf;
}
EXPORT_SYMBOL(ath12k_dp_init_rx_tid_rxq);
static void ath12k_dp_rx_tid_cleanup(struct ath12k_base *ab,
struct ath12k_reoq_buf *tid_qbuf)
{
Annotation
- Immediate include surface: `linux/fips.h`, `linux/ieee80211.h`, `linux/kernel.h`, `linux/skbuff.h`, `core.h`, `debug.h`, `hw.h`, `dp_rx.h`.
- Detected declarations: `function ath12k_dp_list_cut_nodes`, `function list_for_each`, `function ath12k_dp_rx_enqueue_free`, `function ath12k_dp_rx_bufs_replenish`, `function ath12k_dp_rxdma_mon_buf_ring_free`, `function ath12k_dp_rxdma_buf_free`, `function ath12k_dp_rxdma_mon_ring_buf_setup`, `function ath12k_dp_rxdma_ring_buf_setup`, `function ath12k_dp_rxdma_buf_setup`, `function ath12k_dp_rx_pdev_srng_free`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.