Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 55f5e4a9 authored by Sujith's avatar Sujith Committed by John W. Linville
Browse files

ath9k: Remove ath_tx_stopdma and call ath9k_hw_stoptxdma directly

parent e8324357
Loading
Loading
Loading
Loading
+9 −13
Original line number Original line Diff line number Diff line
@@ -877,12 +877,6 @@ static u32 ath_txq_depth(struct ath_softc *sc, int qnum)
	return sc->tx.txq[qnum].axq_depth;
	return sc->tx.txq[qnum].axq_depth;
}
}


static void ath_tx_stopdma(struct ath_softc *sc, struct ath_txq *txq)
{
	struct ath_hal *ah = sc->sc_ah;
	(void) ath9k_hw_stoptxdma(ah, txq->axq_qnum);
}

static void ath_get_beaconconfig(struct ath_softc *sc, int if_id,
static void ath_get_beaconconfig(struct ath_softc *sc, int if_id,
				 struct ath_beacon_config *conf)
				 struct ath_beacon_config *conf)
{
{
@@ -899,15 +893,17 @@ static void ath_get_beaconconfig(struct ath_softc *sc, int if_id,
static void ath_drain_txdataq(struct ath_softc *sc, bool retry_tx)
static void ath_drain_txdataq(struct ath_softc *sc, bool retry_tx)
{
{
	struct ath_hal *ah = sc->sc_ah;
	struct ath_hal *ah = sc->sc_ah;
	struct ath_txq *txq;
	int i, npend = 0;
	int i, npend = 0;


	if (!(sc->sc_flags & SC_OP_INVALID)) {
	if (sc->sc_flags & SC_OP_INVALID)
		return;

	for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) {
	for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) {
		if (ATH_TXQ_SETUP(sc, i)) {
		if (ATH_TXQ_SETUP(sc, i)) {
				ath_tx_stopdma(sc, &sc->tx.txq[i]);
			txq = &sc->tx.txq[i];
				npend += ath9k_hw_numtxpending(ah,
			ath9k_hw_stoptxdma(ah, txq->axq_qnum);
						       sc->tx.txq[i].axq_qnum);
			npend += ath9k_hw_numtxpending(ah, txq->axq_qnum);
			}
		}
		}
	}
	}