drivers/net/wireless/ath/ath11k/dp_rx.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath11k/dp_rx.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/ath11k/dp_rx.c- Extension
.c- Size
- 160747 bytes
- Lines
- 5802
- 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.
- 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.hdebugfs_htt_stats.hdebugfs_sta.hhal_desc.hhw.hdp_rx.hhal_rx.hdp_tx.hpeer.h
Detected Declarations
function Copyrightfunction ath11k_dp_rx_h_mpdu_start_enctypefunction ath11k_dp_rx_h_msdu_start_decap_typefunction ath11k_dp_rx_h_msdu_start_ldpc_supportfunction ath11k_dp_rx_h_msdu_start_mesh_ctl_presentfunction ath11k_dp_rx_h_mpdu_start_seq_ctrl_validfunction ath11k_dp_rx_h_mpdu_start_fc_validfunction ath11k_dp_rx_h_mpdu_start_more_fragsfunction ath11k_dp_rx_h_mpdu_start_frag_nofunction ath11k_dp_rx_h_mpdu_start_seq_nofunction ath11k_dp_rx_h_attn_msdu_donefunction ath11k_dp_rx_h_attn_l4_cksum_failfunction ath11k_dp_rx_h_attn_ip_cksum_failfunction ath11k_dp_rx_h_attn_is_decryptedfunction ath11k_dp_rx_h_attn_mpdu_errfunction ath11k_dp_rx_h_attn_msdu_len_errfunction ath11k_dp_rx_h_msdu_start_msdu_lenfunction ath11k_dp_rx_h_msdu_start_sgifunction ath11k_dp_rx_h_msdu_start_rate_mcsfunction ath11k_dp_rx_h_msdu_start_rx_bwfunction ath11k_dp_rx_h_msdu_start_freqfunction ath11k_dp_rx_h_msdu_start_pkt_typefunction ath11k_dp_rx_h_msdu_start_nssfunction ath11k_dp_rx_h_mpdu_start_tidfunction ath11k_dp_rx_h_mpdu_start_peer_idfunction ath11k_dp_rx_h_msdu_end_l3padfunction ath11k_dp_rx_h_msdu_end_first_msdufunction ath11k_dp_rx_h_msdu_end_last_msdufunction ath11k_dp_rx_desc_end_tlv_copyfunction ath11k_dp_rxdesc_get_mpdulen_errfunction ath11k_dp_rxdesc_mpdu_validfunction ath11k_dp_rxdesc_get_ppduidfunction ath11k_dp_rxdesc_set_msdu_lenfunction ath11k_dp_rx_h_attn_is_mcbcfunction ath11k_dp_rxdesc_mac_addr2_validfunction ath11k_dp_service_mon_ringfunction ath11k_dp_purge_mon_ringfunction ath11k_dp_rxbufs_replenishfunction ath11k_dp_rxdma_buf_ring_freefunction ath11k_dp_rxdma_pdev_buf_freefunction ath11k_dp_rxdma_ring_buf_setupfunction ath11k_dp_rxdma_pdev_buf_setupfunction ath11k_dp_rx_pdev_srng_freefunction ath11k_dp_pdev_reo_cleanupfunction ath11k_dp_pdev_reo_setupfunction ath11k_dp_rx_pdev_srng_allocfunction ath11k_dp_reo_cmd_list_cleanupfunction list_for_each_entry_safe
Annotated Snippet
if (ret) {
ath11k_warn(ab, "failed to setup reo_dst_ring\n");
goto err_reo_cleanup;
}
}
return 0;
err_reo_cleanup:
ath11k_dp_pdev_reo_cleanup(ab);
return ret;
}
static int ath11k_dp_rx_pdev_srng_alloc(struct ath11k *ar)
{
struct ath11k_pdev_dp *dp = &ar->dp;
struct ath11k_base *ab = ar->ab;
struct dp_srng *srng = NULL;
int i;
int ret;
ret = ath11k_dp_srng_setup(ar->ab,
&dp->rx_refill_buf_ring.refill_buf_ring,
HAL_RXDMA_BUF, 0,
dp->mac_id, DP_RXDMA_BUF_RING_SIZE);
if (ret) {
ath11k_warn(ar->ab, "failed to setup rx_refill_buf_ring\n");
return ret;
}
if (ar->ab->hw_params.rx_mac_buf_ring) {
for (i = 0; i < ab->hw_params.num_rxdma_per_pdev; i++) {
ret = ath11k_dp_srng_setup(ar->ab,
&dp->rx_mac_buf_ring[i],
HAL_RXDMA_BUF, 1,
dp->mac_id + i, 1024);
if (ret) {
ath11k_warn(ar->ab, "failed to setup rx_mac_buf_ring %d\n",
i);
return ret;
}
}
}
for (i = 0; i < ab->hw_params.num_rxdma_per_pdev; i++) {
ret = ath11k_dp_srng_setup(ar->ab, &dp->rxdma_err_dst_ring[i],
HAL_RXDMA_DST, 0, dp->mac_id + i,
DP_RXDMA_ERR_DST_RING_SIZE);
if (ret) {
ath11k_warn(ar->ab, "failed to setup rxdma_err_dst_ring %d\n", i);
return ret;
}
}
for (i = 0; i < ab->hw_params.num_rxdma_per_pdev; i++) {
srng = &dp->rx_mon_status_refill_ring[i].refill_buf_ring;
ret = ath11k_dp_srng_setup(ar->ab,
srng,
HAL_RXDMA_MONITOR_STATUS, 0, dp->mac_id + i,
DP_RXDMA_MON_STATUS_RING_SIZE);
if (ret) {
ath11k_warn(ar->ab,
"failed to setup rx_mon_status_refill_ring %d\n", i);
return ret;
}
}
/* if rxdma1_enable is false, then it doesn't need
* to setup rxdam_mon_buf_ring, rxdma_mon_dst_ring
* and rxdma_mon_desc_ring.
* init reap timer for QCA6390.
*/
if (!ar->ab->hw_params.rxdma1_enable) {
//init mon status buffer reap timer
timer_setup(&ar->ab->mon_reap_timer,
ath11k_dp_service_mon_ring, 0);
return 0;
}
ret = ath11k_dp_srng_setup(ar->ab,
&dp->rxdma_mon_buf_ring.refill_buf_ring,
HAL_RXDMA_MONITOR_BUF, 0, dp->mac_id,
DP_RXDMA_MONITOR_BUF_RING_SIZE);
if (ret) {
ath11k_warn(ar->ab,
"failed to setup HAL_RXDMA_MONITOR_BUF\n");
return ret;
}
Annotation
- Immediate include surface: `linux/fips.h`, `linux/ieee80211.h`, `linux/kernel.h`, `linux/skbuff.h`, `core.h`, `debug.h`, `debugfs_htt_stats.h`, `debugfs_sta.h`.
- Detected declarations: `function Copyright`, `function ath11k_dp_rx_h_mpdu_start_enctype`, `function ath11k_dp_rx_h_msdu_start_decap_type`, `function ath11k_dp_rx_h_msdu_start_ldpc_support`, `function ath11k_dp_rx_h_msdu_start_mesh_ctl_present`, `function ath11k_dp_rx_h_mpdu_start_seq_ctrl_valid`, `function ath11k_dp_rx_h_mpdu_start_fc_valid`, `function ath11k_dp_rx_h_mpdu_start_more_frags`, `function ath11k_dp_rx_h_mpdu_start_frag_no`, `function ath11k_dp_rx_h_mpdu_start_seq_no`.
- 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.
- 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.