Skip to content

Commit

Permalink
iwlwifi: call apm stop on exit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gregory Greenman authored and John W. Linville committed Sep 3, 2008
1 parent 73b7d74 commit d535311
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d535311

Please sign in to comment.