wifi: ath12k: fix desc address calculation in wbm tx completion
authorThiraviyam Mariyappan <quic_tmariyap@quicinc.com>
Mon, 11 Mar 2024 18:07:08 +0000 (23:37 +0530)
committerKalle Valo <quic_kvalo@quicinc.com>
Wed, 20 Mar 2024 10:06:10 +0000 (12:06 +0200)
In tx completion, status desc is obtained from offsetting the address
from wbm ring. Having HTT_TX_WBM_COMP_STATUS_OFFSET(8) and reserved 8
bytes in status desc offsets the address twice and read the values
from the incorrect address. Hence, remove the
HTT_TX_WBM_COMP_STATUS_OFFSET from wbm completion address calculation.

Also this patch is applicable for WCN7850.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1

Signed-off-by: Thiraviyam Mariyappan <quic_tmariyap@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240311180708.9334-1-quic_tmariyap@quicinc.com
drivers/net/wireless/ath/ath12k/dp.h
drivers/net/wireless/ath/ath12k/dp_tx.c

index eb2dd408e08147b300ebd2c6319f13bee922e40c..9b83b9230bbcdeb01f506ddcd6f8142dd630242f 100644 (file)
@@ -377,8 +377,6 @@ struct ath12k_dp {
 /* peer meta data */
 #define HTT_TCL_META_DATA_PEER_ID              GENMASK(15, 2)
 
-#define HTT_TX_WBM_COMP_STATUS_OFFSET 8
-
 /* HTT tx completion is overlaid in wbm_release_ring */
 #define HTT_TX_WBM_COMP_INFO0_STATUS           GENMASK(16, 13)
 #define HTT_TX_WBM_COMP_INFO1_REINJECT_REASON  GENMASK(3, 0)
index 572b8715364748e3d9f24830f9a063d8a2cc02d5..9b6d7d72f57c4a452a48c3e431dfa630f3456210 100644 (file)
@@ -414,7 +414,7 @@ ath12k_dp_tx_process_htt_tx_complete(struct ath12k_base *ab,
        struct ath12k_dp_htt_wbm_tx_status ts = {0};
        enum hal_wbm_htt_tx_comp_status wbm_status;
 
-       status_desc = desc + HTT_TX_WBM_COMP_STATUS_OFFSET;
+       status_desc = desc;
 
        wbm_status = le32_get_bits(status_desc->info0,
                                   HTT_TX_WBM_COMP_INFO0_STATUS);