ath9k: add some more fixes for the tx queueing rework

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 37713
This commit is contained in:
Felix Fietkau 2013-08-06 10:30:58 +00:00
parent 27fa640548
commit 592f2c6e2b
3 changed files with 19 additions and 15 deletions

View file

@ -166,7 +166,7 @@
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);

View 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;
@ -47,8 +47,10 @@
+ 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)
{
@ -90,8 +92,10 @@
+ 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();
@ -111,7 +115,7 @@
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;
@ -121,7 +125,7 @@
/*
* 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);
@ -131,7 +135,7 @@
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);
}

View 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;
@ -78,16 +78,16 @@
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;