diff options
author | adrian <adrian@FreeBSD.org> | 2011-01-26 10:48:29 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2011-01-26 10:48:29 +0000 |
commit | dfa1118b46056a3706d53a020f184a9181ac8667 (patch) | |
tree | b5df0eb809670a57c4553e97dc746db4f96fdc2d /sys/dev/ath | |
parent | da9733238421a0ba85bf2df96d6f4179e2ac0874 (diff) | |
download | FreeBSD-src-dfa1118b46056a3706d53a020f184a9181ac8667.zip FreeBSD-src-dfa1118b46056a3706d53a020f184a9181ac8667.tar.gz |
Add ar5416RestoreChainMask() which will undo any AR5416 specific chainmask
overriding after calibration.
This will get set for other two chain radios, such as AR9280 and later on,
AR9287. It should however be a nul operation.
Diffstat (limited to 'sys/dev/ath')
-rw-r--r-- | sys/dev/ath/ath_hal/ar5416/ar5416.h | 1 | ||||
-rw-r--r-- | sys/dev/ath/ath_hal/ar5416/ar5416_reset.c | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416.h b/sys/dev/ath/ath_hal/ar5416/ar5416.h index d9def4e..e4bf737 100644 --- a/sys/dev/ath/ath_hal/ar5416/ar5416.h +++ b/sys/dev/ath/ath_hal/ar5416/ar5416.h @@ -202,6 +202,7 @@ extern void ar5416GetTargetPowersLeg(struct ath_hal *ah, uint16_t numChannels, CAL_TARGET_POWER_LEG *pNewPower, uint16_t numRates, HAL_BOOL isExtTarget); extern void ar5416InitChainMasks(struct ath_hal *ah); +extern void ar5416RestoreChainMask(struct ath_hal *ah); extern HAL_BOOL ar5416StopTxDma(struct ath_hal *ah, u_int q); extern HAL_BOOL ar5416SetupTxDesc(struct ath_hal *ah, struct ath_desc *ds, diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c b/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c index bc36cba..d08d77a 100644 --- a/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c +++ b/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c @@ -329,6 +329,8 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMODE opmode, if (!ar5416InitCal(ah, chan)) FAIL(HAL_ESELFTEST); + ar5416RestoreChainMask(ah); + AH_PRIVATE(ah)->ah_opmode = opmode; /* record operating mode */ if (bChannelChange && !IEEE80211_IS_CHAN_DFS(chan)) @@ -1124,6 +1126,18 @@ ar5416InitChainMasks(struct ath_hal *ah) OS_REG_WRITE(ah, AR_SELFGEN_MASK, AH5416(ah)->ah_tx_chainmask); } +void +ar5416RestoreChainMask(struct ath_hal *ah) +{ + int rx_chainmask = AH5416(ah)->ah_rx_chainmask; + + if ((rx_chainmask == 0x5) || (rx_chainmask == 0x3)) { + OS_REG_WRITE(ah, AR_PHY_RX_CHAINMASK, rx_chainmask); + OS_REG_WRITE(ah, AR_PHY_CAL_CHAINMASK, rx_chainmask); + } +} + + #ifndef IS_5GHZ_FAST_CLOCK_EN #define IS_5GHZ_FAST_CLOCK_EN(ah, chan) AH_FALSE #endif |