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

Commit 15b91e83 authored by Vivek Natarajan's avatar Vivek Natarajan Committed by John W. Linville
Browse files

ath9k: Implement dev_tx_frames_pending callback.



This function returns true if there is atleast one frame
in any one of the tx queues.

Signed-off-by: default avatarVivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent e8306f98
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -2201,6 +2201,21 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop)
	ath9k_ps_restore(sc);
}

static bool ath9k_tx_frames_pending(struct ieee80211_hw *hw)
{
	struct ath_softc *sc = hw->priv;
	int i;

	for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) {
		if (!ATH_TXQ_SETUP(sc, i))
			continue;

		if (ath9k_has_pending_frames(sc, &sc->tx.txq[i]))
			return true;
	}
	return false;
}

struct ieee80211_ops ath9k_ops = {
	.tx 		    = ath9k_tx,
	.start 		    = ath9k_start,
@@ -2223,4 +2238,5 @@ struct ieee80211_ops ath9k_ops = {
	.rfkill_poll        = ath9k_rfkill_poll_state,
	.set_coverage_class = ath9k_set_coverage_class,
	.flush		    = ath9k_flush,
	.tx_frames_pending  = ath9k_tx_frames_pending,
};