ARM: avoid alignment related control reg writeouts
[pandora-kernel.git] / drivers / net / wireless / iwlwifi / iwl-6000.c
1 /******************************************************************************
2  *
3  * Copyright(c) 2008 - 2011 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
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
86 static void iwl6050_additional_nic_config(struct iwl_priv *priv)
87 {
88         /* Indicate calibration version to uCode. */
89         if (iwlagn_eeprom_calib_version(priv) >= 6)
90                 iwl_set_bit(bus(priv), CSR_GP_DRIVER_REG,
91                                 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
92 }
93
94 static void iwl6150_additional_nic_config(struct iwl_priv *priv)
95 {
96         /* Indicate calibration version to uCode. */
97         if (iwlagn_eeprom_calib_version(priv) >= 6)
98                 iwl_set_bit(bus(priv), CSR_GP_DRIVER_REG,
99                                 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
100         iwl_set_bit(bus(priv), CSR_GP_DRIVER_REG,
101                     CSR_GP_DRIVER_REG_BIT_6050_1x2);
102 }
103
104 /* NIC configuration for 6000 series */
105 static void iwl6000_nic_config(struct iwl_priv *priv)
106 {
107         iwl_rf_config(priv);
108
109         /* no locking required for register write */
110         if (priv->cfg->pa_type == IWL_PA_INTERNAL) {
111                 /* 2x2 IPA phy type */
112                 iwl_write32(bus(priv), CSR_GP_DRIVER_REG,
113                              CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
114         }
115         /* do additional nic configuration if needed */
116         if (priv->cfg->additional_nic_config)
117                         priv->cfg->additional_nic_config(priv);
118 }
119
120 static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
121         .min_nrg_cck = 110,
122         .max_nrg_cck = 0, /* not used, set to 0 */
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
145 static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
146 {
147         if (iwlagn_mod_params.num_of_queues >= IWL_MIN_NUM_QUEUES &&
148             iwlagn_mod_params.num_of_queues <= IWLAGN_NUM_QUEUES)
149                 priv->cfg->base_params->num_of_queues =
150                         iwlagn_mod_params.num_of_queues;
151
152         hw_params(priv).max_txq_num = priv->cfg->base_params->num_of_queues;
153         priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID;
154
155         hw_params(priv).max_data_size = IWL60_RTC_DATA_SIZE;
156         hw_params(priv).max_inst_size = IWL60_RTC_INST_SIZE;
157
158         hw_params(priv).ht40_channel =  BIT(IEEE80211_BAND_2GHZ) |
159                                         BIT(IEEE80211_BAND_5GHZ);
160
161         hw_params(priv).tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
162         if (priv->cfg->rx_with_siso_diversity)
163                 hw_params(priv).rx_chains_num = 1;
164         else
165                 hw_params(priv).rx_chains_num =
166                         num_of_ant(priv->cfg->valid_rx_ant);
167         hw_params(priv).valid_tx_ant = priv->cfg->valid_tx_ant;
168         hw_params(priv).valid_rx_ant = priv->cfg->valid_rx_ant;
169
170         iwl6000_set_ct_threshold(priv);
171
172         /* Set initial sensitivity parameters */
173         /* Set initial calibration set */
174         hw_params(priv).sens = &iwl6000_sensitivity;
175         hw_params(priv).calib_init_cfg =
176                 BIT(IWL_CALIB_XTAL)             |
177                 BIT(IWL_CALIB_LO)               |
178                 BIT(IWL_CALIB_TX_IQ)            |
179                 BIT(IWL_CALIB_BASE_BAND);
180         if (priv->cfg->need_dc_calib)
181                 hw_params(priv).calib_rt_cfg |= IWL_CALIB_CFG_DC_IDX;
182         if (priv->cfg->need_temp_offset_calib)
183                 hw_params(priv).calib_init_cfg |= BIT(IWL_CALIB_TEMP_OFFSET);
184
185         return 0;
186 }
187
188 static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
189                                      struct ieee80211_channel_switch *ch_switch)
190 {
191         /*
192          * MULTI-FIXME
193          * See iwlagn_mac_channel_switch.
194          */
195         struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
196         struct iwl6000_channel_switch_cmd *cmd;
197         const struct iwl_channel_info *ch_info;
198         u32 switch_time_in_usec, ucode_switch_time;
199         u16 ch;
200         u32 tsf_low;
201         u8 switch_count;
202         u16 beacon_interval = le16_to_cpu(ctx->timing.beacon_interval);
203         struct ieee80211_vif *vif = ctx->vif;
204         struct iwl_host_cmd hcmd = {
205                 .id = REPLY_CHANNEL_SWITCH,
206                 .len = { sizeof(*cmd), },
207                 .flags = CMD_SYNC,
208                 .dataflags[0] = IWL_HCMD_DFL_NOCOPY,
209         };
210         int err;
211
212         cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
213         if (!cmd)
214                 return -ENOMEM;
215
216         hcmd.data[0] = cmd;
217
218         cmd->band = priv->band == IEEE80211_BAND_2GHZ;
219         ch = ch_switch->channel->hw_value;
220         IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
221                       ctx->active.channel, ch);
222         cmd->channel = cpu_to_le16(ch);
223         cmd->rxon_flags = ctx->staging.flags;
224         cmd->rxon_filter_flags = ctx->staging.filter_flags;
225         switch_count = ch_switch->count;
226         tsf_low = ch_switch->timestamp & 0x0ffffffff;
227         /*
228          * calculate the ucode channel switch time
229          * adding TSF as one of the factor for when to switch
230          */
231         if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) {
232                 if (switch_count > ((priv->ucode_beacon_time - tsf_low) /
233                     beacon_interval)) {
234                         switch_count -= (priv->ucode_beacon_time -
235                                 tsf_low) / beacon_interval;
236                 } else
237                         switch_count = 0;
238         }
239         if (switch_count <= 1)
240                 cmd->switch_time = cpu_to_le32(priv->ucode_beacon_time);
241         else {
242                 switch_time_in_usec =
243                         vif->bss_conf.beacon_int * switch_count * TIME_UNIT;
244                 ucode_switch_time = iwl_usecs_to_beacons(priv,
245                                                          switch_time_in_usec,
246                                                          beacon_interval);
247                 cmd->switch_time = iwl_add_beacon_time(priv,
248                                                        priv->ucode_beacon_time,
249                                                        ucode_switch_time,
250                                                        beacon_interval);
251         }
252         IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
253                       cmd->switch_time);
254         ch_info = iwl_get_channel_info(priv, priv->band, ch);
255         if (ch_info)
256                 cmd->expect_beacon = is_channel_radar(ch_info);
257         else {
258                 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
259                         ctx->active.channel, ch);
260                 return -EFAULT;
261         }
262
263         err = iwl_trans_send_cmd(trans(priv), &hcmd);
264         kfree(cmd);
265         return err;
266 }
267
268 static struct iwl_lib_ops iwl6000_lib = {
269         .set_hw_params = iwl6000_hw_set_hw_params,
270         .set_channel_switch = iwl6000_hw_channel_switch,
271         .nic_config = iwl6000_nic_config,
272         .eeprom_ops = {
273                 .regulatory_bands = {
274                         EEPROM_REG_BAND_1_CHANNELS,
275                         EEPROM_REG_BAND_2_CHANNELS,
276                         EEPROM_REG_BAND_3_CHANNELS,
277                         EEPROM_REG_BAND_4_CHANNELS,
278                         EEPROM_REG_BAND_5_CHANNELS,
279                         EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
280                         EEPROM_REG_BAND_52_HT40_CHANNELS
281                 },
282                 .update_enhanced_txpower = iwl_eeprom_enhanced_txpower,
283         },
284         .temperature = iwlagn_temperature,
285 };
286
287 static struct iwl_lib_ops iwl6030_lib = {
288         .set_hw_params = iwl6000_hw_set_hw_params,
289         .bt_rx_handler_setup = iwlagn_bt_rx_handler_setup,
290         .bt_setup_deferred_work = iwlagn_bt_setup_deferred_work,
291         .cancel_deferred_work = iwlagn_bt_cancel_deferred_work,
292         .set_channel_switch = iwl6000_hw_channel_switch,
293         .nic_config = iwl6000_nic_config,
294         .eeprom_ops = {
295                 .regulatory_bands = {
296                         EEPROM_REG_BAND_1_CHANNELS,
297                         EEPROM_REG_BAND_2_CHANNELS,
298                         EEPROM_REG_BAND_3_CHANNELS,
299                         EEPROM_REG_BAND_4_CHANNELS,
300                         EEPROM_REG_BAND_5_CHANNELS,
301                         EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
302                         EEPROM_REG_BAND_52_HT40_CHANNELS
303                 },
304                 .update_enhanced_txpower = iwl_eeprom_enhanced_txpower,
305         },
306         .temperature = iwlagn_temperature,
307 };
308
309 static struct iwl_base_params iwl6000_base_params = {
310         .eeprom_size = OTP_LOW_IMAGE_SIZE,
311         .num_of_queues = IWLAGN_NUM_QUEUES,
312         .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
313         .pll_cfg_val = 0,
314         .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
315         .shadow_ram_support = true,
316         .led_compensation = 51,
317         .adv_thermal_throttle = true,
318         .support_ct_kill_exit = true,
319         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
320         .chain_noise_scale = 1000,
321         .wd_timeout = IWL_DEF_WD_TIMEOUT,
322         .max_event_log_size = 512,
323         .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
324 };
325
326 static struct iwl_base_params iwl6050_base_params = {
327         .eeprom_size = OTP_LOW_IMAGE_SIZE,
328         .num_of_queues = IWLAGN_NUM_QUEUES,
329         .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
330         .pll_cfg_val = 0,
331         .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
332         .shadow_ram_support = true,
333         .led_compensation = 51,
334         .adv_thermal_throttle = true,
335         .support_ct_kill_exit = true,
336         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
337         .chain_noise_scale = 1500,
338         .wd_timeout = IWL_DEF_WD_TIMEOUT,
339         .max_event_log_size = 1024,
340         .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
341 };
342 static struct iwl_base_params iwl6000_g2_base_params = {
343         .eeprom_size = OTP_LOW_IMAGE_SIZE,
344         .num_of_queues = IWLAGN_NUM_QUEUES,
345         .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
346         .pll_cfg_val = 0,
347         .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
348         .shadow_ram_support = true,
349         .led_compensation = 57,
350         .adv_thermal_throttle = true,
351         .support_ct_kill_exit = true,
352         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
353         .chain_noise_scale = 1000,
354         .wd_timeout = IWL_LONG_WD_TIMEOUT,
355         .max_event_log_size = 512,
356         .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
357 };
358
359 static struct iwl_ht_params iwl6000_ht_params = {
360         .ht_greenfield_support = true,
361         .use_rts_for_aggregation = true, /* use rts/cts protection */
362 };
363
364 static struct iwl_bt_params iwl6000_bt_params = {
365         /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
366         .advanced_bt_coexist = true,
367         .agg_time_limit = BT_AGG_THRESHOLD_DEF,
368         .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
369         .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT,
370         .bt_sco_disable = true,
371 };
372
373 #define IWL_DEVICE_6005                                         \
374         .fw_name_pre = IWL6005_FW_PRE,                          \
375         .ucode_api_max = IWL6000G2_UCODE_API_MAX,               \
376         .ucode_api_ok = IWL6000G2_UCODE_API_OK,                 \
377         .ucode_api_min = IWL6000G2_UCODE_API_MIN,               \
378         .eeprom_ver = EEPROM_6005_EEPROM_VERSION,               \
379         .eeprom_calib_ver = EEPROM_6005_TX_POWER_VERSION,       \
380         .lib = &iwl6000_lib,                                    \
381         .base_params = &iwl6000_g2_base_params,                 \
382         .need_dc_calib = true,                                  \
383         .need_temp_offset_calib = true,                         \
384         .led_mode = IWL_LED_RF_STATE
385
386 struct iwl_cfg iwl6005_2agn_cfg = {
387         .name = "Intel(R) Centrino(R) Advanced-N 6205 AGN",
388         IWL_DEVICE_6005,
389         .ht_params = &iwl6000_ht_params,
390 };
391
392 struct iwl_cfg iwl6005_2abg_cfg = {
393         .name = "Intel(R) Centrino(R) Advanced-N 6205 ABG",
394         IWL_DEVICE_6005,
395 };
396
397 struct iwl_cfg iwl6005_2bg_cfg = {
398         .name = "Intel(R) Centrino(R) Advanced-N 6205 BG",
399         IWL_DEVICE_6005,
400 };
401
402 struct iwl_cfg iwl6005_2agn_sff_cfg = {
403         .name = "Intel(R) Centrino(R) Advanced-N 6205S AGN",
404         IWL_DEVICE_6005,
405         .ht_params = &iwl6000_ht_params,
406 };
407
408 struct iwl_cfg iwl6005_2agn_d_cfg = {
409         .name = "Intel(R) Centrino(R) Advanced-N 6205D AGN",
410         IWL_DEVICE_6005,
411         .ht_params = &iwl6000_ht_params,
412 };
413
414 #define IWL_DEVICE_6030                                         \
415         .fw_name_pre = IWL6030_FW_PRE,                          \
416         .ucode_api_max = IWL6000G2_UCODE_API_MAX,               \
417         .ucode_api_ok = IWL6000G2B_UCODE_API_OK,                \
418         .ucode_api_min = IWL6000G2_UCODE_API_MIN,               \
419         .eeprom_ver = EEPROM_6030_EEPROM_VERSION,               \
420         .eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION,       \
421         .lib = &iwl6030_lib,                                    \
422         .base_params = &iwl6000_g2_base_params,                 \
423         .bt_params = &iwl6000_bt_params,                        \
424         .need_dc_calib = true,                                  \
425         .need_temp_offset_calib = true,                         \
426         .led_mode = IWL_LED_RF_STATE,                           \
427         .adv_pm = true                                          \
428
429 struct iwl_cfg iwl6030_2agn_cfg = {
430         .name = "Intel(R) Centrino(R) Advanced-N 6230 AGN",
431         IWL_DEVICE_6030,
432         .ht_params = &iwl6000_ht_params,
433 };
434
435 struct iwl_cfg iwl6030_2abg_cfg = {
436         .name = "Intel(R) Centrino(R) Advanced-N 6230 ABG",
437         IWL_DEVICE_6030,
438 };
439
440 struct iwl_cfg iwl6030_2bgn_cfg = {
441         .name = "Intel(R) Centrino(R) Advanced-N 6230 BGN",
442         IWL_DEVICE_6030,
443         .ht_params = &iwl6000_ht_params,
444 };
445
446 struct iwl_cfg iwl6030_2bg_cfg = {
447         .name = "Intel(R) Centrino(R) Advanced-N 6230 BG",
448         IWL_DEVICE_6030,
449 };
450
451 #define IWL_DEVICE_6035                                         \
452         .fw_name_pre = IWL6030_FW_PRE,                          \
453         .ucode_api_max = IWL6035_UCODE_API_MAX,                 \
454         .ucode_api_ok = IWL6035_UCODE_API_OK,                   \
455         .ucode_api_min = IWL6035_UCODE_API_MIN,                 \
456         .eeprom_ver = EEPROM_6030_EEPROM_VERSION,               \
457         .eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION,       \
458         .lib = &iwl6030_lib,                                    \
459         .base_params = &iwl6000_g2_base_params,                 \
460         .bt_params = &iwl6000_bt_params,                        \
461         .need_dc_calib = true,                                  \
462         .need_temp_offset_calib = true,                         \
463         .led_mode = IWL_LED_RF_STATE,                           \
464         .adv_pm = true
465
466 struct iwl_cfg iwl6035_2agn_cfg = {
467         .name = "6035 Series 2x2 AGN/BT",
468         IWL_DEVICE_6035,
469         .ht_params = &iwl6000_ht_params,
470 };
471
472 struct iwl_cfg iwl6035_2abg_cfg = {
473         .name = "6035 Series 2x2 ABG/BT",
474         IWL_DEVICE_6030,
475 };
476
477 struct iwl_cfg iwl6035_2bg_cfg = {
478         .name = "6035 Series 2x2 BG/BT",
479         IWL_DEVICE_6030,
480 };
481
482 struct iwl_cfg iwl1030_bgn_cfg = {
483         .name = "Intel(R) Centrino(R) Wireless-N 1030 BGN",
484         IWL_DEVICE_6030,
485         .ht_params = &iwl6000_ht_params,
486 };
487
488 struct iwl_cfg iwl1030_bg_cfg = {
489         .name = "Intel(R) Centrino(R) Wireless-N 1030 BG",
490         IWL_DEVICE_6030,
491 };
492
493 struct iwl_cfg iwl130_bgn_cfg = {
494         .name = "Intel(R) Centrino(R) Wireless-N 130 BGN",
495         IWL_DEVICE_6030,
496         .ht_params = &iwl6000_ht_params,
497         .rx_with_siso_diversity = true,
498 };
499
500 struct iwl_cfg iwl130_bg_cfg = {
501         .name = "Intel(R) Centrino(R) Wireless-N 130 BG",
502         IWL_DEVICE_6030,
503         .rx_with_siso_diversity = true,
504 };
505
506 /*
507  * "i": Internal configuration, use internal Power Amplifier
508  */
509 #define IWL_DEVICE_6000i                                        \
510         .fw_name_pre = IWL6000_FW_PRE,                          \
511         .ucode_api_max = IWL6000_UCODE_API_MAX,                 \
512         .ucode_api_ok = IWL6000_UCODE_API_OK,                   \
513         .ucode_api_min = IWL6000_UCODE_API_MIN,                 \
514         .valid_tx_ant = ANT_BC,         /* .cfg overwrite */    \
515         .valid_rx_ant = ANT_BC,         /* .cfg overwrite */    \
516         .eeprom_ver = EEPROM_6000_EEPROM_VERSION,               \
517         .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,       \
518         .lib = &iwl6000_lib,                                    \
519         .base_params = &iwl6000_base_params,                    \
520         .pa_type = IWL_PA_INTERNAL,                             \
521         .led_mode = IWL_LED_BLINK
522
523 struct iwl_cfg iwl6000i_2agn_cfg = {
524         .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
525         IWL_DEVICE_6000i,
526         .ht_params = &iwl6000_ht_params,
527 };
528
529 struct iwl_cfg iwl6000i_2abg_cfg = {
530         .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
531         IWL_DEVICE_6000i,
532 };
533
534 struct iwl_cfg iwl6000i_2bg_cfg = {
535         .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
536         IWL_DEVICE_6000i,
537 };
538
539 #define IWL_DEVICE_6050                                         \
540         .fw_name_pre = IWL6050_FW_PRE,                          \
541         .ucode_api_max = IWL6050_UCODE_API_MAX,                 \
542         .ucode_api_min = IWL6050_UCODE_API_MIN,                 \
543         .valid_tx_ant = ANT_AB,         /* .cfg overwrite */    \
544         .valid_rx_ant = ANT_AB,         /* .cfg overwrite */    \
545         .lib = &iwl6000_lib,                                    \
546         .additional_nic_config = iwl6050_additional_nic_config, \
547         .eeprom_ver = EEPROM_6050_EEPROM_VERSION,               \
548         .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,       \
549         .base_params = &iwl6050_base_params,                    \
550         .need_dc_calib = true,                                  \
551         .led_mode = IWL_LED_BLINK,                              \
552         .internal_wimax_coex = true
553
554 struct iwl_cfg iwl6050_2agn_cfg = {
555         .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
556         IWL_DEVICE_6050,
557         .ht_params = &iwl6000_ht_params,
558 };
559
560 struct iwl_cfg iwl6050_2abg_cfg = {
561         .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
562         IWL_DEVICE_6050,
563 };
564
565 #define IWL_DEVICE_6150                                         \
566         .fw_name_pre = IWL6050_FW_PRE,                          \
567         .ucode_api_max = IWL6050_UCODE_API_MAX,                 \
568         .ucode_api_min = IWL6050_UCODE_API_MIN,                 \
569         .lib = &iwl6000_lib,                                    \
570         .additional_nic_config = iwl6150_additional_nic_config, \
571         .eeprom_ver = EEPROM_6150_EEPROM_VERSION,               \
572         .eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION,       \
573         .base_params = &iwl6050_base_params,                    \
574         .need_dc_calib = true,                                  \
575         .led_mode = IWL_LED_BLINK,                              \
576         .internal_wimax_coex = true
577
578 struct iwl_cfg iwl6150_bgn_cfg = {
579         .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN",
580         IWL_DEVICE_6150,
581         .ht_params = &iwl6000_ht_params,
582 };
583
584 struct iwl_cfg iwl6150_bg_cfg = {
585         .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BG",
586         IWL_DEVICE_6150,
587 };
588
589 struct iwl_cfg iwl6000_3agn_cfg = {
590         .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
591         .fw_name_pre = IWL6000_FW_PRE,
592         .ucode_api_max = IWL6000_UCODE_API_MAX,
593         .ucode_api_ok = IWL6000_UCODE_API_OK,
594         .ucode_api_min = IWL6000_UCODE_API_MIN,
595         .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
596         .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
597         .lib = &iwl6000_lib,
598         .base_params = &iwl6000_base_params,
599         .ht_params = &iwl6000_ht_params,
600         .need_dc_calib = true,
601         .led_mode = IWL_LED_BLINK,
602 };
603
604 MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_OK));
605 MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_OK));
606 MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_OK));
607 MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2B_UCODE_API_OK));