Skip to content

Commit

Permalink
iwlwifi: pcie: fix TX queue locking
Browse files Browse the repository at this point in the history
When updating the write pointer, the TX queue should be locked
to get consistent state, fix that in the interrupt handler.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
  • Loading branch information
Johannes Berg authored and Emmanuel Grumbach committed Apr 13, 2014
1 parent 43aa616 commit 42646ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/wireless/iwlwifi/pcie/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1042,8 +1042,11 @@ irqreturn_t iwl_pcie_irq_handler(int irq, void *dev_id)
if (inta & CSR_INT_BIT_WAKEUP) {
IWL_DEBUG_ISR(trans, "Wakeup interrupt\n");
iwl_pcie_rxq_check_wrptr(trans);
for (i = 0; i < trans->cfg->base_params->num_of_queues; i++)
for (i = 0; i < trans->cfg->base_params->num_of_queues; i++) {
spin_lock(&trans_pcie->txq[i].lock);
iwl_pcie_txq_inc_wr_ptr(trans, &trans_pcie->txq[i]);
spin_unlock(&trans_pcie->txq[i].lock);
}

isr_stats->wakeup++;

Expand Down

0 comments on commit 42646ba

Please sign in to comment.