fb7012289c3d2e561c23ffc6dfae8ec4f126beae
[firefly-linux-kernel-4.4.55.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-5000-hw.h"
48 #include "iwl-6000-hw.h"
49 #include "iwl-agn-led.h"
50
51 /* Highest firmware API version supported */
52 #define IWL6000_UCODE_API_MAX 4
53 #define IWL6050_UCODE_API_MAX 4
54
55 /* Lowest firmware API version supported */
56 #define IWL6000_UCODE_API_MIN 4
57 #define IWL6050_UCODE_API_MIN 4
58
59 #define IWL6000_FW_PRE "iwlwifi-6000-"
60 #define _IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE #api ".ucode"
61 #define IWL6000_MODULE_FIRMWARE(api) _IWL6000_MODULE_FIRMWARE(api)
62
63 #define IWL6050_FW_PRE "iwlwifi-6050-"
64 #define _IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE #api ".ucode"
65 #define IWL6050_MODULE_FIRMWARE(api) _IWL6050_MODULE_FIRMWARE(api)
66
67 static void iwl6000_set_ct_threshold(struct iwl_priv *priv)
68 {
69         /* want Celsius */
70         priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD;
71         priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
72 }
73
74 /* Indicate calibration version to uCode. */
75 static void iwl6050_set_calib_version(struct iwl_priv *priv)
76 {
77         if (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6)
78                 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
79                                 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
80 }
81
82 /* NIC configuration for 6000 series */
83 static void iwl6000_nic_config(struct iwl_priv *priv)
84 {
85         u16 radio_cfg;
86
87         radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG);
88
89         /* write radio config values to register */
90         if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) <= EEPROM_RF_CONFIG_TYPE_MAX)
91                 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
92                             EEPROM_RF_CFG_TYPE_MSK(radio_cfg) |
93                             EEPROM_RF_CFG_STEP_MSK(radio_cfg) |
94                             EEPROM_RF_CFG_DASH_MSK(radio_cfg));
95
96         /* set CSR_HW_CONFIG_REG for uCode use */
97         iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
98                     CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI |
99                     CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);
100
101         /* no locking required for register write */
102         if (priv->cfg->pa_type == IWL_PA_INTERNAL) {
103                 /* 2x2 IPA phy type */
104                 iwl_write32(priv, CSR_GP_DRIVER_REG,
105                              CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
106         }
107         /* else do nothing, uCode configured */
108         if (priv->cfg->ops->lib->temp_ops.set_calib_version)
109                 priv->cfg->ops->lib->temp_ops.set_calib_version(priv);
110 }
111
112 static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
113         .min_nrg_cck = 97,
114         .max_nrg_cck = 0, /* not used, set to 0 */
115         .auto_corr_min_ofdm = 80,
116         .auto_corr_min_ofdm_mrc = 128,
117         .auto_corr_min_ofdm_x1 = 105,
118         .auto_corr_min_ofdm_mrc_x1 = 192,
119
120         .auto_corr_max_ofdm = 145,
121         .auto_corr_max_ofdm_mrc = 232,
122         .auto_corr_max_ofdm_x1 = 110,
123         .auto_corr_max_ofdm_mrc_x1 = 232,
124
125         .auto_corr_min_cck = 125,
126         .auto_corr_max_cck = 175,
127         .auto_corr_min_cck_mrc = 160,
128         .auto_corr_max_cck_mrc = 310,
129         .nrg_th_cck = 97,
130         .nrg_th_ofdm = 100,
131
132         .barker_corr_th_min = 190,
133         .barker_corr_th_min_mrc = 390,
134         .nrg_th_cca = 62,
135 };
136
137 static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
138 {
139         if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
140             priv->cfg->mod_params->num_of_queues <= IWL50_NUM_QUEUES)
141                 priv->cfg->num_of_queues =
142                         priv->cfg->mod_params->num_of_queues;
143
144         priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
145         priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
146         priv->hw_params.scd_bc_tbls_size =
147                         priv->cfg->num_of_queues *
148                         sizeof(struct iwl5000_scd_bc_tbl);
149         priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
150         priv->hw_params.max_stations = IWL5000_STATION_COUNT;
151         priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
152
153         priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
154         priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
155
156         priv->hw_params.max_bsm_size = 0;
157         priv->hw_params.ht40_channel =  BIT(IEEE80211_BAND_2GHZ) |
158                                         BIT(IEEE80211_BAND_5GHZ);
159         priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
160
161         priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
162         priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
163         priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
164         priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
165
166         if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
167                 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
168
169         /* Set initial sensitivity parameters */
170         /* Set initial calibration set */
171         priv->hw_params.sens = &iwl6000_sensitivity;
172         switch (priv->hw_rev & CSR_HW_REV_TYPE_MSK) {
173         case CSR_HW_REV_TYPE_6x50:
174                 priv->hw_params.calib_init_cfg =
175                         BIT(IWL_CALIB_XTAL)             |
176                         BIT(IWL_CALIB_DC)               |
177                         BIT(IWL_CALIB_LO)               |
178                         BIT(IWL_CALIB_TX_IQ)            |
179                         BIT(IWL_CALIB_BASE_BAND);
180
181                 break;
182         default:
183                 priv->hw_params.calib_init_cfg =
184                         BIT(IWL_CALIB_XTAL)             |
185                         BIT(IWL_CALIB_LO)               |
186                         BIT(IWL_CALIB_TX_IQ)            |
187                         BIT(IWL_CALIB_BASE_BAND);
188                 break;
189         }
190
191         return 0;
192 }
193
194 static int iwl6000_hw_channel_switch(struct iwl_priv *priv, u16 channel)
195 {
196         struct iwl6000_channel_switch_cmd cmd;
197         const struct iwl_channel_info *ch_info;
198         struct iwl_host_cmd hcmd = {
199                 .id = REPLY_CHANNEL_SWITCH,
200                 .len = sizeof(cmd),
201                 .flags = CMD_SIZE_HUGE,
202                 .data = &cmd,
203         };
204
205         IWL_DEBUG_11H(priv, "channel switch from %d to %d\n",
206                 priv->active_rxon.channel, channel);
207
208         cmd.band = priv->band == IEEE80211_BAND_2GHZ;
209         cmd.channel = cpu_to_le16(channel);
210         cmd.rxon_flags = priv->staging_rxon.flags;
211         cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
212         cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
213         ch_info = iwl_get_channel_info(priv, priv->band, channel);
214         if (ch_info)
215                 cmd.expect_beacon = is_channel_radar(ch_info);
216         else {
217                 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
218                         priv->active_rxon.channel, channel);
219                 return -EFAULT;
220         }
221         priv->switch_rxon.channel = cpu_to_le16(channel);
222         priv->switch_rxon.switch_in_progress = true;
223
224         return iwl_send_cmd_sync(priv, &hcmd);
225 }
226
227 static struct iwl_lib_ops iwl6000_lib = {
228         .set_hw_params = iwl6000_hw_set_hw_params,
229         .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl,
230         .txq_inval_byte_cnt_tbl = iwl5000_txq_inval_byte_cnt_tbl,
231         .txq_set_sched = iwl5000_txq_set_sched,
232         .txq_agg_enable = iwl5000_txq_agg_enable,
233         .txq_agg_disable = iwl5000_txq_agg_disable,
234         .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
235         .txq_free_tfd = iwl_hw_txq_free_tfd,
236         .txq_init = iwl_hw_tx_queue_init,
237         .rx_handler_setup = iwl5000_rx_handler_setup,
238         .setup_deferred_work = iwl5000_setup_deferred_work,
239         .is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr,
240         .load_ucode = iwl5000_load_ucode,
241         .dump_nic_event_log = iwl_dump_nic_event_log,
242         .dump_nic_error_log = iwl_dump_nic_error_log,
243         .dump_csr = iwl_dump_csr,
244         .dump_fh = iwl_dump_fh,
245         .init_alive_start = iwl5000_init_alive_start,
246         .alive_notify = iwl5000_alive_notify,
247         .send_tx_power = iwl5000_send_tx_power,
248         .update_chain_flags = iwl_update_chain_flags,
249         .set_channel_switch = iwl6000_hw_channel_switch,
250         .apm_ops = {
251                 .init = iwl_apm_init,
252                 .stop = iwl_apm_stop,
253                 .config = iwl6000_nic_config,
254                 .set_pwr_src = iwl_set_pwr_src,
255         },
256         .eeprom_ops = {
257                 .regulatory_bands = {
258                         EEPROM_5000_REG_BAND_1_CHANNELS,
259                         EEPROM_5000_REG_BAND_2_CHANNELS,
260                         EEPROM_5000_REG_BAND_3_CHANNELS,
261                         EEPROM_5000_REG_BAND_4_CHANNELS,
262                         EEPROM_5000_REG_BAND_5_CHANNELS,
263                         EEPROM_5000_REG_BAND_24_HT40_CHANNELS,
264                         EEPROM_5000_REG_BAND_52_HT40_CHANNELS
265                 },
266                 .verify_signature  = iwlcore_eeprom_verify_signature,
267                 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
268                 .release_semaphore = iwlcore_eeprom_release_semaphore,
269                 .calib_version  = iwl5000_eeprom_calib_version,
270                 .query_addr = iwl5000_eeprom_query_addr,
271                 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
272         },
273         .post_associate = iwl_post_associate,
274         .isr = iwl_isr_ict,
275         .config_ap = iwl_config_ap,
276         .temp_ops = {
277                 .temperature = iwl5000_temperature,
278                 .set_ct_kill = iwl6000_set_ct_threshold,
279          },
280         .add_bcast_station = iwl_add_bcast_station,
281 };
282
283 static const struct iwl_ops iwl6000_ops = {
284         .ucode = &iwl5000_ucode,
285         .lib = &iwl6000_lib,
286         .hcmd = &iwl5000_hcmd,
287         .utils = &iwl5000_hcmd_utils,
288         .led = &iwlagn_led_ops,
289 };
290
291 static struct iwl_lib_ops iwl6050_lib = {
292         .set_hw_params = iwl6000_hw_set_hw_params,
293         .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl,
294         .txq_inval_byte_cnt_tbl = iwl5000_txq_inval_byte_cnt_tbl,
295         .txq_set_sched = iwl5000_txq_set_sched,
296         .txq_agg_enable = iwl5000_txq_agg_enable,
297         .txq_agg_disable = iwl5000_txq_agg_disable,
298         .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
299         .txq_free_tfd = iwl_hw_txq_free_tfd,
300         .txq_init = iwl_hw_tx_queue_init,
301         .rx_handler_setup = iwl5000_rx_handler_setup,
302         .setup_deferred_work = iwl5000_setup_deferred_work,
303         .is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr,
304         .load_ucode = iwl5000_load_ucode,
305         .dump_nic_event_log = iwl_dump_nic_event_log,
306         .dump_nic_error_log = iwl_dump_nic_error_log,
307         .dump_csr = iwl_dump_csr,
308         .dump_fh = iwl_dump_fh,
309         .init_alive_start = iwl5000_init_alive_start,
310         .alive_notify = iwl5000_alive_notify,
311         .send_tx_power = iwl5000_send_tx_power,
312         .update_chain_flags = iwl_update_chain_flags,
313         .set_channel_switch = iwl6000_hw_channel_switch,
314         .apm_ops = {
315                 .init = iwl_apm_init,
316                 .stop = iwl_apm_stop,
317                 .config = iwl6000_nic_config,
318                 .set_pwr_src = iwl_set_pwr_src,
319         },
320         .eeprom_ops = {
321                 .regulatory_bands = {
322                         EEPROM_5000_REG_BAND_1_CHANNELS,
323                         EEPROM_5000_REG_BAND_2_CHANNELS,
324                         EEPROM_5000_REG_BAND_3_CHANNELS,
325                         EEPROM_5000_REG_BAND_4_CHANNELS,
326                         EEPROM_5000_REG_BAND_5_CHANNELS,
327                         EEPROM_5000_REG_BAND_24_HT40_CHANNELS,
328                         EEPROM_5000_REG_BAND_52_HT40_CHANNELS
329                 },
330                 .verify_signature  = iwlcore_eeprom_verify_signature,
331                 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
332                 .release_semaphore = iwlcore_eeprom_release_semaphore,
333                 .calib_version  = iwl5000_eeprom_calib_version,
334                 .query_addr = iwl5000_eeprom_query_addr,
335                 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
336         },
337         .post_associate = iwl_post_associate,
338         .isr = iwl_isr_ict,
339         .config_ap = iwl_config_ap,
340         .temp_ops = {
341                 .temperature = iwl5000_temperature,
342                 .set_ct_kill = iwl6000_set_ct_threshold,
343                 .set_calib_version = iwl6050_set_calib_version,
344          },
345         .add_bcast_station = iwl_add_bcast_station,
346 };
347
348 static const struct iwl_ops iwl6050_ops = {
349         .ucode = &iwl5000_ucode,
350         .lib = &iwl6050_lib,
351         .hcmd = &iwl5000_hcmd,
352         .utils = &iwl5000_hcmd_utils,
353         .led = &iwlagn_led_ops,
354 };
355
356 /*
357  * "i": Internal configuration, use internal Power Amplifier
358  */
359 struct iwl_cfg iwl6000i_2agn_cfg = {
360         .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
361         .fw_name_pre = IWL6000_FW_PRE,
362         .ucode_api_max = IWL6000_UCODE_API_MAX,
363         .ucode_api_min = IWL6000_UCODE_API_MIN,
364         .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
365         .ops = &iwl6000_ops,
366         .eeprom_size = OTP_LOW_IMAGE_SIZE,
367         .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
368         .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
369         .num_of_queues = IWL50_NUM_QUEUES,
370         .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
371         .mod_params = &iwl50_mod_params,
372         .valid_tx_ant = ANT_BC,
373         .valid_rx_ant = ANT_BC,
374         .pll_cfg_val = 0,
375         .set_l0s = true,
376         .use_bsm = false,
377         .pa_type = IWL_PA_INTERNAL,
378         .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
379         .shadow_ram_support = true,
380         .ht_greenfield_support = true,
381         .led_compensation = 51,
382         .use_rts_for_ht = true, /* use rts/cts protection */
383         .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
384         .supports_idle = true,
385         .adv_thermal_throttle = true,
386         .support_ct_kill_exit = true,
387         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
388         .chain_noise_scale = 1000,
389 };
390
391 struct iwl_cfg iwl6000i_2abg_cfg = {
392         .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
393         .fw_name_pre = IWL6000_FW_PRE,
394         .ucode_api_max = IWL6000_UCODE_API_MAX,
395         .ucode_api_min = IWL6000_UCODE_API_MIN,
396         .sku = IWL_SKU_A|IWL_SKU_G,
397         .ops = &iwl6000_ops,
398         .eeprom_size = OTP_LOW_IMAGE_SIZE,
399         .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
400         .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
401         .num_of_queues = IWL50_NUM_QUEUES,
402         .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
403         .mod_params = &iwl50_mod_params,
404         .valid_tx_ant = ANT_BC,
405         .valid_rx_ant = ANT_BC,
406         .pll_cfg_val = 0,
407         .set_l0s = true,
408         .use_bsm = false,
409         .pa_type = IWL_PA_INTERNAL,
410         .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
411         .shadow_ram_support = true,
412         .ht_greenfield_support = true,
413         .led_compensation = 51,
414         .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
415         .supports_idle = true,
416         .adv_thermal_throttle = true,
417         .support_ct_kill_exit = true,
418         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
419         .chain_noise_scale = 1000,
420 };
421
422 struct iwl_cfg iwl6000i_2bg_cfg = {
423         .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
424         .fw_name_pre = IWL6000_FW_PRE,
425         .ucode_api_max = IWL6000_UCODE_API_MAX,
426         .ucode_api_min = IWL6000_UCODE_API_MIN,
427         .sku = IWL_SKU_G,
428         .ops = &iwl6000_ops,
429         .eeprom_size = OTP_LOW_IMAGE_SIZE,
430         .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
431         .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
432         .num_of_queues = IWL50_NUM_QUEUES,
433         .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
434         .mod_params = &iwl50_mod_params,
435         .valid_tx_ant = ANT_BC,
436         .valid_rx_ant = ANT_BC,
437         .pll_cfg_val = 0,
438         .set_l0s = true,
439         .use_bsm = false,
440         .pa_type = IWL_PA_INTERNAL,
441         .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
442         .shadow_ram_support = true,
443         .ht_greenfield_support = true,
444         .led_compensation = 51,
445         .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
446         .supports_idle = true,
447         .adv_thermal_throttle = true,
448         .support_ct_kill_exit = true,
449         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
450         .chain_noise_scale = 1000,
451 };
452
453 struct iwl_cfg iwl6050_2agn_cfg = {
454         .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
455         .fw_name_pre = IWL6050_FW_PRE,
456         .ucode_api_max = IWL6050_UCODE_API_MAX,
457         .ucode_api_min = IWL6050_UCODE_API_MIN,
458         .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
459         .ops = &iwl6050_ops,
460         .eeprom_size = OTP_LOW_IMAGE_SIZE,
461         .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
462         .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
463         .num_of_queues = IWL50_NUM_QUEUES,
464         .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
465         .mod_params = &iwl50_mod_params,
466         .valid_tx_ant = ANT_AB,
467         .valid_rx_ant = ANT_AB,
468         .pll_cfg_val = 0,
469         .set_l0s = true,
470         .use_bsm = false,
471         .pa_type = IWL_PA_SYSTEM,
472         .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
473         .shadow_ram_support = true,
474         .ht_greenfield_support = true,
475         .led_compensation = 51,
476         .use_rts_for_ht = true, /* use rts/cts protection */
477         .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
478         .supports_idle = true,
479         .adv_thermal_throttle = true,
480         .support_ct_kill_exit = true,
481         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
482         .chain_noise_scale = 1500,
483 };
484
485 struct iwl_cfg iwl6050_2abg_cfg = {
486         .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
487         .fw_name_pre = IWL6050_FW_PRE,
488         .ucode_api_max = IWL6050_UCODE_API_MAX,
489         .ucode_api_min = IWL6050_UCODE_API_MIN,
490         .sku = IWL_SKU_A|IWL_SKU_G,
491         .ops = &iwl6050_ops,
492         .eeprom_size = OTP_LOW_IMAGE_SIZE,
493         .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
494         .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
495         .num_of_queues = IWL50_NUM_QUEUES,
496         .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
497         .mod_params = &iwl50_mod_params,
498         .valid_tx_ant = ANT_AB,
499         .valid_rx_ant = ANT_AB,
500         .pll_cfg_val = 0,
501         .set_l0s = true,
502         .use_bsm = false,
503         .pa_type = IWL_PA_SYSTEM,
504         .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
505         .shadow_ram_support = true,
506         .ht_greenfield_support = true,
507         .led_compensation = 51,
508         .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
509         .supports_idle = true,
510         .adv_thermal_throttle = true,
511         .support_ct_kill_exit = true,
512         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
513         .chain_noise_scale = 1500,
514 };
515
516 struct iwl_cfg iwl6000_3agn_cfg = {
517         .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
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_A|IWL_SKU_G|IWL_SKU_N,
522         .ops = &iwl6000_ops,
523         .eeprom_size = OTP_LOW_IMAGE_SIZE,
524         .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
525         .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
526         .num_of_queues = IWL50_NUM_QUEUES,
527         .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES,
528         .mod_params = &iwl50_mod_params,
529         .valid_tx_ant = ANT_ABC,
530         .valid_rx_ant = ANT_ABC,
531         .pll_cfg_val = 0,
532         .set_l0s = true,
533         .use_bsm = false,
534         .pa_type = IWL_PA_SYSTEM,
535         .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
536         .shadow_ram_support = true,
537         .ht_greenfield_support = true,
538         .led_compensation = 51,
539         .use_rts_for_ht = true, /* use rts/cts protection */
540         .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
541         .supports_idle = true,
542         .adv_thermal_throttle = true,
543         .support_ct_kill_exit = true,
544         .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
545         .chain_noise_scale = 1000,
546 };
547
548 MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
549 MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));