]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ath9k_hw: Fix magnitude/phase coeff correction
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>
Thu, 15 Sep 2011 13:32:25 +0000 (19:02 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Nov 2011 17:35:43 +0000 (09:35 -0800)
commit e9c10469cf3c71bc1c6b0f01319161e277d6ac9b upstream.

Do the magnitude/phase coeff correction only if the outlier
is detected. Updating wrong magnitude/phase coeff factor
impacts not only tx gain setting but also leads to poor
performance in congested networks. In the clear environment
the impact is very minimal because the outlier happens
very rarely according to the past experiment. It occured
less than once every 1000 calibrations.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/ath/ath9k/ar9003_calib.c

index f48051c50092f0d85a5babf97160621862c24b36..7c2aaad24ed0a865dd7fe575b7874a5c64affa4d 100644 (file)
@@ -643,8 +643,9 @@ static void ar9003_hw_detect_outlier(int *mp_coeff, int nmeasurement,
                        outlier_idx = max_idx;
                else
                        outlier_idx = min_idx;
+
+               mp_coeff[outlier_idx] = mp_avg;
        }
-       mp_coeff[outlier_idx] = mp_avg;
 }
 
 static void ar9003_hw_tx_iqcal_load_avg_2_passes(struct ath_hw *ah,