1 /******************************************************************************
3 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18 * The full GNU General Public License is included in this distribution in the
19 * file called LICENSE.
21 * Contact Information:
22 * Intel Linux Wireless <ilw@linux.intel.com>
23 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
25 *****************************************************************************/
27 #include <linux/module.h>
28 #include <linux/stringify.h>
29 #include "iwl-config.h"
30 #include "iwl-agn-hw.h"
31 #include "dvm/commands.h" /* needed for BT for now */
33 /* Highest firmware API version supported */
34 #define IWL6000_UCODE_API_MAX 6
35 #define IWL6050_UCODE_API_MAX 5
36 #define IWL6000G2_UCODE_API_MAX 6
37 #define IWL6035_UCODE_API_MAX 6
39 /* Oldest version we won't warn about */
40 #define IWL6000_UCODE_API_OK 4
41 #define IWL6000G2_UCODE_API_OK 5
42 #define IWL6050_UCODE_API_OK 5
43 #define IWL6000G2B_UCODE_API_OK 6
44 #define IWL6035_UCODE_API_OK 6
46 /* Lowest firmware API version supported */
47 #define IWL6000_UCODE_API_MIN 4
48 #define IWL6050_UCODE_API_MIN 4
49 #define IWL6000G2_UCODE_API_MIN 5
50 #define IWL6035_UCODE_API_MIN 6
53 #define EEPROM_6000_TX_POWER_VERSION (4)
54 #define EEPROM_6000_EEPROM_VERSION (0x423)
55 #define EEPROM_6050_TX_POWER_VERSION (4)
56 #define EEPROM_6050_EEPROM_VERSION (0x532)
57 #define EEPROM_6150_TX_POWER_VERSION (6)
58 #define EEPROM_6150_EEPROM_VERSION (0x553)
59 #define EEPROM_6005_TX_POWER_VERSION (6)
60 #define EEPROM_6005_EEPROM_VERSION (0x709)
61 #define EEPROM_6030_TX_POWER_VERSION (6)
62 #define EEPROM_6030_EEPROM_VERSION (0x709)
63 #define EEPROM_6035_TX_POWER_VERSION (6)
64 #define EEPROM_6035_EEPROM_VERSION (0x753)
66 #define IWL6000_FW_PRE "iwlwifi-6000-"
67 #define IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE __stringify(api) ".ucode"
69 #define IWL6050_FW_PRE "iwlwifi-6050-"
70 #define IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE __stringify(api) ".ucode"
72 #define IWL6005_FW_PRE "iwlwifi-6000g2a-"
73 #define IWL6005_MODULE_FIRMWARE(api) IWL6005_FW_PRE __stringify(api) ".ucode"
75 #define IWL6030_FW_PRE "iwlwifi-6000g2b-"
76 #define IWL6030_MODULE_FIRMWARE(api) IWL6030_FW_PRE __stringify(api) ".ucode"
78 static const struct iwl_base_params iwl6000_base_params
= {
79 .eeprom_size
= OTP_LOW_IMAGE_SIZE
,
80 .num_of_queues
= IWLAGN_NUM_QUEUES
,
82 .max_ll_items
= OTP_MAX_LL_ITEMS_6x00
,
83 .shadow_ram_support
= true,
84 .led_compensation
= 51,
85 .wd_timeout
= IWL_DEF_WD_TIMEOUT
,
86 .max_event_log_size
= 512,
87 .shadow_reg_enable
= false, /* TODO: fix bugs using this feature */
88 .scd_chain_ext_wa
= true,
91 static const struct iwl_base_params iwl6050_base_params
= {
92 .eeprom_size
= OTP_LOW_IMAGE_SIZE
,
93 .num_of_queues
= IWLAGN_NUM_QUEUES
,
95 .max_ll_items
= OTP_MAX_LL_ITEMS_6x50
,
96 .shadow_ram_support
= true,
97 .led_compensation
= 51,
98 .wd_timeout
= IWL_DEF_WD_TIMEOUT
,
99 .max_event_log_size
= 1024,
100 .shadow_reg_enable
= false, /* TODO: fix bugs using this feature */
101 .scd_chain_ext_wa
= true,
104 static const struct iwl_base_params iwl6000_g2_base_params
= {
105 .eeprom_size
= OTP_LOW_IMAGE_SIZE
,
106 .num_of_queues
= IWLAGN_NUM_QUEUES
,
108 .max_ll_items
= OTP_MAX_LL_ITEMS_6x00
,
109 .shadow_ram_support
= true,
110 .led_compensation
= 57,
111 .wd_timeout
= IWL_LONG_WD_TIMEOUT
,
112 .max_event_log_size
= 512,
113 .shadow_reg_enable
= false, /* TODO: fix bugs using this feature */
114 .scd_chain_ext_wa
= true,
117 static const struct iwl_ht_params iwl6000_ht_params
= {
118 .ht_greenfield_support
= true,
119 .use_rts_for_aggregation
= true, /* use rts/cts protection */
120 .ht40_bands
= BIT(IEEE80211_BAND_2GHZ
) | BIT(IEEE80211_BAND_5GHZ
),
123 static const struct iwl_eeprom_params iwl6000_eeprom_params
= {
124 .regulatory_bands
= {
125 EEPROM_REG_BAND_1_CHANNELS
,
126 EEPROM_REG_BAND_2_CHANNELS
,
127 EEPROM_REG_BAND_3_CHANNELS
,
128 EEPROM_REG_BAND_4_CHANNELS
,
129 EEPROM_REG_BAND_5_CHANNELS
,
130 EEPROM_6000_REG_BAND_24_HT40_CHANNELS
,
131 EEPROM_REG_BAND_52_HT40_CHANNELS
133 .enhanced_txpower
= true,
136 #define IWL_DEVICE_6005 \
137 .fw_name_pre = IWL6005_FW_PRE, \
138 .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
139 .ucode_api_ok = IWL6000G2_UCODE_API_OK, \
140 .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
141 .device_family = IWL_DEVICE_FAMILY_6005, \
142 .max_inst_size = IWL60_RTC_INST_SIZE, \
143 .max_data_size = IWL60_RTC_DATA_SIZE, \
144 .nvm_ver = EEPROM_6005_EEPROM_VERSION, \
145 .nvm_calib_ver = EEPROM_6005_TX_POWER_VERSION, \
146 .base_params = &iwl6000_g2_base_params, \
147 .eeprom_params = &iwl6000_eeprom_params, \
148 .led_mode = IWL_LED_RF_STATE, \
149 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
151 const struct iwl_cfg iwl6005_2agn_cfg
= {
152 .name
= "Intel(R) Centrino(R) Advanced-N 6205 AGN",
154 .ht_params
= &iwl6000_ht_params
,
157 const struct iwl_cfg iwl6005_2abg_cfg
= {
158 .name
= "Intel(R) Centrino(R) Advanced-N 6205 ABG",
162 const struct iwl_cfg iwl6005_2bg_cfg
= {
163 .name
= "Intel(R) Centrino(R) Advanced-N 6205 BG",
167 const struct iwl_cfg iwl6005_2agn_sff_cfg
= {
168 .name
= "Intel(R) Centrino(R) Advanced-N 6205S AGN",
170 .ht_params
= &iwl6000_ht_params
,
173 const struct iwl_cfg iwl6005_2agn_d_cfg
= {
174 .name
= "Intel(R) Centrino(R) Advanced-N 6205D AGN",
176 .ht_params
= &iwl6000_ht_params
,
179 const struct iwl_cfg iwl6005_2agn_mow1_cfg
= {
180 .name
= "Intel(R) Centrino(R) Advanced-N 6206 AGN",
182 .ht_params
= &iwl6000_ht_params
,
185 const struct iwl_cfg iwl6005_2agn_mow2_cfg
= {
186 .name
= "Intel(R) Centrino(R) Advanced-N 6207 AGN",
188 .ht_params
= &iwl6000_ht_params
,
191 #define IWL_DEVICE_6030 \
192 .fw_name_pre = IWL6030_FW_PRE, \
193 .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
194 .ucode_api_ok = IWL6000G2B_UCODE_API_OK, \
195 .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
196 .device_family = IWL_DEVICE_FAMILY_6030, \
197 .max_inst_size = IWL60_RTC_INST_SIZE, \
198 .max_data_size = IWL60_RTC_DATA_SIZE, \
199 .nvm_ver = EEPROM_6030_EEPROM_VERSION, \
200 .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
201 .base_params = &iwl6000_g2_base_params, \
202 .eeprom_params = &iwl6000_eeprom_params, \
203 .led_mode = IWL_LED_RF_STATE, \
204 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
206 const struct iwl_cfg iwl6030_2agn_cfg
= {
207 .name
= "Intel(R) Centrino(R) Advanced-N 6230 AGN",
209 .ht_params
= &iwl6000_ht_params
,
212 const struct iwl_cfg iwl6030_2abg_cfg
= {
213 .name
= "Intel(R) Centrino(R) Advanced-N 6230 ABG",
217 const struct iwl_cfg iwl6030_2bgn_cfg
= {
218 .name
= "Intel(R) Centrino(R) Advanced-N 6230 BGN",
220 .ht_params
= &iwl6000_ht_params
,
223 const struct iwl_cfg iwl6030_2bg_cfg
= {
224 .name
= "Intel(R) Centrino(R) Advanced-N 6230 BG",
228 #define IWL_DEVICE_6035 \
229 .fw_name_pre = IWL6030_FW_PRE, \
230 .ucode_api_max = IWL6035_UCODE_API_MAX, \
231 .ucode_api_ok = IWL6035_UCODE_API_OK, \
232 .ucode_api_min = IWL6035_UCODE_API_MIN, \
233 .device_family = IWL_DEVICE_FAMILY_6030, \
234 .max_inst_size = IWL60_RTC_INST_SIZE, \
235 .max_data_size = IWL60_RTC_DATA_SIZE, \
236 .nvm_ver = EEPROM_6030_EEPROM_VERSION, \
237 .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
238 .base_params = &iwl6000_g2_base_params, \
239 .eeprom_params = &iwl6000_eeprom_params, \
240 .led_mode = IWL_LED_RF_STATE, \
241 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
243 const struct iwl_cfg iwl6035_2agn_cfg
= {
244 .name
= "Intel(R) Centrino(R) Advanced-N 6235 AGN",
246 .ht_params
= &iwl6000_ht_params
,
249 const struct iwl_cfg iwl6035_2agn_sff_cfg
= {
250 .name
= "Intel(R) Centrino(R) Ultimate-N 6235 AGN",
252 .ht_params
= &iwl6000_ht_params
,
255 const struct iwl_cfg iwl1030_bgn_cfg
= {
256 .name
= "Intel(R) Centrino(R) Wireless-N 1030 BGN",
258 .ht_params
= &iwl6000_ht_params
,
261 const struct iwl_cfg iwl1030_bg_cfg
= {
262 .name
= "Intel(R) Centrino(R) Wireless-N 1030 BG",
266 const struct iwl_cfg iwl130_bgn_cfg
= {
267 .name
= "Intel(R) Centrino(R) Wireless-N 130 BGN",
269 .ht_params
= &iwl6000_ht_params
,
270 .rx_with_siso_diversity
= true,
273 const struct iwl_cfg iwl130_bg_cfg
= {
274 .name
= "Intel(R) Centrino(R) Wireless-N 130 BG",
276 .rx_with_siso_diversity
= true,
280 * "i": Internal configuration, use internal Power Amplifier
282 #define IWL_DEVICE_6000i \
283 .fw_name_pre = IWL6000_FW_PRE, \
284 .ucode_api_max = IWL6000_UCODE_API_MAX, \
285 .ucode_api_ok = IWL6000_UCODE_API_OK, \
286 .ucode_api_min = IWL6000_UCODE_API_MIN, \
287 .device_family = IWL_DEVICE_FAMILY_6000i, \
288 .max_inst_size = IWL60_RTC_INST_SIZE, \
289 .max_data_size = IWL60_RTC_DATA_SIZE, \
290 .valid_tx_ant = ANT_BC, /* .cfg overwrite */ \
291 .valid_rx_ant = ANT_BC, /* .cfg overwrite */ \
292 .nvm_ver = EEPROM_6000_EEPROM_VERSION, \
293 .nvm_calib_ver = EEPROM_6000_TX_POWER_VERSION, \
294 .base_params = &iwl6000_base_params, \
295 .eeprom_params = &iwl6000_eeprom_params, \
296 .led_mode = IWL_LED_BLINK, \
297 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
299 const struct iwl_cfg iwl6000i_2agn_cfg
= {
300 .name
= "Intel(R) Centrino(R) Advanced-N 6200 AGN",
302 .ht_params
= &iwl6000_ht_params
,
305 const struct iwl_cfg iwl6000i_2abg_cfg
= {
306 .name
= "Intel(R) Centrino(R) Advanced-N 6200 ABG",
310 const struct iwl_cfg iwl6000i_2bg_cfg
= {
311 .name
= "Intel(R) Centrino(R) Advanced-N 6200 BG",
315 #define IWL_DEVICE_6050 \
316 .fw_name_pre = IWL6050_FW_PRE, \
317 .ucode_api_max = IWL6050_UCODE_API_MAX, \
318 .ucode_api_min = IWL6050_UCODE_API_MIN, \
319 .device_family = IWL_DEVICE_FAMILY_6050, \
320 .max_inst_size = IWL60_RTC_INST_SIZE, \
321 .max_data_size = IWL60_RTC_DATA_SIZE, \
322 .valid_tx_ant = ANT_AB, /* .cfg overwrite */ \
323 .valid_rx_ant = ANT_AB, /* .cfg overwrite */ \
324 .nvm_ver = EEPROM_6050_EEPROM_VERSION, \
325 .nvm_calib_ver = EEPROM_6050_TX_POWER_VERSION, \
326 .base_params = &iwl6050_base_params, \
327 .eeprom_params = &iwl6000_eeprom_params, \
328 .led_mode = IWL_LED_BLINK, \
329 .internal_wimax_coex = true, \
330 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
332 const struct iwl_cfg iwl6050_2agn_cfg
= {
333 .name
= "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
335 .ht_params
= &iwl6000_ht_params
,
338 const struct iwl_cfg iwl6050_2abg_cfg
= {
339 .name
= "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
343 #define IWL_DEVICE_6150 \
344 .fw_name_pre = IWL6050_FW_PRE, \
345 .ucode_api_max = IWL6050_UCODE_API_MAX, \
346 .ucode_api_min = IWL6050_UCODE_API_MIN, \
347 .device_family = IWL_DEVICE_FAMILY_6150, \
348 .max_inst_size = IWL60_RTC_INST_SIZE, \
349 .max_data_size = IWL60_RTC_DATA_SIZE, \
350 .nvm_ver = EEPROM_6150_EEPROM_VERSION, \
351 .nvm_calib_ver = EEPROM_6150_TX_POWER_VERSION, \
352 .base_params = &iwl6050_base_params, \
353 .eeprom_params = &iwl6000_eeprom_params, \
354 .led_mode = IWL_LED_BLINK, \
355 .internal_wimax_coex = true, \
356 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
358 const struct iwl_cfg iwl6150_bgn_cfg
= {
359 .name
= "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN",
361 .ht_params
= &iwl6000_ht_params
,
364 const struct iwl_cfg iwl6150_bg_cfg
= {
365 .name
= "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BG",
369 const struct iwl_cfg iwl6000_3agn_cfg
= {
370 .name
= "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
371 .fw_name_pre
= IWL6000_FW_PRE
,
372 .ucode_api_max
= IWL6000_UCODE_API_MAX
,
373 .ucode_api_ok
= IWL6000_UCODE_API_OK
,
374 .ucode_api_min
= IWL6000_UCODE_API_MIN
,
375 .device_family
= IWL_DEVICE_FAMILY_6000
,
376 .max_inst_size
= IWL60_RTC_INST_SIZE
,
377 .max_data_size
= IWL60_RTC_DATA_SIZE
,
378 .nvm_ver
= EEPROM_6000_EEPROM_VERSION
,
379 .nvm_calib_ver
= EEPROM_6000_TX_POWER_VERSION
,
380 .base_params
= &iwl6000_base_params
,
381 .eeprom_params
= &iwl6000_eeprom_params
,
382 .ht_params
= &iwl6000_ht_params
,
383 .led_mode
= IWL_LED_BLINK
,
386 MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_OK
));
387 MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_OK
));
388 MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_OK
));
389 MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2B_UCODE_API_OK
));