[PATCH ath12k-ng 06/18] wifi: ath12k: Add direct HAL pointer in ath12k_dp

Ripan Deuri quic_rdeuri at quicinc.com
Thu Oct 9 04:10:33 PDT 2025


From: Pavankumar Nandeshwar <quic_pnandesh at quicinc.com>

Add a direct pointer to the HAL context in ath12k_dp. Since ath12k_dp
is frequenctly used in the per-packet data path, this avoids the need
to access the HAL handle through the ab pointer, reducing indirection
in the per-packet data path.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

Signed-off-by: Pavankumar Nandeshwar <quic_pnandesh at quicinc.com>
Signed-off-by: Ripan Deuri <quic_rdeuri at quicinc.com>
---
 drivers/net/wireless/ath/ath12k/dp.h       | 1 +
 drivers/net/wireless/ath/ath12k/wifi7/dp.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/ath12k/dp.h b/drivers/net/wireless/ath/ath12k/dp.h
index 284e89f7c4b8..9690e3472ab7 100644
--- a/drivers/net/wireless/ath/ath12k/dp.h
+++ b/drivers/net/wireless/ath/ath12k/dp.h
@@ -447,6 +447,7 @@ struct ath12k_dp {
 	struct ath12k_reo_q_addr_lut ml_reoq_lut;
 	const struct ath12k_hw_params *hw_params;
 	struct device *dev;
+	struct ath12k_hal *hal;
 
 	/* RCU on dp_pdevs[] provides a teardown synchronization mechanism,
 	 * ensuring in-flight data path readers complete before reclaim. Writers
diff --git a/drivers/net/wireless/ath/ath12k/wifi7/dp.c b/drivers/net/wireless/ath/ath12k/wifi7/dp.c
index 4465a9e93bf8..e691d0ca0d75 100644
--- a/drivers/net/wireless/ath/ath12k/wifi7/dp.c
+++ b/drivers/net/wireless/ath/ath12k/wifi7/dp.c
@@ -152,6 +152,7 @@ struct ath12k_dp *ath12k_wifi7_dp_device_alloc(struct ath12k_base *ab)
 	dp->ab = ab;
 	dp->dev = ab->dev;
 	dp->hw_params = ab->hw_params;
+	dp->hal = &ab->hal;
 
 	dp->ops = &ath12k_wifi7_dp_arch_ops;
 
-- 
2.34.1




More information about the ath12k mailing list