aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
diff options
context:
space:
mode:
authorFry, Donald H <donald.h.fry@intel.com>2011-02-25 12:44:48 -0500
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-03-03 13:05:11 -0500
commitf8f79a5dbeb59a13a3f8101b24cbe19ec6e92d07 (patch)
tree34f4cfa4bec4709de14e38312757234187c4bda4 /drivers/net/wireless/iwlwifi/iwl-agn-lib.c
parente46395a4b3d32d161d8b6d8e4a002972b1faae3e (diff)
iwlagn: report correct temperature for WiFi/BT devices.
The temperature reported by 'cat /sys/class/net/wlan?/device/temperature' is incorrect for devices with BT capability. Report the value from the correct statistics structure. Tested with 130, 100, 6205 and 5300. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-lib.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-lib.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index fd142bee9189..87a9fd8e41eb 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -533,9 +533,10 @@ int iwlagn_send_tx_power(struct iwl_priv *priv)
533 533
534void iwlagn_temperature(struct iwl_priv *priv) 534void iwlagn_temperature(struct iwl_priv *priv)
535{ 535{
536 /* store temperature from statistics (in Celsius) */ 536 /* store temperature from correct statistics (in Celsius) */
537 priv->temperature = 537 priv->temperature = le32_to_cpu((iwl_bt_statistics(priv)) ?
538 le32_to_cpu(priv->_agn.statistics.general.common.temperature); 538 priv->_agn.statistics_bt.general.common.temperature :
539 priv->_agn.statistics.general.common.temperature);
539 iwl_tt_handler(priv); 540 iwl_tt_handler(priv);
540} 541}
541 542