Lines Matching full:nf

27 #include "ar5212/ar5212.h"	/* for NF cal related declarations */
41 static void ar5416SanitizeNF(struct ath_hal *ah, int16_t *nf);
264 * Do NF calibration after DC offset and other CALs. in ar5416InitCal()
493 /* Do NF cal only at longer intervals */ in ar5416PerCalibrationN()
504 * Get the value from the previous NF cal in ar5416PerCalibrationN()
509 /* NF calibration result isn't valid */ in ar5416PerCalibrationN()
510 HALDEBUG(ah, HAL_DEBUG_UNMASKABLE, "%s: NF calibration" in ar5416PerCalibrationN()
515 * NF calibration result is valid. in ar5416PerCalibrationN()
517 * Load the NF from history buffer of the current channel. in ar5416PerCalibrationN()
518 * NF is slow time-variant, so it is OK to use a in ar5416PerCalibrationN()
523 /* start NF calibration, without updating BB NF register*/ in ar5416PerCalibrationN()
604 * Force NF calibration for all chains. in ar5416LoadNF()
617 * Write filtered NF values into maxCCApwr register parameter in ar5416LoadNF()
645 /* Load software filtered NF value into baseband internal minCCApwr variable. */ in ar5416LoadNF()
658 * here, the baseband nf cal will just be capped by our present in ar5416LoadNF()
662 "nf to load: AR_PHY_AGC_CONTROL=0x%x\n", in ar5416LoadNF()
750 ar5416SanitizeNF(struct ath_hal *ah, int16_t *nf) in ar5416SanitizeNF() argument
762 if (!nf[i]) in ar5416SanitizeNF()
765 if (nf[i] > limit->max) { in ar5416SanitizeNF()
767 "NF[%d] (%d) > MAX (%d), correcting to MAX\n", in ar5416SanitizeNF()
768 i, nf[i], limit->max); in ar5416SanitizeNF()
769 nf[i] = limit->max; in ar5416SanitizeNF()
770 } else if (nf[i] < limit->min) { in ar5416SanitizeNF()
772 "NF[%d] (%d) < MIN (%d), correcting to NOM\n", in ar5416SanitizeNF()
773 i, nf[i], limit->min); in ar5416SanitizeNF()
774 nf[i] = limit->nominal; in ar5416SanitizeNF()
780 * Read the NF and check it against the noise floor threshold
782 * Return 0 if the NF calibration hadn't finished, 0 if it was
783 * invalid, or > 0 for a valid NF reading.
788 int16_t nf, nfThresh; in ar5416GetNf() local
794 "%s: NF didn't complete in calibration window\n", __func__); in ar5416GetNf()
795 nf = 0; in ar5416GetNf()
796 retval = -1; /* NF didn't finish */ in ar5416GetNf()
798 /* Finished NF cal, check against threshold */ in ar5416GetNf()
804 nf = nfarray[0]; in ar5416GetNf()
807 if (nf > nfThresh) { in ar5416GetNf()
811 nf, nfThresh); in ar5416GetNf()
818 nf = 0; in ar5416GetNf()
822 nf = 0; in ar5416GetNf()
833 ichan->rawNoiseFloor = nf; in ar5416GetNf()
834 retval = nf; in ar5416GetNf()