drivers/net/wireless/ath/ath12k/wifi7/hw.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath12k/wifi7/hw.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/ath12k/wifi7/hw.c- Extension
.c- Size
- 31132 bytes
- Lines
- 1185
- 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
linux/types.hlinux/bitops.hlinux/bitfield.h../debug.h../core.h../ce.hce.h../hw.hhw.h../mhi.hmhi.hdp_rx.h../peer.hwmi.h../wow.h../debugfs.h../debugfs_sta.h../testmode.hhal.hdp_tx.h
Detected Declarations
function ath12k_wifi7_hw_qcn9274_mac_from_pdev_idfunction ath12k_wifi7_hw_mac_id_to_pdev_id_qcn9274function ath12k_wifi7_hw_mac_id_to_srng_id_qcn9274function ath12k_wifi7_hw_get_ring_selector_qcn9274function ath12k_wifi7_dp_srng_is_comp_ring_qcn9274function ath12k_wifi7_is_frame_link_agnostic_qcn9274function ath12k_wifi7_hw_mac_id_to_pdev_id_wcn7850function ath12k_wifi7_hw_mac_id_to_srng_id_wcn7850function ath12k_wifi7_hw_get_ring_selector_wcn7850function ath12k_wifi7_dp_srng_is_comp_ring_wcn7850function ath12k_is_addba_resp_action_codefunction ath12k_wifi7_is_frame_link_agnostic_wcn7850function ath12k_wifi7_mac_op_txfunction for_each_set_bitfunction ath12k_wifi7_hw_init
Annotated Snippet
if (!peer || (peer && !peer->is_mlo)) {
spin_unlock_bh(&ah->dp_hw.peer_lock);
spin_unlock_bh(&dp->dp_lock);
return false;
}
spin_unlock_bh(&ah->dp_hw.peer_lock);
}
spin_unlock_bh(&dp->dp_lock);
if (vif->type == NL80211_IFTYPE_STATION)
return arvif->is_up &&
(vif->valid_links == vif->active_links) &&
!ieee80211_is_probe_req(fc) &&
!ieee80211_is_auth(fc) &&
!ieee80211_is_deauth(fc) &&
!ath12k_is_addba_resp_action_code(mgmt);
if (vif->type == NL80211_IFTYPE_AP)
return !(ieee80211_is_probe_resp(fc) || ieee80211_is_auth(fc) ||
ieee80211_is_assoc_resp(fc) || ieee80211_is_reassoc_resp(fc) ||
ath12k_is_addba_resp_action_code(mgmt));
return false;
}
static const struct ath12k_hw_ops qcn9274_ops = {
.get_hw_mac_from_pdev_id = ath12k_wifi7_hw_qcn9274_mac_from_pdev_id,
.mac_id_to_pdev_id = ath12k_wifi7_hw_mac_id_to_pdev_id_qcn9274,
.mac_id_to_srng_id = ath12k_wifi7_hw_mac_id_to_srng_id_qcn9274,
.rxdma_ring_sel_config = ath12k_dp_rxdma_ring_sel_config_qcn9274,
.get_ring_selector = ath12k_wifi7_hw_get_ring_selector_qcn9274,
.dp_srng_is_tx_comp_ring = ath12k_wifi7_dp_srng_is_comp_ring_qcn9274,
.is_frame_link_agnostic = ath12k_wifi7_is_frame_link_agnostic_qcn9274,
};
static const struct ath12k_hw_ops wcn7850_ops = {
.get_hw_mac_from_pdev_id = ath12k_wifi7_hw_qcn9274_mac_from_pdev_id,
.mac_id_to_pdev_id = ath12k_wifi7_hw_mac_id_to_pdev_id_wcn7850,
.mac_id_to_srng_id = ath12k_wifi7_hw_mac_id_to_srng_id_wcn7850,
.rxdma_ring_sel_config = ath12k_dp_rxdma_ring_sel_config_wcn7850,
.get_ring_selector = ath12k_wifi7_hw_get_ring_selector_wcn7850,
.dp_srng_is_tx_comp_ring = ath12k_wifi7_dp_srng_is_comp_ring_wcn7850,
.is_frame_link_agnostic = ath12k_wifi7_is_frame_link_agnostic_wcn7850,
};
static const struct ath12k_hw_ops qcc2072_ops = {
.get_hw_mac_from_pdev_id = ath12k_wifi7_hw_qcn9274_mac_from_pdev_id,
.mac_id_to_pdev_id = ath12k_wifi7_hw_mac_id_to_pdev_id_wcn7850,
.mac_id_to_srng_id = ath12k_wifi7_hw_mac_id_to_srng_id_wcn7850,
.rxdma_ring_sel_config = ath12k_dp_rxdma_ring_sel_config_qcc2072,
.get_ring_selector = ath12k_wifi7_hw_get_ring_selector_wcn7850,
.dp_srng_is_tx_comp_ring = ath12k_wifi7_dp_srng_is_comp_ring_wcn7850,
.is_frame_link_agnostic = ath12k_wifi7_is_frame_link_agnostic_wcn7850,
};
#define ATH12K_TX_RING_MASK_0 0x1
#define ATH12K_TX_RING_MASK_1 0x2
#define ATH12K_TX_RING_MASK_2 0x4
#define ATH12K_TX_RING_MASK_3 0x8
#define ATH12K_TX_RING_MASK_4 0x10
#define ATH12K_RX_RING_MASK_0 0x1
#define ATH12K_RX_RING_MASK_1 0x2
#define ATH12K_RX_RING_MASK_2 0x4
#define ATH12K_RX_RING_MASK_3 0x8
#define ATH12K_RX_ERR_RING_MASK_0 0x1
#define ATH12K_RX_WBM_REL_RING_MASK_0 0x1
#define ATH12K_REO_STATUS_RING_MASK_0 0x1
#define ATH12K_HOST2RXDMA_RING_MASK_0 0x1
#define ATH12K_RX_MON_RING_MASK_0 0x1
#define ATH12K_RX_MON_RING_MASK_1 0x2
#define ATH12K_RX_MON_RING_MASK_2 0x4
#define ATH12K_TX_MON_RING_MASK_0 0x1
#define ATH12K_TX_MON_RING_MASK_1 0x2
#define ATH12K_RX_MON_STATUS_RING_MASK_0 0x1
#define ATH12K_RX_MON_STATUS_RING_MASK_1 0x2
#define ATH12K_RX_MON_STATUS_RING_MASK_2 0x4
static const struct ath12k_hw_ring_mask ath12k_wifi7_hw_ring_mask_qcn9274 = {
.tx = {
ATH12K_TX_RING_MASK_0,
ATH12K_TX_RING_MASK_1,
ATH12K_TX_RING_MASK_2,
Annotation
- Immediate include surface: `linux/types.h`, `linux/bitops.h`, `linux/bitfield.h`, `../debug.h`, `../core.h`, `../ce.h`, `ce.h`, `../hw.h`.
- Detected declarations: `function ath12k_wifi7_hw_qcn9274_mac_from_pdev_id`, `function ath12k_wifi7_hw_mac_id_to_pdev_id_qcn9274`, `function ath12k_wifi7_hw_mac_id_to_srng_id_qcn9274`, `function ath12k_wifi7_hw_get_ring_selector_qcn9274`, `function ath12k_wifi7_dp_srng_is_comp_ring_qcn9274`, `function ath12k_wifi7_is_frame_link_agnostic_qcn9274`, `function ath12k_wifi7_hw_mac_id_to_pdev_id_wcn7850`, `function ath12k_wifi7_hw_mac_id_to_srng_id_wcn7850`, `function ath12k_wifi7_hw_get_ring_selector_wcn7850`, `function ath12k_wifi7_dp_srng_is_comp_ring_wcn7850`.
- 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.