aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/xmit.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-11-02 20:09:12 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-11 17:09:03 -0500
commitf52de03bf9843673cadff8016a609e1628c139e2 (patch)
treee750810d10c44dee9303af41425cc383ff58d16c /drivers/net/wireless/ath/ath9k/xmit.c
parent5008f3727b05b5eb970ce703721aa5897a088e30 (diff)
ath9k: handle low buffer space for virtual wiphys
ath9k virtual wiphys all share the same internal buffer space for TX but they do not share the mac80211 skb queues. When ath9k detects it is running low on buffer space to TX it tells mac80211 to stop sending it skbs its way but it always does this only for the primary wiphy. This means mac80211 won't know its best to avoid sending ath9k more skbs on a separate virtual wiphy. The same issue is present for reliving the skb queue. Since ath9k does not keep track of which virtual wiphy is hammering on TX silence all wiphy's TX when we're low on buffer space. When we're free on buffer space only bother informing the virtual wiphy which is active that we have free buffers. Cc: Jouni.Malinen <Jouni.Malinen@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index fc06768e8231..86b54ddd01cb 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -915,9 +915,10 @@ int ath_tx_get_qnum(struct ath_softc *sc, int qtype, int haltype)
915struct ath_txq *ath_test_get_txq(struct ath_softc *sc, struct sk_buff *skb) 915struct ath_txq *ath_test_get_txq(struct ath_softc *sc, struct sk_buff *skb)
916{ 916{
917 struct ath_txq *txq = NULL; 917 struct ath_txq *txq = NULL;
918 u16 skb_queue = skb_get_queue_mapping(skb);
918 int qnum; 919 int qnum;
919 920
920 qnum = ath_get_hal_qnum(skb_get_queue_mapping(skb), sc); 921 qnum = ath_get_hal_qnum(skb_queue, sc);
921 txq = &sc->tx.txq[qnum]; 922 txq = &sc->tx.txq[qnum];
922 923
923 spin_lock_bh(&txq->axq_lock); 924 spin_lock_bh(&txq->axq_lock);
@@ -926,7 +927,7 @@ struct ath_txq *ath_test_get_txq(struct ath_softc *sc, struct sk_buff *skb)
926 ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_XMIT, 927 ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_XMIT,
927 "TX queue: %d is full, depth: %d\n", 928 "TX queue: %d is full, depth: %d\n",
928 qnum, txq->axq_depth); 929 qnum, txq->axq_depth);
929 ieee80211_stop_queue(sc->hw, skb_get_queue_mapping(skb)); 930 ath_mac80211_stop_queue(sc, skb_queue);
930 txq->stopped = 1; 931 txq->stopped = 1;
931 spin_unlock_bh(&txq->axq_lock); 932 spin_unlock_bh(&txq->axq_lock);
932 return NULL; 933 return NULL;
@@ -1705,8 +1706,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
1705 * on the queue */ 1706 * on the queue */
1706 spin_lock_bh(&txq->axq_lock); 1707 spin_lock_bh(&txq->axq_lock);
1707 if (sc->tx.txq[txq->axq_qnum].axq_depth > 1) { 1708 if (sc->tx.txq[txq->axq_qnum].axq_depth > 1) {
1708 ieee80211_stop_queue(sc->hw, 1709 ath_mac80211_stop_queue(sc, skb_get_queue_mapping(skb));
1709 skb_get_queue_mapping(skb));
1710 txq->stopped = 1; 1710 txq->stopped = 1;
1711 } 1711 }
1712 spin_unlock_bh(&txq->axq_lock); 1712 spin_unlock_bh(&txq->axq_lock);
@@ -1946,7 +1946,7 @@ static void ath_wake_mac80211_queue(struct ath_softc *sc, struct ath_txq *txq)
1946 sc->tx.txq[txq->axq_qnum].axq_depth <= (ATH_TXBUF - 20)) { 1946 sc->tx.txq[txq->axq_qnum].axq_depth <= (ATH_TXBUF - 20)) {
1947 qnum = ath_get_mac80211_qnum(txq->axq_qnum, sc); 1947 qnum = ath_get_mac80211_qnum(txq->axq_qnum, sc);
1948 if (qnum != -1) { 1948 if (qnum != -1) {
1949 ieee80211_wake_queue(sc->hw, qnum); 1949 ath_mac80211_start_queue(sc, qnum);
1950 txq->stopped = 0; 1950 txq->stopped = 0;
1951 } 1951 }
1952 } 1952 }