From: Sujith Manoharan Date: Tue, 21 Jan 2014 03:46:43 +0000 (+0530) Subject: ath9k: Remove unnecessary check X-Git-Tag: accepted/tizen/common/20141203.182822~316^2~18^2^2~368 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bafc20a6499b931ab53afa75d535f338f86d525b;p=platform%2Fkernel%2Flinux-arm64.git ath9k: Remove unnecessary check The commit "ath9k: Fix IQ calibration" added a check to ensure that valid i2_p_q2_a0_d1 values are not discarded. But since it is masked with 0xfff earlier, the codepath will not be executed. The earlier case where all values above 0x800 were considered invalid is incorrect, since the HW can return valid values between 0x800 and 0xfff. Cc: Kai Shi Reported-by: Alex Hacker Signed-off-by: Sujith Manoharan Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath9k/ar9003_calib.c b/drivers/net/wireless/ath/ath9k/ar9003_calib.c index a352128..1537f42 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c @@ -655,9 +655,6 @@ static bool ar9003_hw_calc_iq_corr(struct ath_hw *ah, if (i2_m_q2_a0_d1 > 0x800) i2_m_q2_a0_d1 = -((0xfff - i2_m_q2_a0_d1) + 1); - if (i2_p_q2_a0_d1 > 0x1000) - i2_p_q2_a0_d1 = -((0x1fff - i2_p_q2_a0_d1) + 1); - if (iq_corr_a0_d1 > 0x800) iq_corr_a0_d1 = -((0xfff - iq_corr_a0_d1) + 1);