1 /******************************************************************************
2  *
3  * Copyright(c) 2008 - 2012 Intel Corporation. All rights reserved.
4  *
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.
8  *
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
12  * more details.
13  *
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
17  *
18  * The full GNU General Public License is included in this distribution in the
19  * file called LICENSE.
20  *
21  * Contact Information:
22  *  Intel Linux Wireless <ilw@linux.intel.com>
23  * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
24  *
25  *****************************************************************************/
26 
27 #include <linux/kernel.h>
28 #include <linux/module.h>
29 #include <linux/init.h>
30 #include <linux/delay.h>
31 #include <linux/skbuff.h>
32 #include <linux/netdevice.h>
33 #include <net/mac80211.h>
34 #include <linux/etherdevice.h>
35 #include <asm/unaligned.h>
36 #include <linux/stringify.h>
37 
38 #include "iwl-eeprom.h"
39 #include "iwl-dev.h"
40 #include "iwl-core.h"
41 #include "iwl-io.h"
42 #include "iwl-agn.h"
43 #include "iwl-agn-hw.h"
44 #include "iwl-trans.h"
45 #include "iwl-shared.h"
46 #include "iwl-cfg.h"
47 
48 /* Highest firmware API version supported */
49 #define IWL6000_UCODE_API_MAX 6
50 #define IWL6050_UCODE_API_MAX 5
51 #define IWL6000G2_UCODE_API_MAX 6
52 #define IWL6035_UCODE_API_MAX 6
53 
54 /* Oldest version we won't warn about */
55 #define IWL6000_UCODE_API_OK 4
56 #define IWL6000G2_UCODE_API_OK 5
57 #define IWL6050_UCODE_API_OK 5
58 #define IWL6000G2B_UCODE_API_OK 6
59 #define IWL6035_UCODE_API_OK 6
60 
61 /* Lowest firmware API version supported */
62 #define IWL6000_UCODE_API_MIN 4
63 #define IWL6050_UCODE_API_MIN 4
64 #define IWL6000G2_UCODE_API_MIN 5
65 #define IWL6035_UCODE_API_MIN 6
66 
67 #define IWL6000_FW_PRE "iwlwifi-6000-"
68 #define IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE __stringify(api) ".ucode"
69 
70 #define IWL6050_FW_PRE "iwlwifi-6050-"
71 #define IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE __stringify(api) ".ucode"
72 
73 #define IWL6005_FW_PRE "iwlwifi-6000g2a-"
74 #define IWL6005_MODULE_FIRMWARE(api) IWL6005_FW_PRE __stringify(api) ".ucode"
75 
76 #define IWL6030_FW_PRE "iwlwifi-6000g2b-"
77 #define IWL6030_MODULE_FIRMWARE(api) IWL6030_FW_PRE __stringify(api) ".ucode"
78 
iwl6000_set_ct_threshold(struct iwl_priv * priv)79 static void iwl6000_set_ct_threshold(struct iwl_priv *priv)
80 {
81 	/* want Celsius */
82 	hw_params(priv).ct_kill_threshold = CT_KILL_THRESHOLD;
83 	hw_params(priv).ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
84 }
85 
iwl6050_additional_nic_config(struct iwl_priv * priv)86 static void iwl6050_additional_nic_config(struct iwl_priv *priv)
87 {
88 	/* Indicate calibration version to uCode. */
89 	if (iwl_eeprom_calib_version(priv->shrd) >= 6)
90 		iwl_set_bit(trans(priv), CSR_GP_DRIVER_REG,
91 				CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
92 }
93 
iwl6150_additional_nic_config(struct iwl_priv * priv)94 static void iwl6150_additional_nic_config(struct iwl_priv *priv)
95 {
96 	/* Indicate calibration version to uCode. */
97 	if (iwl_eeprom_calib_version(priv->shrd) >= 6)
98 		iwl_set_bit(trans(priv), CSR_GP_DRIVER_REG,
99 				CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
100 	iwl_set_bit(trans(priv), CSR_GP_DRIVER_REG,
101 		    CSR_GP_DRIVER_REG_BIT_6050_1x2);
102 }
103 
iwl6000i_additional_nic_config(struct iwl_priv * priv)104 static void iwl6000i_additional_nic_config(struct iwl_priv *priv)
105 {
106 	/* 2x2 IPA phy type */
107 	iwl_write32(trans(priv), CSR_GP_DRIVER_REG,
108 		     CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
109 }
110 
111 /* NIC configuration for 6000 series */
iwl6000_nic_config(struct iwl_priv * priv)112 static void iwl6000_nic_config(struct iwl_priv *priv)
113 {
114 	iwl_rf_config(priv);
115 
116 	/* do additional nic configuration if needed */
117 	if (cfg(priv)->additional_nic_config)
118 		cfg(priv)->additional_nic_config(priv);
119 }
120 
121 static const struct iwl_sensitivity_ranges iwl6000_sensitivity = {
122 	.min_nrg_cck = 110,
123 	.auto_corr_min_ofdm = 80,
124 	.auto_corr_min_ofdm_mrc = 128,
125 	.auto_corr_min_ofdm_x1 = 105,
126 	.auto_corr_min_ofdm_mrc_x1 = 192,
127 
128 	.auto_corr_max_ofdm = 145,
129 	.auto_corr_max_ofdm_mrc = 232,
130 	.auto_corr_max_ofdm_x1 = 110,
131 	.auto_corr_max_ofdm_mrc_x1 = 232,
132 
133 	.auto_corr_min_cck = 125,
134 	.auto_corr_max_cck = 175,
135 	.auto_corr_min_cck_mrc = 160,
136 	.auto_corr_max_cck_mrc = 310,
137 	.nrg_th_cck = 110,
138 	.nrg_th_ofdm = 110,
139 
140 	.barker_corr_th_min = 190,
141 	.barker_corr_th_min_mrc = 336,
142 	.nrg_th_cca = 62,
143 };
144 
iwl6000_hw_set_hw_params(struct iwl_priv * priv)145 static void iwl6000_hw_set_hw_params(struct iwl_priv *priv)
146 {
147 	hw_params(priv).ht40_channel =  BIT(IEEE80211_BAND_2GHZ) |
148 					BIT(IEEE80211_BAND_5GHZ);
149 
150 	hw_params(priv).tx_chains_num =
151 		num_of_ant(hw_params(priv).valid_tx_ant);
152 	if (cfg(priv)->rx_with_siso_diversity)
153 		hw_params(priv).rx_chains_num = 1;
154 	else
155 		hw_params(priv).rx_chains_num =
156 			num_of_ant(hw_params(priv).valid_rx_ant);
157 
158 	iwl6000_set_ct_threshold(priv);
159 
160 	/* Set initial sensitivity parameters */
161 	hw_params(priv).sens = &iwl6000_sensitivity;
162 
163 }
164 
iwl6000_hw_channel_switch(struct iwl_priv * priv,struct ieee80211_channel_switch * ch_switch)165 static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
166 				     struct ieee80211_channel_switch *ch_switch)
167 {
168 	/*
169 	 * MULTI-FIXME
170 	 * See iwlagn_mac_channel_switch.
171 	 */
172 	struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
173 	struct iwl6000_channel_switch_cmd *cmd;
174 	const struct iwl_channel_info *ch_info;
175 	u32 switch_time_in_usec, ucode_switch_time;
176 	u16 ch;
177 	u32 tsf_low;
178 	u8 switch_count;
179 	u16 beacon_interval = le16_to_cpu(ctx->timing.beacon_interval);
180 	struct ieee80211_vif *vif = ctx->vif;
181 	struct iwl_host_cmd hcmd = {
182 		.id = REPLY_CHANNEL_SWITCH,
183 		.len = { sizeof(*cmd), },
184 		.flags = CMD_SYNC,
185 		.dataflags[0] = IWL_HCMD_DFL_NOCOPY,
186 	};
187 	int err;
188 
189 	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
190 	if (!cmd)
191 		return -ENOMEM;
192 
193 	hcmd.data[0] = cmd;
194 
195 	cmd->band = priv->band == IEEE80211_BAND_2GHZ;
196 	ch = ch_switch->channel->hw_value;
197 	IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
198 		      ctx->active.channel, ch);
199 	cmd->channel = cpu_to_le16(ch);
200 	cmd->rxon_flags = ctx->staging.flags;
201 	cmd->rxon_filter_flags = ctx->staging.filter_flags;
202 	switch_count = ch_switch->count;
203 	tsf_low = ch_switch->timestamp & 0x0ffffffff;
204 	/*
205 	 * calculate the ucode channel switch time
206 	 * adding TSF as one of the factor for when to switch
207 	 */
208 	if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) {
209 		if (switch_count > ((priv->ucode_beacon_time - tsf_low) /
210 		    beacon_interval)) {
211 			switch_count -= (priv->ucode_beacon_time -
212 				tsf_low) / beacon_interval;
213 		} else
214 			switch_count = 0;
215 	}
216 	if (switch_count <= 1)
217 		cmd->switch_time = cpu_to_le32(priv->ucode_beacon_time);
218 	else {
219 		switch_time_in_usec =
220 			vif->bss_conf.beacon_int * switch_count * TIME_UNIT;
221 		ucode_switch_time = iwl_usecs_to_beacons(priv,
222 							 switch_time_in_usec,
223 							 beacon_interval);
224 		cmd->switch_time = iwl_add_beacon_time(priv,
225 						      priv->ucode_beacon_time,
226 						      ucode_switch_time,
227 						      beacon_interval);
228 	}
229 	IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
230 		      cmd->switch_time);
231 	ch_info = iwl_get_channel_info(priv, priv->band, ch);
232 	if (ch_info)
233 		cmd->expect_beacon = is_channel_radar(ch_info);
234 	else {
235 		IWL_ERR(priv, "invalid channel switch from %u to %u\n",
236 			ctx->active.channel, ch);
237 		return -EFAULT;
238 	}
239 
240 	err = iwl_dvm_send_cmd(priv, &hcmd);
241 	kfree(cmd);
242 	return err;
243 }
244 
245 static struct iwl_lib_ops iwl6000_lib = {
246 	.set_hw_params = iwl6000_hw_set_hw_params,
247 	.set_channel_switch = iwl6000_hw_channel_switch,
248 	.nic_config = iwl6000_nic_config,
249 	.eeprom_ops = {
250 		.regulatory_bands = {
251 			EEPROM_REG_BAND_1_CHANNELS,
252 			EEPROM_REG_BAND_2_CHANNELS,
253 			EEPROM_REG_BAND_3_CHANNELS,
254 			EEPROM_REG_BAND_4_CHANNELS,
255 			EEPROM_REG_BAND_5_CHANNELS,
256 			EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
257 			EEPROM_REG_BAND_52_HT40_CHANNELS
258 		},
259 		.enhanced_txpower = true,
260 	},
261 	.temperature = iwlagn_temperature,
262 };
263 
264 static struct iwl_lib_ops iwl6030_lib = {
265 	.set_hw_params = iwl6000_hw_set_hw_params,
266 	.set_channel_switch = iwl6000_hw_channel_switch,
267 	.nic_config = iwl6000_nic_config,
268 	.eeprom_ops = {
269 		.regulatory_bands = {
270 			EEPROM_REG_BAND_1_CHANNELS,
271 			EEPROM_REG_BAND_2_CHANNELS,
272 			EEPROM_REG_BAND_3_CHANNELS,
273 			EEPROM_REG_BAND_4_CHANNELS,
274 			EEPROM_REG_BAND_5_CHANNELS,
275 			EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
276 			EEPROM_REG_BAND_52_HT40_CHANNELS
277 		},
278 		.enhanced_txpower = true,
279 	},
280 	.temperature = iwlagn_temperature,
281 };
282 
283 static const struct iwl_base_params iwl6000_base_params = {
284 	.eeprom_size = OTP_LOW_IMAGE_SIZE,
285 	.num_of_queues = IWLAGN_NUM_QUEUES,
286 	.num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
287 	.pll_cfg_val = 0,
288 	.max_ll_items = OTP_MAX_LL_ITEMS_6x00,
289 	.shadow_ram_support = true,
290 	.led_compensation = 51,
291 	.adv_thermal_throttle = true,
292 	.support_ct_kill_exit = true,
293 	.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
294 	.chain_noise_scale = 1000,
295 	.wd_timeout = IWL_DEF_WD_TIMEOUT,
296 	.max_event_log_size = 512,
297 	.shadow_reg_enable = false, /* TODO: fix bugs using this feature */
298 };
299 
300 static const struct iwl_base_params iwl6050_base_params = {
301 	.eeprom_size = OTP_LOW_IMAGE_SIZE,
302 	.num_of_queues = IWLAGN_NUM_QUEUES,
303 	.num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
304 	.pll_cfg_val = 0,
305 	.max_ll_items = OTP_MAX_LL_ITEMS_6x50,
306 	.shadow_ram_support = true,
307 	.led_compensation = 51,
308 	.adv_thermal_throttle = true,
309 	.support_ct_kill_exit = true,
310 	.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
311 	.chain_noise_scale = 1500,
312 	.wd_timeout = IWL_DEF_WD_TIMEOUT,
313 	.max_event_log_size = 1024,
314 	.shadow_reg_enable = false, /* TODO: fix bugs using this feature */
315 };
316 
317 static const struct iwl_base_params iwl6000_g2_base_params = {
318 	.eeprom_size = OTP_LOW_IMAGE_SIZE,
319 	.num_of_queues = IWLAGN_NUM_QUEUES,
320 	.num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
321 	.pll_cfg_val = 0,
322 	.max_ll_items = OTP_MAX_LL_ITEMS_6x00,
323 	.shadow_ram_support = true,
324 	.led_compensation = 57,
325 	.adv_thermal_throttle = true,
326 	.support_ct_kill_exit = true,
327 	.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
328 	.chain_noise_scale = 1000,
329 	.wd_timeout = IWL_LONG_WD_TIMEOUT,
330 	.max_event_log_size = 512,
331 	.shadow_reg_enable = false, /* TODO: fix bugs using this feature */
332 };
333 
334 static const struct iwl_ht_params iwl6000_ht_params = {
335 	.ht_greenfield_support = true,
336 	.use_rts_for_aggregation = true, /* use rts/cts protection */
337 };
338 
339 static const struct iwl_bt_params iwl6000_bt_params = {
340 	/* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
341 	.advanced_bt_coexist = true,
342 	.agg_time_limit = BT_AGG_THRESHOLD_DEF,
343 	.bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
344 	.bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT,
345 	.bt_sco_disable = true,
346 };
347 
348 #define IWL_DEVICE_6005						\
349 	.fw_name_pre = IWL6005_FW_PRE,				\
350 	.ucode_api_max = IWL6000G2_UCODE_API_MAX,		\
351 	.ucode_api_ok = IWL6000G2_UCODE_API_OK,			\
352 	.ucode_api_min = IWL6000G2_UCODE_API_MIN,		\
353 	.max_inst_size = IWL60_RTC_INST_SIZE,			\
354 	.max_data_size = IWL60_RTC_DATA_SIZE,			\
355 	.eeprom_ver = EEPROM_6005_EEPROM_VERSION,		\
356 	.eeprom_calib_ver = EEPROM_6005_TX_POWER_VERSION,	\
357 	.lib = &iwl6000_lib,					\
358 	.base_params = &iwl6000_g2_base_params,			\
359 	.need_temp_offset_calib = true,				\
360 	.led_mode = IWL_LED_RF_STATE
361 
362 const struct iwl_cfg iwl6005_2agn_cfg = {
363 	.name = "Intel(R) Centrino(R) Advanced-N 6205 AGN",
364 	IWL_DEVICE_6005,
365 	.ht_params = &iwl6000_ht_params,
366 };
367 
368 const struct iwl_cfg iwl6005_2abg_cfg = {
369 	.name = "Intel(R) Centrino(R) Advanced-N 6205 ABG",
370 	IWL_DEVICE_6005,
371 };
372 
373 const struct iwl_cfg iwl6005_2bg_cfg = {
374 	.name = "Intel(R) Centrino(R) Advanced-N 6205 BG",
375 	IWL_DEVICE_6005,
376 };
377 
378 const struct iwl_cfg iwl6005_2agn_sff_cfg = {
379 	.name = "Intel(R) Centrino(R) Advanced-N 6205S AGN",
380 	IWL_DEVICE_6005,
381 	.ht_params = &iwl6000_ht_params,
382 };
383 
384 const struct iwl_cfg iwl6005_2agn_d_cfg = {
385 	.name = "Intel(R) Centrino(R) Advanced-N 6205D AGN",
386 	IWL_DEVICE_6005,
387 	.ht_params = &iwl6000_ht_params,
388 };
389 
390 const struct iwl_cfg iwl6005_2agn_mow1_cfg = {
391 	.name = "Intel(R) Centrino(R) Advanced-N 6206 AGN",
392 	IWL_DEVICE_6005,
393 	.ht_params = &iwl6000_ht_params,
394 };
395 
396 const struct iwl_cfg iwl6005_2agn_mow2_cfg = {
397 	.name = "Intel(R) Centrino(R) Advanced-N 6207 AGN",
398 	IWL_DEVICE_6005,
399 	.ht_params = &iwl6000_ht_params,
400 };
401 
402 #define IWL_DEVICE_6030						\
403 	.fw_name_pre = IWL6030_FW_PRE,				\
404 	.ucode_api_max = IWL6000G2_UCODE_API_MAX,		\
405 	.ucode_api_ok = IWL6000G2B_UCODE_API_OK,		\
406 	.ucode_api_min = IWL6000G2_UCODE_API_MIN,		\
407 	.max_inst_size = IWL60_RTC_INST_SIZE,			\
408 	.max_data_size = IWL60_RTC_DATA_SIZE,			\
409 	.eeprom_ver = EEPROM_6030_EEPROM_VERSION,		\
410 	.eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION,	\
411 	.lib = &iwl6030_lib,					\
412 	.base_params = &iwl6000_g2_base_params,			\
413 	.bt_params = &iwl6000_bt_params,			\
414 	.need_temp_offset_calib = true,				\
415 	.led_mode = IWL_LED_RF_STATE,				\
416 	.adv_pm = true						\
417 
418 const struct iwl_cfg iwl6030_2agn_cfg = {
419 	.name = "Intel(R) Centrino(R) Advanced-N 6230 AGN",
420 	IWL_DEVICE_6030,
421 	.ht_params = &iwl6000_ht_params,
422 };
423 
424 const struct iwl_cfg iwl6030_2abg_cfg = {
425 	.name = "Intel(R) Centrino(R) Advanced-N 6230 ABG",
426 	IWL_DEVICE_6030,
427 };
428 
429 const struct iwl_cfg iwl6030_2bgn_cfg = {
430 	.name = "Intel(R) Centrino(R) Advanced-N 6230 BGN",
431 	IWL_DEVICE_6030,
432 	.ht_params = &iwl6000_ht_params,
433 };
434 
435 const struct iwl_cfg iwl6030_2bg_cfg = {
436 	.name = "Intel(R) Centrino(R) Advanced-N 6230 BG",
437 	IWL_DEVICE_6030,
438 };
439 
440 #define IWL_DEVICE_6035						\
441 	.fw_name_pre = IWL6030_FW_PRE,				\
442 	.ucode_api_max = IWL6035_UCODE_API_MAX,			\
443 	.ucode_api_ok = IWL6035_UCODE_API_OK,			\
444 	.ucode_api_min = IWL6035_UCODE_API_MIN,			\
445 	.max_inst_size = IWL60_RTC_INST_SIZE,			\
446 	.max_data_size = IWL60_RTC_DATA_SIZE,			\
447 	.eeprom_ver = EEPROM_6030_EEPROM_VERSION,		\
448 	.eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION,	\
449 	.lib = &iwl6030_lib,					\
450 	.base_params = &iwl6000_g2_base_params,			\
451 	.bt_params = &iwl6000_bt_params,			\
452 	.need_temp_offset_calib = true,				\
453 	.led_mode = IWL_LED_RF_STATE,				\
454 	.adv_pm = true
455 
456 const struct iwl_cfg iwl6035_2agn_cfg = {
457 	.name = "Intel(R) Centrino(R) Advanced-N 6235 AGN",
458 	IWL_DEVICE_6035,
459 	.ht_params = &iwl6000_ht_params,
460 };
461 
462 const struct iwl_cfg iwl6035_2agn_sff_cfg = {
463 	.name = "Intel(R) Centrino(R) Ultimate-N 6235 AGN",
464 	IWL_DEVICE_6035,
465 	.ht_params = &iwl6000_ht_params,
466 };
467 
468 const struct iwl_cfg iwl1030_bgn_cfg = {
469 	.name = "Intel(R) Centrino(R) Wireless-N 1030 BGN",
470 	IWL_DEVICE_6030,
471 	.ht_params = &iwl6000_ht_params,
472 };
473 
474 const struct iwl_cfg iwl1030_bg_cfg = {
475 	.name = "Intel(R) Centrino(R) Wireless-N 1030 BG",
476 	IWL_DEVICE_6030,
477 };
478 
479 const struct iwl_cfg iwl130_bgn_cfg = {
480 	.name = "Intel(R) Centrino(R) Wireless-N 130 BGN",
481 	IWL_DEVICE_6030,
482 	.ht_params = &iwl6000_ht_params,
483 	.rx_with_siso_diversity = true,
484 };
485 
486 const struct iwl_cfg iwl130_bg_cfg = {
487 	.name = "Intel(R) Centrino(R) Wireless-N 130 BG",
488 	IWL_DEVICE_6030,
489 	.rx_with_siso_diversity = true,
490 };
491 
492 /*
493  * "i": Internal configuration, use internal Power Amplifier
494  */
495 #define IWL_DEVICE_6000i					\
496 	.fw_name_pre = IWL6000_FW_PRE,				\
497 	.ucode_api_max = IWL6000_UCODE_API_MAX,			\
498 	.ucode_api_ok = IWL6000_UCODE_API_OK,			\
499 	.ucode_api_min = IWL6000_UCODE_API_MIN,			\
500 	.max_inst_size = IWL60_RTC_INST_SIZE,			\
501 	.max_data_size = IWL60_RTC_DATA_SIZE,			\
502 	.valid_tx_ant = ANT_BC,		/* .cfg overwrite */	\
503 	.valid_rx_ant = ANT_BC,		/* .cfg overwrite */	\
504 	.eeprom_ver = EEPROM_6000_EEPROM_VERSION,		\
505 	.eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,	\
506 	.lib = &iwl6000_lib,					\
507 	.additional_nic_config = iwl6000i_additional_nic_config,\
508 	.base_params = &iwl6000_base_params,			\
509 	.led_mode = IWL_LED_BLINK
510 
511 const struct iwl_cfg iwl6000i_2agn_cfg = {
512 	.name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
513 	IWL_DEVICE_6000i,
514 	.ht_params = &iwl6000_ht_params,
515 };
516 
517 const struct iwl_cfg iwl6000i_2abg_cfg = {
518 	.name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
519 	IWL_DEVICE_6000i,
520 };
521 
522 const struct iwl_cfg iwl6000i_2bg_cfg = {
523 	.name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
524 	IWL_DEVICE_6000i,
525 };
526 
527 #define IWL_DEVICE_6050						\
528 	.fw_name_pre = IWL6050_FW_PRE,				\
529 	.ucode_api_max = IWL6050_UCODE_API_MAX,			\
530 	.ucode_api_min = IWL6050_UCODE_API_MIN,			\
531 	.max_inst_size = IWL60_RTC_INST_SIZE,			\
532 	.max_data_size = IWL60_RTC_DATA_SIZE,			\
533 	.valid_tx_ant = ANT_AB,		/* .cfg overwrite */	\
534 	.valid_rx_ant = ANT_AB,		/* .cfg overwrite */	\
535 	.lib = &iwl6000_lib,					\
536 	.additional_nic_config = iwl6050_additional_nic_config,	\
537 	.eeprom_ver = EEPROM_6050_EEPROM_VERSION,		\
538 	.eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,	\
539 	.base_params = &iwl6050_base_params,			\
540 	.led_mode = IWL_LED_BLINK,				\
541 	.internal_wimax_coex = true
542 
543 const struct iwl_cfg iwl6050_2agn_cfg = {
544 	.name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
545 	IWL_DEVICE_6050,
546 	.ht_params = &iwl6000_ht_params,
547 };
548 
549 const struct iwl_cfg iwl6050_2abg_cfg = {
550 	.name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
551 	IWL_DEVICE_6050,
552 };
553 
554 #define IWL_DEVICE_6150						\
555 	.fw_name_pre = IWL6050_FW_PRE,				\
556 	.ucode_api_max = IWL6050_UCODE_API_MAX,			\
557 	.ucode_api_min = IWL6050_UCODE_API_MIN,			\
558 	.max_inst_size = IWL60_RTC_INST_SIZE,			\
559 	.max_data_size = IWL60_RTC_DATA_SIZE,			\
560 	.lib = &iwl6000_lib,					\
561 	.additional_nic_config = iwl6150_additional_nic_config,	\
562 	.eeprom_ver = EEPROM_6150_EEPROM_VERSION,		\
563 	.eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION,	\
564 	.base_params = &iwl6050_base_params,			\
565 	.led_mode = IWL_LED_BLINK,				\
566 	.internal_wimax_coex = true
567 
568 const struct iwl_cfg iwl6150_bgn_cfg = {
569 	.name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN",
570 	IWL_DEVICE_6150,
571 	.ht_params = &iwl6000_ht_params,
572 };
573 
574 const struct iwl_cfg iwl6150_bg_cfg = {
575 	.name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BG",
576 	IWL_DEVICE_6150,
577 };
578 
579 const struct iwl_cfg iwl6000_3agn_cfg = {
580 	.name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
581 	.fw_name_pre = IWL6000_FW_PRE,
582 	.ucode_api_max = IWL6000_UCODE_API_MAX,
583 	.ucode_api_ok = IWL6000_UCODE_API_OK,
584 	.ucode_api_min = IWL6000_UCODE_API_MIN,
585 	.max_inst_size = IWL60_RTC_INST_SIZE,
586 	.max_data_size = IWL60_RTC_DATA_SIZE,
587 	.eeprom_ver = EEPROM_6000_EEPROM_VERSION,
588 	.eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
589 	.lib = &iwl6000_lib,
590 	.base_params = &iwl6000_base_params,
591 	.ht_params = &iwl6000_ht_params,
592 	.led_mode = IWL_LED_BLINK,
593 };
594 
595 MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_OK));
596 MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_OK));
597 MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_OK));
598 MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2B_UCODE_API_OK));
599