1 /******************************************************************************
3 * Copyright(c) 2008 - 2012 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"
31 #include "iwl-dev.h" /* still needed */
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
38 /* Oldest version we won't warn about */
39 #define IWL6000_UCODE_API_OK 4
40 #define IWL6000G2_UCODE_API_OK 5
42 /* Lowest firmware API version supported */
43 #define IWL6000_UCODE_API_MIN 4
44 #define IWL6050_UCODE_API_MIN 4
45 #define IWL6000G2_UCODE_API_MIN 4
48 #define EEPROM_6000_TX_POWER_VERSION (4)
49 #define EEPROM_6000_EEPROM_VERSION (0x423)
50 #define EEPROM_6050_TX_POWER_VERSION (4)
51 #define EEPROM_6050_EEPROM_VERSION (0x532)
52 #define EEPROM_6150_TX_POWER_VERSION (6)
53 #define EEPROM_6150_EEPROM_VERSION (0x553)
54 #define EEPROM_6005_TX_POWER_VERSION (6)
55 #define EEPROM_6005_EEPROM_VERSION (0x709)
56 #define EEPROM_6030_TX_POWER_VERSION (6)
57 #define EEPROM_6030_EEPROM_VERSION (0x709)
58 #define EEPROM_6035_TX_POWER_VERSION (6)
59 #define EEPROM_6035_EEPROM_VERSION (0x753)
61 #define IWL6000_FW_PRE "iwlwifi-6000-"
62 #define IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE __stringify(api) ".ucode"
64 #define IWL6050_FW_PRE "iwlwifi-6050-"
65 #define IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE __stringify(api) ".ucode"
67 #define IWL6005_FW_PRE "iwlwifi-6000g2a-"
68 #define IWL6005_MODULE_FIRMWARE(api) IWL6005_FW_PRE __stringify(api) ".ucode"
70 #define IWL6030_FW_PRE "iwlwifi-6000g2b-"
71 #define IWL6030_MODULE_FIRMWARE(api) IWL6030_FW_PRE __stringify(api) ".ucode"
73 static const struct iwl_base_params iwl6000_base_params = {
74 .eeprom_size = OTP_LOW_IMAGE_SIZE,
75 .num_of_queues = IWLAGN_NUM_QUEUES,
77 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
78 .shadow_ram_support = true,
79 .led_compensation = 51,
80 .adv_thermal_throttle = true,
81 .support_ct_kill_exit = true,
82 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
83 .chain_noise_scale = 1000,
84 .wd_timeout = IWL_DEF_WD_TIMEOUT,
85 .max_event_log_size = 512,
86 .shadow_reg_enable = true,
89 static const struct iwl_base_params iwl6050_base_params = {
90 .eeprom_size = OTP_LOW_IMAGE_SIZE,
91 .num_of_queues = IWLAGN_NUM_QUEUES,
93 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
94 .shadow_ram_support = true,
95 .led_compensation = 51,
96 .adv_thermal_throttle = true,
97 .support_ct_kill_exit = true,
98 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
99 .chain_noise_scale = 1500,
100 .wd_timeout = IWL_DEF_WD_TIMEOUT,
101 .max_event_log_size = 1024,
102 .shadow_reg_enable = true,
105 static const struct iwl_base_params iwl6000_g2_base_params = {
106 .eeprom_size = OTP_LOW_IMAGE_SIZE,
107 .num_of_queues = IWLAGN_NUM_QUEUES,
109 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
110 .shadow_ram_support = true,
111 .led_compensation = 57,
112 .adv_thermal_throttle = true,
113 .support_ct_kill_exit = true,
114 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
115 .chain_noise_scale = 1000,
116 .wd_timeout = IWL_LONG_WD_TIMEOUT,
117 .max_event_log_size = 512,
118 .shadow_reg_enable = true,
121 static const struct iwl_ht_params iwl6000_ht_params = {
122 .ht_greenfield_support = true,
123 .use_rts_for_aggregation = true, /* use rts/cts protection */
126 static const struct iwl_bt_params iwl6000_bt_params = {
127 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
128 .advanced_bt_coexist = true,
129 .agg_time_limit = BT_AGG_THRESHOLD_DEF,
130 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
131 .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT,
132 .bt_sco_disable = true,
135 #define IWL_DEVICE_6005 \
136 .fw_name_pre = IWL6005_FW_PRE, \
137 .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
138 .ucode_api_ok = IWL6000G2_UCODE_API_OK, \
139 .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
140 .device_family = IWL_DEVICE_FAMILY_6005, \
141 .max_inst_size = IWL60_RTC_INST_SIZE, \
142 .max_data_size = IWL60_RTC_DATA_SIZE, \
143 .eeprom_ver = EEPROM_6005_EEPROM_VERSION, \
144 .eeprom_calib_ver = EEPROM_6005_TX_POWER_VERSION, \
145 .base_params = &iwl6000_g2_base_params, \
146 .need_temp_offset_calib = true, \
147 .led_mode = IWL_LED_RF_STATE
149 const struct iwl_cfg iwl6005_2agn_cfg = {
150 .name = "Intel(R) Centrino(R) Advanced-N 6205 AGN",
152 .ht_params = &iwl6000_ht_params,
155 const struct iwl_cfg iwl6005_2abg_cfg = {
156 .name = "Intel(R) Centrino(R) Advanced-N 6205 ABG",
160 const struct iwl_cfg iwl6005_2bg_cfg = {
161 .name = "Intel(R) Centrino(R) Advanced-N 6205 BG",
165 const struct iwl_cfg iwl6005_2agn_sff_cfg = {
166 .name = "Intel(R) Centrino(R) Advanced-N 6205S AGN",
168 .ht_params = &iwl6000_ht_params,
171 const struct iwl_cfg iwl6005_2agn_d_cfg = {
172 .name = "Intel(R) Centrino(R) Advanced-N 6205D AGN",
174 .ht_params = &iwl6000_ht_params,
177 const struct iwl_cfg iwl6005_2agn_mow1_cfg = {
178 .name = "Intel(R) Centrino(R) Advanced-N 6206 AGN",
180 .ht_params = &iwl6000_ht_params,
183 const struct iwl_cfg iwl6005_2agn_mow2_cfg = {
184 .name = "Intel(R) Centrino(R) Advanced-N 6207 AGN",
186 .ht_params = &iwl6000_ht_params,
189 #define IWL_DEVICE_6030 \
190 .fw_name_pre = IWL6030_FW_PRE, \
191 .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
192 .ucode_api_ok = IWL6000G2_UCODE_API_OK, \
193 .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
194 .device_family = IWL_DEVICE_FAMILY_6030, \
195 .max_inst_size = IWL60_RTC_INST_SIZE, \
196 .max_data_size = IWL60_RTC_DATA_SIZE, \
197 .eeprom_ver = EEPROM_6030_EEPROM_VERSION, \
198 .eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
199 .base_params = &iwl6000_g2_base_params, \
200 .bt_params = &iwl6000_bt_params, \
201 .need_temp_offset_calib = true, \
202 .led_mode = IWL_LED_RF_STATE, \
205 const struct iwl_cfg iwl6030_2agn_cfg = {
206 .name = "Intel(R) Centrino(R) Advanced-N 6230 AGN",
208 .ht_params = &iwl6000_ht_params,
211 const struct iwl_cfg iwl6030_2abg_cfg = {
212 .name = "Intel(R) Centrino(R) Advanced-N 6230 ABG",
216 const struct iwl_cfg iwl6030_2bgn_cfg = {
217 .name = "Intel(R) Centrino(R) Advanced-N 6230 BGN",
219 .ht_params = &iwl6000_ht_params,
222 const struct iwl_cfg iwl6030_2bg_cfg = {
223 .name = "Intel(R) Centrino(R) Advanced-N 6230 BG",
227 const struct iwl_cfg iwl6035_2agn_cfg = {
228 .name = "Intel(R) Centrino(R) Advanced-N 6235 AGN",
230 .ht_params = &iwl6000_ht_params,
233 const struct iwl_cfg iwl1030_bgn_cfg = {
234 .name = "Intel(R) Centrino(R) Wireless-N 1030 BGN",
236 .ht_params = &iwl6000_ht_params,
239 const struct iwl_cfg iwl1030_bg_cfg = {
240 .name = "Intel(R) Centrino(R) Wireless-N 1030 BG",
244 const struct iwl_cfg iwl130_bgn_cfg = {
245 .name = "Intel(R) Centrino(R) Wireless-N 130 BGN",
247 .ht_params = &iwl6000_ht_params,
248 .rx_with_siso_diversity = true,
251 const struct iwl_cfg iwl130_bg_cfg = {
252 .name = "Intel(R) Centrino(R) Wireless-N 130 BG",
254 .rx_with_siso_diversity = true,
258 * "i": Internal configuration, use internal Power Amplifier
260 #define IWL_DEVICE_6000i \
261 .fw_name_pre = IWL6000_FW_PRE, \
262 .ucode_api_max = IWL6000_UCODE_API_MAX, \
263 .ucode_api_ok = IWL6000_UCODE_API_OK, \
264 .ucode_api_min = IWL6000_UCODE_API_MIN, \
265 .device_family = IWL_DEVICE_FAMILY_6000i, \
266 .max_inst_size = IWL60_RTC_INST_SIZE, \
267 .max_data_size = IWL60_RTC_DATA_SIZE, \
268 .valid_tx_ant = ANT_BC, /* .cfg overwrite */ \
269 .valid_rx_ant = ANT_BC, /* .cfg overwrite */ \
270 .eeprom_ver = EEPROM_6000_EEPROM_VERSION, \
271 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, \
272 .base_params = &iwl6000_base_params, \
273 .led_mode = IWL_LED_BLINK
275 const struct iwl_cfg iwl6000i_2agn_cfg = {
276 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
278 .ht_params = &iwl6000_ht_params,
281 const struct iwl_cfg iwl6000i_2abg_cfg = {
282 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
286 const struct iwl_cfg iwl6000i_2bg_cfg = {
287 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
291 #define IWL_DEVICE_6050 \
292 .fw_name_pre = IWL6050_FW_PRE, \
293 .ucode_api_max = IWL6050_UCODE_API_MAX, \
294 .ucode_api_min = IWL6050_UCODE_API_MIN, \
295 .device_family = IWL_DEVICE_FAMILY_6050, \
296 .max_inst_size = IWL60_RTC_INST_SIZE, \
297 .max_data_size = IWL60_RTC_DATA_SIZE, \
298 .valid_tx_ant = ANT_AB, /* .cfg overwrite */ \
299 .valid_rx_ant = ANT_AB, /* .cfg overwrite */ \
300 .eeprom_ver = EEPROM_6050_EEPROM_VERSION, \
301 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, \
302 .base_params = &iwl6050_base_params, \
303 .led_mode = IWL_LED_BLINK, \
304 .internal_wimax_coex = true
306 const struct iwl_cfg iwl6050_2agn_cfg = {
307 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
309 .ht_params = &iwl6000_ht_params,
312 const struct iwl_cfg iwl6050_2abg_cfg = {
313 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
317 #define IWL_DEVICE_6150 \
318 .fw_name_pre = IWL6050_FW_PRE, \
319 .ucode_api_max = IWL6050_UCODE_API_MAX, \
320 .ucode_api_min = IWL6050_UCODE_API_MIN, \
321 .device_family = IWL_DEVICE_FAMILY_6150, \
322 .max_inst_size = IWL60_RTC_INST_SIZE, \
323 .max_data_size = IWL60_RTC_DATA_SIZE, \
324 .eeprom_ver = EEPROM_6150_EEPROM_VERSION, \
325 .eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION, \
326 .base_params = &iwl6050_base_params, \
327 .led_mode = IWL_LED_BLINK, \
328 .internal_wimax_coex = true
330 const struct iwl_cfg iwl6150_bgn_cfg = {
331 .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN",
333 .ht_params = &iwl6000_ht_params,
336 const struct iwl_cfg iwl6150_bg_cfg = {
337 .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BG",
341 const struct iwl_cfg iwl6000_3agn_cfg = {
342 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
343 .fw_name_pre = IWL6000_FW_PRE,
344 .ucode_api_max = IWL6000_UCODE_API_MAX,
345 .ucode_api_ok = IWL6000_UCODE_API_OK,
346 .ucode_api_min = IWL6000_UCODE_API_MIN,
347 .device_family = IWL_DEVICE_FAMILY_6000,
348 .max_inst_size = IWL60_RTC_INST_SIZE,
349 .max_data_size = IWL60_RTC_DATA_SIZE,
350 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
351 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
352 .base_params = &iwl6000_base_params,
353 .ht_params = &iwl6000_ht_params,
354 .led_mode = IWL_LED_BLINK,
357 MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_OK));
358 MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
359 MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
360 MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));