summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2011-01-29 08:52:06 +0000
committeradrian <adrian@FreeBSD.org>2011-01-29 08:52:06 +0000
commitd0ef1d0ef89bde2e3837af8debd78d0dfc10e54a (patch)
tree96489e0d30f60f118eb3a306038e05c853615533
parentae8fb00cf1d7490492a1a27e7848e06d52838faf (diff)
downloadFreeBSD-src-d0ef1d0ef89bde2e3837af8debd78d0dfc10e54a.zip
FreeBSD-src-d0ef1d0ef89bde2e3837af8debd78d0dfc10e54a.tar.gz
Add a check for the AR9285E; I have no idea what this is.
The only other changes in ath9k for the AR9285E revolve around sleep modes which are not fully implemented here yet.
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416reg.h4
-rw-r--r--sys/dev/ath/ath_hal/ar9002/ar9285_attach.c20
2 files changed, 20 insertions, 4 deletions
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416reg.h b/sys/dev/ath/ath_hal/ar5416/ar5416reg.h
index 4a23b2f..18badce 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416reg.h
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416reg.h
@@ -634,4 +634,8 @@
#define AR_SREV_KITE_12_OR_LATER(_ah) \
(AR_SREV_KITE_12(_ah) || \
AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_KITE_12)
+#define AR_SREV_9285E_20(_ah) \
+ (AR_SREV_KITE_12_OR_LATER(_ah) && \
+ ((OS_REG_READ(_ah, AR_AN_SYNTH9) & 0x7) == 0x1))
+
#endif /* _DEV_ATH_AR5416REG_H */
diff --git a/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c b/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c
index 79e562a..39dd4cd 100644
--- a/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c
+++ b/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c
@@ -221,15 +221,27 @@ ar9285Attach(uint16_t devid, HAL_SOFTC sc,
HAL_INI_INIT(&ahp9285->ah_ini_rxgain, ar9280Modes_original_rxgain_v2,
6);
+
+ if (AR_SREV_9285E_20(ah))
+ ath_hal_printf(ah, "[ath] AR9285E_20 detected; using XE TX gain tables\n");
+
/* setup txgain table */
switch (ath_hal_eepromGet(ah, AR_EEP_TXGAIN_TYPE, AH_NULL)) {
case AR5416_EEP_TXGAIN_HIGH_POWER:
- HAL_INI_INIT(&ahp9285->ah_ini_txgain,
- ar9285Modes_high_power_tx_gain_v2, 6);
+ if (AR_SREV_9285E_20(ah))
+ HAL_INI_INIT(&ahp9285->ah_ini_txgain,
+ ar9285Modes_XE2_0_high_power, 6);
+ else
+ HAL_INI_INIT(&ahp9285->ah_ini_txgain,
+ ar9285Modes_high_power_tx_gain_v2, 6);
break;
case AR5416_EEP_TXGAIN_ORIG:
- HAL_INI_INIT(&ahp9285->ah_ini_txgain,
- ar9285Modes_original_tx_gain_v2, 6);
+ if (AR_SREV_9285E_20(ah))
+ HAL_INI_INIT(&ahp9285->ah_ini_txgain,
+ ar9285Modes_XE2_0_normal_power, 6);
+ else
+ HAL_INI_INIT(&ahp9285->ah_ini_txgain,
+ ar9285Modes_original_tx_gain_v2, 6);
break;
default:
HALASSERT(AH_FALSE);
OpenPOWER on IntegriCloud