diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-04-25 18:41:43 -0400 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-05-10 18:08:48 -0400 |
commit | 65d1f89682acf4d61dec7a8b771ed34afb7c17d9 (patch) | |
tree | cf050f3e3056eef5e87545c3c44cc41166e1b05c /drivers/net/wireless | |
parent | 6e5c800e75fad95f2a12d45d9b548b23834a13ff (diff) |
iwlwifi: use cfg to configure calibration operation
sensitivity calibration and chain noise calibration are not available
for all the devices; use .cfg to configure the availability of those
calibration functions
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-1000.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 13 |
6 files changed, 44 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c index f9f8a567593d..4d360d74b0cd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-1000.c +++ b/drivers/net/wireless/iwlwifi/iwl-1000.c | |||
@@ -261,6 +261,8 @@ struct iwl_cfg iwl1000_bgn_cfg = { | |||
261 | .monitor_recover_period = IWL_MONITORING_PERIOD, | 261 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
262 | .max_event_log_size = 128, | 262 | .max_event_log_size = 128, |
263 | .ucode_tracing = true, | 263 | .ucode_tracing = true, |
264 | .sensitivity_calib_by_driver = true, | ||
265 | .chain_noise_calib_by_driver = true, | ||
264 | }; | 266 | }; |
265 | 267 | ||
266 | struct iwl_cfg iwl1000_bg_cfg = { | 268 | struct iwl_cfg iwl1000_bg_cfg = { |
@@ -291,6 +293,8 @@ struct iwl_cfg iwl1000_bg_cfg = { | |||
291 | .monitor_recover_period = IWL_MONITORING_PERIOD, | 293 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
292 | .max_event_log_size = 128, | 294 | .max_event_log_size = 128, |
293 | .ucode_tracing = true, | 295 | .ucode_tracing = true, |
296 | .sensitivity_calib_by_driver = true, | ||
297 | .chain_noise_calib_by_driver = true, | ||
294 | }; | 298 | }; |
295 | 299 | ||
296 | MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); | 300 | MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index a756fd4838d0..6b0ae74546dd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -2264,6 +2264,8 @@ struct iwl_cfg iwl4965_agn_cfg = { | |||
2264 | .max_event_log_size = 512, | 2264 | .max_event_log_size = 512, |
2265 | .tx_power_by_driver = true, | 2265 | .tx_power_by_driver = true, |
2266 | .ucode_tracing = true, | 2266 | .ucode_tracing = true, |
2267 | .sensitivity_calib_by_driver = true, | ||
2268 | .chain_noise_calib_by_driver = true, | ||
2267 | /* | 2269 | /* |
2268 | * Force use of chains B and C for scan RX on 5 GHz band | 2270 | * Force use of chains B and C for scan RX on 5 GHz band |
2269 | * because the device has off-channel reception on chain A. | 2271 | * because the device has off-channel reception on chain A. |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index c32db4956821..8ed616e59631 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -467,6 +467,8 @@ struct iwl_cfg iwl5300_agn_cfg = { | |||
467 | .monitor_recover_period = IWL_MONITORING_PERIOD, | 467 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
468 | .max_event_log_size = 512, | 468 | .max_event_log_size = 512, |
469 | .ucode_tracing = true, | 469 | .ucode_tracing = true, |
470 | .sensitivity_calib_by_driver = true, | ||
471 | .chain_noise_calib_by_driver = true, | ||
470 | }; | 472 | }; |
471 | 473 | ||
472 | struct iwl_cfg iwl5100_bgn_cfg = { | 474 | struct iwl_cfg iwl5100_bgn_cfg = { |
@@ -496,6 +498,8 @@ struct iwl_cfg iwl5100_bgn_cfg = { | |||
496 | .monitor_recover_period = IWL_MONITORING_PERIOD, | 498 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
497 | .max_event_log_size = 512, | 499 | .max_event_log_size = 512, |
498 | .ucode_tracing = true, | 500 | .ucode_tracing = true, |
501 | .sensitivity_calib_by_driver = true, | ||
502 | .chain_noise_calib_by_driver = true, | ||
499 | }; | 503 | }; |
500 | 504 | ||
501 | struct iwl_cfg iwl5100_abg_cfg = { | 505 | struct iwl_cfg iwl5100_abg_cfg = { |
@@ -523,6 +527,8 @@ struct iwl_cfg iwl5100_abg_cfg = { | |||
523 | .monitor_recover_period = IWL_MONITORING_PERIOD, | 527 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
524 | .max_event_log_size = 512, | 528 | .max_event_log_size = 512, |
525 | .ucode_tracing = true, | 529 | .ucode_tracing = true, |
530 | .sensitivity_calib_by_driver = true, | ||
531 | .chain_noise_calib_by_driver = true, | ||
526 | }; | 532 | }; |
527 | 533 | ||
528 | struct iwl_cfg iwl5100_agn_cfg = { | 534 | struct iwl_cfg iwl5100_agn_cfg = { |
@@ -552,6 +558,8 @@ struct iwl_cfg iwl5100_agn_cfg = { | |||
552 | .monitor_recover_period = IWL_MONITORING_PERIOD, | 558 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
553 | .max_event_log_size = 512, | 559 | .max_event_log_size = 512, |
554 | .ucode_tracing = true, | 560 | .ucode_tracing = true, |
561 | .sensitivity_calib_by_driver = true, | ||
562 | .chain_noise_calib_by_driver = true, | ||
555 | }; | 563 | }; |
556 | 564 | ||
557 | struct iwl_cfg iwl5350_agn_cfg = { | 565 | struct iwl_cfg iwl5350_agn_cfg = { |
@@ -581,6 +589,8 @@ struct iwl_cfg iwl5350_agn_cfg = { | |||
581 | .monitor_recover_period = IWL_MONITORING_PERIOD, | 589 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
582 | .max_event_log_size = 512, | 590 | .max_event_log_size = 512, |
583 | .ucode_tracing = true, | 591 | .ucode_tracing = true, |
592 | .sensitivity_calib_by_driver = true, | ||
593 | .chain_noise_calib_by_driver = true, | ||
584 | }; | 594 | }; |
585 | 595 | ||
586 | struct iwl_cfg iwl5150_agn_cfg = { | 596 | struct iwl_cfg iwl5150_agn_cfg = { |
@@ -610,6 +620,8 @@ struct iwl_cfg iwl5150_agn_cfg = { | |||
610 | .monitor_recover_period = IWL_MONITORING_PERIOD, | 620 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
611 | .max_event_log_size = 512, | 621 | .max_event_log_size = 512, |
612 | .ucode_tracing = true, | 622 | .ucode_tracing = true, |
623 | .sensitivity_calib_by_driver = true, | ||
624 | .chain_noise_calib_by_driver = true, | ||
613 | }; | 625 | }; |
614 | 626 | ||
615 | struct iwl_cfg iwl5150_abg_cfg = { | 627 | struct iwl_cfg iwl5150_abg_cfg = { |
@@ -637,6 +649,8 @@ struct iwl_cfg iwl5150_abg_cfg = { | |||
637 | .monitor_recover_period = IWL_MONITORING_PERIOD, | 649 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
638 | .max_event_log_size = 512, | 650 | .max_event_log_size = 512, |
639 | .ucode_tracing = true, | 651 | .ucode_tracing = true, |
652 | .sensitivity_calib_by_driver = true, | ||
653 | .chain_noise_calib_by_driver = true, | ||
640 | }; | 654 | }; |
641 | 655 | ||
642 | MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX)); | 656 | MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index 7cd45fe9b775..b69fa36fb87a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -443,6 +443,8 @@ struct iwl_cfg iwl6000g2a_2agn_cfg = { | |||
443 | .monitor_recover_period = IWL_MONITORING_PERIOD, | 443 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
444 | .max_event_log_size = 512, | 444 | .max_event_log_size = 512, |
445 | .ucode_tracing = true, | 445 | .ucode_tracing = true, |
446 | .sensitivity_calib_by_driver = true, | ||
447 | .chain_noise_calib_by_driver = true, | ||
446 | }; | 448 | }; |
447 | 449 | ||
448 | /* | 450 | /* |
@@ -481,6 +483,8 @@ struct iwl_cfg iwl6000i_2agn_cfg = { | |||
481 | .monitor_recover_period = IWL_MONITORING_PERIOD, | 483 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
482 | .max_event_log_size = 1024, | 484 | .max_event_log_size = 1024, |
483 | .ucode_tracing = true, | 485 | .ucode_tracing = true, |
486 | .sensitivity_calib_by_driver = true, | ||
487 | .chain_noise_calib_by_driver = true, | ||
484 | }; | 488 | }; |
485 | 489 | ||
486 | struct iwl_cfg iwl6000i_2abg_cfg = { | 490 | struct iwl_cfg iwl6000i_2abg_cfg = { |
@@ -514,6 +518,8 @@ struct iwl_cfg iwl6000i_2abg_cfg = { | |||
514 | .monitor_recover_period = IWL_MONITORING_PERIOD, | 518 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
515 | .max_event_log_size = 1024, | 519 | .max_event_log_size = 1024, |
516 | .ucode_tracing = true, | 520 | .ucode_tracing = true, |
521 | .sensitivity_calib_by_driver = true, | ||
522 | .chain_noise_calib_by_driver = true, | ||
517 | }; | 523 | }; |
518 | 524 | ||
519 | struct iwl_cfg iwl6000i_2bg_cfg = { | 525 | struct iwl_cfg iwl6000i_2bg_cfg = { |
@@ -547,6 +553,8 @@ struct iwl_cfg iwl6000i_2bg_cfg = { | |||
547 | .monitor_recover_period = IWL_MONITORING_PERIOD, | 553 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
548 | .max_event_log_size = 1024, | 554 | .max_event_log_size = 1024, |
549 | .ucode_tracing = true, | 555 | .ucode_tracing = true, |
556 | .sensitivity_calib_by_driver = true, | ||
557 | .chain_noise_calib_by_driver = true, | ||
550 | }; | 558 | }; |
551 | 559 | ||
552 | struct iwl_cfg iwl6050_2agn_cfg = { | 560 | struct iwl_cfg iwl6050_2agn_cfg = { |
@@ -582,6 +590,8 @@ struct iwl_cfg iwl6050_2agn_cfg = { | |||
582 | .monitor_recover_period = IWL_MONITORING_PERIOD, | 590 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
583 | .max_event_log_size = 1024, | 591 | .max_event_log_size = 1024, |
584 | .ucode_tracing = true, | 592 | .ucode_tracing = true, |
593 | .sensitivity_calib_by_driver = true, | ||
594 | .chain_noise_calib_by_driver = true, | ||
585 | }; | 595 | }; |
586 | 596 | ||
587 | struct iwl_cfg iwl6050_2abg_cfg = { | 597 | struct iwl_cfg iwl6050_2abg_cfg = { |
@@ -615,6 +625,8 @@ struct iwl_cfg iwl6050_2abg_cfg = { | |||
615 | .monitor_recover_period = IWL_MONITORING_PERIOD, | 625 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
616 | .max_event_log_size = 1024, | 626 | .max_event_log_size = 1024, |
617 | .ucode_tracing = true, | 627 | .ucode_tracing = true, |
628 | .sensitivity_calib_by_driver = true, | ||
629 | .chain_noise_calib_by_driver = true, | ||
618 | }; | 630 | }; |
619 | 631 | ||
620 | struct iwl_cfg iwl6000_3agn_cfg = { | 632 | struct iwl_cfg iwl6000_3agn_cfg = { |
@@ -650,6 +662,8 @@ struct iwl_cfg iwl6000_3agn_cfg = { | |||
650 | .monitor_recover_period = IWL_MONITORING_PERIOD, | 662 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
651 | .max_event_log_size = 1024, | 663 | .max_event_log_size = 1024, |
652 | .ucode_tracing = true, | 664 | .ucode_tracing = true, |
665 | .sensitivity_calib_by_driver = true, | ||
666 | .chain_noise_calib_by_driver = true, | ||
653 | }; | 667 | }; |
654 | 668 | ||
655 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); | 669 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 5034dc0037a1..88c641202c2f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -321,6 +321,8 @@ struct iwl_cfg { | |||
321 | u32 max_event_log_size; | 321 | u32 max_event_log_size; |
322 | const bool tx_power_by_driver; | 322 | const bool tx_power_by_driver; |
323 | const bool ucode_tracing; | 323 | const bool ucode_tracing; |
324 | const bool sensitivity_calib_by_driver; | ||
325 | const bool chain_noise_calib_by_driver; | ||
324 | u8 scan_antennas[IEEE80211_NUM_BANDS]; | 326 | u8 scan_antennas[IEEE80211_NUM_BANDS]; |
325 | }; | 327 | }; |
326 | 328 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index 59355fae1f55..df34c3105e1e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -1637,17 +1637,20 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name) | |||
1637 | DEBUGFS_ADD_FILE(ucode_tx_stats, dir_debug, S_IRUSR); | 1637 | DEBUGFS_ADD_FILE(ucode_tx_stats, dir_debug, S_IRUSR); |
1638 | DEBUGFS_ADD_FILE(ucode_general_stats, dir_debug, S_IRUSR); | 1638 | DEBUGFS_ADD_FILE(ucode_general_stats, dir_debug, S_IRUSR); |
1639 | 1639 | ||
1640 | if ((priv->hw_rev & CSR_HW_REV_TYPE_MSK) != CSR_HW_REV_TYPE_3945) { | 1640 | if (priv->cfg->sensitivity_calib_by_driver) |
1641 | DEBUGFS_ADD_FILE(sensitivity, dir_debug, S_IRUSR); | 1641 | DEBUGFS_ADD_FILE(sensitivity, dir_debug, S_IRUSR); |
1642 | if (priv->cfg->chain_noise_calib_by_driver) | ||
1642 | DEBUGFS_ADD_FILE(chain_noise, dir_debug, S_IRUSR); | 1643 | DEBUGFS_ADD_FILE(chain_noise, dir_debug, S_IRUSR); |
1643 | } | ||
1644 | if (priv->cfg->ucode_tracing) | 1644 | if (priv->cfg->ucode_tracing) |
1645 | DEBUGFS_ADD_FILE(ucode_tracing, dir_debug, S_IWUSR | S_IRUSR); | 1645 | DEBUGFS_ADD_FILE(ucode_tracing, dir_debug, S_IWUSR | S_IRUSR); |
1646 | DEBUGFS_ADD_FILE(rxon_flags, dir_debug, S_IWUSR); | 1646 | DEBUGFS_ADD_FILE(rxon_flags, dir_debug, S_IWUSR); |
1647 | DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, S_IWUSR); | 1647 | DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, S_IWUSR); |
1648 | DEBUGFS_ADD_BOOL(disable_sensitivity, dir_rf, &priv->disable_sens_cal); | 1648 | if (priv->cfg->sensitivity_calib_by_driver) |
1649 | DEBUGFS_ADD_BOOL(disable_chain_noise, dir_rf, | 1649 | DEBUGFS_ADD_BOOL(disable_sensitivity, dir_rf, |
1650 | &priv->disable_chain_noise_cal); | 1650 | &priv->disable_sens_cal); |
1651 | if (priv->cfg->chain_noise_calib_by_driver) | ||
1652 | DEBUGFS_ADD_BOOL(disable_chain_noise, dir_rf, | ||
1653 | &priv->disable_chain_noise_cal); | ||
1651 | if (priv->cfg->tx_power_by_driver) | 1654 | if (priv->cfg->tx_power_by_driver) |
1652 | DEBUGFS_ADD_BOOL(disable_tx_power, dir_rf, | 1655 | DEBUGFS_ADD_BOOL(disable_tx_power, dir_rf, |
1653 | &priv->disable_tx_power_cal); | 1656 | &priv->disable_tx_power_cal); |