]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: ath12k: Remove arch-specific HAL dependencies from common DP
authorPavankumar Nandeshwar <quic_pnandesh@quicinc.com>
Mon, 3 Nov 2025 11:21:08 +0000 (16:51 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Wed, 5 Nov 2025 15:16:55 +0000 (07:16 -0800)
Currently common DP includes arch-specific structs from wifi7/hal_desc.h
via dp_mon.h. Store hal_wbm_release_ring_tx size in the HAL object and move
hal_wbm_link_desc to common HAL for this separation.

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@quicinc.com>
Signed-off-by: Ripan Deuri <quic_rdeuri@quicinc.com>
Reviewed-by: Karthikeyan Periyasamy <karthikeyan.periyasamy@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Link: https://patch.msgid.link/20251103112111.2260639-10-quic_rdeuri@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/dp.c
drivers/net/wireless/ath/ath12k/hal.h
drivers/net/wireless/ath/ath12k/wifi7/dp.c
drivers/net/wireless/ath/ath12k/wifi7/hal.c
drivers/net/wireless/ath/ath12k/wifi7/hal_desc.h

index e8f3f396dfde37b6c25ca4aa60ad3b52163c7fb4..b65f421d5b83fe183c5d5e43210f31b0a1a25449 100644 (file)
@@ -11,7 +11,6 @@
 #include "hal.h"
 #include "debug.h"
 #include "peer.h"
-#include "dp_mon.h"
 #include "dp_cmn.h"
 
 enum ath12k_dp_desc_type {
@@ -1532,7 +1531,7 @@ static int ath12k_dp_setup(struct ath12k_base *ab)
        if (ret)
                goto fail_dp_bank_profiles_cleanup;
 
-       size = sizeof(struct hal_wbm_release_ring_tx) *
+       size = ab->hal.hal_wbm_release_ring_tx_size *
               DP_TX_COMP_RING_SIZE(ab);
 
        ret = ath12k_dp_reoq_lut_setup(ab);
index 29bcedca0a3b0e6977459575118c08fbb47afe27..071f4897e4cd0d3d408caa2cb3bc2aab336ea268 100644 (file)
@@ -795,7 +795,10 @@ struct ath12k_buffer_addr {
 struct hal_ce_srng_dest_desc;
 struct hal_ce_srng_dst_status_desc;
 struct hal_ce_srng_src_desc;
-struct hal_wbm_link_desc;
+
+struct hal_wbm_link_desc {
+       struct ath12k_buffer_addr buf_addr_info;
+} __packed;
 
 /* srng flags */
 #define HAL_SRNG_FLAGS_MSI_SWAP                        0x00000008
@@ -1202,6 +1205,7 @@ struct ath12k_hal {
        int num_shadow_reg_configured;
 
        u32 hal_desc_sz;
+       u32 hal_wbm_release_ring_tx_size;
 
        const struct ath12k_hal_tcl_to_wbm_rbm_map *tcl_to_wbm_rbm_map;
 };
index b57e8de05c27322209b31d900c1bb0bf18fe2c93..cf7ede27623af2e446cb361727b3ebc88ad976f4 100644 (file)
@@ -7,6 +7,7 @@
 #include "../debug.h"
 #include "../dp_rx.h"
 #include "../dp_tx.h"
+#include "hal_desc.h"
 #include "../dp_mon.h"
 #include "../dp_cmn.h"
 #include "dp_rx.h"
index 84c0ba2d1fbe99e99993bc7b4f1381f868fe5e1e..f48adb83599e896f8bd13e67019e1529a070feb7 100644 (file)
@@ -55,6 +55,7 @@ int ath12k_wifi7_hal_init(struct ath12k_base *ab)
        hal->tcl_to_wbm_rbm_map = ath12k_wifi7_hw_ver_map[ab->hw_rev].tcl_to_wbm_rbm_map;
        hal->regs = ath12k_wifi7_hw_ver_map[ab->hw_rev].hw_regs;
        hal->hal_params = ath12k_wifi7_hw_ver_map[ab->hw_rev].hal_params;
+       hal->hal_wbm_release_ring_tx_size = sizeof(struct hal_wbm_release_ring_tx);
 
        return 0;
 }
index 81506adf156a59e7be256ef2569ce7ce8a9e4549..aecbf00ea87b8f65fe10f91b48a7952de7dbd4dc 100644 (file)
@@ -1592,10 +1592,6 @@ struct hal_tx_rate_stats {
        __le32 tsf;
 } __packed;
 
-struct hal_wbm_link_desc {
-       struct ath12k_buffer_addr buf_addr_info;
-} __packed;
-
 #define HAL_WBM_COMPL_RX_INFO0_REL_SRC_MODULE          GENMASK(2, 0)
 #define HAL_WBM_COMPL_RX_INFO0_BM_ACTION               GENMASK(5, 3)
 #define HAL_WBM_COMPL_RX_INFO0_DESC_TYPE               GENMASK(8, 6)