diff options
-rw-r--r-- | sys/dev/ath/if_ath.c | 27 | ||||
-rw-r--r-- | sys/dev/ath/if_ath_misc.h | 3 | ||||
-rw-r--r-- | sys/dev/ath/if_ath_tx.c | 1 | ||||
-rw-r--r-- | sys/dev/ath/if_ath_tx.h | 3 | ||||
-rw-r--r-- | sys/dev/ath/if_ath_tx_edma.c | 14 | ||||
-rw-r--r-- | sys/dev/ath/if_athvar.h | 8 |
6 files changed, 26 insertions, 30 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 919a352..00b3092 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -3987,7 +3987,7 @@ ath_tx_freebuf(struct ath_softc *sc, struct ath_buf *bf, int status) } void -ath_legacy_tx_draintxq(struct ath_softc *sc, struct ath_txq *txq) +ath_tx_draintxq(struct ath_softc *sc, struct ath_txq *txq) { #ifdef ATH_DEBUG struct ath_hal *ah = sc->sc_ah; @@ -4013,6 +4013,17 @@ ath_legacy_tx_draintxq(struct ath_softc *sc, struct ath_txq *txq) bf = TAILQ_FIRST(&txq->axq_q); if (bf == NULL) { txq->axq_link = NULL; + /* + * There's currently no flag that indicates + * a buffer is on the FIFO. So until that + * occurs, just clear the FIFO counter here. + * + * Yes, this means that if something in parallel + * is pushing things onto this TXQ and pushing + * _that_ into the hardware, things will get + * very fruity very quickly. + */ + txq->axq_fifo_depth = 0; ATH_TXQ_UNLOCK(txq); break; } @@ -4022,10 +4033,20 @@ ath_legacy_tx_draintxq(struct ath_softc *sc, struct ath_txq *txq) #ifdef ATH_DEBUG if (sc->sc_debug & ATH_DEBUG_RESET) { struct ieee80211com *ic = sc->sc_ifp->if_l2com; + int status = 0; - ath_printtxbuf(sc, bf, txq->axq_qnum, ix, - ath_hal_txprocdesc(ah, bf->bf_lastds, + /* + * EDMA operation has a TX completion FIFO + * separate from the TX descriptor, so this + * method of checking the "completion" status + * is wrong. + */ + if (! sc->sc_isedma) { + status = (ath_hal_txprocdesc(ah, + bf->bf_lastds, &bf->bf_status.ds_txstat) == HAL_OK); + } + ath_printtxbuf(sc, bf, txq->axq_qnum, ix, status); ieee80211_dump_pkt(ic, mtod(bf->bf_m, const uint8_t *), bf->bf_m->m_len, 0, -1); } diff --git a/sys/dev/ath/if_ath_misc.h b/sys/dev/ath/if_ath_misc.h index 4f2f331..d529b6f 100644 --- a/sys/dev/ath/if_ath_misc.h +++ b/sys/dev/ath/if_ath_misc.h @@ -97,7 +97,8 @@ extern void ath_descdma_cleanup(struct ath_softc *sc, 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 void ath_tx_draintxq(struct ath_softc *sc, struct ath_txq *txq); + extern void ath_legacy_tx_drain(struct ath_softc *sc, ATH_RESET_TYPE reset_type); diff --git a/sys/dev/ath/if_ath_tx.c b/sys/dev/ath/if_ath_tx.c index 1fe4020..2649085 100644 --- a/sys/dev/ath/if_ath_tx.c +++ b/sys/dev/ath/if_ath_tx.c @@ -4572,6 +4572,5 @@ 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_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 7b2d60f..ad112ac 100644 --- a/sys/dev/ath/if_ath_tx.h +++ b/sys/dev/ath/if_ath_tx.h @@ -134,9 +134,6 @@ 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_draintxq(_sc, _rtype) \ (_sc)->sc_tx.xmit_drain((_sc), (_rtype)) diff --git a/sys/dev/ath/if_ath_tx_edma.c b/sys/dev/ath/if_ath_tx_edma.c index 992c006..5ae7b8c 100644 --- a/sys/dev/ath/if_ath_tx_edma.c +++ b/sys/dev/ath/if_ath_tx_edma.c @@ -360,19 +360,6 @@ ath_edma_tx_drain(struct ath_softc *sc, ATH_RESET_TYPE reset_type) } /* - * Completely drain the TXQ, completing frames that were completed. - * - * 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) -{ - - device_printf(sc->sc_dev, "%s: called\n", __func__); -} - -/* * Process the TX status queue. */ static void @@ -441,6 +428,5 @@ 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_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 a139a1f..a1a0ad9 100644 --- a/sys/dev/ath/if_athvar.h +++ b/sys/dev/ath/if_athvar.h @@ -416,14 +416,6 @@ struct ath_tx_methods { struct ath_txq *txq); 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); - void (*xmit_drain)(struct ath_softc *sc, ATH_RESET_TYPE reset_type); }; |