diff options
-rw-r--r-- | sys/dev/ath/if_ath.c | 11 | ||||
-rw-r--r-- | sys/dev/ath/if_ath_misc.h | 5 | ||||
-rw-r--r-- | sys/dev/ath/if_ath_tx.c | 3 | ||||
-rw-r--r-- | sys/dev/ath/if_ath_tx.h | 5 | ||||
-rw-r--r-- | sys/dev/ath/if_ath_tx_edma.c | 19 | ||||
-rw-r--r-- | sys/dev/ath/if_athvar.h | 9 |
6 files changed, 28 insertions, 24 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 5287585..919a352 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -168,12 +168,13 @@ static struct ath_txq *ath_txq_setup(struct ath_softc*, int qtype, int subtype); static int ath_tx_setup(struct ath_softc *, int, int); static void ath_tx_cleanupq(struct ath_softc *, struct ath_txq *); static void ath_tx_cleanup(struct ath_softc *); +static int ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq, + int dosched); static void ath_tx_proc_q0(void *, int); static void ath_tx_proc_q0123(void *, int); static void ath_tx_proc(void *, int); static void ath_txq_sched_tasklet(void *, int); static int ath_chan_set(struct ath_softc *, struct ieee80211_channel *); -static void ath_draintxq(struct ath_softc *, ATH_RESET_TYPE reset_type); static void ath_chan_change(struct ath_softc *, struct ieee80211_channel *); static void ath_scan_start(struct ieee80211com *); static void ath_scan_end(struct ieee80211com *); @@ -3585,8 +3586,8 @@ ath_tx_update_busy(struct ath_softc *sc) * Kick the packet scheduler if needed. This can occur from this * particular task. */ -int -ath_legacy_tx_processq(struct ath_softc *sc, struct ath_txq *txq, int dosched) +static int +ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq, int dosched) { struct ath_hal *ah = sc->sc_ah; struct ath_buf *bf; @@ -4093,8 +4094,8 @@ ath_stoptxdma(struct ath_softc *sc) /* * Drain the transmit queues and reclaim resources. */ -static void -ath_draintxq(struct ath_softc *sc, ATH_RESET_TYPE reset_type) +void +ath_legacy_tx_drain(struct ath_softc *sc, ATH_RESET_TYPE reset_type) { #ifdef ATH_DEBUG struct ath_hal *ah = sc->sc_ah; diff --git a/sys/dev/ath/if_ath_misc.h b/sys/dev/ath/if_ath_misc.h index d34c72c..4f2f331 100644 --- a/sys/dev/ath/if_ath_misc.h +++ b/sys/dev/ath/if_ath_misc.h @@ -96,9 +96,10 @@ extern void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd, ath_bufhead *head); extern void ath_legacy_attach_comp_func(struct ath_softc *sc); + extern void ath_legacy_tx_draintxq(struct ath_softc *sc, struct ath_txq *txq); -extern int ath_legacy_tx_processq(struct ath_softc *sc, struct ath_txq *txq, - int dosched); +extern void ath_legacy_tx_drain(struct ath_softc *sc, + ATH_RESET_TYPE reset_type); /* * This is only here so that the RX proc function can call it. diff --git a/sys/dev/ath/if_ath_tx.c b/sys/dev/ath/if_ath_tx.c index fbf5c92..1fe4020 100644 --- a/sys/dev/ath/if_ath_tx.c +++ b/sys/dev/ath/if_ath_tx.c @@ -4571,6 +4571,7 @@ ath_xmit_setup_legacy(struct ath_softc *sc) sc->sc_tx.xmit_dma_restart = ath_legacy_tx_dma_restart; sc->sc_tx.xmit_handoff = ath_legacy_xmit_handoff; - sc->sc_tx.xmit_processq = ath_legacy_tx_processq; + sc->sc_tx.xmit_drainq = ath_legacy_tx_draintxq; + sc->sc_tx.xmit_drain = ath_legacy_tx_drain; } diff --git a/sys/dev/ath/if_ath_tx.h b/sys/dev/ath/if_ath_tx.h index 4ac4589..7b2d60f 100644 --- a/sys/dev/ath/if_ath_tx.h +++ b/sys/dev/ath/if_ath_tx.h @@ -134,10 +134,11 @@ extern void ath_addba_response_timeout(struct ieee80211_node *ni, (_sc)->sc_tx.xmit_dma_restart((_sc), (_txq)) #define ath_tx_handoff(_sc, _txq, _bf) \ (_sc)->sc_tx.xmit_handoff((_sc), (_txq), (_bf)) + #define ath_tx_draintxq(_sc, _txq) \ (_sc)->sc_tx.xmit_drainq((_sc), (_txq)) -#define ath_tx_processq(_sc, _txq, _dosched) \ - (_sc)->sc_tx.xmit_processq((_sc), (_txq), (_dosched)) +#define ath_draintxq(_sc, _rtype) \ + (_sc)->sc_tx.xmit_drain((_sc), (_rtype)) extern void ath_xmit_setup_legacy(struct ath_softc *sc); diff --git a/sys/dev/ath/if_ath_tx_edma.c b/sys/dev/ath/if_ath_tx_edma.c index 493dc45..992c006 100644 --- a/sys/dev/ath/if_ath_tx_edma.c +++ b/sys/dev/ath/if_ath_tx_edma.c @@ -349,26 +349,21 @@ ath_edma_dma_txteardown(struct ath_softc *sc) } /* - * Process frames in the current queue and if necessary, re-schedule the - * software TXQ scheduler for this TXQ. - * - * XXX This is again a pain in the ass to do because the status descriptor - * information is in the TX status FIFO, not with the current descriptor. + * Drain all TXQs, potentially after completing the existing completed + * frames. */ -static int -ath_edma_tx_processq(struct ath_softc *sc, struct ath_txq *txq, int dosched) +static void +ath_edma_tx_drain(struct ath_softc *sc, ATH_RESET_TYPE reset_type) { device_printf(sc->sc_dev, "%s: called\n", __func__); - return (0); } /* * Completely drain the TXQ, completing frames that were completed. * - * XXX this is going to be a complete pain in the ass because the - * completion status is in the TX status FIFO, not with the descriptor - * itself. Sigh. + * This is only called to _explictly_ drain the frames from a queue + * without caring if they were completed or not. */ static void ath_edma_tx_draintxq(struct ath_softc *sc, struct ath_txq *txq) @@ -446,6 +441,6 @@ ath_xmit_setup_edma(struct ath_softc *sc) sc->sc_tx.xmit_dma_restart = ath_edma_dma_restart; sc->sc_tx.xmit_handoff = ath_edma_xmit_handoff; - sc->sc_tx.xmit_processq = ath_edma_tx_processq; sc->sc_tx.xmit_drainq = ath_edma_tx_draintxq; + sc->sc_tx.xmit_drain = ath_edma_tx_drain; } diff --git a/sys/dev/ath/if_athvar.h b/sys/dev/ath/if_athvar.h index cecddab..a139a1f 100644 --- a/sys/dev/ath/if_athvar.h +++ b/sys/dev/ath/if_athvar.h @@ -417,10 +417,15 @@ struct ath_tx_methods { void (*xmit_handoff)(struct ath_softc *sc, struct ath_txq *txq, struct ath_buf *bf); + /* + * This is only required by the CABQ code as well as + * xmit_drain(). + */ void (*xmit_drainq)(struct ath_softc *sc, struct ath_txq *txq); - int (*xmit_processq)(struct ath_softc *sc, - struct ath_txq *txq, int dosched); + + void (*xmit_drain)(struct ath_softc *sc, + ATH_RESET_TYPE reset_type); }; struct ath_softc { |