diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-03-19 10:36:09 -0700 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-03-25 11:22:08 -0700 |
commit | 6e8cc38d5b05bb812f89a35bd9bf52405e67d0df (patch) | |
tree | 315cec6bbf580bdbc0e5c8dad06dfeb9da2313c5 /drivers/net/wireless/iwlwifi/iwl-core.c | |
parent | 6c69d121676761b2a85282df796af9c3f8c99b64 (diff) | |
download | kernel_samsung_smdk4412-6e8cc38d5b05bb812f89a35bd9bf52405e67d0df.zip kernel_samsung_smdk4412-6e8cc38d5b05bb812f89a35bd9bf52405e67d0df.tar.gz kernel_samsung_smdk4412-6e8cc38d5b05bb812f89a35bd9bf52405e67d0df.tar.bz2 |
iwlwifi: change spin_lock to spin_lock_irqsave
Use spin_lock_irqsave() in interrupt handler to disable interrupts locally
and provide the spinlock on SMP. This covers both interrupt and SMP
concurrency.
With this changes, also fix the sparse warning issues.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-core.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index d152198..9e48352 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c @@ -1531,10 +1531,11 @@ irqreturn_t iwl_isr_legacy(int irq, void *data) struct iwl_priv *priv = data; u32 inta, inta_mask; u32 inta_fh; + unsigned long flags; if (!priv) return IRQ_NONE; - spin_lock(&priv->lock); + spin_lock_irqsave(&priv->lock, flags); /* Disable (but don't clear!) interrupts here to avoid * back-to-back ISRs and sporadic interrupts from our NIC. @@ -1572,7 +1573,7 @@ irqreturn_t iwl_isr_legacy(int irq, void *data) tasklet_schedule(&priv->irq_tasklet); unplugged: - spin_unlock(&priv->lock); + spin_unlock_irqrestore(&priv->lock, flags); return IRQ_HANDLED; none: @@ -1580,7 +1581,7 @@ irqreturn_t iwl_isr_legacy(int irq, void *data) /* only Re-enable if diabled by irq */ if (test_bit(STATUS_INT_ENABLED, &priv->status)) iwl_enable_interrupts(priv); - spin_unlock(&priv->lock); + spin_unlock_irqrestore(&priv->lock, flags); return IRQ_NONE; } EXPORT_SYMBOL(iwl_isr_legacy); |