diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-04-13 03:14:45 -0700 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-04-22 10:02:34 -0700 |
commit | bc4f8adac6b30ee5f03dad267896add7e58db729 (patch) | |
tree | 0d6a2c806a96b35fde1a8579af6b5291f0d2d30d /drivers/net/wireless/iwlwifi/iwl-agn.h | |
parent | 1a10f43313481b99154b3b1ce6863742475422e0 (diff) |
iwlagn: refactor down path
The iwl_down path really consists of multiple things,
refactor out the hardware resetting (including, of
course, related software state like irqs).
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h index 078a23e5d99..1211f457ee4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.h +++ b/drivers/net/wireless/iwlwifi/iwl-agn.h @@ -120,6 +120,17 @@ int iwl_alloc_isr_ict(struct iwl_priv *priv); void iwl_free_isr_ict(struct iwl_priv *priv); irqreturn_t iwl_isr_ict(int irq, void *data); +/* call this function to flush any scheduled tasklet */ +static inline void iwl_synchronize_irq(struct iwl_priv *priv) +{ + /* wait to make sure we flush pending tasklet*/ + synchronize_irq(priv->pci_dev->irq); + tasklet_kill(&priv->irq_tasklet); +} + + +void iwlagn_stop_device(struct iwl_priv *priv); + /* tx queue */ void iwlagn_set_wr_ptrs(struct iwl_priv *priv, int txq_id, u32 index); |