60
59
#define IWL6000G2_UCODE_API_MIN 4
62
61
#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)
62
#define IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE __stringify(api) ".ucode"
66
64
#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)
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)
74
#define IWL6000G2B_FW_PRE "iwlwifi-6000g2b-"
75
#define _IWL6000G2B_MODULE_FIRMWARE(api) IWL6000G2B_FW_PRE #api ".ucode"
76
#define IWL6000G2B_MODULE_FIRMWARE(api) _IWL6000G2B_MODULE_FIRMWARE(api)
65
#define IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE __stringify(api) ".ucode"
67
#define IWL6005_FW_PRE "iwlwifi-6000g2a-"
68
#define IWL6005_MODULE_FIRMWARE(api) IWL6005_FW_PRE __stringify(api) ".ucode"
70
#define IWL6030_FW_PRE "iwlwifi-6000g2b-"
71
#define IWL6030_MODULE_FIRMWARE(api) IWL6030_FW_PRE __stringify(api) ".ucode"
78
73
static void iwl6000_set_ct_threshold(struct iwl_priv *priv)
85
80
static void iwl6050_additional_nic_config(struct iwl_priv *priv)
87
82
/* Indicate calibration version to uCode. */
88
if (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6)
83
if (iwlagn_eeprom_calib_version(priv) >= 6)
89
84
iwl_set_bit(priv, CSR_GP_DRIVER_REG,
90
85
CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
93
static void iwl6050g2_additional_nic_config(struct iwl_priv *priv)
88
static void iwl6150_additional_nic_config(struct iwl_priv *priv)
95
90
/* Indicate calibration version to uCode. */
96
if (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6)
91
if (iwlagn_eeprom_calib_version(priv) >= 6)
97
92
iwl_set_bit(priv, CSR_GP_DRIVER_REG,
98
93
CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
99
94
iwl_set_bit(priv, CSR_GP_DRIVER_REG,
160
155
static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
162
if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
163
priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
157
if (iwlagn_mod_params.num_of_queues >= IWL_MIN_NUM_QUEUES &&
158
iwlagn_mod_params.num_of_queues <= IWLAGN_NUM_QUEUES)
164
159
priv->cfg->base_params->num_of_queues =
165
priv->cfg->mod_params->num_of_queues;
160
iwlagn_mod_params.num_of_queues;
167
162
priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues;
168
163
priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
277
271
ctx->active.channel, ch);
280
priv->switch_rxon.channel = cmd.channel;
281
priv->switch_rxon.switch_in_progress = true;
283
275
return iwl_send_cmd_sync(priv, &hcmd);
286
278
static struct iwl_lib_ops iwl6000_lib = {
287
279
.set_hw_params = iwl6000_hw_set_hw_params,
288
.txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
289
.txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
290
.txq_set_sched = iwlagn_txq_set_sched,
291
.txq_agg_enable = iwlagn_txq_agg_enable,
292
.txq_agg_disable = iwlagn_txq_agg_disable,
293
.txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
294
.txq_free_tfd = iwl_hw_txq_free_tfd,
295
.txq_init = iwl_hw_tx_queue_init,
296
280
.rx_handler_setup = iwlagn_rx_handler_setup,
297
281
.setup_deferred_work = iwlagn_setup_deferred_work,
298
282
.is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
299
.load_ucode = iwlagn_load_ucode,
300
.dump_nic_event_log = iwl_dump_nic_event_log,
301
.dump_nic_error_log = iwl_dump_nic_error_log,
302
.dump_csr = iwl_dump_csr,
303
.dump_fh = iwl_dump_fh,
304
.init_alive_start = iwlagn_init_alive_start,
305
.alive_notify = iwlagn_alive_notify,
306
283
.send_tx_power = iwlagn_send_tx_power,
307
284
.update_chain_flags = iwl_update_chain_flags,
308
285
.set_channel_switch = iwl6000_hw_channel_switch,
320
297
EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
321
298
EEPROM_REG_BAND_52_HT40_CHANNELS
323
.acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
324
.release_semaphore = iwlcore_eeprom_release_semaphore,
325
.calib_version = iwlagn_eeprom_calib_version,
326
300
.query_addr = iwlagn_eeprom_query_addr,
327
301
.update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
331
.free = iwl_free_isr_ict,
332
.alloc = iwl_alloc_isr_ict,
333
.reset = iwl_reset_ict,
334
.disable = iwl_disable_ict,
337
304
.temperature = iwlagn_temperature,
340
.rx_stats_read = iwl_ucode_rx_stats_read,
341
.tx_stats_read = iwl_ucode_tx_stats_read,
342
.general_stats_read = iwl_ucode_general_stats_read,
343
.bt_stats_read = iwl_ucode_bt_stats_read,
344
.reply_tx_error = iwl_reply_tx_error_read,
346
.check_plcp_health = iwl_good_plcp_health,
347
.check_ack_health = iwl_good_ack_health,
348
306
.txfifo_flush = iwlagn_txfifo_flush,
349
307
.dev_txfifo_flush = iwlagn_dev_txfifo_flush,
351
.lower_power_detection = iwl_tt_is_low_power_state,
352
.tt_power_mode = iwl_tt_current_power_mode,
353
.ct_kill_check = iwl_check_for_ct_kill,
357
static struct iwl_lib_ops iwl6000g2b_lib = {
310
static struct iwl_lib_ops iwl6030_lib = {
358
311
.set_hw_params = iwl6000_hw_set_hw_params,
359
.txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
360
.txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
361
.txq_set_sched = iwlagn_txq_set_sched,
362
.txq_agg_enable = iwlagn_txq_agg_enable,
363
.txq_agg_disable = iwlagn_txq_agg_disable,
364
.txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
365
.txq_free_tfd = iwl_hw_txq_free_tfd,
366
.txq_init = iwl_hw_tx_queue_init,
367
312
.rx_handler_setup = iwlagn_bt_rx_handler_setup,
368
313
.setup_deferred_work = iwlagn_bt_setup_deferred_work,
369
314
.cancel_deferred_work = iwlagn_bt_cancel_deferred_work,
370
315
.is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
371
.load_ucode = iwlagn_load_ucode,
372
.dump_nic_event_log = iwl_dump_nic_event_log,
373
.dump_nic_error_log = iwl_dump_nic_error_log,
374
.dump_csr = iwl_dump_csr,
375
.dump_fh = iwl_dump_fh,
376
.init_alive_start = iwlagn_init_alive_start,
377
.alive_notify = iwlagn_alive_notify,
378
316
.send_tx_power = iwlagn_send_tx_power,
379
317
.update_chain_flags = iwl_update_chain_flags,
380
318
.set_channel_switch = iwl6000_hw_channel_switch,
392
330
EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
393
331
EEPROM_REG_BAND_52_HT40_CHANNELS
395
.acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
396
.release_semaphore = iwlcore_eeprom_release_semaphore,
397
.calib_version = iwlagn_eeprom_calib_version,
398
333
.query_addr = iwlagn_eeprom_query_addr,
399
334
.update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
403
.free = iwl_free_isr_ict,
404
.alloc = iwl_alloc_isr_ict,
405
.reset = iwl_reset_ict,
406
.disable = iwl_disable_ict,
409
337
.temperature = iwlagn_temperature,
412
.rx_stats_read = iwl_ucode_rx_stats_read,
413
.tx_stats_read = iwl_ucode_tx_stats_read,
414
.general_stats_read = iwl_ucode_general_stats_read,
415
.bt_stats_read = iwl_ucode_bt_stats_read,
416
.reply_tx_error = iwl_reply_tx_error_read,
418
.check_plcp_health = iwl_good_plcp_health,
419
.check_ack_health = iwl_good_ack_health,
420
339
.txfifo_flush = iwlagn_txfifo_flush,
421
340
.dev_txfifo_flush = iwlagn_dev_txfifo_flush,
423
.lower_power_detection = iwl_tt_is_low_power_state,
424
.tt_power_mode = iwl_tt_current_power_mode,
425
.ct_kill_check = iwl_check_for_ct_kill,
429
343
static struct iwl_nic_ops iwl6050_nic_ops = {
430
344
.additional_nic_config = &iwl6050_additional_nic_config,
433
static struct iwl_nic_ops iwl6050g2_nic_ops = {
434
.additional_nic_config = &iwl6050g2_additional_nic_config,
347
static struct iwl_nic_ops iwl6150_nic_ops = {
348
.additional_nic_config = &iwl6150_additional_nic_config,
437
351
static const struct iwl_ops iwl6000_ops = {
438
352
.lib = &iwl6000_lib,
439
353
.hcmd = &iwlagn_hcmd,
440
354
.utils = &iwlagn_hcmd_utils,
441
.led = &iwlagn_led_ops,
442
.ieee80211_ops = &iwlagn_hw_ops,
445
357
static const struct iwl_ops iwl6050_ops = {
446
358
.lib = &iwl6000_lib,
447
359
.hcmd = &iwlagn_hcmd,
448
360
.utils = &iwlagn_hcmd_utils,
449
.led = &iwlagn_led_ops,
450
361
.nic = &iwl6050_nic_ops,
451
.ieee80211_ops = &iwlagn_hw_ops,
454
static const struct iwl_ops iwl6050g2_ops = {
364
static const struct iwl_ops iwl6150_ops = {
455
365
.lib = &iwl6000_lib,
456
366
.hcmd = &iwlagn_hcmd,
457
367
.utils = &iwlagn_hcmd_utils,
458
.led = &iwlagn_led_ops,
459
.nic = &iwl6050g2_nic_ops,
460
.ieee80211_ops = &iwlagn_hw_ops,
368
.nic = &iwl6150_nic_ops,
463
static const struct iwl_ops iwl6000g2b_ops = {
464
.lib = &iwl6000g2b_lib,
371
static const struct iwl_ops iwl6030_ops = {
465
373
.hcmd = &iwlagn_bt_hcmd,
466
374
.utils = &iwlagn_hcmd_utils,
467
.led = &iwlagn_led_ops,
468
.ieee80211_ops = &iwlagn_hw_ops,
471
377
static struct iwl_base_params iwl6000_base_params = {
473
379
.num_of_queues = IWLAGN_NUM_QUEUES,
474
380
.num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
475
381
.pll_cfg_val = 0,
478
382
.max_ll_items = OTP_MAX_LL_ITEMS_6x00,
479
383
.shadow_ram_support = true,
480
384
.led_compensation = 51,
481
385
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
482
.supports_idle = true,
483
386
.adv_thermal_throttle = true,
484
387
.support_ct_kill_exit = true,
485
388
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
486
389
.chain_noise_scale = 1000,
487
390
.wd_timeout = IWL_DEF_WD_TIMEOUT,
488
391
.max_event_log_size = 512,
489
.ucode_tracing = true,
490
.sensitivity_calib_by_driver = true,
491
.chain_noise_calib_by_driver = true,
492
392
.shadow_reg_enable = true,
497
397
.num_of_queues = IWLAGN_NUM_QUEUES,
498
398
.num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
499
399
.pll_cfg_val = 0,
502
400
.max_ll_items = OTP_MAX_LL_ITEMS_6x50,
503
401
.shadow_ram_support = true,
504
402
.led_compensation = 51,
505
403
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
506
.supports_idle = true,
507
404
.adv_thermal_throttle = true,
508
405
.support_ct_kill_exit = true,
509
406
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
510
407
.chain_noise_scale = 1500,
511
408
.wd_timeout = IWL_DEF_WD_TIMEOUT,
512
409
.max_event_log_size = 1024,
513
.ucode_tracing = true,
514
.sensitivity_calib_by_driver = true,
515
.chain_noise_calib_by_driver = true,
516
410
.shadow_reg_enable = true,
518
412
static struct iwl_base_params iwl6000_g2_base_params = {
520
414
.num_of_queues = IWLAGN_NUM_QUEUES,
521
415
.num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
522
416
.pll_cfg_val = 0,
525
417
.max_ll_items = OTP_MAX_LL_ITEMS_6x00,
526
418
.shadow_ram_support = true,
527
419
.led_compensation = 57,
528
420
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
529
.supports_idle = true,
530
421
.adv_thermal_throttle = true,
531
422
.support_ct_kill_exit = true,
532
423
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
533
424
.chain_noise_scale = 1000,
534
425
.wd_timeout = IWL_LONG_WD_TIMEOUT,
535
426
.max_event_log_size = 512,
536
.ucode_tracing = true,
537
.sensitivity_calib_by_driver = true,
538
.chain_noise_calib_by_driver = true,
539
427
.shadow_reg_enable = true,
557
444
#define IWL_DEVICE_6005 \
558
.fw_name_pre = IWL6000G2A_FW_PRE, \
445
.fw_name_pre = IWL6005_FW_PRE, \
559
446
.ucode_api_max = IWL6000G2_UCODE_API_MAX, \
560
447
.ucode_api_min = IWL6000G2_UCODE_API_MIN, \
561
.eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, \
562
.eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, \
448
.eeprom_ver = EEPROM_6005_EEPROM_VERSION, \
449
.eeprom_calib_ver = EEPROM_6005_TX_POWER_VERSION, \
563
450
.ops = &iwl6000_ops, \
564
.mod_params = &iwlagn_mod_params, \
565
451
.base_params = &iwl6000_g2_base_params, \
566
452
.need_dc_calib = true, \
567
453
.need_temp_offset_calib = true, \
586
472
#define IWL_DEVICE_6030 \
587
.fw_name_pre = IWL6000G2B_FW_PRE, \
473
.fw_name_pre = IWL6030_FW_PRE, \
588
474
.ucode_api_max = IWL6000G2_UCODE_API_MAX, \
589
475
.ucode_api_min = IWL6000G2_UCODE_API_MIN, \
590
.eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, \
591
.eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, \
592
.ops = &iwl6000g2b_ops, \
593
.mod_params = &iwlagn_mod_params, \
476
.eeprom_ver = EEPROM_6030_EEPROM_VERSION, \
477
.eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
478
.ops = &iwl6030_ops, \
594
479
.base_params = &iwl6000_g2_base_params, \
595
480
.bt_params = &iwl6000_bt_params, \
596
481
.need_dc_calib = true, \
508
struct iwl_cfg iwl6035_2agn_cfg = {
509
.name = "6035 Series 2x2 AGN/BT",
511
.ht_params = &iwl6000_ht_params,
514
struct iwl_cfg iwl6035_2abg_cfg = {
515
.name = "6035 Series 2x2 ABG/BT",
519
struct iwl_cfg iwl6035_2bg_cfg = {
520
.name = "6035 Series 2x2 BG/BT",
623
524
struct iwl_cfg iwl1030_bgn_cfg = {
624
525
.name = "Intel(R) Centrino(R) Wireless-N 1030 BGN",
605
#define IWL_DEVICE_6150 \
606
.fw_name_pre = IWL6050_FW_PRE, \
607
.ucode_api_max = IWL6050_UCODE_API_MAX, \
608
.ucode_api_min = IWL6050_UCODE_API_MIN, \
609
.ops = &iwl6150_ops, \
610
.eeprom_ver = EEPROM_6150_EEPROM_VERSION, \
611
.eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION, \
612
.base_params = &iwl6050_base_params, \
613
.need_dc_calib = true, \
614
.led_mode = IWL_LED_BLINK, \
615
.internal_wimax_coex = true
706
617
struct iwl_cfg iwl6150_bgn_cfg = {
707
618
.name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN",
708
.fw_name_pre = IWL6050_FW_PRE,
709
.ucode_api_max = IWL6050_UCODE_API_MAX,
710
.ucode_api_min = IWL6050_UCODE_API_MIN,
711
.eeprom_ver = EEPROM_6050G2_EEPROM_VERSION,
712
.eeprom_calib_ver = EEPROM_6050G2_TX_POWER_VERSION,
713
.ops = &iwl6050g2_ops,
714
.mod_params = &iwlagn_mod_params,
715
.base_params = &iwl6050_base_params,
716
620
.ht_params = &iwl6000_ht_params,
717
.need_dc_calib = true,
718
.led_mode = IWL_LED_RF_STATE,
719
.internal_wimax_coex = true,
623
struct iwl_cfg iwl6150_bg_cfg = {
624
.name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BG",
722
628
struct iwl_cfg iwl6000_3agn_cfg = {