aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/calib.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-07-30 15:02:09 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-08-04 15:27:36 -0400
commit00c86590e36bd42574821b43b5124d75f30df9dd (patch)
treeddf43562d2f1a26237c32764c46630a07c7d9dd5 /drivers/net/wireless/ath/ath9k/calib.c
parent1601b1e56e1093d6deb8f475fafc30cc30143357 (diff)
ath9k_hw: clean up and fix initial noise floor calibration
On AR9003 the initial noise floor calibration is currently triggered at the end of the reset without allowing the hardware to update the baseband settings. This could potentially make scans in noisy environments a bit more unreliable, so use the same calibration sequence that is used on AR9002. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/calib.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/calib.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
index 139289e4e93..294016f9ce7 100644
--- a/drivers/net/wireless/ath/ath9k/calib.c
+++ b/drivers/net/wireless/ath/ath9k/calib.c
@@ -158,12 +158,18 @@ bool ath9k_hw_reset_calvalid(struct ath_hw *ah)
158} 158}
159EXPORT_SYMBOL(ath9k_hw_reset_calvalid); 159EXPORT_SYMBOL(ath9k_hw_reset_calvalid);
160 160
161void ath9k_hw_start_nfcal(struct ath_hw *ah) 161void ath9k_hw_start_nfcal(struct ath_hw *ah, bool update)
162{ 162{
163 REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, 163 REG_SET_BIT(ah, AR_PHY_AGC_CONTROL,
164 AR_PHY_AGC_CONTROL_ENABLE_NF); 164 AR_PHY_AGC_CONTROL_ENABLE_NF);
165 REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, 165
166 if (update)
167 REG_CLR_BIT(ah, AR_PHY_AGC_CONTROL,
166 AR_PHY_AGC_CONTROL_NO_UPDATE_NF); 168 AR_PHY_AGC_CONTROL_NO_UPDATE_NF);
169 else
170 REG_SET_BIT(ah, AR_PHY_AGC_CONTROL,
171 AR_PHY_AGC_CONTROL_NO_UPDATE_NF);
172
167 REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_NF); 173 REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_NF);
168} 174}
169 175