1 /******************************************************************************
3 * Copyright(c) 2007 - 2010 Intel Corporation. All rights reserved.
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.
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
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
18 * The full GNU General Public License is included in this distribution in the
19 * file called LICENSE.
21 * Contact Information:
22 * Intel Linux Wireless <ilw@linux.intel.com>
23 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
25 *****************************************************************************/
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/sched.h>
34 #include <linux/skbuff.h>
35 #include <linux/netdevice.h>
36 #include <linux/wireless.h>
37 #include <net/mac80211.h>
38 #include <linux/etherdevice.h>
39 #include <asm/unaligned.h>
41 #include "iwl-eeprom.h"
46 #include "iwl-helpers.h"
48 #include "iwl-agn-led.h"
49 #include "iwl-agn-hw.h"
50 #include "iwl-5000-hw.h"
51 #include "iwl-agn-debugfs.h"
53 /* Highest firmware API version supported */
54 #define IWL5000_UCODE_API_MAX 2
55 #define IWL5150_UCODE_API_MAX 2
57 /* Lowest firmware API version supported */
58 #define IWL5000_UCODE_API_MIN 1
59 #define IWL5150_UCODE_API_MIN 1
61 #define IWL5000_FW_PRE "iwlwifi-5000-"
62 #define _IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE #api ".ucode"
63 #define IWL5000_MODULE_FIRMWARE(api) _IWL5000_MODULE_FIRMWARE(api)
65 #define IWL5150_FW_PRE "iwlwifi-5150-"
66 #define _IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE #api ".ucode"
67 #define IWL5150_MODULE_FIRMWARE(api) _IWL5150_MODULE_FIRMWARE(api)
69 /* NIC configuration for 5000 series */
70 static void iwl5000_nic_config(struct iwl_priv *priv)
75 spin_lock_irqsave(&priv->lock, flags);
77 radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG);
79 /* write radio config values to register */
80 if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) < EEPROM_RF_CONFIG_TYPE_MAX)
81 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
82 EEPROM_RF_CFG_TYPE_MSK(radio_cfg) |
83 EEPROM_RF_CFG_STEP_MSK(radio_cfg) |
84 EEPROM_RF_CFG_DASH_MSK(radio_cfg));
86 /* set CSR_HW_CONFIG_REG for uCode use */
87 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
88 CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI |
89 CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);
91 /* W/A : NIC is stuck in a reset state after Early PCIe power off
92 * (PCIe power is lost before PERST# is asserted),
93 * causing ME FW to lose ownership and not being able to obtain it back.
95 iwl_set_bits_mask_prph(priv, APMG_PS_CTRL_REG,
96 APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS,
97 ~APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS);
100 spin_unlock_irqrestore(&priv->lock, flags);
103 static struct iwl_sensitivity_ranges iwl5000_sensitivity = {
105 .max_nrg_cck = 0, /* not used, set to 0 */
106 .auto_corr_min_ofdm = 90,
107 .auto_corr_min_ofdm_mrc = 170,
108 .auto_corr_min_ofdm_x1 = 120,
109 .auto_corr_min_ofdm_mrc_x1 = 240,
111 .auto_corr_max_ofdm = 120,
112 .auto_corr_max_ofdm_mrc = 210,
113 .auto_corr_max_ofdm_x1 = 120,
114 .auto_corr_max_ofdm_mrc_x1 = 240,
116 .auto_corr_min_cck = 125,
117 .auto_corr_max_cck = 200,
118 .auto_corr_min_cck_mrc = 170,
119 .auto_corr_max_cck_mrc = 400,
123 .barker_corr_th_min = 190,
124 .barker_corr_th_min_mrc = 390,
128 static struct iwl_sensitivity_ranges iwl5150_sensitivity = {
130 .max_nrg_cck = 0, /* not used, set to 0 */
131 .auto_corr_min_ofdm = 90,
132 .auto_corr_min_ofdm_mrc = 170,
133 .auto_corr_min_ofdm_x1 = 105,
134 .auto_corr_min_ofdm_mrc_x1 = 220,
136 .auto_corr_max_ofdm = 120,
137 .auto_corr_max_ofdm_mrc = 210,
138 /* max = min for performance bug in 5150 DSP */
139 .auto_corr_max_ofdm_x1 = 105,
140 .auto_corr_max_ofdm_mrc_x1 = 220,
142 .auto_corr_min_cck = 125,
143 .auto_corr_max_cck = 200,
144 .auto_corr_min_cck_mrc = 170,
145 .auto_corr_max_cck_mrc = 400,
149 .barker_corr_th_min = 190,
150 .barker_corr_th_min_mrc = 390,
154 static void iwl5150_set_ct_threshold(struct iwl_priv *priv)
156 const s32 volt2temp_coef = IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF;
157 s32 threshold = (s32)CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD_LEGACY) -
158 iwl_temp_calib_to_offset(priv);
160 priv->hw_params.ct_kill_threshold = threshold * volt2temp_coef;
163 static void iwl5000_set_ct_threshold(struct iwl_priv *priv)
166 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD_LEGACY;
169 static int iwl5000_hw_set_hw_params(struct iwl_priv *priv)
171 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
172 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
173 priv->cfg->num_of_queues =
174 priv->cfg->mod_params->num_of_queues;
176 priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
177 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
178 priv->hw_params.scd_bc_tbls_size =
179 priv->cfg->num_of_queues *
180 sizeof(struct iwlagn_scd_bc_tbl);
181 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
182 priv->hw_params.max_stations = IWL5000_STATION_COUNT;
183 priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
185 priv->hw_params.max_data_size = IWLAGN_RTC_DATA_SIZE;
186 priv->hw_params.max_inst_size = IWLAGN_RTC_INST_SIZE;
188 priv->hw_params.max_bsm_size = 0;
189 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
190 BIT(IEEE80211_BAND_5GHZ);
191 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
193 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
194 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
195 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
196 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
198 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
199 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
201 /* Set initial sensitivity parameters */
202 /* Set initial calibration set */
203 priv->hw_params.sens = &iwl5000_sensitivity;
204 priv->hw_params.calib_init_cfg =
205 BIT(IWL_CALIB_XTAL) |
207 BIT(IWL_CALIB_TX_IQ) |
208 BIT(IWL_CALIB_TX_IQ_PERD) |
209 BIT(IWL_CALIB_BASE_BAND);
211 priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
216 static int iwl5150_hw_set_hw_params(struct iwl_priv *priv)
218 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
219 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
220 priv->cfg->num_of_queues =
221 priv->cfg->mod_params->num_of_queues;
223 priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
224 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
225 priv->hw_params.scd_bc_tbls_size =
226 priv->cfg->num_of_queues *
227 sizeof(struct iwlagn_scd_bc_tbl);
228 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
229 priv->hw_params.max_stations = IWL5000_STATION_COUNT;
230 priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
232 priv->hw_params.max_data_size = IWLAGN_RTC_DATA_SIZE;
233 priv->hw_params.max_inst_size = IWLAGN_RTC_INST_SIZE;
235 priv->hw_params.max_bsm_size = 0;
236 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
237 BIT(IEEE80211_BAND_5GHZ);
238 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
240 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
241 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
242 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
243 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
245 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
246 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
248 /* Set initial sensitivity parameters */
249 /* Set initial calibration set */
250 priv->hw_params.sens = &iwl5150_sensitivity;
251 priv->hw_params.calib_init_cfg =
254 BIT(IWL_CALIB_TX_IQ) |
255 BIT(IWL_CALIB_BASE_BAND);
257 priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
262 static void iwl5150_temperature(struct iwl_priv *priv)
265 s32 offset = iwl_temp_calib_to_offset(priv);
267 vt = le32_to_cpu(priv->statistics.general.temperature);
268 vt = vt / IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF + offset;
269 /* now vt hold the temperature in Kelvin */
270 priv->temperature = KELVIN_TO_CELSIUS(vt);
271 iwl_tt_handler(priv);
274 static int iwl5000_hw_channel_switch(struct iwl_priv *priv,
275 struct ieee80211_channel_switch *ch_switch)
277 struct iwl5000_channel_switch_cmd cmd;
278 const struct iwl_channel_info *ch_info;
279 u32 switch_time_in_usec, ucode_switch_time;
283 u16 beacon_interval = le16_to_cpu(priv->rxon_timing.beacon_interval);
284 struct ieee80211_vif *vif = priv->vif;
285 struct iwl_host_cmd hcmd = {
286 .id = REPLY_CHANNEL_SWITCH,
288 .flags = CMD_SIZE_HUGE,
292 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
293 ch = ieee80211_frequency_to_channel(ch_switch->channel->center_freq);
294 IWL_DEBUG_11H(priv, "channel switch from %d to %d\n",
295 priv->active_rxon.channel, ch);
296 cmd.channel = cpu_to_le16(ch);
297 cmd.rxon_flags = priv->staging_rxon.flags;
298 cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
299 switch_count = ch_switch->count;
300 tsf_low = ch_switch->timestamp & 0x0ffffffff;
302 * calculate the ucode channel switch time
303 * adding TSF as one of the factor for when to switch
305 if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) {
306 if (switch_count > ((priv->ucode_beacon_time - tsf_low) /
308 switch_count -= (priv->ucode_beacon_time -
309 tsf_low) / beacon_interval;
313 if (switch_count <= 1)
314 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
316 switch_time_in_usec =
317 vif->bss_conf.beacon_int * switch_count * TIME_UNIT;
318 ucode_switch_time = iwl_usecs_to_beacons(priv,
321 cmd.switch_time = iwl_add_beacon_time(priv,
322 priv->ucode_beacon_time,
326 IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
328 ch_info = iwl_get_channel_info(priv, priv->band, ch);
330 cmd.expect_beacon = is_channel_radar(ch_info);
332 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
333 priv->active_rxon.channel, ch);
336 priv->switch_rxon.channel = cmd.channel;
337 priv->switch_rxon.switch_in_progress = true;
339 return iwl_send_cmd_sync(priv, &hcmd);
342 static struct iwl_lib_ops iwl5000_lib = {
343 .set_hw_params = iwl5000_hw_set_hw_params,
344 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
345 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
346 .txq_set_sched = iwlagn_txq_set_sched,
347 .txq_agg_enable = iwlagn_txq_agg_enable,
348 .txq_agg_disable = iwlagn_txq_agg_disable,
349 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
350 .txq_free_tfd = iwl_hw_txq_free_tfd,
351 .txq_init = iwl_hw_tx_queue_init,
352 .rx_handler_setup = iwlagn_rx_handler_setup,
353 .setup_deferred_work = iwlagn_setup_deferred_work,
354 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
355 .dump_nic_event_log = iwl_dump_nic_event_log,
356 .dump_nic_error_log = iwl_dump_nic_error_log,
357 .dump_csr = iwl_dump_csr,
358 .dump_fh = iwl_dump_fh,
359 .load_ucode = iwlagn_load_ucode,
360 .init_alive_start = iwlagn_init_alive_start,
361 .alive_notify = iwlagn_alive_notify,
362 .send_tx_power = iwlagn_send_tx_power,
363 .update_chain_flags = iwl_update_chain_flags,
364 .set_channel_switch = iwl5000_hw_channel_switch,
366 .init = iwl_apm_init,
367 .stop = iwl_apm_stop,
368 .config = iwl5000_nic_config,
369 .set_pwr_src = iwl_set_pwr_src,
372 .regulatory_bands = {
373 EEPROM_REG_BAND_1_CHANNELS,
374 EEPROM_REG_BAND_2_CHANNELS,
375 EEPROM_REG_BAND_3_CHANNELS,
376 EEPROM_REG_BAND_4_CHANNELS,
377 EEPROM_REG_BAND_5_CHANNELS,
378 EEPROM_REG_BAND_24_HT40_CHANNELS,
379 EEPROM_REG_BAND_52_HT40_CHANNELS
381 .verify_signature = iwlcore_eeprom_verify_signature,
382 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
383 .release_semaphore = iwlcore_eeprom_release_semaphore,
384 .calib_version = iwlagn_eeprom_calib_version,
385 .query_addr = iwlagn_eeprom_query_addr,
387 .post_associate = iwl_post_associate,
389 .config_ap = iwl_config_ap,
391 .temperature = iwlagn_temperature,
392 .set_ct_kill = iwl5000_set_ct_threshold,
394 .manage_ibss_station = iwlagn_manage_ibss_station,
396 .rx_stats_read = iwl_ucode_rx_stats_read,
397 .tx_stats_read = iwl_ucode_tx_stats_read,
398 .general_stats_read = iwl_ucode_general_stats_read,
400 .recover_from_tx_stall = iwl_bg_monitor_recover,
401 .check_plcp_health = iwl_good_plcp_health,
402 .check_ack_health = iwl_good_ack_health,
405 static struct iwl_lib_ops iwl5150_lib = {
406 .set_hw_params = iwl5150_hw_set_hw_params,
407 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
408 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
409 .txq_set_sched = iwlagn_txq_set_sched,
410 .txq_agg_enable = iwlagn_txq_agg_enable,
411 .txq_agg_disable = iwlagn_txq_agg_disable,
412 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
413 .txq_free_tfd = iwl_hw_txq_free_tfd,
414 .txq_init = iwl_hw_tx_queue_init,
415 .rx_handler_setup = iwlagn_rx_handler_setup,
416 .setup_deferred_work = iwlagn_setup_deferred_work,
417 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
418 .dump_nic_event_log = iwl_dump_nic_event_log,
419 .dump_nic_error_log = iwl_dump_nic_error_log,
420 .dump_csr = iwl_dump_csr,
421 .load_ucode = iwlagn_load_ucode,
422 .init_alive_start = iwlagn_init_alive_start,
423 .alive_notify = iwlagn_alive_notify,
424 .send_tx_power = iwlagn_send_tx_power,
425 .update_chain_flags = iwl_update_chain_flags,
426 .set_channel_switch = iwl5000_hw_channel_switch,
428 .init = iwl_apm_init,
429 .stop = iwl_apm_stop,
430 .config = iwl5000_nic_config,
431 .set_pwr_src = iwl_set_pwr_src,
434 .regulatory_bands = {
435 EEPROM_REG_BAND_1_CHANNELS,
436 EEPROM_REG_BAND_2_CHANNELS,
437 EEPROM_REG_BAND_3_CHANNELS,
438 EEPROM_REG_BAND_4_CHANNELS,
439 EEPROM_REG_BAND_5_CHANNELS,
440 EEPROM_REG_BAND_24_HT40_CHANNELS,
441 EEPROM_REG_BAND_52_HT40_CHANNELS
443 .verify_signature = iwlcore_eeprom_verify_signature,
444 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
445 .release_semaphore = iwlcore_eeprom_release_semaphore,
446 .calib_version = iwlagn_eeprom_calib_version,
447 .query_addr = iwlagn_eeprom_query_addr,
449 .post_associate = iwl_post_associate,
451 .config_ap = iwl_config_ap,
453 .temperature = iwl5150_temperature,
454 .set_ct_kill = iwl5150_set_ct_threshold,
456 .manage_ibss_station = iwlagn_manage_ibss_station,
458 .rx_stats_read = iwl_ucode_rx_stats_read,
459 .tx_stats_read = iwl_ucode_tx_stats_read,
460 .general_stats_read = iwl_ucode_general_stats_read,
462 .recover_from_tx_stall = iwl_bg_monitor_recover,
463 .check_plcp_health = iwl_good_plcp_health,
464 .check_ack_health = iwl_good_ack_health,
467 static const struct iwl_ops iwl5000_ops = {
469 .hcmd = &iwlagn_hcmd,
470 .utils = &iwlagn_hcmd_utils,
471 .led = &iwlagn_led_ops,
474 static const struct iwl_ops iwl5150_ops = {
476 .hcmd = &iwlagn_hcmd,
477 .utils = &iwlagn_hcmd_utils,
478 .led = &iwlagn_led_ops,
481 struct iwl_cfg iwl5300_agn_cfg = {
482 .name = "Intel(R) Ultimate N WiFi Link 5300 AGN",
483 .fw_name_pre = IWL5000_FW_PRE,
484 .ucode_api_max = IWL5000_UCODE_API_MAX,
485 .ucode_api_min = IWL5000_UCODE_API_MIN,
486 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
488 .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
489 .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
490 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
491 .num_of_queues = IWLAGN_NUM_QUEUES,
492 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
493 .mod_params = &iwlagn_mod_params,
494 .valid_tx_ant = ANT_ABC,
495 .valid_rx_ant = ANT_ABC,
496 .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
499 .ht_greenfield_support = true,
500 .led_compensation = 51,
501 .use_rts_for_ht = true, /* use rts/cts protection */
502 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
503 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
504 .chain_noise_scale = 1000,
505 .monitor_recover_period = IWL_MONITORING_PERIOD,
506 .max_event_log_size = 512,
507 .ucode_tracing = true,
508 .sensitivity_calib_by_driver = true,
509 .chain_noise_calib_by_driver = true,
512 struct iwl_cfg iwl5100_bgn_cfg = {
513 .name = "Intel(R) WiFi Link 5100 BGN",
514 .fw_name_pre = IWL5000_FW_PRE,
515 .ucode_api_max = IWL5000_UCODE_API_MAX,
516 .ucode_api_min = IWL5000_UCODE_API_MIN,
517 .sku = IWL_SKU_G|IWL_SKU_N,
519 .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
520 .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
521 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
522 .num_of_queues = IWLAGN_NUM_QUEUES,
523 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
524 .mod_params = &iwlagn_mod_params,
525 .valid_tx_ant = ANT_B,
526 .valid_rx_ant = ANT_AB,
527 .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
530 .ht_greenfield_support = true,
531 .led_compensation = 51,
532 .use_rts_for_ht = true, /* use rts/cts protection */
533 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
534 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
535 .chain_noise_scale = 1000,
536 .monitor_recover_period = IWL_MONITORING_PERIOD,
537 .max_event_log_size = 512,
538 .ucode_tracing = true,
539 .sensitivity_calib_by_driver = true,
540 .chain_noise_calib_by_driver = true,
543 struct iwl_cfg iwl5100_abg_cfg = {
544 .name = "Intel(R) WiFi Link 5100 ABG",
545 .fw_name_pre = IWL5000_FW_PRE,
546 .ucode_api_max = IWL5000_UCODE_API_MAX,
547 .ucode_api_min = IWL5000_UCODE_API_MIN,
548 .sku = IWL_SKU_A|IWL_SKU_G,
550 .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
551 .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
552 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
553 .num_of_queues = IWLAGN_NUM_QUEUES,
554 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
555 .mod_params = &iwlagn_mod_params,
556 .valid_tx_ant = ANT_B,
557 .valid_rx_ant = ANT_AB,
558 .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
561 .led_compensation = 51,
562 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
563 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
564 .chain_noise_scale = 1000,
565 .monitor_recover_period = IWL_MONITORING_PERIOD,
566 .max_event_log_size = 512,
567 .ucode_tracing = true,
568 .sensitivity_calib_by_driver = true,
569 .chain_noise_calib_by_driver = true,
572 struct iwl_cfg iwl5100_agn_cfg = {
573 .name = "Intel(R) WiFi Link 5100 AGN",
574 .fw_name_pre = IWL5000_FW_PRE,
575 .ucode_api_max = IWL5000_UCODE_API_MAX,
576 .ucode_api_min = IWL5000_UCODE_API_MIN,
577 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
579 .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
580 .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
581 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
582 .num_of_queues = IWLAGN_NUM_QUEUES,
583 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
584 .mod_params = &iwlagn_mod_params,
585 .valid_tx_ant = ANT_B,
586 .valid_rx_ant = ANT_AB,
587 .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
590 .ht_greenfield_support = true,
591 .led_compensation = 51,
592 .use_rts_for_ht = true, /* use rts/cts protection */
593 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
594 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
595 .chain_noise_scale = 1000,
596 .monitor_recover_period = IWL_MONITORING_PERIOD,
597 .max_event_log_size = 512,
598 .ucode_tracing = true,
599 .sensitivity_calib_by_driver = true,
600 .chain_noise_calib_by_driver = true,
603 struct iwl_cfg iwl5350_agn_cfg = {
604 .name = "Intel(R) WiMAX/WiFi Link 5350 AGN",
605 .fw_name_pre = IWL5000_FW_PRE,
606 .ucode_api_max = IWL5000_UCODE_API_MAX,
607 .ucode_api_min = IWL5000_UCODE_API_MIN,
608 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
610 .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
611 .eeprom_ver = EEPROM_5050_EEPROM_VERSION,
612 .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION,
613 .num_of_queues = IWLAGN_NUM_QUEUES,
614 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
615 .mod_params = &iwlagn_mod_params,
616 .valid_tx_ant = ANT_ABC,
617 .valid_rx_ant = ANT_ABC,
618 .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
621 .ht_greenfield_support = true,
622 .led_compensation = 51,
623 .use_rts_for_ht = true, /* use rts/cts protection */
624 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
625 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
626 .chain_noise_scale = 1000,
627 .monitor_recover_period = IWL_MONITORING_PERIOD,
628 .max_event_log_size = 512,
629 .ucode_tracing = true,
630 .sensitivity_calib_by_driver = true,
631 .chain_noise_calib_by_driver = true,
634 struct iwl_cfg iwl5150_agn_cfg = {
635 .name = "Intel(R) WiMAX/WiFi Link 5150 AGN",
636 .fw_name_pre = IWL5150_FW_PRE,
637 .ucode_api_max = IWL5150_UCODE_API_MAX,
638 .ucode_api_min = IWL5150_UCODE_API_MIN,
639 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
641 .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
642 .eeprom_ver = EEPROM_5050_EEPROM_VERSION,
643 .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION,
644 .num_of_queues = IWLAGN_NUM_QUEUES,
645 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
646 .mod_params = &iwlagn_mod_params,
647 .valid_tx_ant = ANT_A,
648 .valid_rx_ant = ANT_AB,
649 .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
652 .ht_greenfield_support = true,
653 .led_compensation = 51,
654 .use_rts_for_ht = true, /* use rts/cts protection */
655 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
656 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
657 .chain_noise_scale = 1000,
658 .monitor_recover_period = IWL_MONITORING_PERIOD,
659 .max_event_log_size = 512,
660 .ucode_tracing = true,
661 .sensitivity_calib_by_driver = true,
662 .chain_noise_calib_by_driver = true,
665 struct iwl_cfg iwl5150_abg_cfg = {
666 .name = "Intel(R) WiMAX/WiFi Link 5150 ABG",
667 .fw_name_pre = IWL5150_FW_PRE,
668 .ucode_api_max = IWL5150_UCODE_API_MAX,
669 .ucode_api_min = IWL5150_UCODE_API_MIN,
670 .sku = IWL_SKU_A|IWL_SKU_G,
672 .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
673 .eeprom_ver = EEPROM_5050_EEPROM_VERSION,
674 .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION,
675 .num_of_queues = IWLAGN_NUM_QUEUES,
676 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
677 .mod_params = &iwlagn_mod_params,
678 .valid_tx_ant = ANT_A,
679 .valid_rx_ant = ANT_AB,
680 .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
683 .led_compensation = 51,
684 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
685 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
686 .chain_noise_scale = 1000,
687 .monitor_recover_period = IWL_MONITORING_PERIOD,
688 .max_event_log_size = 512,
689 .ucode_tracing = true,
690 .sensitivity_calib_by_driver = true,
691 .chain_noise_calib_by_driver = true,
694 MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
695 MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX));