From 0d2dd30cbd826dde3a1a3fe3630183cd3959d3cd Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Fri, 22 Apr 2011 10:57:46 +0000 Subject: [PATCH] Bring over a pdadc calibration fix from ath9k - unused power detector gain values should be 58, not the previous values. Obtained From: linux ath9k --- sys/dev/ath/ath_hal/ah_eeprom_v4k.h | 2 ++ sys/dev/ath/ath_hal/ar9002/ar9285_reset.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/ath/ath_hal/ah_eeprom_v4k.h b/sys/dev/ath/ath_hal/ah_eeprom_v4k.h index fa16ad9d35b..3487de47245 100644 --- a/sys/dev/ath/ath_hal/ah_eeprom_v4k.h +++ b/sys/dev/ath/ath_hal/ah_eeprom_v4k.h @@ -29,6 +29,8 @@ #define AR9285_RDEXT_DEFAULT 0x1F +#define AR5416_4K_EEP_PD_GAIN_BOUNDARY_DEFAULT 58 + #undef owl_eep_start_loc #ifdef __LINUX_ARM_ARCH__ /* AP71 */ #define owl_eep_start_loc 0 diff --git a/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c b/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c index 1b1c10e7683..1f7bdd322ab 100644 --- a/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c +++ b/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c @@ -871,7 +871,7 @@ ar9285GetGainBoundariesAndPdadcs(struct ath_hal *ah, /* Fill out pdGainBoundaries - only up to 2 allowed here, but hardware allows up to 4 */ while (i < AR5416_PD_GAINS_IN_MASK) { - pPdGainBoundaries[i] = pPdGainBoundaries[i-1]; + pPdGainBoundaries[i] = AR5416_4K_EEP_PD_GAIN_BOUNDARY_DEFAULT; i++; }