drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c- Extension
.c- Size
- 66674 bytes
- Lines
- 2318
- 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
dp_rx.h../dp_tx.h../peer.hhal_qcn9274.hhal_wcn7850.hhal_qcc2072.h
Detected Declarations
function Copyrightfunction ath12k_wifi7_peer_rx_tid_qref_setupfunction ath12k_wifi7_peer_rx_tid_qref_resetfunction ath12k_wifi7_dp_rx_peer_tid_deletefunction ath12k_wifi7_dp_rx_link_desc_returnfunction ath12k_wifi7_dp_reo_cmd_sendfunction ath12k_wifi7_peer_rx_tid_reo_updatefunction ath12k_wifi7_dp_reo_cache_flushfunction ath12k_wifi7_dp_rx_assign_reoqfunction ath12k_wifi7_dp_rx_tid_delete_handlerfunction ath12k_wifi7_dp_rx_h_csum_offloadfunction ath12k_wifi7_dp_rx_h_mpdufunction ath12k_wifi7_dp_rx_msdu_coalescefunction ath12k_wifi7_dp_rx_process_msdufunction ath12k_wifi7_dp_rx_process_received_packetsfunction ath12k_wifi7_dp_rx_processfunction ath12k_wifi7_dp_rx_h_defrag_validate_incr_pnfunction ath12k_wifi7_dp_rx_h_defrag_reo_reinjectfunction ath12k_wifi7_dp_rx_h_verify_tkip_micfunction ath12k_wifi7_dp_rx_h_defragfunction skb_queue_walkfunction ath12k_wifi7_dp_rx_frags_cleanupfunction ath12k_wifi7_dp_rx_frag_h_mpdufunction ath12k_wifi7_dp_process_rx_err_buffunction ath12k_dp_h_msdu_buffer_typefunction ath12k_wifi7_dp_rx_process_errfunction ath12k_wifi7_dp_rx_null_q_desc_sg_dropfunction skb_queue_walk_safefunction ath12k_wifi7_dp_rx_h_null_q_descfunction ath12k_wifi7_dp_rx_h_tkip_mic_errfunction ath12k_wifi7_dp_rx_h_unauth_wds_errfunction ath12k_wifi7_dp_rx_h_rxdma_errfunction ath12k_wifi7_dp_rx_h_reo_errfunction ath12k_wifi7_dp_rx_wbm_errfunction ath12k_wifi7_dp_setup_pn_check_reo_cmdfunction ath12k_wifi7_dp_rx_process_wbm_errfunction skb_queue_walkfunction ath12k_dp_rxdma_ring_sel_config_qcn9274function ath12k_dp_rxdma_ring_sel_config_wcn7850function ath12k_dp_rxdma_ring_sel_config_qcc2072function ath12k_wifi7_dp_rx_process_reo_statusfunction list_for_each_entry_safefunction ath12k_wifi7_dp_rxdesc_mpdu_valid
Annotated Snippet
if (ret) {
kfree(vaddr);
return ret;
}
buf->vaddr = vaddr;
buf->paddr_aligned = paddr_aligned;
buf->size = hw_desc_sz;
}
rx_tid->qbuf = *buf;
return 0;
}
int ath12k_wifi7_dp_rx_tid_delete_handler(struct ath12k_base *ab,
struct ath12k_dp_rx_tid_rxq *rx_tid)
{
struct ath12k_hal_reo_cmd cmd = {};
cmd.flag = HAL_REO_CMD_FLG_NEED_STATUS;
cmd.addr_lo = lower_32_bits(rx_tid->qbuf.paddr_aligned);
cmd.addr_hi = upper_32_bits(rx_tid->qbuf.paddr_aligned);
cmd.upd0 |= HAL_REO_CMD_UPD0_VLD;
/* Observed flush cache failure, to avoid that set vld bit during delete */
cmd.upd1 |= HAL_REO_CMD_UPD1_VLD;
return ath12k_wifi7_dp_reo_cmd_send(ab, rx_tid,
HAL_REO_CMD_UPDATE_RX_QUEUE, &cmd,
ath12k_dp_rx_tid_del_func);
}
static void ath12k_wifi7_dp_rx_h_csum_offload(struct sk_buff *msdu,
struct hal_rx_desc_data *rx_info)
{
msdu->ip_summed = (rx_info->ip_csum_fail || rx_info->l4_csum_fail) ?
CHECKSUM_NONE : CHECKSUM_UNNECESSARY;
}
static int ath12k_wifi7_dp_rx_h_mpdu(struct ath12k_pdev_dp *dp_pdev,
struct sk_buff *msdu,
struct hal_rx_desc_data *rx_info)
{
struct ath12k_skb_rxcb *rxcb;
enum hal_encrypt_type enctype;
bool is_decrypted = false;
struct ieee80211_hdr *hdr;
struct ath12k_dp_peer *peer;
struct ieee80211_rx_status *rx_status = rx_info->rx_status;
u32 err_bitmap = rx_info->err_bitmap;
RCU_LOCKDEP_WARN(!rcu_read_lock_held(),
"dp_rx_h_mpdu called without rcu lock");
/* PN for multicast packets will be checked in mac80211 */
rxcb = ATH12K_SKB_RXCB(msdu);
rxcb->is_mcbc = rx_info->is_mcbc;
if (rxcb->is_mcbc)
rxcb->peer_id = rx_info->peer_id;
peer = ath12k_dp_peer_find_by_peerid(dp_pdev, rxcb->peer_id);
if (peer) {
/*
* Drop the 3-address multicast packet from 4-address
* peer To avoid receiving the duplicate multicast packet
* Specifically from AP interface in 3-address format
*/
if (rxcb->is_mcbc &&
rx_info->decap_type == DP_RX_DECAP_TYPE_ETHERNET2_DIX) {
if (peer->use_4addr &&
!(rx_info->is_from_ds && rx_info->is_to_ds))
return -EINVAL;
}
/* resetting mcbc bit because mcbc packets are unicast
* packets only for AP as STA sends unicast packets.
*/
rxcb->is_mcbc = rxcb->is_mcbc && !peer->ucast_ra_only;
if (rxcb->is_mcbc)
enctype = peer->sec_type_grp;
else
enctype = peer->sec_type;
} else {
enctype = HAL_ENCRYPT_TYPE_OPEN;
}
if (enctype != HAL_ENCRYPT_TYPE_OPEN && !err_bitmap)
is_decrypted = rx_info->is_decrypted;
Annotation
- Immediate include surface: `dp_rx.h`, `../dp_tx.h`, `../peer.h`, `hal_qcn9274.h`, `hal_wcn7850.h`, `hal_qcc2072.h`.
- Detected declarations: `function Copyright`, `function ath12k_wifi7_peer_rx_tid_qref_setup`, `function ath12k_wifi7_peer_rx_tid_qref_reset`, `function ath12k_wifi7_dp_rx_peer_tid_delete`, `function ath12k_wifi7_dp_rx_link_desc_return`, `function ath12k_wifi7_dp_reo_cmd_send`, `function ath12k_wifi7_peer_rx_tid_reo_update`, `function ath12k_wifi7_dp_reo_cache_flush`, `function ath12k_wifi7_dp_rx_assign_reoq`, `function ath12k_wifi7_dp_rx_tid_delete_handler`.
- 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.