All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "ath9k_hw: implement temperature compensation support for AR9003+"
@ 2016-10-11 17:46 Felix Fietkau
  2016-10-12  5:21 ` Kalle Valo
  2016-10-13 11:15 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Felix Fietkau @ 2016-10-11 17:46 UTC (permalink / raw)
  To: linux-wireless; +Cc: kvalo

This reverts commit 171f6402e4aa5cd3b8407f82501f7ea21fa54ccc.
Some users report that this commit causes a regression in performance
under some conditions.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 drivers/net/wireless/ath/ath9k/ar9003_calib.c | 25 +++----------------------
 drivers/net/wireless/ath/ath9k/hw.h           |  1 -
 2 files changed, 3 insertions(+), 23 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_calib.c b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
index b6f064a..7e27a06 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
@@ -33,7 +33,6 @@ struct coeff {
 
 enum ar9003_cal_types {
 	IQ_MISMATCH_CAL = BIT(0),
-	TEMP_COMP_CAL = BIT(1),
 };
 
 static void ar9003_hw_setup_calibration(struct ath_hw *ah,
@@ -59,12 +58,6 @@ static void ar9003_hw_setup_calibration(struct ath_hw *ah,
 		/* Kick-off cal */
 		REG_SET_BIT(ah, AR_PHY_TIMING4, AR_PHY_TIMING4_DO_CAL);
 		break;
-	case TEMP_COMP_CAL:
-		ath_dbg(common, CALIBRATE,
-			"starting Temperature Compensation Calibration\n");
-		REG_SET_BIT(ah, AR_CH0_THERM, AR_CH0_THERM_LOCAL);
-		REG_SET_BIT(ah, AR_CH0_THERM, AR_CH0_THERM_START);
-		break;
 	default:
 		ath_err(common, "Invalid calibration type\n");
 		break;
@@ -93,8 +86,7 @@ static bool ar9003_hw_per_calibration(struct ath_hw *ah,
 		/*
 		* Accumulate cal measures for active chains
 		*/
-		if (cur_caldata->calCollect)
-			cur_caldata->calCollect(ah);
+		cur_caldata->calCollect(ah);
 		ah->cal_samples++;
 
 		if (ah->cal_samples >= cur_caldata->calNumSamples) {
@@ -107,8 +99,7 @@ static bool ar9003_hw_per_calibration(struct ath_hw *ah,
 			/*
 			* Process accumulated data
 			*/
-			if (cur_caldata->calPostProc)
-				cur_caldata->calPostProc(ah, numChains);
+			cur_caldata->calPostProc(ah, numChains);
 
 			/* Calibration has finished. */
 			caldata->CalValid |= cur_caldata->calType;
@@ -323,16 +314,9 @@ static const struct ath9k_percal_data iq_cal_single_sample = {
 	ar9003_hw_iqcalibrate
 };
 
-static const struct ath9k_percal_data temp_cal_single_sample = {
-	TEMP_COMP_CAL,
-	MIN_CAL_SAMPLES,
-	PER_MAX_LOG_COUNT,
-};
-
 static void ar9003_hw_init_cal_settings(struct ath_hw *ah)
 {
 	ah->iq_caldata.calData = &iq_cal_single_sample;
-	ah->temp_caldata.calData = &temp_cal_single_sample;
 
 	if (AR_SREV_9300_20_OR_LATER(ah)) {
 		ah->enabled_cals |= TX_IQ_CAL;
@@ -340,7 +324,7 @@ static void ar9003_hw_init_cal_settings(struct ath_hw *ah)
 			ah->enabled_cals |= TX_IQ_ON_AGC_CAL;
 	}
 
-	ah->supp_cals = IQ_MISMATCH_CAL | TEMP_COMP_CAL;
+	ah->supp_cals = IQ_MISMATCH_CAL;
 }
 
 #define OFF_UPPER_LT 24
@@ -1399,9 +1383,6 @@ static void ar9003_hw_init_cal_common(struct ath_hw *ah)
 	INIT_CAL(&ah->iq_caldata);
 	INSERT_CAL(ah, &ah->iq_caldata);
 
-	INIT_CAL(&ah->temp_caldata);
-	INSERT_CAL(ah, &ah->temp_caldata);
-
 	/* Initialize current pointer to first element in list */
 	ah->cal_list_curr = ah->cal_list;
 
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 2a5d3ad..9cbca12 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -830,7 +830,6 @@ struct ath_hw {
 	/* Calibration */
 	u32 supp_cals;
 	struct ath9k_cal_list iq_caldata;
-	struct ath9k_cal_list temp_caldata;
 	struct ath9k_cal_list adcgain_caldata;
 	struct ath9k_cal_list adcdc_caldata;
 	struct ath9k_cal_list *cal_list;
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Revert "ath9k_hw: implement temperature compensation support for AR9003+"
  2016-10-11 17:46 [PATCH] Revert "ath9k_hw: implement temperature compensation support for AR9003+" Felix Fietkau
@ 2016-10-12  5:21 ` Kalle Valo
  2016-10-13 11:15 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2016-10-12  5:21 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless, kvalo

Felix Fietkau <nbd@nbd.name> wrote:
> This reverts commit 171f6402e4aa5cd3b8407f82501f7ea21fa54ccc.
> Some users report that this commit causes a regression in performance
> under some conditions.
> 
> Signed-off-by: Felix Fietkau <nbd@nbd.name>

I added these to the commit log:

    Fixes: 171f6402e4aa ("ath9k_hw: implement temperature compensation support for AR9003+")
    Cc: <stable@vger.kernel.org> #4.8

My understanding is that the commit is not in 4.7, hence only cc stable 4.8.

-- 
https://patchwork.kernel.org/patch/9371479/

Documentation about submitting wireless patches and checking status
from patchwork:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Revert "ath9k_hw: implement temperature compensation support for AR9003+"
  2016-10-11 17:46 [PATCH] Revert "ath9k_hw: implement temperature compensation support for AR9003+" Felix Fietkau
  2016-10-12  5:21 ` Kalle Valo
@ 2016-10-13 11:15 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2016-10-13 11:15 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless, kvalo

Felix Fietkau <nbd@nbd.name> wrote:
> This reverts commit 171f6402e4aa5cd3b8407f82501f7ea21fa54ccc.
> Some users report that this commit causes a regression in performance
> under some conditions.
> 
> Signed-off-by: Felix Fietkau <nbd@nbd.name>

Patch applied to ath-current branch of ath.git, thanks.

304e5ac118cc Revert "ath9k_hw: implement temperature compensation support for AR9003+"

-- 
https://patchwork.kernel.org/patch/9371479/

Documentation about submitting wireless patches and checking status
from patchwork:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-13 11:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-11 17:46 [PATCH] Revert "ath9k_hw: implement temperature compensation support for AR9003+" Felix Fietkau
2016-10-12  5:21 ` Kalle Valo
2016-10-13 11:15 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.