aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-io.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c7
3 files changed, 10 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index fe907f35336..4aeb101fc45 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)
1338 spin_lock_irqsave(&priv->lock, flags); 1338 spin_lock_irqsave(&priv->lock, flags);
1339 1339
1340 iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET); 1340 iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET);
1341 udelay(10);
1342
1343 iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
1341 1344
1342 iwl_poll_direct_bit(priv, CSR_GP_CNTRL, 1345 iwl_poll_direct_bit(priv, CSR_GP_CNTRL,
1343 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); 1346 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000);
@@ -1347,11 +1350,6 @@ static int iwl3945_apm_reset(struct iwl_priv *priv)
1347 iwl_write_prph(priv, APMG_CLK_CTRL_REG, 1350 iwl_write_prph(priv, APMG_CLK_CTRL_REG,
1348 APMG_CLK_VAL_BSM_CLK_RQT); 1351 APMG_CLK_VAL_BSM_CLK_RQT);
1349 1352
1350 udelay(10);
1351
1352 iwl_set_bit(priv, CSR_GP_CNTRL,
1353 CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
1354
1355 iwl_write_prph(priv, APMG_RTC_INT_MSK_REG, 0x0); 1353 iwl_write_prph(priv, APMG_RTC_INT_MSK_REG, 0x0);
1356 iwl_write_prph(priv, APMG_RTC_INT_STT_REG, 1354 iwl_write_prph(priv, APMG_RTC_INT_STT_REG,
1357 0xFFFFFFFF); 1355 0xFFFFFFFF);
diff --git a/drivers/net/wireless/iwlwifi/iwl-io.h b/drivers/net/wireless/iwlwifi/iwl-io.h
index bc3f3daef6e..7341a2da843 100644
--- a/drivers/net/wireless/iwlwifi/iwl-io.h
+++ b/drivers/net/wireless/iwlwifi/iwl-io.h
@@ -165,7 +165,7 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv)
165 ret = _iwl_poll_bit(priv, CSR_GP_CNTRL, 165 ret = _iwl_poll_bit(priv, CSR_GP_CNTRL,
166 CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN, 166 CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN,
167 (CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY | 167 (CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY |
168 CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 50); 168 CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 15000);
169 if (ret < 0) { 169 if (ret < 0) {
170 IWL_ERR(priv, "MAC is in deep sleep!\n"); 170 IWL_ERR(priv, "MAC is in deep sleep!\n");
171 return -EIO; 171 return -EIO;
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 78271936801..d520bfe2db9 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