02bf1599a3
SVN-Revision: 25056
123 lines
3.4 KiB
Diff
123 lines
3.4 KiB
Diff
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
|
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
|
@@ -1221,49 +1221,59 @@ void ath_tx_cleanupq(struct ath_softc *s
|
|
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;
|
|
-
|
|
- tid = list_first_entry(&ac->tid_q, struct ath_atx_tid, list);
|
|
- list_del(&tid->list);
|
|
- tid->sched = false;
|
|
+ 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;
|
|
+
|
|
+ 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;
|
|
}
|
|
}
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
|
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
|
@@ -369,6 +369,9 @@ static void ath9k_hw_init_config(struct
|
|
else
|
|
ah->config.ht_enable = 0;
|
|
|
|
+ /* PAPRD needs some more work to be enabled */
|
|
+ ah->config.paprd_disable = 1;
|
|
+
|
|
ah->config.rx_intr_mitigation = true;
|
|
ah->config.pcieSerDesWrite = true;
|
|
|
|
@@ -1949,7 +1952,8 @@ int ath9k_hw_fill_cap_info(struct ath_hw
|
|
pCap->rx_status_len = sizeof(struct ar9003_rxs);
|
|
pCap->tx_desc_len = sizeof(struct ar9003_txc);
|
|
pCap->txs_len = sizeof(struct ar9003_txs);
|
|
- if (ah->eep_ops->get_eeprom(ah, EEP_PAPRD))
|
|
+ if (!ah->config.paprd_disable &&
|
|
+ ah->eep_ops->get_eeprom(ah, EEP_PAPRD))
|
|
pCap->hw_caps |= ATH9K_HW_CAP_PAPRD;
|
|
} else {
|
|
pCap->tx_desc_len = sizeof(struct ath_desc);
|
|
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
|
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
|
@@ -228,6 +228,7 @@ struct ath9k_ops_config {
|
|
u32 pcie_waen;
|
|
u8 analog_shiftreg;
|
|
u8 ht_enable;
|
|
+ u8 paprd_disable;
|
|
u32 ofdm_trig_low;
|
|
u32 ofdm_trig_high;
|
|
u32 cck_trig_high;
|