diff options
author | Zhu, Yi <yi.zhu@intel.com> | 2008-12-05 10:58:39 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-12-12 13:48:21 -0500 |
commit | 42802d71dd14dd0e435a8da59d817d0c6f8a2866 (patch) | |
tree | f836e1cfbd4e6a8d49d79e37cc2cbaf2aa88c434 /drivers/net/wireless/iwlwifi/iwl-4965.c | |
parent | f056658bb9c3085d5ec52fbdd45b38d55b899cc9 (diff) |
iwlwifi: fix "MAC in deep sleep" error
This patch fixes the misue of CSR_GP_CNTRL with CSR_RESET address
in polling the CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY bit in
iwl4965_apm_reset(). This causes "MAC in deep sleep" error sometimes.
The patch also fixes the timeout value and the iwl_poll_bit() return
value check.
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@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/iwl-4965.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 87c7bb0d5044..c961e2c716d3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -482,11 +482,11 @@ static int iwl4965_apm_reset(struct iwl_priv *priv) | |||
482 | 482 | ||
483 | iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); | 483 | iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); |
484 | 484 | ||
485 | ret = iwl_poll_bit(priv, CSR_RESET, | 485 | ret = iwl_poll_bit(priv, CSR_GP_CNTRL, |
486 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, | 486 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, |
487 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25); | 487 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); |
488 | 488 | ||
489 | if (ret) | 489 | if (ret < 0) |
490 | goto out; | 490 | goto out; |
491 | 491 | ||
492 | udelay(10); | 492 | udelay(10); |