aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index b42354fda2c5..3738ffa2dcde 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -5018,7 +5018,8 @@ static int iwl3945_verify_inst_full(struct iwl3945_priv *priv, __le32 *image, u3
5018 if (rc) 5018 if (rc)
5019 return rc; 5019 return rc;
5020 5020
5021 iwl3945_write_direct32(priv, HBUS_TARG_MEM_RADDR, RTC_INST_LOWER_BOUND); 5021 iwl3945_write_direct32(priv, HBUS_TARG_MEM_RADDR,
5022 IWL39_RTC_INST_LOWER_BOUND);
5022 5023
5023 errcnt = 0; 5024 errcnt = 0;
5024 for (; len > 0; len -= sizeof(u32), image++) { 5025 for (; len > 0; len -= sizeof(u32), image++) {
@@ -5069,7 +5070,7 @@ static int iwl3945_verify_inst_sparse(struct iwl3945_priv *priv, __le32 *image,
5069 /* NOTE: Use the debugless read so we don't flood kernel log 5070 /* NOTE: Use the debugless read so we don't flood kernel log
5070 * if IWL_DL_IO is set */ 5071 * if IWL_DL_IO is set */
5071 iwl3945_write_direct32(priv, HBUS_TARG_MEM_RADDR, 5072 iwl3945_write_direct32(priv, HBUS_TARG_MEM_RADDR,
5072 i + RTC_INST_LOWER_BOUND); 5073 i + IWL39_RTC_INST_LOWER_BOUND);
5073 val = _iwl3945_read_direct32(priv, HBUS_TARG_MEM_RDAT); 5074 val = _iwl3945_read_direct32(priv, HBUS_TARG_MEM_RDAT);
5074 if (val != le32_to_cpu(*image)) { 5075 if (val != le32_to_cpu(*image)) {
5075#if 0 /* Enable this if you want to see details */ 5076#if 0 /* Enable this if you want to see details */
@@ -5219,7 +5220,7 @@ static int iwl3945_load_bsm(struct iwl3945_priv *priv)
5219 IWL_DEBUG_INFO("Begin load bsm\n"); 5220 IWL_DEBUG_INFO("Begin load bsm\n");
5220 5221
5221 /* make sure bootstrap program is no larger than BSM's SRAM size */ 5222 /* make sure bootstrap program is no larger than BSM's SRAM size */
5222 if (len > IWL_MAX_BSM_SIZE) 5223 if (len > IWL39_MAX_BSM_SIZE)
5223 return -EINVAL; 5224 return -EINVAL;
5224 5225
5225 /* Tell bootstrap uCode where to find the "Initialize" uCode 5226 /* Tell bootstrap uCode where to find the "Initialize" uCode
@@ -5257,7 +5258,7 @@ static int iwl3945_load_bsm(struct iwl3945_priv *priv)
5257 /* Tell BSM to copy from BSM SRAM into instruction SRAM, when asked */ 5258 /* Tell BSM to copy from BSM SRAM into instruction SRAM, when asked */
5258 iwl3945_write_prph(priv, BSM_WR_MEM_SRC_REG, 0x0); 5259 iwl3945_write_prph(priv, BSM_WR_MEM_SRC_REG, 0x0);
5259 iwl3945_write_prph(priv, BSM_WR_MEM_DST_REG, 5260 iwl3945_write_prph(priv, BSM_WR_MEM_DST_REG,
5260 RTC_INST_LOWER_BOUND); 5261 IWL39_RTC_INST_LOWER_BOUND);
5261 iwl3945_write_prph(priv, BSM_WR_DWCOUNT_REG, len / sizeof(u32)); 5262 iwl3945_write_prph(priv, BSM_WR_DWCOUNT_REG, len / sizeof(u32));
5262 5263
5263 /* Load bootstrap code into instruction SRAM now, 5264 /* Load bootstrap code into instruction SRAM now,
@@ -5401,32 +5402,32 @@ static int iwl3945_read_ucode(struct iwl3945_priv *priv)
5401 } 5402 }
5402 5403
5403 /* Verify that uCode images will fit in card's SRAM */ 5404 /* Verify that uCode images will fit in card's SRAM */
5404 if (inst_size > IWL_MAX_INST_SIZE) { 5405 if (inst_size > IWL39_MAX_INST_SIZE) {
5405 IWL_DEBUG_INFO("uCode instr len %d too large to fit in\n", 5406 IWL_DEBUG_INFO("uCode instr len %d too large to fit in\n",
5406 inst_size); 5407 inst_size);
5407 ret = -EINVAL; 5408 ret = -EINVAL;
5408 goto err_release; 5409 goto err_release;
5409 } 5410 }
5410 5411
5411 if (data_size > IWL_MAX_DATA_SIZE) { 5412 if (data_size > IWL39_MAX_DATA_SIZE) {
5412 IWL_DEBUG_INFO("uCode data len %d too large to fit in\n", 5413 IWL_DEBUG_INFO("uCode data len %d too large to fit in\n",
5413 data_size); 5414 data_size);
5414 ret = -EINVAL; 5415 ret = -EINVAL;
5415 goto err_release; 5416 goto err_release;
5416 } 5417 }
5417 if (init_size > IWL_MAX_INST_SIZE) { 5418 if (init_size > IWL39_MAX_INST_SIZE) {
5418 IWL_DEBUG_INFO("uCode init instr len %d too large to fit in\n", 5419 IWL_DEBUG_INFO("uCode init instr len %d too large to fit in\n",
5419 init_size); 5420 init_size);
5420 ret = -EINVAL; 5421 ret = -EINVAL;
5421 goto err_release; 5422 goto err_release;
5422 } 5423 }
5423 if (init_data_size > IWL_MAX_DATA_SIZE) { 5424 if (init_data_size > IWL39_MAX_DATA_SIZE) {
5424 IWL_DEBUG_INFO("uCode init data len %d too large to fit in\n", 5425 IWL_DEBUG_INFO("uCode init data len %d too large to fit in\n",
5425 init_data_size); 5426 init_data_size);
5426 ret = -EINVAL; 5427 ret = -EINVAL;
5427 goto err_release; 5428 goto err_release;
5428 } 5429 }
5429 if (boot_size > IWL_MAX_BSM_SIZE) { 5430 if (boot_size > IWL39_MAX_BSM_SIZE) {
5430 IWL_DEBUG_INFO("uCode boot instr len %d too large to fit in\n", 5431 IWL_DEBUG_INFO("uCode boot instr len %d too large to fit in\n",
5431 boot_size); 5432 boot_size);
5432 ret = -EINVAL; 5433 ret = -EINVAL;