svn commit: r225746 - user/adrian/if_ath_tx/sys/dev/ath
Adrian Chadd
adrian at FreeBSD.org
Sat Sep 24 07:33:30 UTC 2011
Author: adrian
Date: Sat Sep 24 07:33:29 2011
New Revision: 225746
URL: http://svn.freebsd.org/changeset/base/225746
Log:
Change how RXEOL/RXORN is handled.
* If the condition is hit on chips where it isn't fatal, don't restart
the PCU by stopping/starting; this introduces quite long pauses and it
doesn't look like it's needed (at least for AR9160 hostap.)
* Add some debugging to see what's going on.
It turns out that I either see a full RX queue (512 packets) or
an empty RX queue (0); I'll have to do some further poking to see
why that is.
Modified:
user/adrian/if_ath_tx/sys/dev/ath/if_ath.c
Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Fri Sep 23 21:01:44 2011 (r225745)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Sat Sep 24 07:33:29 2011 (r225746)
@@ -3656,6 +3656,7 @@ ath_rx_proc(void *arg, int npending)
HAL_STATUS status;
int16_t nf;
u_int64_t tsf;
+ int npkts = 0;
DPRINTF(sc, ATH_DEBUG_RX_PROC, "%s: pending %u\n", __func__, npending);
ngood = 0;
@@ -3715,6 +3716,7 @@ ath_rx_proc(void *arg, int npending)
break;
TAILQ_REMOVE(&sc->sc_rxbuf, bf, bf_list);
+ npkts++;
/*
* If the datalen is greater than the buffer itself,
@@ -4045,6 +4047,9 @@ rx_next:
* XXX is it really needed? Or is it just enough to
* XXX kick the PCU again to continue RXing?
*/
+ device_printf(sc->sc_dev, "%s: kickpcu; handled %d packets\n",
+ __func__, npkts);
+#if 0
ath_stoprecv(sc);
sc->sc_imask |= (HAL_INT_RXEOL | HAL_INT_RXORN);
if (ath_startrecv(sc) != 0) {
@@ -4054,6 +4059,15 @@ rx_next:
ath_reset(ifp);
return;
}
+#endif
+
+ /* XXX rxslink? */
+ bf = TAILQ_FIRST(&sc->sc_rxbuf);
+ ath_hal_putrxbuf(ah, bf->bf_daddr);
+ ath_hal_rxena(ah); /* enable recv descriptors */
+ ath_mode_init(sc); /* set filters, etc. */
+ ath_hal_startpcurecv(ah); /* re-enable PCU/DMA engine */
+
ath_hal_intrset(ah, sc->sc_imask);
}
More information about the svn-src-user
mailing list