diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2014-02-19 03:15:09 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-02-24 15:21:55 -0500 |
commit | 59f01183a7846c1621a23dd88182f5a890f38717 (patch) | |
tree | aa3655fd0c61a9d62309822253d0e2d0fd20116e /drivers/net/wireless/iwlegacy | |
parent | e3c91683b5c6498df19e5fba51fdb61fef5f4227 (diff) |
iwl3945: fix wakeup interrupt
We have only 5 tx queues on 3945, updating il->txq[5] results in
writing random value to HBUS_TARG_WRPTR register.
Additionally use spin lock to protect txq->write_ptr and
txq->need_update fields also modified in TX path.
Tested-by: Pedro Francisco <pedrogfrancisco@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy')
-rw-r--r-- | drivers/net/wireless/iwlegacy/3945-mac.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c index 0487461ae4da..46b32d41aa2f 100644 --- a/drivers/net/wireless/iwlegacy/3945-mac.c +++ b/drivers/net/wireless/iwlegacy/3945-mac.c | |||
@@ -1495,12 +1495,14 @@ il3945_irq_tasklet(struct il_priv *il) | |||
1495 | if (inta & CSR_INT_BIT_WAKEUP) { | 1495 | if (inta & CSR_INT_BIT_WAKEUP) { |
1496 | D_ISR("Wakeup interrupt\n"); | 1496 | D_ISR("Wakeup interrupt\n"); |
1497 | il_rx_queue_update_write_ptr(il, &il->rxq); | 1497 | il_rx_queue_update_write_ptr(il, &il->rxq); |
1498 | |||
1499 | spin_lock_irqsave(&il->lock, flags); | ||
1498 | il_txq_update_write_ptr(il, &il->txq[0]); | 1500 | il_txq_update_write_ptr(il, &il->txq[0]); |
1499 | il_txq_update_write_ptr(il, &il->txq[1]); | 1501 | il_txq_update_write_ptr(il, &il->txq[1]); |
1500 | il_txq_update_write_ptr(il, &il->txq[2]); | 1502 | il_txq_update_write_ptr(il, &il->txq[2]); |
1501 | il_txq_update_write_ptr(il, &il->txq[3]); | 1503 | il_txq_update_write_ptr(il, &il->txq[3]); |
1502 | il_txq_update_write_ptr(il, &il->txq[4]); | 1504 | il_txq_update_write_ptr(il, &il->txq[4]); |
1503 | il_txq_update_write_ptr(il, &il->txq[5]); | 1505 | spin_unlock_irqrestore(&il->lock, flags); |
1504 | 1506 | ||
1505 | il->isr_stats.wakeup++; | 1507 | il->isr_stats.wakeup++; |
1506 | handled |= CSR_INT_BIT_WAKEUP; | 1508 | handled |= CSR_INT_BIT_WAKEUP; |