Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236762
b: refs/heads/master
c: 7755bad
h: refs/heads/master
v: v3
  • Loading branch information
Ben Greear authored and John W. Linville committed Jan 21, 2011
1 parent 21c88a1 commit 1fdabdc
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 55f6d0fff64dfee57812e821f846b068a8c2df01
refs/heads/master: 7755bad9ffe56e0faacb13bc9484ccc0194aaa75
64 changes: 37 additions & 27 deletions trunk/drivers/net/wireless/ath/ath9k/xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1222,49 +1222,59 @@ void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq)
sc->tx.txqsetup &= ~(1<<txq->axq_qnum);
}

/* For each axq_acq entry, for each tid, try to schedule packets
* for transmit until ampdu_depth has reached min Q depth.
*/
void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
{
struct ath_atx_ac *ac;
struct ath_atx_tid *tid, *last;
struct ath_atx_ac *ac, *ac_tmp, *last_ac;
struct ath_atx_tid *tid, *last_tid;

if (list_empty(&txq->axq_acq) ||
txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
return;

ac = list_first_entry(&txq->axq_acq, struct ath_atx_ac, list);
last = list_entry(ac->tid_q.prev, struct ath_atx_tid, list);
list_del(&ac->list);
ac->sched = false;
last_ac = list_entry(txq->axq_acq.prev, struct ath_atx_ac, list);

do {
if (list_empty(&ac->tid_q))
return;
list_for_each_entry_safe(ac, ac_tmp, &txq->axq_acq, list) {
last_tid = list_entry(ac->tid_q.prev, struct ath_atx_tid, list);
list_del(&ac->list);
ac->sched = false;

tid = list_first_entry(&ac->tid_q, struct ath_atx_tid, list);
list_del(&tid->list);
tid->sched = false;
while (!list_empty(&ac->tid_q)) {
tid = list_first_entry(&ac->tid_q, struct ath_atx_tid,
list);
list_del(&tid->list);
tid->sched = false;

if (tid->paused)
continue;
if (tid->paused)
continue;

ath_tx_sched_aggr(sc, txq, tid);
ath_tx_sched_aggr(sc, txq, tid);

/*
* add tid to round-robin queue if more frames
* are pending for the tid
*/
if (!list_empty(&tid->buf_q))
ath_tx_queue_tid(txq, tid);
/*
* add tid to round-robin queue if more frames
* are pending for the tid
*/
if (!list_empty(&tid->buf_q))
ath_tx_queue_tid(txq, tid);

if (tid == last || txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
break;
} while (!list_empty(&ac->tid_q));
if (tid == last_tid ||
txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
break;
}

if (!list_empty(&ac->tid_q)) {
if (!ac->sched) {
ac->sched = true;
list_add_tail(&ac->list, &txq->axq_acq);
if (!list_empty(&ac->tid_q)) {
if (!ac->sched) {
ac->sched = true;
list_add_tail(&ac->list, &txq->axq_acq);
}
}

if (ac == last_ac ||
txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
return;
}
}

Expand Down

0 comments on commit 1fdabdc

Please sign in to comment.