diff options
author | adrian <adrian@FreeBSD.org> | 2015-05-23 08:02:54 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2015-05-23 08:02:54 +0000 |
commit | cfe20f63ac5afd3f40fbe2b342cb0449dcc65d6c (patch) | |
tree | 5a82290cfc7df400d7bbedd6031d6a36c1f83ec1 | |
parent | f031069b05df001e73fbfa92d7d06c0917b87f98 (diff) | |
download | FreeBSD-src-cfe20f63ac5afd3f40fbe2b342cb0449dcc65d6c.zip FreeBSD-src-cfe20f63ac5afd3f40fbe2b342cb0449dcc65d6c.tar.gz |
Add support for the tuning cap for Hornet/AR9331 boards.
This dramatically improves RX sensitivity and behaviour on the
AR9331 hardware I have, including the Carambola 2.
Tested:
* AR9331, Carambola 2 board
Submitted by: Zilvinas Valinskas <zilvinas.valinskas@gmail.com>
-rw-r--r-- | sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c index 9028ab7..c8d2b51 100644 --- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c +++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c @@ -4476,8 +4476,16 @@ HAL_BOOL ar9300_tuning_caps_apply(struct ath_hal *ah) if ((eep->base_eep_header.feature_enable & 0x40) >> 6) { tuning_caps_params &= 0x7f; - if (AR_SREV_HORNET(ah) || AR_SREV_POSEIDON(ah) || AR_SREV_WASP(ah)) { + /* XXX TODO: ath9k skips it for Wasp and Honeybee/AR9531, not Poseidon */ + if (AR_SREV_POSEIDON(ah) || AR_SREV_WASP(ah)) { return AH_TRUE; + } else if (AR_SREV_HORNET(ah)) { + OS_REG_RMW_FIELD(ah, + AR_HORNET_CH0_XTAL, AR_OSPREY_CHO_XTAL_CAPINDAC, + tuning_caps_params); + OS_REG_RMW_FIELD(ah, + AR_HORNET_CH0_XTAL, AR_OSPREY_CHO_XTAL_CAPOUTDAC, + tuning_caps_params); } else if (AR_SREV_SCORPION(ah)) { OS_REG_RMW_FIELD(ah, AR_SCORPION_CH0_XTAL, AR_OSPREY_CHO_XTAL_CAPINDAC, |