@@ -1162,6 +1162,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
u64 tsf = 0;
u32 tsf_lower = 0;
unsigned long flags;
+ int max_per_round = 1000; /* max of 1000 per call if not flushing */
if (edma)
dma_type = DMA_BIDIRECTIONAL;
@@ -1176,6 +1177,11 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
do {
bool decrypt_error = false;
+ if (!flush) {
+ if (--max_per_round == 0)
+ break;
+ }
+
memset(&rs, 0, sizeof(rs));
if (edma)
bf = ath_edma_get_next_rx_buf(sc, &rs, qtype);