If we're doing a kickpcu, make sure we flush the whole RX list rather than

stopping after 128 frames.

Whilst here, add in some code that lets me optionally flip back to the
original behaviour of calling ath_startrecv().
This commit is contained in:
Adrian Chadd 2013-01-13 22:41:58 +00:00
parent e1e1f0e44f
commit 233af52df2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=245396

View File

@ -845,6 +845,7 @@ ath_rx_proc(struct ath_softc *sc, int resched)
int16_t nf;
u_int64_t tsf;
int npkts = 0;
int kickpcu = 0;
/* XXX we must not hold the ATH_LOCK here */
ATH_UNLOCK_ASSERT(sc);
@ -852,6 +853,7 @@ ath_rx_proc(struct ath_softc *sc, int resched)
ATH_PCU_LOCK(sc);
sc->sc_rxproc_cnt++;
kickpcu = sc->sc_kickpcu;
ATH_PCU_UNLOCK(sc);
DPRINTF(sc, ATH_DEBUG_RX_PROC, "%s: called\n", __func__);
@ -866,7 +868,7 @@ ath_rx_proc(struct ath_softc *sc, int resched)
* latency can jump by quite a bit, causing throughput
* degredation.
*/
if (npkts >= ATH_RX_MAX)
if (!kickpcu && npkts >= ATH_RX_MAX)
break;
bf = TAILQ_FIRST(&sc->sc_rxbuf);
@ -961,6 +963,9 @@ ath_rx_proc(struct ath_softc *sc, int resched)
__func__, npkts);
/* XXX rxslink? */
#if 0
ath_startrecv(sc);
#else
/*
* XXX can we hold the PCU lock here?
* Are there any net80211 buffer calls involved?
@ -970,6 +975,7 @@ ath_rx_proc(struct ath_softc *sc, int resched)
ath_hal_rxena(ah); /* enable recv descriptors */
ath_mode_init(sc); /* set filters, etc. */
ath_hal_startpcurecv(ah); /* re-enable PCU/DMA engine */
#endif
ath_hal_intrset(ah, sc->sc_imask);
sc->sc_kickpcu = 0;