diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2008-12-18 21:37:11 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 15:58:57 -0500 |
commit | 250bdd216c95907760b3fcc3aac1ed436d21c66c (patch) | |
tree | 82f3c0834b1529d3e283833d48ff70b76248168e /drivers/net/wireless | |
parent | 0f741d9992ad043026218677c06042ac9f834f8f (diff) |
iwl3945: Have consistant and not redefined HW constants
SRAM addresses are different for 3945, 4065, and 5000, let's give them
different names.
Also, the RSSI_OFFSET is different for 3945 and 4965, thus they should be
named differently.
Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@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')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-hw.h | 26 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965-hw.h | 20 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000-hw.h | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 19 |
8 files changed, 55 insertions, 42 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-hw.h b/drivers/net/wireless/iwlwifi/iwl-3945-hw.h index b6145b0b9255..1182e6847a05 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-hw.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945-hw.h | |||
@@ -82,7 +82,7 @@ | |||
82 | #define LONG_SLOT_TIME 20 | 82 | #define LONG_SLOT_TIME 20 |
83 | 83 | ||
84 | /* RSSI to dBm */ | 84 | /* RSSI to dBm */ |
85 | #define IWL_RSSI_OFFSET 95 | 85 | #define IWL39_RSSI_OFFSET 95 |
86 | 86 | ||
87 | /* | 87 | /* |
88 | * EEPROM related constants, enums, and structures. | 88 | * EEPROM related constants, enums, and structures. |
@@ -276,27 +276,29 @@ struct iwl3945_eeprom { | |||
276 | 276 | ||
277 | /* Sizes and addresses for instruction and data memory (SRAM) in | 277 | /* Sizes and addresses for instruction and data memory (SRAM) in |
278 | * 3945's embedded processor. Driver access is via HBUS_TARG_MEM_* regs. */ | 278 | * 3945's embedded processor. Driver access is via HBUS_TARG_MEM_* regs. */ |
279 | #define RTC_INST_LOWER_BOUND (0x000000) | 279 | #define IWL39_RTC_INST_LOWER_BOUND (0x000000) |
280 | #define ALM_RTC_INST_UPPER_BOUND (0x014000) | 280 | #define IWL39_RTC_INST_UPPER_BOUND (0x014000) |
281 | 281 | ||
282 | #define RTC_DATA_LOWER_BOUND (0x800000) | 282 | #define IWL39_RTC_DATA_LOWER_BOUND (0x800000) |
283 | #define ALM_RTC_DATA_UPPER_BOUND (0x808000) | 283 | #define IWL39_RTC_DATA_UPPER_BOUND (0x808000) |
284 | 284 | ||
285 | #define ALM_RTC_INST_SIZE (ALM_RTC_INST_UPPER_BOUND - RTC_INST_LOWER_BOUND) | 285 | #define IWL39_RTC_INST_SIZE (IWL39_RTC_INST_UPPER_BOUND - \ |
286 | #define ALM_RTC_DATA_SIZE (ALM_RTC_DATA_UPPER_BOUND - RTC_DATA_LOWER_BOUND) | 286 | IWL39_RTC_INST_LOWER_BOUND) |
287 | #define IWL39_RTC_DATA_SIZE (IWL39_RTC_DATA_UPPER_BOUND - \ | ||
288 | IWL39_RTC_DATA_LOWER_BOUND) | ||
287 | 289 | ||
288 | #define IWL_MAX_INST_SIZE ALM_RTC_INST_SIZE | 290 | #define IWL39_MAX_INST_SIZE IWL39_RTC_INST_SIZE |
289 | #define IWL_MAX_DATA_SIZE ALM_RTC_DATA_SIZE | 291 | #define IWL39_MAX_DATA_SIZE IWL39_RTC_DATA_SIZE |
290 | 292 | ||
291 | /* Size of uCode instruction memory in bootstrap state machine */ | 293 | /* Size of uCode instruction memory in bootstrap state machine */ |
292 | #define IWL_MAX_BSM_SIZE ALM_RTC_INST_SIZE | 294 | #define IWL39_MAX_BSM_SIZE IWL39_RTC_INST_SIZE |
293 | 295 | ||
294 | #define IWL39_MAX_NUM_QUEUES 8 | 296 | #define IWL39_MAX_NUM_QUEUES 8 |
295 | 297 | ||
296 | static inline int iwl3945_hw_valid_rtc_data_addr(u32 addr) | 298 | static inline int iwl3945_hw_valid_rtc_data_addr(u32 addr) |
297 | { | 299 | { |
298 | return (addr >= RTC_DATA_LOWER_BOUND) && | 300 | return (addr >= IWL39_RTC_DATA_LOWER_BOUND) && |
299 | (addr < ALM_RTC_DATA_UPPER_BOUND); | 301 | (addr < IWL39_RTC_DATA_UPPER_BOUND); |
300 | } | 302 | } |
301 | 303 | ||
302 | /* Base physical address of iwl3945_shared is provided to FH_TSSR_CBB_BASE | 304 | /* Base physical address of iwl3945_shared is provided to FH_TSSR_CBB_BASE |
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index b64e07f0dad5..7ce43cbf0faa 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -661,7 +661,7 @@ static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv, | |||
661 | 661 | ||
662 | 662 | ||
663 | /* Convert 3945's rssi indicator to dBm */ | 663 | /* Convert 3945's rssi indicator to dBm */ |
664 | rx_status.signal = rx_stats->rssi - IWL_RSSI_OFFSET; | 664 | rx_status.signal = rx_stats->rssi - IWL39_RSSI_OFFSET; |
665 | 665 | ||
666 | /* Set default noise value to -127 */ | 666 | /* Set default noise value to -127 */ |
667 | if (priv->last_rx_noise == 0) | 667 | if (priv->last_rx_noise == 0) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-hw.h b/drivers/net/wireless/iwlwifi/iwl-4965-hw.h index 6649f7b55650..9330b5a1aab8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965-hw.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965-hw.h | |||
@@ -89,7 +89,7 @@ | |||
89 | #define LONG_SLOT_TIME 20 | 89 | #define LONG_SLOT_TIME 20 |
90 | 90 | ||
91 | /* RSSI to dBm */ | 91 | /* RSSI to dBm */ |
92 | #define IWL_RSSI_OFFSET 44 | 92 | #define IWL49_RSSI_OFFSET 44 |
93 | 93 | ||
94 | 94 | ||
95 | 95 | ||
@@ -129,24 +129,26 @@ | |||
129 | 129 | ||
130 | /* Sizes and addresses for instruction and data memory (SRAM) in | 130 | /* Sizes and addresses for instruction and data memory (SRAM) in |
131 | * 4965's embedded processor. Driver access is via HBUS_TARG_MEM_* regs. */ | 131 | * 4965's embedded processor. Driver access is via HBUS_TARG_MEM_* regs. */ |
132 | #define RTC_INST_LOWER_BOUND (0x000000) | 132 | #define IWL49_RTC_INST_LOWER_BOUND (0x000000) |
133 | #define IWL49_RTC_INST_UPPER_BOUND (0x018000) | 133 | #define IWL49_RTC_INST_UPPER_BOUND (0x018000) |
134 | 134 | ||
135 | #define RTC_DATA_LOWER_BOUND (0x800000) | 135 | #define IWL49_RTC_DATA_LOWER_BOUND (0x800000) |
136 | #define IWL49_RTC_DATA_UPPER_BOUND (0x80A000) | 136 | #define IWL49_RTC_DATA_UPPER_BOUND (0x80A000) |
137 | 137 | ||
138 | #define IWL49_RTC_INST_SIZE (IWL49_RTC_INST_UPPER_BOUND - RTC_INST_LOWER_BOUND) | 138 | #define IWL49_RTC_INST_SIZE (IWL49_RTC_INST_UPPER_BOUND - \ |
139 | #define IWL49_RTC_DATA_SIZE (IWL49_RTC_DATA_UPPER_BOUND - RTC_DATA_LOWER_BOUND) | 139 | IWL49_RTC_INST_LOWER_BOUND) |
140 | #define IWL49_RTC_DATA_SIZE (IWL49_RTC_DATA_UPPER_BOUND - \ | ||
141 | IWL49_RTC_DATA_LOWER_BOUND) | ||
140 | 142 | ||
141 | #define IWL_MAX_INST_SIZE IWL49_RTC_INST_SIZE | 143 | #define IWL49_MAX_INST_SIZE IWL49_RTC_INST_SIZE |
142 | #define IWL_MAX_DATA_SIZE IWL49_RTC_DATA_SIZE | 144 | #define IWL49_MAX_DATA_SIZE IWL49_RTC_DATA_SIZE |
143 | 145 | ||
144 | /* Size of uCode instruction memory in bootstrap state machine */ | 146 | /* Size of uCode instruction memory in bootstrap state machine */ |
145 | #define IWL_MAX_BSM_SIZE BSM_SRAM_SIZE | 147 | #define IWL49_MAX_BSM_SIZE BSM_SRAM_SIZE |
146 | 148 | ||
147 | static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr) | 149 | static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr) |
148 | { | 150 | { |
149 | return (addr >= RTC_DATA_LOWER_BOUND) && | 151 | return (addr >= IWL49_RTC_DATA_LOWER_BOUND) && |
150 | (addr < IWL49_RTC_DATA_UPPER_BOUND); | 152 | (addr < IWL49_RTC_DATA_UPPER_BOUND); |
151 | } | 153 | } |
152 | 154 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index bb9617092c4e..48223627dd23 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -149,7 +149,7 @@ static int iwl4965_load_bsm(struct iwl_priv *priv) | |||
149 | priv->ucode_type = UCODE_RT; | 149 | priv->ucode_type = UCODE_RT; |
150 | 150 | ||
151 | /* make sure bootstrap program is no larger than BSM's SRAM size */ | 151 | /* make sure bootstrap program is no larger than BSM's SRAM size */ |
152 | if (len > IWL_MAX_BSM_SIZE) | 152 | if (len > IWL49_MAX_BSM_SIZE) |
153 | return -EINVAL; | 153 | return -EINVAL; |
154 | 154 | ||
155 | /* Tell bootstrap uCode where to find the "Initialize" uCode | 155 | /* Tell bootstrap uCode where to find the "Initialize" uCode |
@@ -186,7 +186,7 @@ static int iwl4965_load_bsm(struct iwl_priv *priv) | |||
186 | 186 | ||
187 | /* Tell BSM to copy from BSM SRAM into instruction SRAM, when asked */ | 187 | /* Tell BSM to copy from BSM SRAM into instruction SRAM, when asked */ |
188 | iwl_write_prph(priv, BSM_WR_MEM_SRC_REG, 0x0); | 188 | iwl_write_prph(priv, BSM_WR_MEM_SRC_REG, 0x0); |
189 | iwl_write_prph(priv, BSM_WR_MEM_DST_REG, RTC_INST_LOWER_BOUND); | 189 | iwl_write_prph(priv, BSM_WR_MEM_DST_REG, IWL49_RTC_INST_LOWER_BOUND); |
190 | iwl_write_prph(priv, BSM_WR_DWCOUNT_REG, len / sizeof(u32)); | 190 | iwl_write_prph(priv, BSM_WR_DWCOUNT_REG, len / sizeof(u32)); |
191 | 191 | ||
192 | /* Load bootstrap code into instruction SRAM now, | 192 | /* Load bootstrap code into instruction SRAM now, |
@@ -2246,7 +2246,7 @@ static int iwl4965_calc_rssi(struct iwl_priv *priv, | |||
2246 | 2246 | ||
2247 | /* dBm = max_rssi dB - agc dB - constant. | 2247 | /* dBm = max_rssi dB - agc dB - constant. |
2248 | * Higher AGC (higher radio gain) means lower signal. */ | 2248 | * Higher AGC (higher radio gain) means lower signal. */ |
2249 | return max_rssi - agc - IWL_RSSI_OFFSET; | 2249 | return max_rssi - agc - IWL49_RSSI_OFFSET; |
2250 | } | 2250 | } |
2251 | 2251 | ||
2252 | 2252 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000-hw.h b/drivers/net/wireless/iwlwifi/iwl-5000-hw.h index 82c3859ce0f8..d83e60577b17 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000-hw.h +++ b/drivers/net/wireless/iwlwifi/iwl-5000-hw.h | |||
@@ -68,10 +68,16 @@ | |||
68 | #ifndef __iwl_5000_hw_h__ | 68 | #ifndef __iwl_5000_hw_h__ |
69 | #define __iwl_5000_hw_h__ | 69 | #define __iwl_5000_hw_h__ |
70 | 70 | ||
71 | #define IWL50_RTC_INST_LOWER_BOUND (0x000000) | ||
71 | #define IWL50_RTC_INST_UPPER_BOUND (0x020000) | 72 | #define IWL50_RTC_INST_UPPER_BOUND (0x020000) |
73 | |||
74 | #define IWL50_RTC_DATA_LOWER_BOUND (0x800000) | ||
72 | #define IWL50_RTC_DATA_UPPER_BOUND (0x80C000) | 75 | #define IWL50_RTC_DATA_UPPER_BOUND (0x80C000) |
73 | #define IWL50_RTC_INST_SIZE (IWL50_RTC_INST_UPPER_BOUND - RTC_INST_LOWER_BOUND) | 76 | |
74 | #define IWL50_RTC_DATA_SIZE (IWL50_RTC_DATA_UPPER_BOUND - RTC_DATA_LOWER_BOUND) | 77 | #define IWL50_RTC_INST_SIZE (IWL50_RTC_INST_UPPER_BOUND - \ |
78 | IWL50_RTC_INST_LOWER_BOUND) | ||
79 | #define IWL50_RTC_DATA_SIZE (IWL50_RTC_DATA_UPPER_BOUND - \ | ||
80 | IWL50_RTC_DATA_LOWER_BOUND) | ||
75 | 81 | ||
76 | /* EEPROM */ | 82 | /* EEPROM */ |
77 | #define IWL_5000_EEPROM_IMG_SIZE 2048 | 83 | #define IWL_5000_EEPROM_IMG_SIZE 2048 |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 66d053d28a74..338444ab003e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -580,7 +580,8 @@ static int iwl5000_load_given_ucode(struct iwl_priv *priv, | |||
580 | { | 580 | { |
581 | int ret = 0; | 581 | int ret = 0; |
582 | 582 | ||
583 | ret = iwl5000_load_section(priv, inst_image, RTC_INST_LOWER_BOUND); | 583 | ret = iwl5000_load_section(priv, inst_image, |
584 | IWL50_RTC_INST_LOWER_BOUND); | ||
584 | if (ret) | 585 | if (ret) |
585 | return ret; | 586 | return ret; |
586 | 587 | ||
@@ -600,7 +601,7 @@ static int iwl5000_load_given_ucode(struct iwl_priv *priv, | |||
600 | priv->ucode_write_complete = 0; | 601 | priv->ucode_write_complete = 0; |
601 | 602 | ||
602 | ret = iwl5000_load_section( | 603 | ret = iwl5000_load_section( |
603 | priv, data_image, RTC_DATA_LOWER_BOUND); | 604 | priv, data_image, IWL50_RTC_DATA_LOWER_BOUND); |
604 | if (ret) | 605 | if (ret) |
605 | return ret; | 606 | return ret; |
606 | 607 | ||
@@ -1356,7 +1357,7 @@ static void iwl5000_rx_handler_setup(struct iwl_priv *priv) | |||
1356 | 1357 | ||
1357 | static int iwl5000_hw_valid_rtc_data_addr(u32 addr) | 1358 | static int iwl5000_hw_valid_rtc_data_addr(u32 addr) |
1358 | { | 1359 | { |
1359 | return (addr >= RTC_DATA_LOWER_BOUND) && | 1360 | return (addr >= IWL50_RTC_DATA_LOWER_BOUND) && |
1360 | (addr < IWL50_RTC_DATA_UPPER_BOUND); | 1361 | (addr < IWL50_RTC_DATA_UPPER_BOUND); |
1361 | } | 1362 | } |
1362 | 1363 | ||
@@ -1460,7 +1461,7 @@ static int iwl5000_calc_rssi(struct iwl_priv *priv, | |||
1460 | 1461 | ||
1461 | /* dBm = max_rssi dB - agc dB - constant. | 1462 | /* dBm = max_rssi dB - agc dB - constant. |
1462 | * Higher AGC (higher radio gain) means lower signal. */ | 1463 | * Higher AGC (higher radio gain) means lower signal. */ |
1463 | return max_rssi - agc - IWL_RSSI_OFFSET; | 1464 | return max_rssi - agc - IWL49_RSSI_OFFSET; |
1464 | } | 1465 | } |
1465 | 1466 | ||
1466 | static struct iwl_hcmd_ops iwl5000_hcmd = { | 1467 | static struct iwl_hcmd_ops iwl5000_hcmd = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 327d1bd4ff0f..bee83d6a51cd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -1018,7 +1018,7 @@ static int iwlcore_verify_inst_sparse(struct iwl_priv *priv, __le32 *image, u32 | |||
1018 | /* NOTE: Use the debugless read so we don't flood kernel log | 1018 | /* NOTE: Use the debugless read so we don't flood kernel log |
1019 | * if IWL_DL_IO is set */ | 1019 | * if IWL_DL_IO is set */ |
1020 | iwl_write_direct32(priv, HBUS_TARG_MEM_RADDR, | 1020 | iwl_write_direct32(priv, HBUS_TARG_MEM_RADDR, |
1021 | i + RTC_INST_LOWER_BOUND); | 1021 | i + IWL49_RTC_INST_LOWER_BOUND); |
1022 | val = _iwl_read_direct32(priv, HBUS_TARG_MEM_RDAT); | 1022 | val = _iwl_read_direct32(priv, HBUS_TARG_MEM_RDAT); |
1023 | if (val != le32_to_cpu(*image)) { | 1023 | if (val != le32_to_cpu(*image)) { |
1024 | ret = -EIO; | 1024 | ret = -EIO; |
@@ -1051,7 +1051,8 @@ static int iwl_verify_inst_full(struct iwl_priv *priv, __le32 *image, | |||
1051 | if (ret) | 1051 | if (ret) |
1052 | return ret; | 1052 | return ret; |
1053 | 1053 | ||
1054 | iwl_write_direct32(priv, HBUS_TARG_MEM_RADDR, RTC_INST_LOWER_BOUND); | 1054 | iwl_write_direct32(priv, HBUS_TARG_MEM_RADDR, |
1055 | IWL49_RTC_INST_LOWER_BOUND); | ||
1055 | 1056 | ||
1056 | errcnt = 0; | 1057 | errcnt = 0; |
1057 | for (; len > 0; len -= sizeof(u32), image++) { | 1058 | for (; len > 0; len -= sizeof(u32), image++) { |
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; |