Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/linville...
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / net / wireless / ath / ath5k / base.c
index 8611f24cdf6a12be46d299984476854b626498db..dae0bdcef257f8640ceccd26043d06b6de2b8a3b 100644 (file)
@@ -2276,6 +2276,8 @@ ath5k_tx_complete_poll_work(struct work_struct *work)
        int i;
        bool needreset = false;
 
+       mutex_lock(&sc->lock);
+
        for (i = 0; i < ARRAY_SIZE(sc->txqs); i++) {
                if (sc->txqs[i].setup) {
                        txq = &sc->txqs[i];
@@ -2303,6 +2305,8 @@ ath5k_tx_complete_poll_work(struct work_struct *work)
                ath5k_reset(sc, NULL, true);
        }
 
+       mutex_unlock(&sc->lock);
+
        ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work,
                msecs_to_jiffies(ATH5K_TX_COMPLETE_POLL_INT));
 }