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>
This commit is contained in:
parent
e46395a4b3
commit
f8f79a5dbe
|
@ -533,9 +533,10 @@ int iwlagn_send_tx_power(struct iwl_priv *priv)
|
||||||
|
|
||||||
void iwlagn_temperature(struct iwl_priv *priv)
|
void iwlagn_temperature(struct iwl_priv *priv)
|
||||||
{
|
{
|
||||||
/* store temperature from statistics (in Celsius) */
|
/* store temperature from correct statistics (in Celsius) */
|
||||||
priv->temperature =
|
priv->temperature = le32_to_cpu((iwl_bt_statistics(priv)) ?
|
||||||
le32_to_cpu(priv->_agn.statistics.general.common.temperature);
|
priv->_agn.statistics_bt.general.common.temperature :
|
||||||
|
priv->_agn.statistics.general.common.temperature);
|
||||||
iwl_tt_handler(priv);
|
iwl_tt_handler(priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue