]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: ath12k: Support arch-specific DP device allocation
authorRipan Deuri <quic_rdeuri@quicinc.com>
Tue, 30 Sep 2025 13:10:01 +0000 (18:40 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Tue, 30 Sep 2025 16:12:58 +0000 (09:12 -0700)
commit614c23e24ee84d5cc2c1648941ee7156b4fb173f
treeebcbe763c680f3eaba381ff08841560f0b979f03
parent3a52762b539f6eefa6f600ab58577ee09f26657a
wifi: ath12k: Support arch-specific DP device allocation

Add arch_init() and arch_deinit() ops to the PCI and AHB family ops to
support allocation and cleanup of architecture-specific fields in
ath12k_base. Define shared ath12k_wifi7_arch_init() and
ath12k_wifi7_arch_deinit() functions to handle DP device allocation and
cleanup for Wi-Fi 7 across both PCI and AHB. Introduce a new header file
wifi7/core.h to declare functions defined in wifi7/core.c.

Currently, DP device allocation and cleanup are handled via arch_init()
and arch_deinit(), which can be extended to support additional
architecture-specific initialization in the future.

Define common ath12k_wifi7_arch_init() and
ath12k_wifi7_arch_deinit() functions to handle allocation and cleanup
for Wi-Fi 7. Add a new header file wifi7/core.h to declare common Wi-Fi 7
functions.

Add ath12k_wifi7_dp_device_alloc() and ath12k_wifi7_dp_device_free() to
handle allocation and deallocation of the DP device object for Wi-Fi 7.

Add ath12k_dp_cmn_device_init() and ath12k_dp_cmn_device_deinit() to
initialize and deinitialize common DP device fields. Introduce a new header
file dp_cmn.h to declare these functions, which can also be used to expose
new common DP functions that need to be invoked from non-DP code.

Rename existing DP allocation and cleanup functions to ath12k_dp_setup()
and ath12k_dp_cleanup() to better reflect their purpose in the updated
design.

Replicate device-related fields such as device and hw_params in the DP
device object to align with the new design, which limits per packet data
path object usage to DP specific objects.

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>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Link: https://patch.msgid.link/20250930131005.2884253-3-quic_rdeuri@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
14 files changed:
drivers/net/wireless/ath/ath12k/ahb.c
drivers/net/wireless/ath/ath12k/ahb.h
drivers/net/wireless/ath/ath12k/core.c
drivers/net/wireless/ath/ath12k/dp.c
drivers/net/wireless/ath/ath12k/dp.h
drivers/net/wireless/ath/ath12k/dp_cmn.h [new file with mode: 0644]
drivers/net/wireless/ath/ath12k/pci.c
drivers/net/wireless/ath/ath12k/pci.h
drivers/net/wireless/ath/ath12k/wifi7/ahb.c
drivers/net/wireless/ath/ath12k/wifi7/core.c
drivers/net/wireless/ath/ath12k/wifi7/core.h [new file with mode: 0644]
drivers/net/wireless/ath/ath12k/wifi7/dp.c
drivers/net/wireless/ath/ath12k/wifi7/dp.h
drivers/net/wireless/ath/ath12k/wifi7/pci.c