aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/xmit.c
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2014-09-30 04:45:23 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-09-30 13:17:48 -0400
commit4d9f634b02e4240f86719f30e4c9e62f6a4c4d36 (patch)
treeebb24bcd1fe800477529e004de8928fd361a2814 /drivers/net/wireless/ath/ath9k/xmit.c
parent4eb3af7c1df32dcd4362c2f20928f679ed78f2e5 (diff)
ath9k: Check early for HW reset
chan_lock is not required for checking if we are in the middle of a HW reset, so do it early. This also removes the small window where the lock is dropped and reacquired. 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/xmit.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index aae70a10d1e0..7193a00d3bca 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1839,15 +1839,17 @@ void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
1839 if (txq->mac80211_qnum < 0) 1839 if (txq->mac80211_qnum < 0)
1840 return; 1840 return;
1841 1841
1842 if (test_bit(ATH_OP_HW_RESET, &common->op_flags))
1843 return;
1844
1842 spin_lock_bh(&sc->chan_lock); 1845 spin_lock_bh(&sc->chan_lock);
1843 ac_list = &sc->cur_chan->acq[txq->mac80211_qnum]; 1846 ac_list = &sc->cur_chan->acq[txq->mac80211_qnum];
1844 spin_unlock_bh(&sc->chan_lock);
1845 1847
1846 if (test_bit(ATH_OP_HW_RESET, &common->op_flags) || 1848 if (list_empty(ac_list)) {
1847 list_empty(ac_list)) 1849 spin_unlock_bh(&sc->chan_lock);
1848 return; 1850 return;
1851 }
1849 1852
1850 spin_lock_bh(&sc->chan_lock);
1851 rcu_read_lock(); 1853 rcu_read_lock();
1852 1854
1853 last_ac = list_entry(ac_list->prev, struct ath_atx_ac, list); 1855 last_ac = list_entry(ac_list->prev, struct ath_atx_ac, list);