From: Kalle Valo <kvalo@kernel.org>
To: ath12k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org
Subject: [PATCH 8/8] wifi: ath12k: avoid redundant code in DP Rx error process
Date: Thu, 5 Dec 2024 22:30:44 +0200 [thread overview]
Message-ID: <20241205203044.589499-9-kvalo@kernel.org> (raw)
In-Reply-To: <20241205203044.589499-1-kvalo@kernel.org>
From: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Currently, in DP rx error processing, the MAC id is fetched redundantly from
the same descriptor for each MSDU. To avoid this redundancy, move the fetch
handling before the iteration.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-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: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
---
drivers/net/wireless/ath/ath12k/dp_rx.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
index b24d1de4aabb..2c919503ddef 100644
--- a/drivers/net/wireless/ath/ath12k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
@@ -3516,6 +3516,13 @@ int ath12k_dp_rx_process_err(struct ath12k_base *ab, struct napi_struct *napi,
ret);
continue;
}
+
+ mac_id = le32_get_bits(reo_desc->info0,
+ HAL_REO_DEST_RING_INFO0_SRC_LINK_ID);
+
+ pdev_id = ath12k_hw_mac_id_to_pdev_id(ab->hw_params, mac_id);
+ ar = ab->pdevs[pdev_id].ar;
+
link_desc_va = link_desc_banks[desc_bank].vaddr +
(paddr - link_desc_banks[desc_bank].paddr);
ath12k_hal_rx_msdu_link_info_get(link_desc_va, &num_msdus, msdu_cookies,
@@ -3544,12 +3551,6 @@ int ath12k_dp_rx_process_err(struct ath12k_base *ab, struct napi_struct *napi,
}
for (i = 0; i < num_msdus; i++) {
- mac_id = le32_get_bits(reo_desc->info0,
- HAL_REO_DEST_RING_INFO0_SRC_LINK_ID);
-
- pdev_id = ath12k_hw_mac_id_to_pdev_id(ab->hw_params, mac_id);
- ar = ab->pdevs[pdev_id].ar;
-
if (!ath12k_dp_process_rx_err_buf(ar, reo_desc,
&rx_desc_used_list,
drop,
--
2.39.5
prev parent reply other threads:[~2024-12-05 20:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-05 20:30 [PATCH 0/8] wifi: ath12k: MLO support part 7 Kalle Valo
2024-12-05 20:30 ` [PATCH 1/8] dt-bindings: net: wireless: Describe ath12k PCI module with WSI Kalle Valo
2024-12-06 17:05 ` Conor Dooley
2024-12-09 9:49 ` Kalle Valo
2024-12-09 17:26 ` Kalle Valo
2024-12-05 20:30 ` [PATCH 2/8] wifi: ath12k: parse multiple device information from Device Tree Kalle Valo
2024-12-05 20:30 ` [PATCH 3/8] wifi: ath12k: send partner device details in QMI MLO capability Kalle Valo
2024-12-05 20:30 ` [PATCH 4/8] wifi: ath12k: refactor ath12k_qmi_alloc_target_mem_chunk() Kalle Valo
2024-12-05 20:30 ` [PATCH 5/8] wifi: ath12k: add support to allocate MLO global memory region Kalle Valo
2024-12-05 20:30 ` [PATCH 6/8] wifi: ath12k: Add MLO WMI setup and teardown functions Kalle Valo
2024-12-05 20:30 ` [PATCH 7/8] wifi: ath12k: enable MLO setup and teardown from core Kalle Valo
2024-12-05 20:30 ` Kalle Valo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241205203044.589499-9-kvalo@kernel.org \
--to=kvalo@kernel.org \
--cc=ath12k@lists.infradead.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).