@@ -4077,21 +4077,18 @@ int ath10k_htt_txrx_compl_task(struct ath10k *ar, int budget)
/* Deliver received data after processing data from hardware */
quota = ath10k_htt_rx_deliver_msdu(ar, quota, budget);
- /* From NAPI documentation:
- * The napi poll() function may also process TX completions, in which
- * case if it processes the entire TX ring then it should count that
- * work as the rest of the budget.
- */
- if ((quota < budget) && !kfifo_is_empty(&htt->txdone_fifo))
- quota = budget;
-
/* kfifo_get: called only within txrx_tasklet so it's neatly serialized.
* From kfifo_get() documentation:
* Note that with only one concurrent reader and one concurrent writer,
* you don't need extra locking to use these macro.
*/
- while (kfifo_get(&htt->txdone_fifo, &tx_done))
+ while (kfifo_get(&htt->txdone_fifo, &tx_done)) {
ath10k_txrx_tx_unref(htt, &tx_done);
+ quota++;
+ }
+
+ if (quota > budget)
+ resched_napi = true;
ath10k_mac_tx_push_pending(ar);
Currently the entire NAPI budget is marked as exhausted if any tx completion is processed. In scenarios of bi-directional traffic, this leads to a situation where the irqs are never enabled and the NAPI is rescheuled again and again. Increase the work done quota by the number of tx completions which are processed in the NAPI context. Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1 Signed-off-by: Rakesh Pillai <pillair@codeaurora.org> --- drivers/net/wireless/ath/ath10k/htt_rx.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)