aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
authorReinette Chatre <reinette.chatre@intel.com>2008-01-31 01:05:15 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-01 16:14:21 -0500
commite903fbd41e9a723da194e91816bfb69d442eb116 (patch)
tree88a8ca0c8be3a9a41b46e2826ea370c49892ad95 /drivers/net/wireless/iwlwifi/iwl3945-base.c
parentff5059eff254fbe1d2aa4f47e24aa6fc71b98e65 (diff)
iwlwifi: fix merge sequence: exit on error before state change
The intention behind the original patch: "iwlwifi: fix possible read attempt on ucode that is not available" was to exit before any state is changed. Due to its submission directly to 2.6.24 it was not clear how this relates to the latest iwlwifi work. This patch does exactly the same as the previous patch, just earlier to prevent any state from being changed if there is an error. 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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 33239f197984..f55c75712b55 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -6330,6 +6330,11 @@ static int __iwl3945_up(struct iwl3945_priv *priv)
6330 return -ENODEV; 6330 return -ENODEV;
6331 } 6331 }
6332 6332
6333 if (!priv->ucode_data_backup.v_addr || !priv->ucode_data.v_addr) {
6334 IWL_ERROR("ucode not available for device bringup\n");
6335 return -EIO;
6336 }
6337
6333 /* If platform's RF_KILL switch is NOT set to KILL */ 6338 /* If platform's RF_KILL switch is NOT set to KILL */
6334 if (iwl3945_read32(priv, CSR_GP_CNTRL) & 6339 if (iwl3945_read32(priv, CSR_GP_CNTRL) &
6335 CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW) 6340 CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW)
@@ -6342,11 +6347,6 @@ static int __iwl3945_up(struct iwl3945_priv *priv)
6342 } 6347 }
6343 } 6348 }
6344 6349
6345 if (!priv->ucode_data_backup.v_addr || !priv->ucode_data.v_addr) {
6346 IWL_ERROR("ucode not available for device bringup\n");
6347 return -EIO;
6348 }
6349
6350 iwl3945_write32(priv, CSR_INT, 0xFFFFFFFF); 6350 iwl3945_write32(priv, CSR_INT, 0xFFFFFFFF);
6351 6351
6352 rc = iwl3945_hw_nic_init(priv); 6352 rc = iwl3945_hw_nic_init(priv);