Skip to content

Commit

Permalink
iwl4965: correctly validate temperature value
Browse files Browse the repository at this point in the history
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: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Stanislaw Gruszka authored and John W. Linville committed Jun 1, 2011
1 parent a7567b2 commit dfe2158
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwlegacy/iwl-4965.c
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,7 @@ static void iwl4965_temperature_calib(struct iwl_priv *priv)
s32 temp;

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

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

0 comments on commit dfe2158

Please sign in to comment.