aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2010-08-12 06:08:36 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2010-08-12 06:08:36 +0000
commit43ff2d6aec3a6141de53fdb38010139d4f21fd75 (patch)
treeafe7170e22f58cbf131c27d1a1a4b8e186708feb /sys/dev
parent85b035b335b9b7461beca7257187f763cd410991 (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416_cal.c13
1 files changed, 12 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 712f7e0568ad..82b3009dde50 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
@@ -24,6 +24,8 @@
#include "ah_eeprom_v14.h"
+#include "ar5212/ar5212.h" /* for NF cal related declarations */
+
#include "ar5416/ar5416.h"
#include "ar5416/ar5416reg.h"
#include "ar5416/ar5416phy.h"
@@ -220,7 +222,16 @@ ar5416InitCal(struct ath_hal *ah, const struct ieee80211_channel *chan)
* triggered at the same time.
*/
OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_NF);
-
+ /*
+ * Try to make sure the above NF cal completes, just so
+ * it doesn't clash with subsequent percals -adrian
+ */
+ if (! ar5212WaitNFCalComplete(ah, 10000)) {
+ HALDEBUG(ah, HAL_DEBUG_ANY, "%s: initial NF calibration did "
+ "not complete in time; noisy environment?\n", __func__);
+ return AH_FALSE;
+ }
+
/* Initialize list pointers */
cal->cal_list = cal->cal_last = cal->cal_curr = AH_NULL;