ath5k: fixup some merge damage for AR5211 IQ calibration
authorJohn W. Linville <linville@tuxdriver.com>
Thu, 8 Apr 2010 20:34:49 +0000 (16:34 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 8 Apr 2010 20:40:04 +0000 (16:40 -0400)
Resolution of a merge conflict upstream accidentally removed a hunk of
"ath5k: IQ calibration for AR5211 is slightly different", so restore it.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/phy.c

index 4a49dbb173529427805eb9c266c93706d2161374..60873a4f6171e8a6faaf8b6f201ffa0dc6451ae4 100644 (file)
@@ -1388,7 +1388,10 @@ static int ath5k_hw_rf511x_calibrate(struct ath5k_hw *ah,
        i_coff = (-iq_corr) / i_coffd;
        i_coff = clamp(i_coff, -32, 31); /* signed 6 bit */
 
-       q_coff = (i_pwr / q_coffd) - 128;
+       if (ah->ah_version == AR5K_AR5211)
+               q_coff = (i_pwr / q_coffd) - 64;
+       else
+               q_coff = (i_pwr / q_coffd) - 128;
        q_coff = clamp(q_coff, -16, 15); /* signed 5 bit */
 
        ATH5K_DBG_UNLIMIT(ah->ah_sc, ATH5K_DEBUG_CALIBRATE,