u32 num_irq;
ring_mask = ab->hw_params->ring_mask;
- hal_ops = ab->hw_params->hal_ops;
+ hal_ops = ab->hal.hal_ops;
for (i = 0; i < ATH12K_EXT_IRQ_GRP_NUM_MAX; i++) {
irq_grp = &ab->ext_irq_grp[i];
num_irq = 0;
grp_mask = &ab->hw_params->ring_mask->rx_wbm_rel[0];
ring_num = 0;
} else {
- map = ab->hw_params->hal_ops->tcl_to_wbm_rbm_map;
+ map = ab->hal.hal_ops->tcl_to_wbm_rbm_map;
for (i = 0; i < ab->hw_params->max_tx_ring; i++) {
if (ring_num == map[i].wbm_ring_num) {
ring_num = i;
}
for (i = 0; i < ab->hw_params->max_tx_ring; i++) {
- map = ab->hw_params->hal_ops->tcl_to_wbm_rbm_map;
+ map = ab->hal.hal_ops->tcl_to_wbm_rbm_map;
tx_comp_ring_num = map[i].wbm_ring_num;
ret = ath12k_dp_srng_setup(ab, &dp->tx_ring[i].tcl_data_ring,
rx_desc = (struct hal_rx_desc *)head_msdu->data;
hdr_desc =
- ab->hw_params->hal_ops->rx_desc_get_msdu_payload(rx_desc);
+ ab->hal.hal_ops->rx_desc_get_msdu_payload(rx_desc);
/* Base size */
wh = (struct ieee80211_hdr_3addr *)hdr_desc;
static inline u8 ath12k_dp_rx_h_l3pad(struct ath12k_base *ab,
struct hal_rx_desc *desc)
{
- return ab->hw_params->hal_ops->rx_desc_get_l3_pad_bytes(desc);
+ return ab->hal.hal_ops->rx_desc_get_l3_pad_bytes(desc);
}
static inline void ath12k_dp_rx_desc_end_tlv_copy(struct ath12k_base *ab,
struct hal_rx_desc *fdesc,
struct hal_rx_desc *ldesc)
{
- ab->hw_params->hal_ops->rx_desc_copy_end_tlv(fdesc, ldesc);
+ ab->hal.hal_ops->rx_desc_copy_end_tlv(fdesc, ldesc);
}
static inline void ath12k_dp_rxdesc_set_msdu_len(struct ath12k_base *ab,
struct hal_rx_desc *desc,
u16 len)
{
- ab->hw_params->hal_ops->rx_desc_set_msdu_len(desc, len);
+ ab->hal.hal_ops->rx_desc_set_msdu_len(desc, len);
}
static inline u32 ath12k_dp_rxdesc_get_ppduid(struct ath12k_base *ab,
struct hal_rx_desc *rx_desc)
{
- return ab->hw_params->hal_ops->rx_desc_get_mpdu_ppdu_id(rx_desc);
+ return ab->hal.hal_ops->rx_desc_get_mpdu_ppdu_id(rx_desc);
}
static inline bool ath12k_dp_rxdesc_mpdu_valid(struct ath12k_base *ab,
{
u32 tlv_tag;
- tlv_tag = ab->hw_params->hal_ops->rx_desc_get_mpdu_start_tag(rx_desc);
+ tlv_tag = ab->hal.hal_ops->rx_desc_get_mpdu_start_tag(rx_desc);
return tlv_tag == HAL_RX_MPDU_START;
}
struct hal_rx_desc *desc,
struct ieee80211_hdr *hdr)
{
- ab->hw_params->hal_ops->rx_desc_get_dot11_hdr(desc, hdr);
+ ab->hal.hal_ops->rx_desc_get_dot11_hdr(desc, hdr);
}
static inline void ath12k_dp_rx_desc_get_crypto_header(struct ath12k_base *ab,
u8 *crypto_hdr,
enum hal_encrypt_type enctype)
{
- ab->hw_params->hal_ops->rx_desc_get_crypto_header(desc, crypto_hdr, enctype);
+ ab->hal.hal_ops->rx_desc_get_crypto_header(desc, crypto_hdr, enctype);
}
static inline u8 ath12k_dp_rx_get_msdu_src_link(struct ath12k_base *ab,
struct hal_rx_desc *desc)
{
- return ab->hw_params->hal_ops->rx_desc_get_msdu_src_link_id(desc);
+ return ab->hal.hal_ops->rx_desc_get_msdu_src_link_id(desc);
}
static inline void ath12k_dp_clean_up_skb_list(struct sk_buff_head *skb_list)
{
int ret;
- ret = ab->hw_params->hal_ops->create_srng_config(ab);
+ ret = ab->hal.hal_ops->create_srng_config(ab);
if (ret)
goto err_hal;
dma_addr_t paddr;
} wrp;
+ const struct hal_ops *hal_ops;
/* Available REO blocking resources bitmap */
u8 avail_blk_resource;
}
struct ath12k_hw_version_map {
+ const struct hal_ops *hal_ops;
u32 hal_desc_sz;
};
u8 *(*rx_desc_get_msdu_payload)(struct hal_rx_desc *desc);
};
-extern const struct hal_ops hal_qcn9274_ops;
-extern const struct hal_ops hal_wcn7850_ops;
-
u32 ath12k_wifi7_hal_reo_qdesc_size(u32 ba_window_size, u8 tid);
void ath12k_wifi7_hal_reo_qdesc_setup(struct hal_rx_reo_queue *qdesc,
int tid, u32 ba_window_size,
void (*wmi_init)(struct ath12k_base *ab,
struct ath12k_wmi_resource_config_arg *config);
- const struct hal_ops *hal_ops;
-
u64 qmi_cnss_feature_bitmap;
u32 rfkill_pin;
struct hal_rx_desc *rx_desc,
struct hal_rx_desc *ldesc)
{
- ab->hw_params->hal_ops->extract_rx_desc_data(rx_info, rx_desc, ldesc);
+ ab->hal.hal_ops->extract_rx_desc_data(rx_info, rx_desc, ldesc);
}
#endif
ti.ring_id = ring_selector % ab->hw_params->max_tx_ring;
ring_map |= BIT(ti.ring_id);
- ti.rbm_id = ab->hw_params->hal_ops->tcl_to_wbm_rbm_map[ti.ring_id].rbm_id;
+ ti.rbm_id = ab->hal.hal_ops->tcl_to_wbm_rbm_map[ti.ring_id].rbm_id;
tx_ring = &dp->tx_ring[ti.ring_id];
#include "hal_desc.h"
#include "../hal.h"
#include "hal.h"
+#include "hal_qcn9274.h"
+#include "hal_wcn7850.h"
static const struct ath12k_hw_version_map ath12k_wifi7_hw_ver_map[] = {
[ATH12K_HW_QCN9274_HW10] = {
+ .hal_ops = &hal_qcn9274_ops,
.hal_desc_sz = sizeof(struct hal_rx_desc_qcn9274_compact),
},
[ATH12K_HW_QCN9274_HW20] = {
+ .hal_ops = &hal_qcn9274_ops,
.hal_desc_sz = sizeof(struct hal_rx_desc_qcn9274_compact),
},
[ATH12K_HW_WCN7850_HW20] = {
+ .hal_ops = &hal_wcn7850_ops,
.hal_desc_sz = sizeof(struct hal_rx_desc_wcn7850),
},
[ATH12K_HW_IPQ5332_HW10] = {
+ .hal_ops = &hal_qcn9274_ops,
.hal_desc_sz = sizeof(struct hal_rx_desc_qcn9274_compact),
},
};
memset(hal, 0, sizeof(*hal));
+ hal->hal_ops = ath12k_wifi7_hw_ver_map[ab->hw_rev].hal_ops;
hal->hal_desc_sz = ath12k_wifi7_hw_ver_map[ab->hw_rev].hal_desc_sz;
return 0;
#include "../hal.h"
#include "hal_rx.h"
+extern const struct hal_ops hal_qcn9274_ops;
extern const struct ath12k_hal_tcl_to_wbm_rbm_map
ath12k_hal_qcn9274_tcl_to_wbm_rbm_map[DP_TCL_NUM_RING_MAX];
#include "../hal.h"
#include "hal_rx.h"
+extern const struct hal_ops hal_wcn7850_ops;
extern const struct ath12k_hal_tcl_to_wbm_rbm_map
ath12k_hal_wcn7850_tcl_to_wbm_rbm_map[DP_TCL_NUM_RING_MAX];
.wmi_init = ath12k_wifi7_wmi_init_qcn9274,
- .hal_ops = &hal_qcn9274_ops,
-
.qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01),
.rfkill_pin = 0,
.wmi_init = ath12k_wifi7_wmi_init_wcn7850,
- .hal_ops = &hal_wcn7850_ops,
-
.qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01) |
BIT(CNSS_PCIE_PERST_NO_PULL_V01),
.wmi_init = ath12k_wifi7_wmi_init_qcn9274,
- .hal_ops = &hal_qcn9274_ops,
-
.qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01),
.rfkill_pin = 0,
.wmi_init = &ath12k_wifi7_wmi_init_qcn9274,
- .hal_ops = &hal_qcn9274_ops,
-
.qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01),
.rfkill_pin = 0,