]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/net/wireless/iwlwifi/iwl-6000.c
iwlwifi: rename 6000 series Gen2 devices to Gen2a
[karo-tx-linux.git] / drivers / net / wireless / iwlwifi / iwl-6000.c
1 /******************************************************************************
2  *
3  * Copyright(c) 2008 - 2010 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/pci.h>
31 #include <linux/dma-mapping.h>
32 #include <linux/delay.h>
33 #include <linux/skbuff.h>
34 #include <linux/netdevice.h>
35 #include <linux/wireless.h>
36 #include <net/mac80211.h>
37 #include <linux/etherdevice.h>
38 #include <asm/unaligned.h>
39
40 #include "iwl-eeprom.h"
41 #include "iwl-dev.h"
42 #include "iwl-core.h"
43 #include "iwl-io.h"
44 #include "iwl-sta.h"
45 #include "iwl-agn.h"
46 #include "iwl-helpers.h"
47 #include "iwl-agn-hw.h"
48 #include "iwl-6000-hw.h"
49 #include "iwl-agn-led.h"
50 #include "iwl-agn-debugfs.h"
51
52 /* Highest firmware API version supported */
53 #define IWL6000_UCODE_API_MAX 4
54 #define IWL6050_UCODE_API_MAX 4
55 #define IWL6000G2_UCODE_API_MAX 4
56
57 /* Lowest firmware API version supported */
58 #define IWL6000_UCODE_API_MIN 4
59 #define IWL6050_UCODE_API_MIN 4
60 #define IWL6000G2_UCODE_API_MIN 4
61
62 #define IWL6000_FW_PRE "iwlwifi-6000-"
63 #define _IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE #api ".ucode"
64 #define IWL6000_MODULE_FIRMWARE(api) _IWL6000_MODULE_FIRMWARE(api)
65
66 #define IWL6050_FW_PRE "iwlwifi-6050-"
67 #define _IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE #api ".ucode"
68 #define IWL6050_MODULE_FIRMWARE(api) _IWL6050_MODULE_FIRMWARE(api)
69
70 #define IWL6000G2A_FW_PRE "iwlwifi-6000g2a-"
71 #define _IWL6000G2A_MODULE_FIRMWARE(api) IWL6000G2A_FW_PRE #api ".ucode"
72 #define IWL6000G2A_MODULE_FIRMWARE(api) _IWL6000G2A_MODULE_FIRMWARE(api)
73
74
75 static void iwl6000_set_ct_threshold(struct iwl_priv *priv)
76 {
77         /* want Celsius */
78         priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD;
79         priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
80 }
81
82 /* Indicate calibration version to uCode. */
83 static void iwl6050_set_calib_version(struct iwl_priv *priv)
84 {
85         if (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6)
86                 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
87                                 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
88 }
89
90 /* NIC configuration for 6000 series */
91 static void iwl6000_nic_config(struct iwl_priv *priv)
92 {
93         u16 radio_cfg;
94
95         radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG);
96
97         /* write radio config values to register */
98         if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) <= EEPROM_RF_CONFIG_TYPE_MAX)
99                 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
100                             EEPROM_RF_CFG_TYPE_MSK(radio_cfg) |
101                             EEPROM_RF_CFG_STEP_MSK(radio_cfg) |
102                             EEPROM_RF_CFG_DASH_MSK(radio_cfg));
103
104         /* set CSR_HW_CONFIG_REG for uCode use */
105         iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
106                     CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI |
107                     CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);
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(priv, CSR_GP_DRIVER_REG,
113                              CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
114         }
115         /* else do nothing, uCode configured */
116         if (priv->cfg->ops->lib->temp_ops.set_calib_version)
117                 priv->cfg->ops->lib->temp_ops.set_calib_version(priv);
118 }
119
120 static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
121         .min_nrg_cck = 97,
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 = 97,
138         .nrg_th_ofdm = 100,
139
140         .barker_corr_th_min = 190,
141         .barker_corr_th_min_mrc = 390,
142         .nrg_th_cca = 62,
143 };
144
145 static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
146 {
147         if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
148             priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
149                 priv->cfg->num_of_queues =
150                         priv->cfg->mod_params->num_of_queues;
151
152         priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
153         priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
154         priv->hw_params.scd_bc_tbls_size =
155                         priv->cfg->num_of_queues *
156                         sizeof(struct iwlagn_scd_bc_tbl);
157         priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
158         priv->hw_params.max_stations = IWL5000_STATION_COUNT;
159         priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
160
161         priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
162         priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
163
164         priv->hw_params.max_bsm_size = 0;
165         priv->hw_params.ht40_channel =  BIT(IEEE80211_BAND_2GHZ) |
166                                         BIT(IEEE80211_BAND_5GHZ);
167         priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
168
169         priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
170         priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
171         priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
172         priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
173
174         if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
175                 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
176
177         /* Set initial sensitivity parameters */
178         /* Set initial calibration set */
179         priv->hw_params.sens = &iwl6000_sensitivity;
180         priv->hw_params.calib_init_cfg =
181                 BIT(IWL_CALIB_XTAL)             |
182                 BIT(IWL_CALIB_LO)               |
183                 BIT(IWL_CALIB_TX_IQ)            |
184                 BIT(IWL_CALIB_BASE_BAND);
185
186         return 0;
187 }
188
189 static int iwl6050_hw_set_hw_params(struct iwl_priv *priv)
190 {
191         if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
192             priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
193                 priv->cfg->num_of_queues =
194                         priv->cfg->mod_params->num_of_queues;
195
196         priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
197         priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
198         priv->hw_params.scd_bc_tbls_size =
199                         priv->cfg->num_of_queues *
200                         sizeof(struct iwlagn_scd_bc_tbl);
201         priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
202         priv->hw_params.max_stations = IWL5000_STATION_COUNT;
203         priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
204
205         priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
206         priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
207
208         priv->hw_params.max_bsm_size = 0;
209         priv->hw_params.ht40_channel =  BIT(IEEE80211_BAND_2GHZ) |
210                                         BIT(IEEE80211_BAND_5GHZ);
211         priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
212
213         priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
214         priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
215         priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
216         priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
217
218         if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
219                 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
220
221         /* Set initial sensitivity parameters */
222         /* Set initial calibration set */
223         priv->hw_params.sens = &iwl6000_sensitivity;
224         priv->hw_params.calib_init_cfg =
225                 BIT(IWL_CALIB_XTAL)             |
226                 BIT(IWL_CALIB_DC)               |
227                 BIT(IWL_CALIB_LO)               |
228                 BIT(IWL_CALIB_TX_IQ)            |
229                 BIT(IWL_CALIB_BASE_BAND);
230
231         return 0;
232 }
233
234 static int iwl6000_hw_channel_switch(struct iwl_priv *priv, u16 channel)
235 {
236         struct iwl6000_channel_switch_cmd cmd;
237         const struct iwl_channel_info *ch_info;
238         struct iwl_host_cmd hcmd = {
239                 .id = REPLY_CHANNEL_SWITCH,
240                 .len = sizeof(cmd),
241                 .flags = CMD_SIZE_HUGE,
242                 .data = &cmd,
243         };
244
245         IWL_DEBUG_11H(priv, "channel switch from %d to %d\n",
246                 priv->active_rxon.channel, channel);
247
248         cmd.band = priv->band == IEEE80211_BAND_2GHZ;
249         cmd.channel = cpu_to_le16(channel);
250         cmd.rxon_flags = priv->staging_rxon.flags;
251         cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
252         cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
253         ch_info = iwl_get_channel_info(priv, priv->band, channel);
254         if (ch_info)
255                 cmd.expect_beacon = is_channel_radar(ch_info);
256         else {
257                 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
258                         priv->active_rxon.channel, channel);
259                 return -EFAULT;
260         }
261         priv->switch_rxon.channel = cpu_to_le16(channel);
262         priv->switch_rxon.switch_in_progress = true;
263
264         return iwl_send_cmd_sync(priv, &hcmd);
265 }
266
267 static struct iwl_lib_ops iwl6000_lib = {
268         .set_hw_params = iwl6000_hw_set_hw_params,
269         .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
270         .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
271         .txq_set_sched = iwlagn_txq_set_sched,
272         .txq_agg_enable = iwlagn_txq_agg_enable,
273         .txq_agg_disable = iwlagn_txq_agg_disable,
274         .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
275         .txq_free_tfd = iwl_hw_txq_free_tfd,
276         .txq_init = iwl_hw_tx_queue_init,
277         .rx_handler_setup = iwlagn_rx_handler_setup,
278         .setup_deferred_work = iwlagn_setup_deferred_work,
279         .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
280         .load_ucode = iwlagn_load_ucode,
281         .dump_nic_event_log = iwl_dump_nic_event_log,
282         .dump_nic_error_log = iwl_dump_nic_error_log,
283         .dump_csr = iwl_dump_csr,
284         .dump_fh = iwl_dump_fh,
285         .init_alive_start = iwlagn_init_alive_start,
286         .alive_notify = iwlagn_alive_notify,
287         .send_tx_power = iwlagn_send_tx_power,
288         .update_chain_flags = iwl_update_chain_flags,
289         .set_channel_switch = iwl6000_hw_channel_switch,
290         .apm_ops = {
291                 .init = iwl_apm_init,
292                 .stop = iwl_apm_stop,
293                 .config = iwl6000_nic_config,
294                 .set_pwr_src = iwl_set_pwr_src,
295         },
296         .eeprom_ops = {
297                 .regulatory_bands = {
298                         EEPROM_REG_BAND_1_CHANNELS,
299                         EEPROM_REG_BAND_2_CHANNELS,
300                         EEPROM_REG_BAND_3_CHANNELS,
301                         EEPROM_REG_BAND_4_CHANNELS,
302                         EEPROM_REG_BAND_5_CHANNELS,
303                         EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
304                         EEPROM_REG_BAND_52_HT40_CHANNELS
305                 },
306                 .verify_signature  = iwlcore_eeprom_verify_signature,
307                 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
308                 .release_semaphore = iwlcore_eeprom_release_semaphore,
309                 .calib_version  = iwlagn_eeprom_calib_version,
310                 .query_addr = iwlagn_eeprom_query_addr,
311                 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
312         },
313         .post_associate = iwl_post_associate,
314         .isr = iwl_isr_ict,
315         .config_ap = iwl_config_ap,
316         .temp_ops = {
317                 .temperature = iwlagn_temperature,
318                 .set_ct_kill = iwl6000_set_ct_threshold,
319          },
320         .add_bcast_station = iwl_add_bcast_station,
321         .debugfs_ops = {
322                 .rx_stats_read = iwl_ucode_rx_stats_read,
323                 .tx_stats_read = iwl_ucode_tx_stats_read,
324                 .general_stats_read = iwl_ucode_general_stats_read,
325         },
326         .recover_from_tx_stall = iwl_bg_monitor_recover,
327         .check_plcp_health = iwl_good_plcp_health,
328         .check_ack_health = iwl_good_ack_health,
329 };
330
331 static const struct iwl_ops iwl6000_ops = {
332         .ucode = &iwlagn_ucode,
333         .lib = &iwl6000_lib,
334         .hcmd = &iwlagn_hcmd,
335         .utils = &iwlagn_hcmd_utils,
336         .led = &iwlagn_led_ops,
337 };
338
339 static struct iwl_lib_ops iwl6050_lib = {
340         .set_hw_params = iwl6050_hw_set_hw_params,
341         .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
342         .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
343         .txq_set_sched = iwlagn_txq_set_sched,
344         .txq_agg_enable = iwlagn_txq_agg_enable,
345         .txq_agg_disable = iwlagn_txq_agg_disable,
346         .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
347         .txq_free_tfd = iwl_hw_txq_free_tfd,
348         .txq_init = iwl_hw_tx_queue_init,
349         .rx_handler_setup = iwlagn_rx_handler_setup,
350         .setup_deferred_work = iwlagn_setup_deferred_work,
351         .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
352         .load_ucode = iwlagn_load_ucode,
353         .dump_nic_event_log = iwl_dump_nic_event_log,
354         .dump_nic_error_log = iwl_dump_nic_error_log,
355         .dump_csr = iwl_dump_csr,
356         .dump_fh = iwl_dump_fh,
357         .init_alive_start = iwlagn_init_alive_start,
358         .alive_notify = iwlagn_alive_notify,
359         .send_tx_power = iwlagn_send_tx_power,
360         .update_chain_flags = iwl_update_chain_flags,
361         .set_channel_switch = iwl6000_hw_channel_switch,
362         .apm_ops = {
363                 .init = iwl_apm_init,
364                 .stop = iwl_apm_stop,
365                 .config = iwl6000_nic_config,
366                 .set_pwr_src = iwl_set_pwr_src,
367         },
368         .eeprom_ops = {
369                 .regulatory_bands = {
370                         EEPROM_REG_BAND_1_CHANNELS,
371                         EEPROM_REG_BAND_2_CHANNELS,
372                         EEPROM_REG_BAND_3_CHANNELS,
373                         EEPROM_REG_BAND_4_CHANNELS,
374                         EEPROM_REG_BAND_5_CHANNELS,
375                         EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
376                         EEPROM_REG_BAND_52_HT40_CHANNELS
377                 },
378                 .verify_signature  = iwlcore_eeprom_verify_signature,
379                 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
380                 .release_semaphore = iwlcore_eeprom_release_semaphore,
381                 .calib_version  = iwlagn_eeprom_calib_version,
382                 .query_addr = iwlagn_eeprom_query_addr,
383                 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
384         },
385         .post_associate = iwl_post_associate,
386         .isr = iwl_isr_ict,
387         .config_ap = iwl_config_ap,
388         .temp_ops = {
389                 .temperature = iwlagn_temperature,
390                 .set_ct_kill = iwl6000_set_ct_threshold,
391                 .set_calib_version = iwl6050_set_calib_version,
392          },
393         .add_bcast_station = iwl_add_bcast_station,
394         .debugfs_ops = {
395                 .rx_stats_read = iwl_ucode_rx_stats_read,
396                 .tx_stats_read = iwl_ucode_tx_stats_read,
397                 .general_stats_read = iwl_ucode_general_stats_read,
398         },
399         .recover_from_tx_stall = iwl_bg_monitor_recover,
400         .check_plcp_health = iwl_good_plcp_health,
401         .check_ack_health = iwl_good_ack_health,
402 };
403
404 static const struct iwl_ops iwl6050_ops = {
405         .ucode = &iwlagn_ucode,
406         .lib = &iwl6050_lib,
407         .hcmd = &iwlagn_hcmd,
408         .utils = &iwlagn_hcmd_utils,
409         .led = &iwlagn_led_ops,
410 };
411
412
413 struct iwl_cfg iwl6000g2a_2agn_cfg = {
414         .name = "6000 Series 2x2 AGN Gen2a",
415         .fw_name_pre = IWL6000G2A_FW_PRE,
416         .ucode_api_max = IWL6000G2_UCODE_API_MAX,
417         .ucode_api_min = IWL6000G2_UCODE_API_MIN,
418         .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
419         .ops = &iwl6000_ops,
420         .eeprom_size = OTP_LOW_IMAGE_SIZE,
421         .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
422         .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
423         .num_of_queues = IWLAGN_NUM_QUEUES,
424         .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
425         .mod_params = &iwlagn_mod_params,
426         .valid_tx_ant = ANT_AB,
427         .valid_rx_ant = ANT_AB,
428         .pll_cfg_val = 0,
429         .set_l0s = true,
430         .use_bsm = false,
431         .pa_type = IWL_PA_SYSTEM,
432         .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
433         .shadow_ram_support = true,
434         .ht_greenfield_support = true,
435         .led_compensation = 51,
436         .use_rts_for_ht = true, /* use rts/cts protection */
437         .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
438         .supports_idle = true,
439         .adv_thermal_throttle = true,
440         .support_ct_kill_exit = true,
441         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
442         .chain_noise_scale = 1000,
443         .monitor_recover_period = IWL_MONITORING_PERIOD,
444         .max_event_log_size = 512,
445 };
446
447 /*
448  * "i": Internal configuration, use internal Power Amplifier
449  */
450 struct iwl_cfg iwl6000i_2agn_cfg = {
451         .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
452         .fw_name_pre = IWL6000_FW_PRE,
453         .ucode_api_max = IWL6000_UCODE_API_MAX,
454         .ucode_api_min = IWL6000_UCODE_API_MIN,
455         .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
456         .ops = &iwl6000_ops,
457         .eeprom_size = OTP_LOW_IMAGE_SIZE,
458         .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
459         .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
460         .num_of_queues = IWLAGN_NUM_QUEUES,
461         .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
462         .mod_params = &iwlagn_mod_params,
463         .valid_tx_ant = ANT_BC,
464         .valid_rx_ant = ANT_BC,
465         .pll_cfg_val = 0,
466         .set_l0s = true,
467         .use_bsm = false,
468         .pa_type = IWL_PA_INTERNAL,
469         .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
470         .shadow_ram_support = true,
471         .ht_greenfield_support = true,
472         .led_compensation = 51,
473         .use_rts_for_ht = true, /* use rts/cts protection */
474         .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
475         .supports_idle = true,
476         .adv_thermal_throttle = true,
477         .support_ct_kill_exit = true,
478         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
479         .chain_noise_scale = 1000,
480         .monitor_recover_period = IWL_MONITORING_PERIOD,
481         .max_event_log_size = 1024,
482 };
483
484 struct iwl_cfg iwl6000i_2abg_cfg = {
485         .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
486         .fw_name_pre = IWL6000_FW_PRE,
487         .ucode_api_max = IWL6000_UCODE_API_MAX,
488         .ucode_api_min = IWL6000_UCODE_API_MIN,
489         .sku = IWL_SKU_A|IWL_SKU_G,
490         .ops = &iwl6000_ops,
491         .eeprom_size = OTP_LOW_IMAGE_SIZE,
492         .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
493         .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
494         .num_of_queues = IWLAGN_NUM_QUEUES,
495         .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
496         .mod_params = &iwlagn_mod_params,
497         .valid_tx_ant = ANT_BC,
498         .valid_rx_ant = ANT_BC,
499         .pll_cfg_val = 0,
500         .set_l0s = true,
501         .use_bsm = false,
502         .pa_type = IWL_PA_INTERNAL,
503         .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
504         .shadow_ram_support = true,
505         .led_compensation = 51,
506         .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
507         .supports_idle = true,
508         .adv_thermal_throttle = true,
509         .support_ct_kill_exit = true,
510         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
511         .chain_noise_scale = 1000,
512         .monitor_recover_period = IWL_MONITORING_PERIOD,
513         .max_event_log_size = 1024,
514 };
515
516 struct iwl_cfg iwl6000i_2bg_cfg = {
517         .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
518         .fw_name_pre = IWL6000_FW_PRE,
519         .ucode_api_max = IWL6000_UCODE_API_MAX,
520         .ucode_api_min = IWL6000_UCODE_API_MIN,
521         .sku = IWL_SKU_G,
522         .ops = &iwl6000_ops,
523         .eeprom_size = OTP_LOW_IMAGE_SIZE,
524         .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
525         .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
526         .num_of_queues = IWLAGN_NUM_QUEUES,
527         .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
528         .mod_params = &iwlagn_mod_params,
529         .valid_tx_ant = ANT_BC,
530         .valid_rx_ant = ANT_BC,
531         .pll_cfg_val = 0,
532         .set_l0s = true,
533         .use_bsm = false,
534         .pa_type = IWL_PA_INTERNAL,
535         .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
536         .shadow_ram_support = true,
537         .led_compensation = 51,
538         .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
539         .supports_idle = true,
540         .adv_thermal_throttle = true,
541         .support_ct_kill_exit = true,
542         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
543         .chain_noise_scale = 1000,
544         .monitor_recover_period = IWL_MONITORING_PERIOD,
545         .max_event_log_size = 1024,
546 };
547
548 struct iwl_cfg iwl6050_2agn_cfg = {
549         .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
550         .fw_name_pre = IWL6050_FW_PRE,
551         .ucode_api_max = IWL6050_UCODE_API_MAX,
552         .ucode_api_min = IWL6050_UCODE_API_MIN,
553         .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
554         .ops = &iwl6050_ops,
555         .eeprom_size = OTP_LOW_IMAGE_SIZE,
556         .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
557         .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
558         .num_of_queues = IWLAGN_NUM_QUEUES,
559         .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
560         .mod_params = &iwlagn_mod_params,
561         .valid_tx_ant = ANT_AB,
562         .valid_rx_ant = ANT_AB,
563         .pll_cfg_val = 0,
564         .set_l0s = true,
565         .use_bsm = false,
566         .pa_type = IWL_PA_SYSTEM,
567         .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
568         .shadow_ram_support = true,
569         .ht_greenfield_support = true,
570         .led_compensation = 51,
571         .use_rts_for_ht = true, /* use rts/cts protection */
572         .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
573         .supports_idle = true,
574         .adv_thermal_throttle = true,
575         .support_ct_kill_exit = true,
576         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
577         .chain_noise_scale = 1500,
578         .monitor_recover_period = IWL_MONITORING_PERIOD,
579         .max_event_log_size = 1024,
580 };
581
582 struct iwl_cfg iwl6050_2abg_cfg = {
583         .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
584         .fw_name_pre = IWL6050_FW_PRE,
585         .ucode_api_max = IWL6050_UCODE_API_MAX,
586         .ucode_api_min = IWL6050_UCODE_API_MIN,
587         .sku = IWL_SKU_A|IWL_SKU_G,
588         .ops = &iwl6050_ops,
589         .eeprom_size = OTP_LOW_IMAGE_SIZE,
590         .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
591         .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
592         .num_of_queues = IWLAGN_NUM_QUEUES,
593         .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
594         .mod_params = &iwlagn_mod_params,
595         .valid_tx_ant = ANT_AB,
596         .valid_rx_ant = ANT_AB,
597         .pll_cfg_val = 0,
598         .set_l0s = true,
599         .use_bsm = false,
600         .pa_type = IWL_PA_SYSTEM,
601         .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
602         .shadow_ram_support = true,
603         .led_compensation = 51,
604         .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
605         .supports_idle = true,
606         .adv_thermal_throttle = true,
607         .support_ct_kill_exit = true,
608         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
609         .chain_noise_scale = 1500,
610         .monitor_recover_period = IWL_MONITORING_PERIOD,
611         .max_event_log_size = 1024,
612 };
613
614 struct iwl_cfg iwl6000_3agn_cfg = {
615         .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
616         .fw_name_pre = IWL6000_FW_PRE,
617         .ucode_api_max = IWL6000_UCODE_API_MAX,
618         .ucode_api_min = IWL6000_UCODE_API_MIN,
619         .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
620         .ops = &iwl6000_ops,
621         .eeprom_size = OTP_LOW_IMAGE_SIZE,
622         .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
623         .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
624         .num_of_queues = IWLAGN_NUM_QUEUES,
625         .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
626         .mod_params = &iwlagn_mod_params,
627         .valid_tx_ant = ANT_ABC,
628         .valid_rx_ant = ANT_ABC,
629         .pll_cfg_val = 0,
630         .set_l0s = true,
631         .use_bsm = false,
632         .pa_type = IWL_PA_SYSTEM,
633         .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
634         .shadow_ram_support = true,
635         .ht_greenfield_support = true,
636         .led_compensation = 51,
637         .use_rts_for_ht = true, /* use rts/cts protection */
638         .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
639         .supports_idle = true,
640         .adv_thermal_throttle = true,
641         .support_ct_kill_exit = true,
642         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
643         .chain_noise_scale = 1000,
644         .monitor_recover_period = IWL_MONITORING_PERIOD,
645         .max_event_log_size = 1024,
646 };
647
648 MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
649 MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
650 MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));