Commit d7017461 authored by Sujith Manoharan's avatar Sujith Manoharan Committed by John W. Linville

ath9k: Fix queue management

Since we use IEEE80211_HW_QUEUE_CONTROL now, the
CAB/Offchannel queues are registered as the last
two queues. There is no need to check and reassign
the queues in the TX start()/done() routines.

CAB frames will not reach the tx() callback since
we set IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING and
pull the buffered frames during beacon transmission.
We also don't have a special HW queue for handling
off-channel frames.
Signed-off-by: default avatarSujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 01f7feea
...@@ -158,7 +158,6 @@ static void ath_txq_skb_done(struct ath_softc *sc, struct ath_txq *txq, ...@@ -158,7 +158,6 @@ static void ath_txq_skb_done(struct ath_softc *sc, struct ath_txq *txq,
{ {
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct ath_frame_info *fi = get_frame_info(skb); struct ath_frame_info *fi = get_frame_info(skb);
int hw_queue;
int q = fi->txq; int q = fi->txq;
if (q < 0) if (q < 0)
...@@ -168,10 +167,9 @@ static void ath_txq_skb_done(struct ath_softc *sc, struct ath_txq *txq, ...@@ -168,10 +167,9 @@ static void ath_txq_skb_done(struct ath_softc *sc, struct ath_txq *txq,
if (WARN_ON(--txq->pending_frames < 0)) if (WARN_ON(--txq->pending_frames < 0))
txq->pending_frames = 0; txq->pending_frames = 0;
hw_queue = (info->hw_queue >= sc->hw->queues - 2) ? q : info->hw_queue;
if (txq->stopped && if (txq->stopped &&
txq->pending_frames < sc->tx.txq_max_pending[q]) { txq->pending_frames < sc->tx.txq_max_pending[q]) {
ieee80211_wake_queue(sc->hw, hw_queue); ieee80211_wake_queue(sc->hw, info->hw_queue);
txq->stopped = false; txq->stopped = false;
} }
} }
...@@ -2208,8 +2206,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb, ...@@ -2208,8 +2206,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
struct ath_atx_tid *tid = NULL; struct ath_atx_tid *tid = NULL;
struct ath_buf *bf; struct ath_buf *bf;
bool queue; bool queue;
int q, hw_queue; int q, ret;
int ret;
if (vif) if (vif)
avp = (void *)vif->drv_priv; avp = (void *)vif->drv_priv;
...@@ -2228,14 +2225,13 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb, ...@@ -2228,14 +2225,13 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
*/ */
q = skb_get_queue_mapping(skb); q = skb_get_queue_mapping(skb);
hw_queue = (info->hw_queue >= sc->hw->queues - 2) ? q : info->hw_queue;
ath_txq_lock(sc, txq); ath_txq_lock(sc, txq);
if (txq == sc->tx.txq_map[q]) { if (txq == sc->tx.txq_map[q]) {
fi->txq = q; fi->txq = q;
if (++txq->pending_frames > sc->tx.txq_max_pending[q] && if (++txq->pending_frames > sc->tx.txq_max_pending[q] &&
!txq->stopped) { !txq->stopped) {
ieee80211_stop_queue(sc->hw, hw_queue); ieee80211_stop_queue(sc->hw, info->hw_queue);
txq->stopped = true; txq->stopped = true;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment