diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2008-06-11 21:46:52 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-14 12:18:04 -0400 |
commit | 16e727e866d739d7f02790c794410f6d9f1d720b (patch) | |
tree | 88a6bbf3e8e3135bfc6b3f4a58c6421c2a81643c /drivers/net/wireless/iwlwifi/iwl-4965.c | |
parent | a78a83255651acff8234975b5c7b6cd19d717f3f (diff) |
iwlwifi: removes the RUN_TIME_CALIB ifdef
This patch removes the possibility not to compile the run time
calibrations. It also renames priv->sensitivity_work to
priv->run_time_calib_work, and moves bg_run_time_calib to iwl4965_base
since it is common to both: 4965 and 5000.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 84414da0bdeb..e2c2d9f3edb5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -652,8 +652,6 @@ void iwl4965_rf_kill_ct_config(struct iwl_priv *priv) | |||
652 | cmd.critical_temperature_R); | 652 | cmd.critical_temperature_R); |
653 | } | 653 | } |
654 | 654 | ||
655 | #ifdef CONFIG_IWL4965_RUN_TIME_CALIB | ||
656 | |||
657 | /* Reset differential Rx gains in NIC to prepare for chain noise calibration. | 655 | /* Reset differential Rx gains in NIC to prepare for chain noise calibration. |
658 | * Called after every association, but this runs only once! | 656 | * Called after every association, but this runs only once! |
659 | * ... once chain noise is calibrated the first time, it's good forever. */ | 657 | * ... once chain noise is calibrated the first time, it's good forever. */ |
@@ -741,30 +739,6 @@ static void iwl4965_gain_computation(struct iwl_priv *priv, | |||
741 | data->beacon_count = 0; | 739 | data->beacon_count = 0; |
742 | } | 740 | } |
743 | 741 | ||
744 | static void iwl4965_bg_sensitivity_work(struct work_struct *work) | ||
745 | { | ||
746 | struct iwl_priv *priv = container_of(work, struct iwl_priv, | ||
747 | sensitivity_work); | ||
748 | |||
749 | mutex_lock(&priv->mutex); | ||
750 | |||
751 | if (test_bit(STATUS_EXIT_PENDING, &priv->status) || | ||
752 | test_bit(STATUS_SCANNING, &priv->status)) { | ||
753 | mutex_unlock(&priv->mutex); | ||
754 | return; | ||
755 | } | ||
756 | |||
757 | if (priv->start_calib) { | ||
758 | iwl_chain_noise_calibration(priv, &priv->statistics); | ||
759 | |||
760 | iwl_sensitivity_calibration(priv, &priv->statistics); | ||
761 | } | ||
762 | |||
763 | mutex_unlock(&priv->mutex); | ||
764 | return; | ||
765 | } | ||
766 | #endif /*CONFIG_IWL4965_RUN_TIME_CALIB*/ | ||
767 | |||
768 | static void iwl4965_bg_txpower_work(struct work_struct *work) | 742 | static void iwl4965_bg_txpower_work(struct work_struct *work) |
769 | { | 743 | { |
770 | struct iwl_priv *priv = container_of(work, struct iwl_priv, | 744 | struct iwl_priv *priv = container_of(work, struct iwl_priv, |
@@ -920,7 +894,6 @@ int iwl4965_alive_notify(struct iwl_priv *priv) | |||
920 | return ret; | 894 | return ret; |
921 | } | 895 | } |
922 | 896 | ||
923 | #ifdef CONFIG_IWL4965_RUN_TIME_CALIB | ||
924 | static struct iwl_sensitivity_ranges iwl4965_sensitivity = { | 897 | static struct iwl_sensitivity_ranges iwl4965_sensitivity = { |
925 | .min_nrg_cck = 97, | 898 | .min_nrg_cck = 97, |
926 | .max_nrg_cck = 0, | 899 | .max_nrg_cck = 0, |
@@ -943,7 +916,6 @@ static struct iwl_sensitivity_ranges iwl4965_sensitivity = { | |||
943 | .nrg_th_cck = 100, | 916 | .nrg_th_cck = 100, |
944 | .nrg_th_ofdm = 100, | 917 | .nrg_th_ofdm = 100, |
945 | }; | 918 | }; |
946 | #endif | ||
947 | 919 | ||
948 | /** | 920 | /** |
949 | * iwl4965_hw_set_hw_params | 921 | * iwl4965_hw_set_hw_params |
@@ -983,9 +955,7 @@ int iwl4965_hw_set_hw_params(struct iwl_priv *priv) | |||
983 | priv->hw_params.valid_rx_ant = ANT_A | ANT_B; | 955 | priv->hw_params.valid_rx_ant = ANT_A | ANT_B; |
984 | priv->hw_params.ct_kill_threshold = CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD); | 956 | priv->hw_params.ct_kill_threshold = CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD); |
985 | 957 | ||
986 | #ifdef CONFIG_IWL4965_RUN_TIME_CALIB | ||
987 | priv->hw_params.sens = &iwl4965_sensitivity; | 958 | priv->hw_params.sens = &iwl4965_sensitivity; |
988 | #endif | ||
989 | 959 | ||
990 | return 0; | 960 | return 0; |
991 | } | 961 | } |
@@ -2123,9 +2093,7 @@ void iwl4965_hw_rx_statistics(struct iwl_priv *priv, | |||
2123 | if (unlikely(!test_bit(STATUS_SCANNING, &priv->status)) && | 2093 | if (unlikely(!test_bit(STATUS_SCANNING, &priv->status)) && |
2124 | (pkt->hdr.cmd == STATISTICS_NOTIFICATION)) { | 2094 | (pkt->hdr.cmd == STATISTICS_NOTIFICATION)) { |
2125 | iwl4965_rx_calc_noise(priv); | 2095 | iwl4965_rx_calc_noise(priv); |
2126 | #ifdef CONFIG_IWL4965_RUN_TIME_CALIB | 2096 | queue_work(priv->workqueue, &priv->run_time_calib_work); |
2127 | queue_work(priv->workqueue, &priv->sensitivity_work); | ||
2128 | #endif | ||
2129 | } | 2097 | } |
2130 | 2098 | ||
2131 | iwl_leds_background(priv); | 2099 | iwl_leds_background(priv); |
@@ -3504,9 +3472,6 @@ static void iwl4965_rx_handler_setup(struct iwl_priv *priv) | |||
3504 | void iwl4965_hw_setup_deferred_work(struct iwl_priv *priv) | 3472 | void iwl4965_hw_setup_deferred_work(struct iwl_priv *priv) |
3505 | { | 3473 | { |
3506 | INIT_WORK(&priv->txpower_work, iwl4965_bg_txpower_work); | 3474 | INIT_WORK(&priv->txpower_work, iwl4965_bg_txpower_work); |
3507 | #ifdef CONFIG_IWL4965_RUN_TIME_CALIB | ||
3508 | INIT_WORK(&priv->sensitivity_work, iwl4965_bg_sensitivity_work); | ||
3509 | #endif | ||
3510 | init_timer(&priv->statistics_periodic); | 3475 | init_timer(&priv->statistics_periodic); |
3511 | priv->statistics_periodic.data = (unsigned long)priv; | 3476 | priv->statistics_periodic.data = (unsigned long)priv; |
3512 | priv->statistics_periodic.function = iwl4965_bg_statistics_periodic; | 3477 | priv->statistics_periodic.function = iwl4965_bg_statistics_periodic; |
@@ -3527,10 +3492,8 @@ static struct iwl_hcmd_ops iwl4965_hcmd = { | |||
3527 | static struct iwl_hcmd_utils_ops iwl4965_hcmd_utils = { | 3492 | static struct iwl_hcmd_utils_ops iwl4965_hcmd_utils = { |
3528 | .get_hcmd_size = iwl4965_get_hcmd_size, | 3493 | .get_hcmd_size = iwl4965_get_hcmd_size, |
3529 | .build_addsta_hcmd = iwl4965_build_addsta_hcmd, | 3494 | .build_addsta_hcmd = iwl4965_build_addsta_hcmd, |
3530 | #ifdef CONFIG_IWL4965_RUN_TIME_CALIB | ||
3531 | .chain_noise_reset = iwl4965_chain_noise_reset, | 3495 | .chain_noise_reset = iwl4965_chain_noise_reset, |
3532 | .gain_computation = iwl4965_gain_computation, | 3496 | .gain_computation = iwl4965_gain_computation, |
3533 | #endif | ||
3534 | }; | 3497 | }; |
3535 | 3498 | ||
3536 | static struct iwl_lib_ops iwl4965_lib = { | 3499 | static struct iwl_lib_ops iwl4965_lib = { |