diff options
author | adrian <adrian@FreeBSD.org> | 2011-05-15 07:59:33 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2011-05-15 07:59:33 +0000 |
commit | ca9749fa3229ab01ada13cfaa69726d3fe080fea (patch) | |
tree | 74d549838ed19820ff027e2f544ce808d8372dc2 | |
parent | 1c89b601bc4cc1a1cd314875fdd0fd8bb9286205 (diff) | |
download | FreeBSD-src-ca9749fa3229ab01ada13cfaa69726d3fe080fea.zip FreeBSD-src-ca9749fa3229ab01ada13cfaa69726d3fe080fea.tar.gz |
Fix NF calibration breakage introduced by me in a past commit.
Since the returned NF will be -ve, checking for <= 0 is not good
enough. For now, check whether it equals 0 or -1; a future commit
will tidy this mess up and have it return HAL_BOOL instead.
-rw-r--r-- | sys/dev/ath/ath_hal/ar5416/ar5416_cal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c b/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c index d8609bb..ee61c30 100644 --- a/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c +++ b/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c @@ -501,7 +501,7 @@ ar5416PerCalibrationN(struct ath_hal *ah, struct ieee80211_channel *chan, * and update the history buffer. */ r = ar5416GetNf(ah, chan); - if (r <= 0) { + if (r == 0 || r == -1) { /* NF calibration result isn't valid */ HALDEBUG(ah, HAL_DEBUG_UNMASKABLE, "%s: NF calibration" " didn't finish; delaying CCA\n", __func__); |