diff options
author | adrian <adrian@FreeBSD.org> | 2011-04-17 13:46:13 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2011-04-17 13:46:13 +0000 |
commit | 83df5db1b3cba766699cdc83cba686ad470e736b (patch) | |
tree | c6fd906b76468d460039f5a76a44938dd2fa381c | |
parent | 169935c85b8ce868ab2d02fa4c84c504dd6d01d8 (diff) | |
download | FreeBSD-src-83df5db1b3cba766699cdc83cba686ad470e736b.zip FreeBSD-src-83df5db1b3cba766699cdc83cba686ad470e736b.tar.gz |
Mark the PHY as inactive before the chip is reset.
It's also marked inactive by the initvals, and enabled after
the baseband/PLL has been configured, but before the RF
registers have been programmed.
The origin and reason for this particular change is currently unknown.
Obtained from: Linux ath9k
-rw-r--r-- | sys/dev/ath/ath_hal/ar5416/ar5416_reset.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c b/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c index d220dc6..3908fee 100644 --- a/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c +++ b/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c @@ -62,6 +62,7 @@ static HAL_BOOL ar5416SetPowerPerRateTable(struct ath_hal *ah, uint16_t twiceMaxRegulatoryPower, uint16_t powerLimit); static void ar5416Set11nRegs(struct ath_hal *ah, const struct ieee80211_channel *chan); +static void ar5416MarkPhyInactive(struct ath_hal *ah); /* * Places the device in and out of reset and then places sane @@ -148,6 +149,9 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMODE opmode, if (AR_SREV_MERLIN_20_OR_LATER(ah) && ath_hal_eepromGetFlag(ah, AR_EEP_OL_PWRCTRL)) tsf = ar5212GetTsf64(ah); + /* Mark PHY as inactive; marked active in ar5416InitBB() */ + ar5416MarkPhyInactive(ah); + if (!ar5416ChipReset(ah, chan)) { HALDEBUG(ah, HAL_DEBUG_ANY, "%s: chip reset failed\n", __func__); FAIL(HAL_EIO); @@ -2493,3 +2497,8 @@ ar5416EepromSetAddac(struct ath_hal *ah, const struct ieee80211_channel *chan) #undef XPA_LVL_FREQ } +static void +ar5416MarkPhyInactive(struct ath_hal *ah) +{ + OS_REG_WRITE(ah, AR_PHY_ACTIVE, AR_PHY_ACTIVE_DIS); +} |