Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08a4a1ab authored by Felix Fietkau's avatar Felix Fietkau Committed by John W. Linville
Browse files

ath9k_hw: fix SREV checks for applying tuning caps from EEPROM



AR9485, AR9330 and AR9340 are the chips that this is *NOT* supposed to be
applied on.

Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 3e2ea543
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -3890,6 +3890,9 @@ static void ar9003_hw_apply_tuning_caps(struct ath_hw *ah)
	struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep;
	u8 tuning_caps_param = eep->baseEepHeader.params_for_tuning_caps[0];

	if (AR_SREV_9485(ah) || AR_SREV_9330(ah) || AR_SREV_9340(ah))
		return;

	if (eep->baseEepHeader.featureEnable & 0x40) {
		tuning_caps_param &= 0x7f;
		REG_RMW_FIELD(ah, AR_CH0_XTAL, AR_CH0_XTAL_CAPINDAC,
@@ -3987,7 +3990,6 @@ static void ath9k_hw_ar9300_set_board_values(struct ath_hw *ah,
	ar9003_hw_quick_drop_apply(ah, chan->channel);
	if (!AR_SREV_9330(ah) && !AR_SREV_9340(ah) && !AR_SREV_9550(ah))
		ar9003_hw_internal_regulator_apply(ah);
	if (AR_SREV_9485(ah) || AR_SREV_9330(ah) || AR_SREV_9340(ah))
	ar9003_hw_apply_tuning_caps(ah);
	ar9003_hw_txend_to_xpa_off_apply(ah, is2ghz);
}