diff options
author | Abbas, Mohamed <mohamed.abbas@intel.com> | 2009-01-21 00:33:55 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 16:01:06 -0500 |
commit | e9414b6b3f34dcc3683e66dffa4f5f167d49df51 (patch) | |
tree | 857f8deb0ce8110fcf82930d41c4b11db1c4b9db /drivers/net/wireless/iwlwifi/iwl3945-base.c | |
parent | c0af96a6e63ef93c605ce495fff79c692d4b8c4d (diff) |
iwl3945: fix deep sleep when removing the driver.
A warning message "MAC is in deep sleep" sometimes happen when user removes
the driver. This warning is related to card not being ready. In __iwl3945_down
function some of the going down steps are in wrong order, to fix this this patch
do the following:
1- make sure we are calling iwl3945_apm_reset and iwl3945_apm_stop
in the right order.
2- make sure we set CSR_GP_CNTRL_REG_FLAG_INIT_DONE in apm_reset before
poll on CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY.
3- set correct polling counter.
This fixes bug
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1834
Signed-off-by: mohamed abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 78271936801a..d520bfe2db99 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -4941,6 +4941,7 @@ static void __iwl3945_down(struct iwl_priv *priv) | |||
4941 | test_bit(STATUS_EXIT_PENDING, &priv->status) << | 4941 | test_bit(STATUS_EXIT_PENDING, &priv->status) << |
4942 | STATUS_EXIT_PENDING; | 4942 | STATUS_EXIT_PENDING; |
4943 | 4943 | ||
4944 | priv->cfg->ops->lib->apm_ops.reset(priv); | ||
4944 | spin_lock_irqsave(&priv->lock, flags); | 4945 | spin_lock_irqsave(&priv->lock, flags); |
4945 | iwl_clear_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); | 4946 | iwl_clear_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); |
4946 | spin_unlock_irqrestore(&priv->lock, flags); | 4947 | spin_unlock_irqrestore(&priv->lock, flags); |
@@ -4958,7 +4959,11 @@ static void __iwl3945_down(struct iwl_priv *priv) | |||
4958 | 4959 | ||
4959 | udelay(5); | 4960 | udelay(5); |
4960 | 4961 | ||
4961 | priv->cfg->ops->lib->apm_ops.reset(priv); | 4962 | if (exit_pending || test_bit(STATUS_IN_SUSPEND, &priv->status)) |
4963 | priv->cfg->ops->lib->apm_ops.stop(priv); | ||
4964 | else | ||
4965 | priv->cfg->ops->lib->apm_ops.reset(priv); | ||
4966 | |||
4962 | exit: | 4967 | exit: |
4963 | memset(&priv->card_alive, 0, sizeof(struct iwl_alive_resp)); | 4968 | memset(&priv->card_alive, 0, sizeof(struct iwl_alive_resp)); |
4964 | 4969 | ||