ath9k: add some more fixes for the tx queueing rework
authorFelix Fietkau <nbd@openwrt.org>
Tue, 6 Aug 2013 10:30:58 +0000 (10:30 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 6 Aug 2013 10:30:58 +0000 (10:30 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 37713

package/kernel/mac80211/patches/560-ath9k_prepare_tid_queue_split.patch
package/kernel/mac80211/patches/571-ath9k_tid_fairness.patch
package/kernel/mac80211/patches/572-ath9k_multicast_node.patch

index d2c2bac78c44ce0bfcf0f4fc8c687a997b7c19b6..8ac529426a0a1d7452104f3f38d768166c375055 100644 (file)
                        TX_STAT_INC(txq->axq_qnum, a_queued_hw);
  
 -                      if (skb_queue_empty(&tid->buf_q))
-+                      if (ath_tid_has_buffered(tid))
++                      if (!ath_tid_has_buffered(tid))
                                ieee80211_sta_set_buffered(an->sta, i, false);
                }
                ath_txq_unlock_complete(sc, tid->ac->txq);
index 30ae0908ecadee83c28c80e18893d2cf394569db..8d3400a35d04109b9a7c23bbc232c1038c7991d7 100644 (file)
@@ -11,7 +11,7 @@
  {
        struct ath_buf *bf;
        struct ieee80211_tx_info *tx_info;
-@@ -1327,40 +1327,39 @@ static void ath_tx_sched_aggr(struct ath
+@@ -1327,40 +1327,41 @@ static void ath_tx_sched_aggr(struct ath
        int aggr_len = 0;
        bool aggr, last = true;
  
 +      tx_info = IEEE80211_SKB_CB(bf->bf_mpdu);
 +      aggr = !!(tx_info->flags & IEEE80211_TX_CTL_AMPDU);
 +      if ((aggr && txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH) ||
-+              (!aggr && txq->axq_depth >= ATH_NON_AGGR_MIN_QDEPTH))
++              (!aggr && txq->axq_depth >= ATH_NON_AGGR_MIN_QDEPTH)) {
++              *stop = true;
 +              return false;
++      }
 +
 +      ath_set_rates(tid->an->vif, tid->an->sta, bf);
 +      if (aggr)
@@ -80,7 +82,7 @@
  }
  
  int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
-@@ -1796,8 +1795,9 @@ void ath_tx_cleanupq(struct ath_softc *s
+@@ -1796,25 +1797,27 @@ void ath_tx_cleanupq(struct ath_softc *s
   */
  void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
  {
 +      bool sent = false;
  
        if (test_bit(SC_OP_HW_RESET, &sc->sc_flags) ||
-           list_empty(&txq->axq_acq) ||
-@@ -1806,15 +1806,17 @@ void ath_txq_schedule(struct ath_softc *
+-          list_empty(&txq->axq_acq) ||
+-          txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
++          list_empty(&txq->axq_acq))
+               return;
  
        rcu_read_lock();
  
                        tid = list_first_entry(&ac->tid_q, struct ath_atx_tid,
                                               list);
                        list_del(&tid->list);
-@@ -1823,7 +1825,8 @@ void ath_txq_schedule(struct ath_softc *
+@@ -1823,7 +1826,8 @@ void ath_txq_schedule(struct ath_softc *
                        if (tid->paused)
                                continue;
  
  
                        /*
                         * add tid to round-robin queue if more frames
-@@ -1832,8 +1835,7 @@ void ath_txq_schedule(struct ath_softc *
+@@ -1832,8 +1836,7 @@ void ath_txq_schedule(struct ath_softc *
                        if (ath_tid_has_buffered(tid))
                                ath_tx_queue_tid(txq, tid);
  
                                break;
                }
  
-@@ -1842,9 +1844,17 @@ void ath_txq_schedule(struct ath_softc *
+@@ -1842,9 +1845,17 @@ void ath_txq_schedule(struct ath_softc *
                        list_add_tail(&ac->list, &txq->axq_acq);
                }
  
index cbe3816b12eb03ae1084f1be87c3f78cfc08581e..28ec6ee9dbffbf095d51aedb520138f52dde15ef 100644 (file)
@@ -69,7 +69,7 @@
        ieee80211_send_bar(tid->an->vif, tid->an->sta->addr, tid->tidno,
                           seqno << IEEE80211_SEQ_SEQ_SHIFT);
  }
-@@ -1352,7 +1355,7 @@ static bool ath_tx_sched_aggr(struct ath
+@@ -1354,7 +1357,7 @@ static bool ath_tx_sched_aggr(struct ath
        if (list_empty(&bf_q))
                return false;
  
                tid->ac->clear_ps_filter = false;
                tx_info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT;
        }
-@@ -1542,7 +1545,7 @@ void ath9k_release_buffered_frames(struc
+@@ -1544,7 +1547,7 @@ void ath9k_release_buffered_frames(struc
                        sent++;
                        TX_STAT_INC(txq->axq_qnum, a_queued_hw);
  
--                      if (ath_tid_has_buffered(tid))
-+                      if (an->sta && ath_tid_has_buffered(tid))
+-                      if (!ath_tid_has_buffered(tid))
++                      if (an->sta && !ath_tid_has_buffered(tid))
                                ieee80211_sta_set_buffered(an->sta, i, false);
                }
                ath_txq_unlock_complete(sc, tid->ac->txq);
-@@ -2075,6 +2078,7 @@ static int ath_tx_prepare(struct ieee802
+@@ -2076,6 +2079,7 @@ static int ath_tx_prepare(struct ieee802
        struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
        struct ieee80211_sta *sta = txctl->sta;
        struct ieee80211_vif *vif = info->control.vif;
@@ -95,7 +95,7 @@
        struct ath_softc *sc = hw->priv;
        int frmlen = skb->len + FCS_LEN;
        int padpos, padsize;
-@@ -2082,6 +2086,10 @@ static int ath_tx_prepare(struct ieee802
+@@ -2083,6 +2087,10 @@ static int ath_tx_prepare(struct ieee802
        /* NOTE:  sta can be NULL according to net/mac80211.h */
        if (sta)
                txctl->an = (struct ath_node *)sta->drv_priv;