Commit 454a9721 authored by Carl Huang's avatar Carl Huang Committed by Kalle Valo

ath11k: process both lmac rings for QCA6390

For QCA6390, the num_radios is 1 but it needs to process 2 lmac rings.
So use NUM_RXDMA_PER_PDEV to do another loop.

Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2
Signed-off-by: default avatarCarl Huang <cjhuang@codeaurora.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1597555891-26112-8-git-send-email-kvalo@codeaurora.org
parent a6275302
...@@ -731,7 +731,7 @@ int ath11k_dp_service_srng(struct ath11k_base *ab, ...@@ -731,7 +731,7 @@ int ath11k_dp_service_srng(struct ath11k_base *ab,
struct napi_struct *napi = &irq_grp->napi; struct napi_struct *napi = &irq_grp->napi;
int grp_id = irq_grp->grp_id; int grp_id = irq_grp->grp_id;
int work_done = 0; int work_done = 0;
int i = 0; int i = 0, j;
int tot_work_done = 0; int tot_work_done = 0;
while (ab->hw_params.ring_mask->tx[grp_id] >> i) { while (ab->hw_params.ring_mask->tx[grp_id] >> i) {
...@@ -771,25 +771,34 @@ int ath11k_dp_service_srng(struct ath11k_base *ab, ...@@ -771,25 +771,34 @@ int ath11k_dp_service_srng(struct ath11k_base *ab,
if (ab->hw_params.ring_mask->rx_mon_status[grp_id]) { if (ab->hw_params.ring_mask->rx_mon_status[grp_id]) {
for (i = 0; i < ab->num_radios; i++) { for (i = 0; i < ab->num_radios; i++) {
if (ab->hw_params.ring_mask->rx_mon_status[grp_id] & BIT(i)) { for (j = 0; j < ab->hw_params.num_rxmda_per_pdev; j++) {
int id = i * ab->hw_params.num_rxmda_per_pdev + j;
if (ab->hw_params.ring_mask->rx_mon_status[grp_id] &
BIT(id)) {
work_done = work_done =
ath11k_dp_rx_process_mon_rings(ab, ath11k_dp_rx_process_mon_rings(ab,
i, napi, id,
budget); napi, budget);
budget -= work_done; budget -= work_done;
tot_work_done += work_done; tot_work_done += work_done;
}
if (budget <= 0) if (budget <= 0)
goto done; goto done;
} }
} }
}
}
if (ab->hw_params.ring_mask->reo_status[grp_id]) if (ab->hw_params.ring_mask->reo_status[grp_id])
ath11k_dp_process_reo_status(ab); ath11k_dp_process_reo_status(ab);
for (i = 0; i < ab->num_radios; i++) { for (i = 0; i < ab->num_radios; i++) {
if (ab->hw_params.ring_mask->rxdma2host[grp_id] & BIT(i)) { for (j = 0; j < ab->hw_params.num_rxmda_per_pdev; j++) {
work_done = ath11k_dp_process_rxdma_err(ab, i, budget); int id = i * ab->hw_params.num_rxmda_per_pdev + j;
if (ab->hw_params.ring_mask->rxdma2host[grp_id] & BIT(id)) {
work_done = ath11k_dp_process_rxdma_err(ab, id, budget);
budget -= work_done; budget -= work_done;
tot_work_done += work_done; tot_work_done += work_done;
} }
...@@ -797,15 +806,17 @@ int ath11k_dp_service_srng(struct ath11k_base *ab, ...@@ -797,15 +806,17 @@ int ath11k_dp_service_srng(struct ath11k_base *ab,
if (budget <= 0) if (budget <= 0)
goto done; goto done;
if (ab->hw_params.ring_mask->host2rxdma[grp_id] & BIT(i)) { if (ab->hw_params.ring_mask->host2rxdma[grp_id] & BIT(id)) {
struct ath11k_pdev_dp *dp = &ab->pdevs[i].ar->dp; struct ath11k *ar = ath11k_ab_to_ar(ab, id);
struct ath11k_pdev_dp *dp = &ar->dp;
struct dp_rxdma_ring *rx_ring = &dp->rx_refill_buf_ring; struct dp_rxdma_ring *rx_ring = &dp->rx_refill_buf_ring;
ath11k_dp_rxbufs_replenish(ab, i, rx_ring, 0, ath11k_dp_rxbufs_replenish(ab, id, rx_ring, 0,
HAL_RX_BUF_RBM_SW3_BM, HAL_RX_BUF_RBM_SW3_BM,
GFP_ATOMIC); GFP_ATOMIC);
} }
} }
}
/* TODO: Implement handler for other interrupts */ /* TODO: Implement handler for other interrupts */
done: done:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment