Home | History | Annotate | Download | only in ar5416

Lines Matching defs:cal

27 #include "ar5212/ar5212.h"	/* for NF cal related declarations */
46 struct ar5416PerCal *cal = &AH5416(ah)->ah_cal;
48 switch (calType & cal->suppCals) {
54 /* Run ADC Gain Cal for non-CCK & non 2GHz-HT20 only */
62 * Setup HW to collect samples used for current cal
95 /* Kick-off cal */
100 * Initialize shared data structures and prepare a cal to be run.
105 struct ar5416PerCal *cal = &AH5416(ah)->ah_cal;
108 OS_MEMZERO(cal->caldata, sizeof(cal->caldata));
109 cal->calSamples = 0;
126 struct ar5416PerCal *cal = &AH5416(ah)->ah_cal;
137 /* Reset this Cal */
142 "%s: Cal %d failed to finish in 100ms.\n",
145 cal->cal_list = cal->cal_last = cal->cal_curr = AH_NULL;
148 /* Run this cal */
153 "%s: init cal %d did not complete.\n",
160 cal->cal_list = cal->cal_last = cal->cal_curr = AH_NULL;
171 struct ar5416PerCal *cal = &AH5416(ah)->ah_cal;
178 /* Enable Rx Filter Cal */
183 /* Clear the carrier leak cal bit */
186 /* kick off the cal */
197 /* Set the cl cal bit and rerun the cal a 2nd time */
198 /* Enable Rx Filter Cal */
220 * higher than normal value if DC offset and noise floor cal are
226 * Try to make sure the above NF cal completes, just so
236 cal->cal_list = cal->cal_last = cal->cal_curr = AH_NULL;
246 INIT_CAL(&cal->adcDcCalInitData);
247 INSERT_CAL(cal, &cal->adcDcCalInitData);
250 cal->cal_curr = cal->cal_list;
252 if (cal->ah_cal_curr != AH_NULL && !ar5416RunInitCals(ah, 0))
259 INIT_CAL(&cal->adcGainCalData);
260 INSERT_CAL(cal, &cal->adcGainCalData);
265 INIT_CAL(&cal->adcDcCalData);
266 INSERT_CAL(cal, &cal->adcDcCalData);
271 INIT_CAL(&cal->iqCalData);
272 INSERT_CAL(cal, &cal->iqCalData);
277 cal->cal_curr = cal->cal_list;
279 /* Kick off measurements for the first cal */
280 if (cal->cal_curr != AH_NULL)
281 ar5416ResetMeasurement(ah, cal->cal_curr);
290 * Entry point for upper layers to restart current cal.
296 struct ar5416PerCal *cal = &AH5416(ah)->ah_cal;
298 HAL_CAL_LIST *currCal = cal->cal_curr;
321 /* Verify Cal is supported on this channel */
326 "%s: Resetting Cal %d state for channel %u/0x%x\n",
330 /* Disable cal validity in channel */
345 struct ar5416PerCal *cal = &AH5416(ah)->ah_cal;
347 /* Cal is assumed not done until explicitly set below */
361 __func__, cal->calSamples,
367 if (++cal->calSamples >= currCal->calData->calNumSamples) {
390 /* If current cal is marked invalid in channel, kick it off */
402 struct ar5416PerCal *cal = &AH5416(ah)->ah_cal;
403 HAL_CAL_LIST *currCal = cal->cal_curr;
428 * 1. Call generic cal routine
429 * 2. When this cal is done (isCalDone) if we have more cals waiting
432 * Instead, change isCalDone to FALSE and setup the waiting cal(s)
440 cal->cal_curr = currCal = currCal->calNext;
448 /* Do NF cal only at longer intervals */
451 * Get the value from the previous NF cal
477 struct ar5416PerCal *cal = &AH5416(ah)->ah_cal;
478 HAL_CAL_LIST *curCal = cal->cal_curr;
583 * baseband nf cal will just be capped by our present
660 /* Finished NF cal, check against threshold */