]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/net/wireless/iwlwifi/iwl-6000.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad...
[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         .manage_ibss_station = iwlagn_manage_ibss_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         .lib = &iwl6000_lib,
333         .hcmd = &iwlagn_hcmd,
334         .utils = &iwlagn_hcmd_utils,
335         .led = &iwlagn_led_ops,
336 };
337
338 static struct iwl_lib_ops iwl6050_lib = {
339         .set_hw_params = iwl6050_hw_set_hw_params,
340         .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
341         .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
342         .txq_set_sched = iwlagn_txq_set_sched,
343         .txq_agg_enable = iwlagn_txq_agg_enable,
344         .txq_agg_disable = iwlagn_txq_agg_disable,
345         .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
346         .txq_free_tfd = iwl_hw_txq_free_tfd,
347         .txq_init = iwl_hw_tx_queue_init,
348         .rx_handler_setup = iwlagn_rx_handler_setup,
349         .setup_deferred_work = iwlagn_setup_deferred_work,
350         .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
351         .load_ucode = iwlagn_load_ucode,
352         .dump_nic_event_log = iwl_dump_nic_event_log,
353         .dump_nic_error_log = iwl_dump_nic_error_log,
354         .dump_csr = iwl_dump_csr,
355         .dump_fh = iwl_dump_fh,
356         .init_alive_start = iwlagn_init_alive_start,
357         .alive_notify = iwlagn_alive_notify,
358         .send_tx_power = iwlagn_send_tx_power,
359         .update_chain_flags = iwl_update_chain_flags,
360         .set_channel_switch = iwl6000_hw_channel_switch,
361         .apm_ops = {
362                 .init = iwl_apm_init,
363                 .stop = iwl_apm_stop,
364                 .config = iwl6000_nic_config,
365                 .set_pwr_src = iwl_set_pwr_src,
366         },
367         .eeprom_ops = {
368                 .regulatory_bands = {
369                         EEPROM_REG_BAND_1_CHANNELS,
370                         EEPROM_REG_BAND_2_CHANNELS,
371                         EEPROM_REG_BAND_3_CHANNELS,
372                         EEPROM_REG_BAND_4_CHANNELS,
373                         EEPROM_REG_BAND_5_CHANNELS,
374                         EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
375                         EEPROM_REG_BAND_52_HT40_CHANNELS
376                 },
377                 .verify_signature  = iwlcore_eeprom_verify_signature,
378                 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
379                 .release_semaphore = iwlcore_eeprom_release_semaphore,
380                 .calib_version  = iwlagn_eeprom_calib_version,
381                 .query_addr = iwlagn_eeprom_query_addr,
382                 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
383         },
384         .post_associate = iwl_post_associate,
385         .isr = iwl_isr_ict,
386         .config_ap = iwl_config_ap,
387         .temp_ops = {
388                 .temperature = iwlagn_temperature,
389                 .set_ct_kill = iwl6000_set_ct_threshold,
390                 .set_calib_version = iwl6050_set_calib_version,
391          },
392         .manage_ibss_station = iwlagn_manage_ibss_station,
393         .debugfs_ops = {
394                 .rx_stats_read = iwl_ucode_rx_stats_read,
395                 .tx_stats_read = iwl_ucode_tx_stats_read,
396                 .general_stats_read = iwl_ucode_general_stats_read,
397         },
398         .recover_from_tx_stall = iwl_bg_monitor_recover,
399         .check_plcp_health = iwl_good_plcp_health,
400         .check_ack_health = iwl_good_ack_health,
401 };
402
403 static const struct iwl_ops iwl6050_ops = {
404         .lib = &iwl6050_lib,
405         .hcmd = &iwlagn_hcmd,
406         .utils = &iwlagn_hcmd_utils,
407         .led = &iwlagn_led_ops,
408 };
409
410
411 struct iwl_cfg iwl6000g2a_2agn_cfg = {
412         .name = "6000 Series 2x2 AGN Gen2a",
413         .fw_name_pre = IWL6000G2A_FW_PRE,
414         .ucode_api_max = IWL6000G2_UCODE_API_MAX,
415         .ucode_api_min = IWL6000G2_UCODE_API_MIN,
416         .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
417         .ops = &iwl6000_ops,
418         .eeprom_size = OTP_LOW_IMAGE_SIZE,
419         .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
420         .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
421         .num_of_queues = IWLAGN_NUM_QUEUES,
422         .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
423         .mod_params = &iwlagn_mod_params,
424         .valid_tx_ant = ANT_AB,
425         .valid_rx_ant = ANT_AB,
426         .pll_cfg_val = 0,
427         .set_l0s = true,
428         .use_bsm = false,
429         .pa_type = IWL_PA_SYSTEM,
430         .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
431         .shadow_ram_support = true,
432         .ht_greenfield_support = true,
433         .led_compensation = 51,
434         .use_rts_for_ht = true, /* use rts/cts protection */
435         .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
436         .supports_idle = true,
437         .adv_thermal_throttle = true,
438         .support_ct_kill_exit = true,
439         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
440         .chain_noise_scale = 1000,
441         .monitor_recover_period = IWL_MONITORING_PERIOD,
442         .max_event_log_size = 512,
443         .ucode_tracing = true,
444         .sensitivity_calib_by_driver = true,
445         .chain_noise_calib_by_driver = true,
446 };
447
448 /*
449  * "i": Internal configuration, use internal Power Amplifier
450  */
451 struct iwl_cfg iwl6000i_2agn_cfg = {
452         .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
453         .fw_name_pre = IWL6000_FW_PRE,
454         .ucode_api_max = IWL6000_UCODE_API_MAX,
455         .ucode_api_min = IWL6000_UCODE_API_MIN,
456         .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
457         .ops = &iwl6000_ops,
458         .eeprom_size = OTP_LOW_IMAGE_SIZE,
459         .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
460         .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
461         .num_of_queues = IWLAGN_NUM_QUEUES,
462         .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
463         .mod_params = &iwlagn_mod_params,
464         .valid_tx_ant = ANT_BC,
465         .valid_rx_ant = ANT_BC,
466         .pll_cfg_val = 0,
467         .set_l0s = true,
468         .use_bsm = false,
469         .pa_type = IWL_PA_INTERNAL,
470         .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
471         .shadow_ram_support = true,
472         .ht_greenfield_support = true,
473         .led_compensation = 51,
474         .use_rts_for_ht = true, /* use rts/cts protection */
475         .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
476         .supports_idle = true,
477         .adv_thermal_throttle = true,
478         .support_ct_kill_exit = true,
479         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
480         .chain_noise_scale = 1000,
481         .monitor_recover_period = IWL_MONITORING_PERIOD,
482         .max_event_log_size = 1024,
483         .ucode_tracing = true,
484         .sensitivity_calib_by_driver = true,
485         .chain_noise_calib_by_driver = true,
486 };
487
488 struct iwl_cfg iwl6000i_2abg_cfg = {
489         .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
490         .fw_name_pre = IWL6000_FW_PRE,
491         .ucode_api_max = IWL6000_UCODE_API_MAX,
492         .ucode_api_min = IWL6000_UCODE_API_MIN,
493         .sku = IWL_SKU_A|IWL_SKU_G,
494         .ops = &iwl6000_ops,
495         .eeprom_size = OTP_LOW_IMAGE_SIZE,
496         .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
497         .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
498         .num_of_queues = IWLAGN_NUM_QUEUES,
499         .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
500         .mod_params = &iwlagn_mod_params,
501         .valid_tx_ant = ANT_BC,
502         .valid_rx_ant = ANT_BC,
503         .pll_cfg_val = 0,
504         .set_l0s = true,
505         .use_bsm = false,
506         .pa_type = IWL_PA_INTERNAL,
507         .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
508         .shadow_ram_support = true,
509         .led_compensation = 51,
510         .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
511         .supports_idle = true,
512         .adv_thermal_throttle = true,
513         .support_ct_kill_exit = true,
514         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
515         .chain_noise_scale = 1000,
516         .monitor_recover_period = IWL_MONITORING_PERIOD,
517         .max_event_log_size = 1024,
518         .ucode_tracing = true,
519         .sensitivity_calib_by_driver = true,
520         .chain_noise_calib_by_driver = true,
521 };
522
523 struct iwl_cfg iwl6000i_2bg_cfg = {
524         .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
525         .fw_name_pre = IWL6000_FW_PRE,
526         .ucode_api_max = IWL6000_UCODE_API_MAX,
527         .ucode_api_min = IWL6000_UCODE_API_MIN,
528         .sku = IWL_SKU_G,
529         .ops = &iwl6000_ops,
530         .eeprom_size = OTP_LOW_IMAGE_SIZE,
531         .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
532         .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
533         .num_of_queues = IWLAGN_NUM_QUEUES,
534         .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
535         .mod_params = &iwlagn_mod_params,
536         .valid_tx_ant = ANT_BC,
537         .valid_rx_ant = ANT_BC,
538         .pll_cfg_val = 0,
539         .set_l0s = true,
540         .use_bsm = false,
541         .pa_type = IWL_PA_INTERNAL,
542         .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
543         .shadow_ram_support = true,
544         .led_compensation = 51,
545         .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
546         .supports_idle = true,
547         .adv_thermal_throttle = true,
548         .support_ct_kill_exit = true,
549         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
550         .chain_noise_scale = 1000,
551         .monitor_recover_period = IWL_MONITORING_PERIOD,
552         .max_event_log_size = 1024,
553         .ucode_tracing = true,
554         .sensitivity_calib_by_driver = true,
555         .chain_noise_calib_by_driver = true,
556 };
557
558 struct iwl_cfg iwl6050_2agn_cfg = {
559         .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
560         .fw_name_pre = IWL6050_FW_PRE,
561         .ucode_api_max = IWL6050_UCODE_API_MAX,
562         .ucode_api_min = IWL6050_UCODE_API_MIN,
563         .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
564         .ops = &iwl6050_ops,
565         .eeprom_size = OTP_LOW_IMAGE_SIZE,
566         .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
567         .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
568         .num_of_queues = IWLAGN_NUM_QUEUES,
569         .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
570         .mod_params = &iwlagn_mod_params,
571         .valid_tx_ant = ANT_AB,
572         .valid_rx_ant = ANT_AB,
573         .pll_cfg_val = 0,
574         .set_l0s = true,
575         .use_bsm = false,
576         .pa_type = IWL_PA_SYSTEM,
577         .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
578         .shadow_ram_support = true,
579         .ht_greenfield_support = true,
580         .led_compensation = 51,
581         .use_rts_for_ht = true, /* use rts/cts protection */
582         .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
583         .supports_idle = true,
584         .adv_thermal_throttle = true,
585         .support_ct_kill_exit = true,
586         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
587         .chain_noise_scale = 1500,
588         .monitor_recover_period = IWL_MONITORING_PERIOD,
589         .max_event_log_size = 1024,
590         .ucode_tracing = true,
591         .sensitivity_calib_by_driver = true,
592         .chain_noise_calib_by_driver = true,
593 };
594
595 struct iwl_cfg iwl6050_2abg_cfg = {
596         .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
597         .fw_name_pre = IWL6050_FW_PRE,
598         .ucode_api_max = IWL6050_UCODE_API_MAX,
599         .ucode_api_min = IWL6050_UCODE_API_MIN,
600         .sku = IWL_SKU_A|IWL_SKU_G,
601         .ops = &iwl6050_ops,
602         .eeprom_size = OTP_LOW_IMAGE_SIZE,
603         .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
604         .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
605         .num_of_queues = IWLAGN_NUM_QUEUES,
606         .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
607         .mod_params = &iwlagn_mod_params,
608         .valid_tx_ant = ANT_AB,
609         .valid_rx_ant = ANT_AB,
610         .pll_cfg_val = 0,
611         .set_l0s = true,
612         .use_bsm = false,
613         .pa_type = IWL_PA_SYSTEM,
614         .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
615         .shadow_ram_support = true,
616         .led_compensation = 51,
617         .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
618         .supports_idle = true,
619         .adv_thermal_throttle = true,
620         .support_ct_kill_exit = true,
621         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
622         .chain_noise_scale = 1500,
623         .monitor_recover_period = IWL_MONITORING_PERIOD,
624         .max_event_log_size = 1024,
625         .ucode_tracing = true,
626         .sensitivity_calib_by_driver = true,
627         .chain_noise_calib_by_driver = true,
628 };
629
630 struct iwl_cfg iwl6000_3agn_cfg = {
631         .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
632         .fw_name_pre = IWL6000_FW_PRE,
633         .ucode_api_max = IWL6000_UCODE_API_MAX,
634         .ucode_api_min = IWL6000_UCODE_API_MIN,
635         .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
636         .ops = &iwl6000_ops,
637         .eeprom_size = OTP_LOW_IMAGE_SIZE,
638         .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
639         .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
640         .num_of_queues = IWLAGN_NUM_QUEUES,
641         .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
642         .mod_params = &iwlagn_mod_params,
643         .valid_tx_ant = ANT_ABC,
644         .valid_rx_ant = ANT_ABC,
645         .pll_cfg_val = 0,
646         .set_l0s = true,
647         .use_bsm = false,
648         .pa_type = IWL_PA_SYSTEM,
649         .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
650         .shadow_ram_support = true,
651         .ht_greenfield_support = true,
652         .led_compensation = 51,
653         .use_rts_for_ht = true, /* use rts/cts protection */
654         .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
655         .supports_idle = true,
656         .adv_thermal_throttle = true,
657         .support_ct_kill_exit = true,
658         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
659         .chain_noise_scale = 1000,
660         .monitor_recover_period = IWL_MONITORING_PERIOD,
661         .max_event_log_size = 1024,
662         .ucode_tracing = true,
663         .sensitivity_calib_by_driver = true,
664         .chain_noise_calib_by_driver = true,
665 };
666
667 MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
668 MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
669 MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));