1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Tue, 11 Oct 2016 19:45:41 +0200
3 Subject: [PATCH] Revert "ath9k_hw: implement temperature compensation support
6 This reverts commit 171f6402e4aa5cd3b8407f82501f7ea21fa54ccc.
7 Some users report that this commit causes a regression in performance
10 Signed-off-by: Felix Fietkau <nbd@nbd.name>
13 --- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
14 +++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
15 @@ -33,7 +33,6 @@ struct coeff {
17 enum ar9003_cal_types {
18 IQ_MISMATCH_CAL = BIT(0),
19 - TEMP_COMP_CAL = BIT(1),
22 static void ar9003_hw_setup_calibration(struct ath_hw *ah,
23 @@ -59,12 +58,6 @@ static void ar9003_hw_setup_calibration(
25 REG_SET_BIT(ah, AR_PHY_TIMING4, AR_PHY_TIMING4_DO_CAL);
28 - ath_dbg(common, CALIBRATE,
29 - "starting Temperature Compensation Calibration\n");
30 - REG_SET_BIT(ah, AR_CH0_THERM, AR_CH0_THERM_LOCAL);
31 - REG_SET_BIT(ah, AR_CH0_THERM, AR_CH0_THERM_START);
34 ath_err(common, "Invalid calibration type\n");
36 @@ -93,8 +86,7 @@ static bool ar9003_hw_per_calibration(st
38 * Accumulate cal measures for active chains
40 - if (cur_caldata->calCollect)
41 - cur_caldata->calCollect(ah);
42 + cur_caldata->calCollect(ah);
45 if (ah->cal_samples >= cur_caldata->calNumSamples) {
46 @@ -107,8 +99,7 @@ static bool ar9003_hw_per_calibration(st
48 * Process accumulated data
50 - if (cur_caldata->calPostProc)
51 - cur_caldata->calPostProc(ah, numChains);
52 + cur_caldata->calPostProc(ah, numChains);
54 /* Calibration has finished. */
55 caldata->CalValid |= cur_caldata->calType;
56 @@ -323,16 +314,9 @@ static const struct ath9k_percal_data iq
60 -static const struct ath9k_percal_data temp_cal_single_sample = {
66 static void ar9003_hw_init_cal_settings(struct ath_hw *ah)
68 ah->iq_caldata.calData = &iq_cal_single_sample;
69 - ah->temp_caldata.calData = &temp_cal_single_sample;
71 if (AR_SREV_9300_20_OR_LATER(ah)) {
72 ah->enabled_cals |= TX_IQ_CAL;
73 @@ -340,7 +324,7 @@ static void ar9003_hw_init_cal_settings(
74 ah->enabled_cals |= TX_IQ_ON_AGC_CAL;
77 - ah->supp_cals = IQ_MISMATCH_CAL | TEMP_COMP_CAL;
78 + ah->supp_cals = IQ_MISMATCH_CAL;
81 #define OFF_UPPER_LT 24
82 @@ -1399,9 +1383,6 @@ static void ar9003_hw_init_cal_common(st
83 INIT_CAL(&ah->iq_caldata);
84 INSERT_CAL(ah, &ah->iq_caldata);
86 - INIT_CAL(&ah->temp_caldata);
87 - INSERT_CAL(ah, &ah->temp_caldata);
89 /* Initialize current pointer to first element in list */
90 ah->cal_list_curr = ah->cal_list;
92 --- a/drivers/net/wireless/ath/ath9k/hw.h
93 +++ b/drivers/net/wireless/ath/ath9k/hw.h
94 @@ -830,7 +830,6 @@ struct ath_hw {
97 struct ath9k_cal_list iq_caldata;
98 - struct ath9k_cal_list temp_caldata;
99 struct ath9k_cal_list adcgain_caldata;
100 struct ath9k_cal_list adcdc_caldata;
101 struct ath9k_cal_list *cal_list;