]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: ath12k: Replace ops with direct calls for rxdma ring mask
authorPavankumar Nandeshwar <quic_pnandesh@quicinc.com>
Wed, 10 Sep 2025 18:14:10 +0000 (23:44 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Thu, 11 Sep 2025 14:26:54 +0000 (07:26 -0700)
Replace following ops with direct function calls

rxdma_ring_wmask_rx_mpdu_start
rxdma_ring_wmask_rx_msdu_end
rx_desc_get_mpdu_start_offset
rx_desc_get_msdu_end_offset

Remove redundant ops entries following the switch to direct
function calls.

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: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Link: https://patch.msgid.link/20250910181414.2062280-5-quic_rdeuri@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/hal.c
drivers/net/wireless/ath/ath12k/hal.h
drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c

index 1fba023d0859d89f2e090fb630aa9bd1a5c0964e..329c458d1fe253e4030ff3e73d86ee29a2c0fedc 100644 (file)
@@ -432,10 +432,6 @@ const struct hal_rx_ops hal_rx_qcn9274_compact_ops = {
        .rx_desc_get_mpdu_ppdu_id = ath12k_hal_rx_desc_get_mpdu_ppdu_id_qcn9274,
        .rx_desc_set_msdu_len = ath12k_hal_rx_desc_set_msdu_len_qcn9274,
        .rx_desc_get_msdu_payload = ath12k_hal_rx_desc_get_msdu_payload_qcn9274,
-       .rx_desc_get_mpdu_start_offset =
-               ath12k_hal_rx_desc_get_mpdu_start_offset_qcn9274,
-       .rx_desc_get_msdu_end_offset =
-               ath12k_hal_rx_desc_get_msdu_end_offset_qcn9274,
        .rx_desc_mac_addr2_valid = ath12k_hal_rx_desc_mac_addr2_valid_qcn9274,
        .rx_desc_mpdu_start_addr2 = ath12k_hal_rx_desc_mpdu_start_addr2_qcn9274,
        .rx_desc_is_da_mcbc = ath12k_hal_rx_desc_is_da_mcbc_qcn9274,
@@ -455,8 +451,6 @@ EXPORT_SYMBOL(hal_rx_qcn9274_compact_ops);
 const struct hal_ops hal_qcn9274_ops = {
        .create_srng_config = ath12k_hal_srng_create_config_qcn9274,
        .tcl_to_wbm_rbm_map = ath12k_hal_qcn9274_tcl_to_wbm_rbm_map,
-       .rxdma_ring_wmask_rx_mpdu_start = ath12k_hal_rx_mpdu_start_wmask_get_qcn9274,
-       .rxdma_ring_wmask_rx_msdu_end = ath12k_hal_rx_msdu_end_wmask_get_qcn9274,
 };
 EXPORT_SYMBOL(hal_qcn9274_ops);
 
@@ -609,8 +603,6 @@ const struct hal_rx_ops hal_rx_wcn7850_ops = {
        .rx_desc_get_mpdu_ppdu_id = ath12k_hal_rx_desc_get_mpdu_ppdu_id_wcn7850,
        .rx_desc_set_msdu_len = ath12k_hal_rx_desc_set_msdu_len_wcn7850,
        .rx_desc_get_msdu_payload = ath12k_hal_rx_desc_get_msdu_payload_wcn7850,
-       .rx_desc_get_mpdu_start_offset = ath12k_hal_rx_desc_get_mpdu_start_offset_wcn7850,
-       .rx_desc_get_msdu_end_offset = ath12k_hal_rx_desc_get_msdu_end_offset_wcn7850,
        .rx_desc_mac_addr2_valid = ath12k_hal_rx_desc_mac_addr2_valid_wcn7850,
        .rx_desc_mpdu_start_addr2 = ath12k_hal_rx_desc_mpdu_start_addr2_wcn7850,
        .rx_desc_is_da_mcbc = ath12k_hal_rx_desc_is_da_mcbc_wcn7850,
@@ -629,8 +621,6 @@ EXPORT_SYMBOL(hal_rx_wcn7850_ops);
 const struct hal_ops hal_wcn7850_ops = {
        .create_srng_config = ath12k_hal_srng_create_config_wcn7850,
        .tcl_to_wbm_rbm_map = ath12k_hal_wcn7850_tcl_to_wbm_rbm_map,
-       .rxdma_ring_wmask_rx_mpdu_start = NULL,
-       .rxdma_ring_wmask_rx_msdu_end = NULL,
 };
 EXPORT_SYMBOL(hal_wcn7850_ops);
 
index e4c46a9ad94eebb1c47fcc93f289dcccf4dcd9ad..ee0c22d65d2cc447e3c25d86106d4ab7cb85a2bc 100644 (file)
@@ -1576,8 +1576,6 @@ struct hal_rx_ops {
        void (*rx_desc_set_msdu_len)(struct hal_rx_desc *desc, u16 len);
        struct rx_attention *(*rx_desc_get_attention)(struct hal_rx_desc *desc);
        u8 *(*rx_desc_get_msdu_payload)(struct hal_rx_desc *desc);
-       u32 (*rx_desc_get_mpdu_start_offset)(void);
-       u32 (*rx_desc_get_msdu_end_offset)(void);
        bool (*rx_desc_mac_addr2_valid)(struct hal_rx_desc *desc);
        u8* (*rx_desc_mpdu_start_addr2)(struct hal_rx_desc *desc);
        bool (*rx_desc_is_da_mcbc)(struct hal_rx_desc *desc);
@@ -1597,8 +1595,6 @@ struct hal_rx_ops {
 
 struct hal_ops {
        int (*create_srng_config)(struct ath12k_base *ab);
-       u16 (*rxdma_ring_wmask_rx_mpdu_start)(void);
-       u32 (*rxdma_ring_wmask_rx_msdu_end)(void);
        const struct ath12k_hal_tcl_to_wbm_rbm_map *tcl_to_wbm_rbm_map;
 };
 
index 2105d9e94976844c0086f5a521cf9fb16a332e1c..99ff560384520cc36447b44e41a9637dd2c533c5 100644 (file)
@@ -7,6 +7,8 @@
 #include "dp_rx.h"
 #include "../dp_tx.h"
 #include "../peer.h"
+#include "hal_qcn9274.h"
+#include "hal_wcn7850.h"
 
 void ath12k_peer_rx_tid_qref_setup(struct ath12k_base *ab, u16 peer_id, u16 tid,
                                   dma_addr_t paddr)
@@ -1897,14 +1899,12 @@ int ath12k_dp_rxdma_ring_sel_config_qcn9274(struct ath12k_base *ab)
        tlv_filter.rx_packet_offset = hal_rx_desc_sz;
 
        tlv_filter.rx_mpdu_start_offset =
-               ab->hal_rx_ops->rx_desc_get_mpdu_start_offset();
+               ath12k_hal_rx_desc_get_mpdu_start_offset_qcn9274();
        tlv_filter.rx_msdu_end_offset =
-               ab->hal_rx_ops->rx_desc_get_msdu_end_offset();
+               ath12k_hal_rx_desc_get_msdu_end_offset_qcn9274();
 
-       tlv_filter.rx_mpdu_start_wmask =
-               ab->hw_params->hal_ops->rxdma_ring_wmask_rx_mpdu_start();
-       tlv_filter.rx_msdu_end_wmask =
-               ab->hw_params->hal_ops->rxdma_ring_wmask_rx_msdu_end();
+       tlv_filter.rx_mpdu_start_wmask = ath12k_hal_rx_mpdu_start_wmask_get_qcn9274();
+       tlv_filter.rx_msdu_end_wmask = ath12k_hal_rx_msdu_end_wmask_get_qcn9274();
        ath12k_dbg(ab, ATH12K_DBG_DATA,
                   "Configuring compact tlv masks rx_mpdu_start_wmask 0x%x rx_msdu_end_wmask 0x%x\n",
                   tlv_filter.rx_mpdu_start_wmask, tlv_filter.rx_msdu_end_wmask);
@@ -1940,9 +1940,9 @@ int ath12k_dp_rxdma_ring_sel_config_wcn7850(struct ath12k_base *ab)
        tlv_filter.rx_header_offset = offsetof(struct hal_rx_desc_wcn7850, pkt_hdr_tlv);
 
        tlv_filter.rx_mpdu_start_offset =
-               ab->hal_rx_ops->rx_desc_get_mpdu_start_offset();
+               ath12k_hal_rx_desc_get_mpdu_start_offset_wcn7850();
        tlv_filter.rx_msdu_end_offset =
-               ab->hal_rx_ops->rx_desc_get_msdu_end_offset();
+               ath12k_hal_rx_desc_get_msdu_end_offset_wcn7850();
 
        /* TODO: Selectively subscribe to required qwords within msdu_end
         * and mpdu_start and setup the mask in below msg