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
This commit is contained in:
Adrian Chadd 2011-04-17 13:46:13 +00:00
parent 0afb958b91
commit d10f1cdc8c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=220738

View File

@ -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);
}