diff options
author | adrian <adrian@FreeBSD.org> | 2011-05-11 13:24:17 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2011-05-11 13:24:17 +0000 |
commit | c7c34734f4e284fca5be38a6050b79188ece8221 (patch) | |
tree | 53c24cb2b5c167678edc82240b6a7efc03e198f3 | |
parent | b410b114e0e2ea173de31f4f2cfa8dd26ab84e9f (diff) | |
download | FreeBSD-src-c7c34734f4e284fca5be38a6050b79188ece8221.zip FreeBSD-src-c7c34734f4e284fca5be38a6050b79188ece8221.tar.gz |
Make sure the chip is awake before writing to it to finally detach
it.
Obtained from: Atheros
-rw-r--r-- | sys/dev/ath/ath_hal/ar5416/ar5416_attach.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c b/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c index 9ef0984..d545733 100644 --- a/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c +++ b/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c @@ -420,6 +420,12 @@ ar5416Detach(struct ath_hal *ah) HALASSERT(ah != AH_NULL); HALASSERT(ah->ah_magic == AR5416_MAGIC); + /* Make sure that chip is awake before writing to it */ + if (! ar5416SetPowerMode(ah, HAL_PM_AWAKE, AH_TRUE)) + HALDEBUG(ah, HAL_DEBUG_UNMASKABLE, + "%s: failed to wake up chip\n", + __func__); + ar5416AniDetach(ah); ar5212RfDetach(ah); ah->ah_disable(ah); |