summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Greenman <gregory.greenman@intel.com>2008-09-03 03:18:49 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2008-09-03 19:10:37 (GMT)
commitd535311ecbba0d692b5f1278b8bcb2581c3482e0 (patch)
treee71d516c2a725e2b5411434730390e2b7302235e
parent73b7d742519ab4cc1b7a12c7af15187fc0ede8e7 (diff)
downloadlinux-d535311ecbba0d692b5f1278b8bcb2581c3482e0.tar.xz
iwlwifi: call apm stop on exit
This patch calls apm stop on exit and suspend. Without this patch hardware consumes power even after driver is removed or suspended. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 34928c8..4e3d6c7 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2187,7 +2187,10 @@ static void __iwl4965_down(struct iwl_priv *priv)
udelay(5);
/* FIXME: apm_ops.suspend(priv) */
- priv->cfg->ops->lib->apm_ops.reset(priv);
+ if (exit_pending || test_bit(STATUS_IN_SUSPEND, &priv->status))
+ priv->cfg->ops->lib->apm_ops.stop(priv);
+ else
+ priv->cfg->ops->lib->apm_ops.reset(priv);
priv->cfg->ops->lib->free_shared_mem(priv);
exit: