ath9k: add some more fixes for the tx queueing rework
[openwrt.git] / package / kernel / mac80211 / patches / 571-ath9k_tid_fairness.patch
index 30ae090..8d3400a 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);
                }