aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965.c
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2009-05-21 16:44:23 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-05-22 14:06:03 -0400
commit62161aefa403a3f8d603b061f5688cf00928a2cc (patch)
treee4b6a51b9d25b2e068e299a972adb8b8fdd1367f /drivers/net/wireless/iwlwifi/iwl-4965.c
parent2681b20ba2a255ea20a168c0ebe519c40b55e57e (diff)
iwlwifi: Temperature sensor voltage reading for 5150
The temperature measurement by uCode for 5150 and 5000 are different CSR_HW_REV_TYPE_5150: temperature sensor output voltage CSR_HW_REV_TYPE_5000: temperature in Celsius temperature related operation for 5150 is measured by temperature sensor output voltage; additional conversion is required for set and store the temperature. To make sure support different HW design; implement _ops method for temperature related functions (temperature reading and set ct kill threshold) Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@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.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index a98ff4ead720..97131e63397e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -788,6 +788,12 @@ static struct iwl_sensitivity_ranges iwl4965_sensitivity = {
788 .nrg_th_ofdm = 100, 788 .nrg_th_ofdm = 100,
789}; 789};
790 790
791static void iwl4965_set_ct_threshold(struct iwl_priv *priv)
792{
793 /* want Kelvin */
794 priv->hw_params.ct_kill_threshold = CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD);
795}
796
791/** 797/**
792 * iwl4965_hw_set_hw_params 798 * iwl4965_hw_set_hw_params
793 * 799 *
@@ -822,7 +828,8 @@ static int iwl4965_hw_set_hw_params(struct iwl_priv *priv)
822 priv->hw_params.rx_chains_num = 2; 828 priv->hw_params.rx_chains_num = 2;
823 priv->hw_params.valid_tx_ant = ANT_A | ANT_B; 829 priv->hw_params.valid_tx_ant = ANT_A | ANT_B;
824 priv->hw_params.valid_rx_ant = ANT_A | ANT_B; 830 priv->hw_params.valid_rx_ant = ANT_A | ANT_B;
825 priv->hw_params.ct_kill_threshold = CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD); 831 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
832 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
826 833
827 priv->hw_params.sens = &iwl4965_sensitivity; 834 priv->hw_params.sens = &iwl4965_sensitivity;
828 835
@@ -2331,9 +2338,12 @@ static struct iwl_lib_ops iwl4965_lib = {
2331 }, 2338 },
2332 .send_tx_power = iwl4965_send_tx_power, 2339 .send_tx_power = iwl4965_send_tx_power,
2333 .update_chain_flags = iwl_update_chain_flags, 2340 .update_chain_flags = iwl_update_chain_flags,
2334 .temperature = iwl4965_temperature_calib,
2335 .post_associate = iwl_post_associate, 2341 .post_associate = iwl_post_associate,
2336 .config_ap = iwl_config_ap, 2342 .config_ap = iwl_config_ap,
2343 .temp_ops = {
2344 .temperature = iwl4965_temperature_calib,
2345 .set_ct_kill = iwl4965_set_ct_threshold,
2346 },
2337}; 2347};
2338 2348
2339static struct iwl_ops iwl4965_ops = { 2349static struct iwl_ops iwl4965_ops = {