Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dfe21582 authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by John W. Linville
Browse files

iwl4965: correctly validate temperature value

In some cases we can read wrong temperature value. If after that
temperature value will not be updated to good one, we badly configure
tx power parameters and device is unable to send a data.

Resolves:
https://bugzilla.kernel.org/show_bug.cgi?id=35932



Cc: stable@kernel.org # 2.6.39+
Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent a7567b20
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1543,7 +1543,7 @@ static void iwl4965_temperature_calib(struct iwl_priv *priv)
	s32 temp;
	s32 temp;


	temp = iwl4965_hw_get_temperature(priv);
	temp = iwl4965_hw_get_temperature(priv);
	if (temp < 0)
	if (IWL_TX_POWER_TEMPERATURE_OUT_OF_RANGE(temp))
		return;
		return;


	if (priv->temperature != temp) {
	if (priv->temperature != temp) {