Exemplo n.º 1
0
void iwlagn_temperature(struct iwl_priv *priv)
{
	lockdep_assert_held(&priv->statistics.lock);

	/* store temperature from correct statistics (in Celsius) */
	priv->temperature = le32_to_cpu(priv->statistics.common.temperature);
	iwl_tt_handler(priv);
}
Exemplo n.º 2
0
static void iwl5150_temperature(struct iwl_priv *priv)
{
	u32 vt = 0;
	s32 offset =  iwl_temp_calib_to_offset(priv);

	vt = le32_to_cpu(priv->_agn.statistics.general.common.temperature);
	vt = vt / IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF + offset;
	/* now vt hold the temperature in Kelvin */
	priv->temperature = KELVIN_TO_CELSIUS(vt);
	iwl_tt_handler(priv);
}
static void iwl5150_temperature(struct iwl_priv *priv)
{
    u32 vt = 0;
    s32 offset =  iwl_temp_calib_to_offset(priv->shrd);

    vt = le32_to_cpu(priv->statistics.common.temperature);
    vt = vt / IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF + offset;

    priv->temperature = KELVIN_TO_CELSIUS(vt);
    iwl_tt_handler(priv);
}