wifi: ath12k: Remove arch-specific HAL dependencies from common DP

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>
This commit is contained in:
Pavankumar Nandeshwar 2025-11-03 16:51:08 +05:30 committed by Jeff Johnson
parent 147daefc59
commit 951cca9cc6
5 changed files with 8 additions and 7 deletions

View 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);

View 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;
};

View 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"

View 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;
}

View 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)