mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-07 23:28:55 +00:00
ath9k: Use configurable timeout for flush
The timeout value for flushing the TX queues is hardcoded at 200ms right now. Use a channel context-specific value instead to allow adjustments to the timeout in case MCC is enabled. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
8890d05ff5
commit
2fae0d9fb0
3 changed files with 10 additions and 1 deletions
|
@ -345,6 +345,7 @@ struct ath_chanctx {
|
||||||
u64 tsf_val;
|
u64 tsf_val;
|
||||||
u32 last_beacon;
|
u32 last_beacon;
|
||||||
|
|
||||||
|
int flush_timeout;
|
||||||
u16 txpower;
|
u16 txpower;
|
||||||
bool offchannel;
|
bool offchannel;
|
||||||
bool stopped;
|
bool stopped;
|
||||||
|
|
|
@ -117,6 +117,7 @@ void ath_chanctx_init(struct ath_softc *sc)
|
||||||
cfg80211_chandef_create(&ctx->chandef, chan, NL80211_CHAN_HT20);
|
cfg80211_chandef_create(&ctx->chandef, chan, NL80211_CHAN_HT20);
|
||||||
INIT_LIST_HEAD(&ctx->vifs);
|
INIT_LIST_HEAD(&ctx->vifs);
|
||||||
ctx->txpower = ATH_TXPOWER_MAX;
|
ctx->txpower = ATH_TXPOWER_MAX;
|
||||||
|
ctx->flush_timeout = HZ / 5; /* 200ms */
|
||||||
for (j = 0; j < ARRAY_SIZE(ctx->acq); j++)
|
for (j = 0; j < ARRAY_SIZE(ctx->acq); j++)
|
||||||
INIT_LIST_HEAD(&ctx->acq[j]);
|
INIT_LIST_HEAD(&ctx->acq[j]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2034,7 +2034,7 @@ void __ath9k_flush(struct ieee80211_hw *hw, u32 queues, bool drop)
|
||||||
struct ath_softc *sc = hw->priv;
|
struct ath_softc *sc = hw->priv;
|
||||||
struct ath_hw *ah = sc->sc_ah;
|
struct ath_hw *ah = sc->sc_ah;
|
||||||
struct ath_common *common = ath9k_hw_common(ah);
|
struct ath_common *common = ath9k_hw_common(ah);
|
||||||
int timeout = HZ / 5; /* 200 ms */
|
int timeout;
|
||||||
bool drain_txq;
|
bool drain_txq;
|
||||||
|
|
||||||
cancel_delayed_work_sync(&sc->tx_complete_work);
|
cancel_delayed_work_sync(&sc->tx_complete_work);
|
||||||
|
@ -2049,6 +2049,13 @@ void __ath9k_flush(struct ieee80211_hw *hw, u32 queues, bool drop)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spin_lock_bh(&sc->chan_lock);
|
||||||
|
timeout = sc->cur_chan->flush_timeout;
|
||||||
|
spin_unlock_bh(&sc->chan_lock);
|
||||||
|
|
||||||
|
ath_dbg(common, CHAN_CTX,
|
||||||
|
"Flush timeout: %d\n", jiffies_to_msecs(timeout));
|
||||||
|
|
||||||
if (wait_event_timeout(sc->tx_wait, !ath9k_has_tx_pending(sc),
|
if (wait_event_timeout(sc->tx_wait, !ath9k_has_tx_pending(sc),
|
||||||
timeout) > 0)
|
timeout) > 0)
|
||||||
drop = false;
|
drop = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue