ath9k: add some more fixes for the tx queueing rework
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 6 Aug 2013 10:30:58 +0000 (10:30 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 6 Aug 2013 10:30:58 +0000 (10:30 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37713 3c298f89-4303-0410-b956-a3cf2f4a3e73

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 d2c2bac..8ac5294 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 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);
                }
  
index cbe3816..28ec6ee 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;