summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2014-10-17 06:10:15 +0400
committerJohn W. Linville <linville@tuxdriver.com>2014-10-27 21:16:15 +0300
commit2fae0d9fb038d8cd354d51fbb0560cf252a66ecc (patch)
treef56118e6c4c31a2e05fce70739c82d706e4a43e5 /drivers/net/wireless/ath/ath9k/main.c
parent8890d05ff5f4bc0ba81f2d3d845cc95631c78cac (diff)
downloadlinux-2fae0d9fb038d8cd354d51fbb0560cf252a66ecc.tar.xz
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>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 5d54f39a61a8..81a20de771c5 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -2034,7 +2034,7 @@ void __ath9k_flush(struct ieee80211_hw *hw, u32 queues, bool drop)
struct ath_softc *sc = hw->priv;
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
- int timeout = HZ / 5; /* 200 ms */
+ int timeout;
bool drain_txq;
cancel_delayed_work_sync(&sc->tx_complete_work);
@@ -2049,6 +2049,13 @@ void __ath9k_flush(struct ieee80211_hw *hw, u32 queues, bool drop)
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),
timeout) > 0)
drop = false;