diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2014-09-24 02:18:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-09-26 17:11:08 -0400 |
commit | d7017461fa4ce9a59104866a6c382eeca439560a (patch) | |
tree | 606f3cf92376bf6e9dd291cdeb3aff4a23dc4d18 /drivers/net/wireless/ath/ath9k/xmit.c | |
parent | 01f7feeaf4528bec83798316b3c811701bac5d3e (diff) |
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: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/xmit.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 93ad31be0ada..2c8327f308c9 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -158,7 +158,6 @@ static void ath_txq_skb_done(struct ath_softc *sc, struct ath_txq *txq, | |||
158 | { | 158 | { |
159 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 159 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); |
160 | struct ath_frame_info *fi = get_frame_info(skb); | 160 | struct ath_frame_info *fi = get_frame_info(skb); |
161 | int hw_queue; | ||
162 | int q = fi->txq; | 161 | int q = fi->txq; |
163 | 162 | ||
164 | if (q < 0) | 163 | if (q < 0) |
@@ -168,10 +167,9 @@ static void ath_txq_skb_done(struct ath_softc *sc, struct ath_txq *txq, | |||
168 | if (WARN_ON(--txq->pending_frames < 0)) | 167 | if (WARN_ON(--txq->pending_frames < 0)) |
169 | txq->pending_frames = 0; | 168 | txq->pending_frames = 0; |
170 | 169 | ||
171 | hw_queue = (info->hw_queue >= sc->hw->queues - 2) ? q : info->hw_queue; | ||
172 | if (txq->stopped && | 170 | if (txq->stopped && |
173 | txq->pending_frames < sc->tx.txq_max_pending[q]) { | 171 | txq->pending_frames < sc->tx.txq_max_pending[q]) { |
174 | ieee80211_wake_queue(sc->hw, hw_queue); | 172 | ieee80211_wake_queue(sc->hw, info->hw_queue); |
175 | txq->stopped = false; | 173 | txq->stopped = false; |
176 | } | 174 | } |
177 | } | 175 | } |
@@ -2208,8 +2206,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
2208 | struct ath_atx_tid *tid = NULL; | 2206 | struct ath_atx_tid *tid = NULL; |
2209 | struct ath_buf *bf; | 2207 | struct ath_buf *bf; |
2210 | bool queue; | 2208 | bool queue; |
2211 | int q, hw_queue; | 2209 | int q, ret; |
2212 | int ret; | ||
2213 | 2210 | ||
2214 | if (vif) | 2211 | if (vif) |
2215 | avp = (void *)vif->drv_priv; | 2212 | avp = (void *)vif->drv_priv; |
@@ -2228,14 +2225,13 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
2228 | */ | 2225 | */ |
2229 | 2226 | ||
2230 | q = skb_get_queue_mapping(skb); | 2227 | q = skb_get_queue_mapping(skb); |
2231 | hw_queue = (info->hw_queue >= sc->hw->queues - 2) ? q : info->hw_queue; | ||
2232 | 2228 | ||
2233 | ath_txq_lock(sc, txq); | 2229 | ath_txq_lock(sc, txq); |
2234 | if (txq == sc->tx.txq_map[q]) { | 2230 | if (txq == sc->tx.txq_map[q]) { |
2235 | fi->txq = q; | 2231 | fi->txq = q; |
2236 | if (++txq->pending_frames > sc->tx.txq_max_pending[q] && | 2232 | if (++txq->pending_frames > sc->tx.txq_max_pending[q] && |
2237 | !txq->stopped) { | 2233 | !txq->stopped) { |
2238 | ieee80211_stop_queue(sc->hw, hw_queue); | 2234 | ieee80211_stop_queue(sc->hw, info->hw_queue); |
2239 | txq->stopped = true; | 2235 | txq->stopped = true; |
2240 | } | 2236 | } |
2241 | } | 2237 | } |