diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-04-27 17:33:33 -0400 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-05-10 18:08:48 -0400 |
commit | 4e7033ef491a8447247e77b20626cbc197a2eb83 (patch) | |
tree | 5541e38a77d2b396e61142daa0159a64916d3314 /drivers/net/wireless/iwlwifi/iwl-3945.c | |
parent | 92445c953eb5698d1abab16b9a43238effdc0a6d (diff) |
iwlwifi: remove device type checking for tx power in debugfs
Instead of checking device type for enable/disable tx power control,
move it to .cfg for better control and more flexibilities.
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/iwlwifi/iwl-3945.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 3faa78ceaed1..360781326cb7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -1714,6 +1714,11 @@ static int iwl3945_hw_reg_comp_txpower_temp(struct iwl_priv *priv) | |||
1714 | int ref_temp; | 1714 | int ref_temp; |
1715 | int temperature = priv->temperature; | 1715 | int temperature = priv->temperature; |
1716 | 1716 | ||
1717 | if (priv->disable_tx_power_cal || | ||
1718 | test_bit(STATUS_SCANNING, &priv->status)) { | ||
1719 | /* do not perform tx power calibration */ | ||
1720 | return 0; | ||
1721 | } | ||
1717 | /* set up new Tx power info for each and every channel, 2.4 and 5.x */ | 1722 | /* set up new Tx power info for each and every channel, 2.4 and 5.x */ |
1718 | for (i = 0; i < priv->channel_count; i++) { | 1723 | for (i = 0; i < priv->channel_count; i++) { |
1719 | ch_info = &priv->channel_info[i]; | 1724 | ch_info = &priv->channel_info[i]; |
@@ -2842,6 +2847,7 @@ static struct iwl_cfg iwl3945_bg_cfg = { | |||
2842 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | 2847 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
2843 | .monitor_recover_period = IWL_MONITORING_PERIOD, | 2848 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
2844 | .max_event_log_size = 512, | 2849 | .max_event_log_size = 512, |
2850 | .tx_power_by_driver = true, | ||
2845 | }; | 2851 | }; |
2846 | 2852 | ||
2847 | static struct iwl_cfg iwl3945_abg_cfg = { | 2853 | static struct iwl_cfg iwl3945_abg_cfg = { |
@@ -2862,6 +2868,7 @@ static struct iwl_cfg iwl3945_abg_cfg = { | |||
2862 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | 2868 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
2863 | .monitor_recover_period = IWL_MONITORING_PERIOD, | 2869 | .monitor_recover_period = IWL_MONITORING_PERIOD, |
2864 | .max_event_log_size = 512, | 2870 | .max_event_log_size = 512, |
2871 | .tx_power_by_driver = true, | ||
2865 | }; | 2872 | }; |
2866 | 2873 | ||
2867 | DEFINE_PCI_DEVICE_TABLE(iwl3945_hw_card_ids) = { | 2874 | DEFINE_PCI_DEVICE_TABLE(iwl3945_hw_card_ids) = { |