diff options
author | David Spinadel <david.spinadel@intel.com> | 2012-08-12 08:14:04 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-09-10 19:11:53 +0200 |
commit | ee7d737c45440062320c16bc7ad7bb5c9fe8888e (patch) | |
tree | ad83c629957e422bc3b61526179e5e928dda8d9a /drivers/net/wireless | |
parent | 8b61fa242ce56838ce1c41db3692b64b4c344776 (diff) |
iwlwifi: stop interrupts before stopping device
If an RX interrupt is signalled after or during apm_stop
we may try to access the peripherals which are already
down. Prevent this by disabling interrupts first.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/trans.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index 913ad46a668..7da075f5bff 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c @@ -1453,6 +1453,10 @@ static void iwl_trans_pcie_stop_hw(struct iwl_trans *trans, bool hw_rfkill; unsigned long flags; + spin_lock_irqsave(&trans_pcie->irq_lock, flags); + iwl_disable_interrupts(trans); + spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); + iwl_apm_stop(trans); spin_lock_irqsave(&trans_pcie->irq_lock, flags); |