On 06/21/2017 04:50 PM, Johannes Berg wrote:
From: Johannes Berg <johannes.berg@xxxxxxxxx> Some drivers may want to also use the TXQ abstraction with non-data packets that need powersave buffering, so add a hardware flag to allow this. Change ath9k/ath10k to use these by dequeuing the frames immediately and invoking the normal TX path for them. Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
--- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c @@ -154,8 +154,24 @@ void ath9k_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *queue) { struct ath_softc *sc = hw->priv; struct ath_common *common = ath9k_hw_common(sc->sc_ah); - struct ath_atx_tid *tid = (struct ath_atx_tid *) queue->drv_priv; - struct ath_txq *txq = tid->txq; + struct ath_atx_tid *tid; + struct ath_txq *txq; + + if (unlikely(queue->tid == IEEE80211_NUM_TIDS)) { + struct sk_buff *skb = ieee80211_tx_dequeue(hw, queue); + struct ieee80211_tx_control control = { + .sta = queue->sta, + }; + + if (WARN_ON(!skb)) + return; + + ath9k_tx(hw, &control, skb); + return; + }
I think a comment for the above code block would be warranted (and for ath10k as well). I guess this is the part about dequeueing the frames immediately? Thanks, Ben -- Ben Greear <greearb@xxxxxxxxxxxxxxx> Candela Technologies Inc http://www.candelatech.com