summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath11k/dp.c
diff options
context:
space:
mode:
authorP Praneesh <ppranees@codeaurora.org>2021-11-12 12:05:58 +0300
committerKalle Valo <kvalo@codeaurora.org>2021-11-15 12:21:55 +0300
commitcbfbed495d3289d5a0bc7c614cea639008086cfe (patch)
treeae786dcda3f60d0c752cb38dfda8c3f8254b9752 /drivers/net/wireless/ath/ath11k/dp.c
parenta8508bf7ced2e43f30b46333f09cbc79a1675616 (diff)
downloadlinux-cbfbed495d3289d5a0bc7c614cea639008086cfe.tar.xz
ath11k: avoid while loop in ring selection of tx completion interrupt
Currently while loop is used to find the tx completion ring number and it is not required since the tx ring mask and the group id can be combined to directly fetch the ring number. Hence remove the while loop and directly get the ring number from tx mask and group id. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01734-QCAHKSWPL_SILICONZ-1 v2 Co-developed-by: Sriram R <srirrama@codeaurora.org> Signed-off-by: Sriram R <srirrama@codeaurora.org> Signed-off-by: Jouni Malinen <jouni@codeaurora.org> Signed-off-by: P Praneesh <ppranees@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/1630560820-21905-11-git-send-email-ppranees@codeaurora.org
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/dp.c')
-rw-r--r--drivers/net/wireless/ath/ath11k/dp.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath11k/dp.c b/drivers/net/wireless/ath/ath11k/dp.c
index 56b4cebbc6a5..81b0b2baa461 100644
--- a/drivers/net/wireless/ath/ath11k/dp.c
+++ b/drivers/net/wireless/ath/ath11k/dp.c
@@ -771,13 +771,12 @@ int ath11k_dp_service_srng(struct ath11k_base *ab,
const struct ath11k_hw_hal_params *hal_params;
int grp_id = irq_grp->grp_id;
int work_done = 0;
- int i = 0, j;
+ int i, j;
int tot_work_done = 0;
- while (ab->hw_params.ring_mask->tx[grp_id] >> i) {
- if (ab->hw_params.ring_mask->tx[grp_id] & BIT(i))
- ath11k_dp_tx_completion_handler(ab, i);
- i++;
+ if (ab->hw_params.ring_mask->tx[grp_id]) {
+ i = __fls(ab->hw_params.ring_mask->tx[grp_id]);
+ ath11k_dp_tx_completion_handler(ab, i);
}
if (ab->hw_params.ring_mask->rx_err[grp_id]) {