1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-24 01:43:08 +02:00

ath9k: fix a locking issue

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29537 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2011-12-14 21:03:52 +00:00
parent 032d881496
commit 92f09266ed

View File

@ -212,36 +212,3 @@
if (sc->sc_flags & SC_OP_TXAGGR)
ath_txq_schedule(sc, txq);
}
@@ -2281,6 +2253,7 @@ void ath_tx_edma_tasklet(struct ath_soft
struct list_head bf_head;
int status;
+ spin_lock_bh(&txq->axq_lock);
for (;;) {
if (work_pending(&sc->hw_reset_work))
break;
@@ -2300,12 +2273,8 @@ void ath_tx_edma_tasklet(struct ath_soft
txq = &sc->tx.txq[ts.qid];
- spin_lock_bh(&txq->axq_lock);
-
- if (list_empty(&txq->txq_fifo[txq->txq_tailidx])) {
- spin_unlock_bh(&txq->axq_lock);
- return;
- }
+ if (list_empty(&txq->txq_fifo[txq->txq_tailidx]))
+ break;
bf = list_first_entry(&txq->txq_fifo[txq->txq_tailidx],
struct ath_buf, list);
@@ -2329,8 +2298,8 @@ void ath_tx_edma_tasklet(struct ath_soft
}
ath_tx_process_buffer(sc, txq, &ts, bf, &bf_head);
- spin_unlock_bh(&txq->axq_lock);
}
+ spin_unlock_bh(&txq->axq_lock);
}
/*****************/