diff options
author | Abbas, Mohamed <mohamed.abbas@intel.com> | 2009-01-20 21:33:55 -0800 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 16:01:06 -0500 |
commit | e9414b6b3f34dcc3683e66dffa4f5f167d49df51 (patch) | |
tree | 857f8deb0ce8110fcf82930d41c4b11db1c4b9db /drivers/net/wireless/iwlwifi/iwl-3945.c | |
parent | c0af96a6e63ef93c605ce495fff79c692d4b8c4d (diff) | |
download | talos-obmc-linux-e9414b6b3f34dcc3683e66dffa4f5f167d49df51.tar.gz talos-obmc-linux-e9414b6b3f34dcc3683e66dffa4f5f167d49df51.zip |
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/iwl-3945.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index fe907f353368..4aeb101fc45b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c @@ -1338,6 +1338,9 @@ static int iwl3945_apm_reset(struct iwl_priv *priv) spin_lock_irqsave(&priv->lock, flags); iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET); + udelay(10); + + iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); iwl_poll_direct_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); @@ -1347,11 +1350,6 @@ static int iwl3945_apm_reset(struct iwl_priv *priv) iwl_write_prph(priv, APMG_CLK_CTRL_REG, APMG_CLK_VAL_BSM_CLK_RQT); - udelay(10); - - iwl_set_bit(priv, CSR_GP_CNTRL, - CSR_GP_CNTRL_REG_FLAG_INIT_DONE); - iwl_write_prph(priv, APMG_RTC_INT_MSK_REG, 0x0); iwl_write_prph(priv, APMG_RTC_INT_STT_REG, 0xFFFFFFFF); |