]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/mac80211/iface.c
mac80211: fix txq queue related crashes
[karo-tx-linux.git] / net / mac80211 / iface.c
index c9e325d2e120c0f9c230dbace71c3c405b9216a3..7a2b7915093bfb8e76ae1239a75a6a9ca710ab3c 100644 (file)
@@ -977,7 +977,10 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
        if (sdata->vif.txq) {
                struct txq_info *txqi = to_txq_info(sdata->vif.txq);
 
+               spin_lock_bh(&txqi->queue.lock);
                ieee80211_purge_tx_queue(&local->hw, &txqi->queue);
+               spin_unlock_bh(&txqi->queue.lock);
+
                atomic_set(&sdata->txqs_len[txqi->txq.ac], 0);
        }