aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2011-06-01 11:17:57 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-06-01 14:41:13 -0400
commitdfe21582ac5ebc460dda98c67e8589dd506d02cd (patch)
tree76fe13dd7d63a378d432ac98b62015fcae38a2e3 /drivers/net
parenta7567b2059020bf3fa96c389ec25eed8e28ad4ba (diff)
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: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-4965.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965.c b/drivers/net/wireless/iwlegacy/iwl-4965.c
index f5433c74b845..f9db25bb35c3 100644
--- a/drivers/net/wireless/iwlegacy/iwl-4965.c
+++ b/drivers/net/wireless/iwlegacy/iwl-4965.c
@@ -1543,7 +1543,7 @@ static void iwl4965_temperature_calib(struct iwl_priv *priv)
1543 s32 temp; 1543 s32 temp;
1544 1544
1545 temp = iwl4965_hw_get_temperature(priv); 1545 temp = iwl4965_hw_get_temperature(priv);
1546 if (temp < 0) 1546 if (IWL_TX_POWER_TEMPERATURE_OUT_OF_RANGE(temp))
1547 return; 1547 return;
1548 1548
1549 if (priv->temperature != temp) { 1549 if (priv->temperature != temp) {