]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: ath12k: Refactor data path pdev struct
authorRipan Deuri <quic_rdeuri@quicinc.com>
Tue, 7 Oct 2025 11:02:02 +0000 (16:32 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Wed, 8 Oct 2025 16:24:49 +0000 (09:24 -0700)
commit9e0ee04f818f42ec879b053e4b5d0c9c230415da
tree2e2aeefccec8e414c2e9645746b81eac9e2f4db0
parentaf66c7640cf94aa77314cf8d5e95141bdecbc1ee
wifi: ath12k: Refactor data path pdev struct

Refactor struct ath12k_pdev_dp to encapsulate all DP related fields of
radio (ar) and rely on this single pdev object in per packet DP
operations to optimize cache usage.

Introduce an array of RCU-protected ath12k_pdev_dp in DP device object
to find DP pdev directly from the DP device object.

RCU on dp_pdevs[] provides a teardown synchronization mechanism by
ensuring all in-flight access to dp_pdev pointers complete before reclaim.
Once a dp_pdev pointer is obtained, its internal fields can be accessed
as follows:

- Writers update internal fields using their own synchronization.
- Readers may perform lockless reads if occasional inconsistency is
  acceptable, or use additional synchronization (e.g., spin_lock,
  atomic_t) for a coherent view between readers and writers.

Please note that RCU is used for dp_pdevs[] at this stage to align
with ab->pdevs_active[]. However, if the teardown paths ensure quiescence,
both dp_pdevs[] and pdevs_active[] can be converted to plain pointers,
removing RCU synchronization overhead. This will be evaluated separately.

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: Ripan Deuri <quic_rdeuri@quicinc.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Link: https://patch.msgid.link/20251007110203.1541167-2-quic_rdeuri@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/core.h
drivers/net/wireless/ath/ath12k/dp.c
drivers/net/wireless/ath/ath12k/dp.h
drivers/net/wireless/ath/ath12k/dp_mon.c
drivers/net/wireless/ath/ath12k/dp_mon.h
drivers/net/wireless/ath/ath12k/dp_rx.c
drivers/net/wireless/ath/ath12k/dp_rx.h
drivers/net/wireless/ath/ath12k/mac.c
drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.h