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) {
...@@ -770,17 +770,23 @@ int ath11k_dp_service_srng(struct ath11k_base *ab, ...@@ -770,17 +770,23 @@ 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++) {
work_done = int id = i * ab->hw_params.num_rxmda_per_pdev + j;
ath11k_dp_rx_process_mon_rings(ab,
i, napi, if (ab->hw_params.ring_mask->rx_mon_status[grp_id] &
budget); BIT(id)) {
budget -= work_done; work_done =
tot_work_done += work_done; ath11k_dp_rx_process_mon_rings(ab,
id,
napi, budget);
budget -= work_done;
tot_work_done += work_done;
if (budget <= 0)
goto done;
}
} }
if (budget <= 0)
goto done;
} }
} }
...@@ -788,22 +794,27 @@ int ath11k_dp_service_srng(struct ath11k_base *ab, ...@@ -788,22 +794,27 @@ int ath11k_dp_service_srng(struct ath11k_base *ab,
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;
budget -= work_done;
tot_work_done += work_done;
}
if (budget <= 0) if (ab->hw_params.ring_mask->rxdma2host[grp_id] & BIT(id)) {
goto done; work_done = ath11k_dp_process_rxdma_err(ab, id, budget);
budget -= work_done;
tot_work_done += work_done;
}
if (ab->hw_params.ring_mask->host2rxdma[grp_id] & BIT(i)) { if (budget <= 0)
struct ath11k_pdev_dp *dp = &ab->pdevs[i].ar->dp; goto done;
struct dp_rxdma_ring *rx_ring = &dp->rx_refill_buf_ring;
if (ab->hw_params.ring_mask->host2rxdma[grp_id] & BIT(id)) {
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;
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 */
......
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