Lines Matching refs:aniState

53 	struct ar5416AniState *aniState = ahp->ah_curani;
82 if (level > aniState->noiseImmunityLevel)
84 else if (level < aniState->noiseImmunityLevel)
86 aniState->noiseImmunityLevel = (uint8_t)level; /* LINT */
137 if ((!on) != aniState->ofdmWeakSigDetectOff) {
142 aniState->ofdmWeakSigDetectOff = !on;
153 if (high != aniState->cckWeakSigThreshold) {
159 aniState->cckWeakSigThreshold = (uint8_t)high;
177 if (level > aniState->firstepLevel)
179 else if (level < aniState->firstepLevel)
181 aniState->firstepLevel = (uint8_t)level; /* LINT */
199 if (level > aniState->spurImmunityLevel)
201 else if (level < aniState->spurImmunityLevel)
203 aniState->spurImmunityLevel = (uint8_t)level; /* LINT */
219 aniState->noiseImmunityLevel, aniState->spurImmunityLevel,
220 !aniState->ofdmWeakSigDetectOff));
224 aniState->cckWeakSigThreshold, aniState->firstepLevel,
225 aniState->listenTime));
228 aniState->cycleCount, aniState->ofdmPhyErrCount,
229 aniState->cckPhyErrCount));
248 struct ar5416AniState *aniState;
253 aniState = ahp->ah_curani;
255 aniState->listenTime = 0;
257 if (aniState->ofdmTrigHigh > AR_PHY_COUNTMAX) {
258 aniState->ofdmPhyErrBase = 0;
262 aniState->ofdmPhyErrBase =
263 AR_PHY_COUNTMAX - aniState->ofdmTrigHigh;
265 if (aniState->cckTrigHigh > AR_PHY_COUNTMAX) {
266 aniState->cckPhyErrBase = 0;
270 aniState->cckPhyErrBase =
271 AR_PHY_COUNTMAX - aniState->cckTrigHigh;
276 __func__, aniState->ofdmPhyErrBase,
277 aniState->cckPhyErrBase));
279 REG_WRITE(ah, AR_PHY_ERR_1, aniState->ofdmPhyErrBase);
280 REG_WRITE(ah, AR_PHY_ERR_2, aniState->cckPhyErrBase);
286 aniState->ofdmPhyErrCount = 0;
287 aniState->cckPhyErrCount = 0;
295 struct ar5416AniState *aniState;
302 aniState = ahp->ah_curani;
304 if (aniState->noiseImmunityLevel < HAL_NOISE_IMMUNE_MAX) {
306 aniState->noiseImmunityLevel + 1)) {
311 if (aniState->spurImmunityLevel < HAL_SPUR_IMMUNE_MAX) {
313 aniState->spurImmunityLevel + 1)) {
319 if (aniState->firstepLevel < HAL_FIRST_STEP_MAX) {
321 aniState->firstepLevel + 1);
326 if (rssi > aniState->rssiThrHigh) {
327 if (!aniState->ofdmWeakSigDetectOff) {
336 if (aniState->firstepLevel < HAL_FIRST_STEP_MAX) {
338 aniState->firstepLevel + 1);
341 } else if (rssi > aniState->rssiThrLow) {
342 if (aniState->ofdmWeakSigDetectOff)
346 if (aniState->firstepLevel < HAL_FIRST_STEP_MAX)
348 aniState->firstepLevel + 1);
353 if (!aniState->ofdmWeakSigDetectOff)
357 if (aniState->firstepLevel > 0)
370 struct ar5416AniState *aniState;
377 aniState = ahp->ah_curani;
378 if (aniState->noiseImmunityLevel < HAL_NOISE_IMMUNE_MAX) {
380 aniState->noiseImmunityLevel + 1)) {
385 if (aniState->firstepLevel < HAL_FIRST_STEP_MAX) {
387 aniState->firstepLevel + 1);
392 if (rssi > aniState->rssiThrLow) {
393 if (aniState->firstepLevel < HAL_FIRST_STEP_MAX)
395 aniState->firstepLevel + 1);
399 if (aniState->firstepLevel > 0)
410 struct ar5416AniState *aniState;
413 aniState = ahp->ah_curani;
416 if (aniState->firstepLevel > 0) {
418 aniState->firstepLevel - 1))
423 if (rssi > aniState->rssiThrHigh) {
426 } else if (rssi > aniState->rssiThrLow) {
427 if (aniState->ofdmWeakSigDetectOff) {
433 if (aniState->firstepLevel > 0) {
436 aniState->firstepLevel - 1) == B_TRUE)
440 if (aniState->firstepLevel > 0) {
443 aniState->firstepLevel - 1) == B_TRUE)
449 if (aniState->spurImmunityLevel > 0) {
451 aniState->spurImmunityLevel - 1))
455 if (aniState->noiseImmunityLevel > 0) {
457 aniState->noiseImmunityLevel - 1);
466 struct ar5416AniState *aniState;
474 aniState = ahp->ah_curani;
475 if (aniState->cycleCount == 0 || aniState->cycleCount > cycleCount) {
480 int32_t ccdelta = cycleCount - aniState->cycleCount;
481 int32_t rfdelta = rxFrameCount - aniState->rxFrameCount;
482 int32_t tfdelta = txFrameCount - aniState->txFrameCount;
485 aniState->cycleCount = cycleCount;
486 aniState->txFrameCount = txFrameCount;
487 aniState->rxFrameCount = rxFrameCount;
496 struct ar5416AniState *aniState;
507 aniState = &ahp->ah_ani[index];
508 ahp->ah_curani = aniState;
544 if (aniState->noiseImmunityLevel != 0)
546 aniState->noiseImmunityLevel);
547 if (aniState->spurImmunityLevel != 0)
549 aniState->spurImmunityLevel);
550 if (aniState->ofdmWeakSigDetectOff)
553 !aniState->ofdmWeakSigDetectOff);
554 if (aniState->cckWeakSigThreshold)
556 aniState->cckWeakSigThreshold);
557 if (aniState->firstepLevel != 0)
559 aniState->firstepLevel);
580 struct ar5416AniState *aniState;
583 aniState = ahp->ah_curani;
593 aniState->listenTime += listenTime;
604 if (phyCnt1 < aniState->ofdmPhyErrBase ||
605 phyCnt2 < aniState->cckPhyErrBase) {
606 if (phyCnt1 < aniState->ofdmPhyErrBase) {
611 aniState->ofdmPhyErrBase));
613 aniState->ofdmPhyErrBase);
617 if (phyCnt2 < aniState->cckPhyErrBase) {
622 aniState->cckPhyErrBase));
624 aniState->cckPhyErrBase);
631 ofdmPhyErrCnt = phyCnt1 - aniState->ofdmPhyErrBase;
633 ofdmPhyErrCnt - aniState->ofdmPhyErrCount;
634 aniState->ofdmPhyErrCount = ofdmPhyErrCnt;
636 cckPhyErrCnt = phyCnt2 - aniState->cckPhyErrBase;
638 cckPhyErrCnt - aniState->cckPhyErrCount;
639 aniState->cckPhyErrCount = cckPhyErrCnt;
645 if (aniState->listenTime > 5 * ahp->ah_aniPeriod) {
646 if (aniState->ofdmPhyErrCount <= aniState->listenTime *
647 aniState->ofdmTrigLow / 1000 &&
648 aniState->cckPhyErrCount <= aniState->listenTime *
649 aniState->cckTrigLow / 1000)
652 } else if (aniState->listenTime > ahp->ah_aniPeriod) {
653 if (aniState->ofdmPhyErrCount > aniState->listenTime *
654 aniState->ofdmTrigHigh / 1000) {
657 } else if (aniState->cckPhyErrCount >
658 aniState->listenTime * aniState->cckTrigHigh / 1000) {
778 struct ar5416AniState *aniState = ahp->ah_curani;
782 ofdmPhyErrCnt = phyCnt1 - aniState->ofdmPhyErrBase;
784 ofdmPhyErrCnt - aniState->ofdmPhyErrCount;
785 aniState->ofdmPhyErrCount = ofdmPhyErrCnt;
787 cckPhyErrCnt = phyCnt2 - aniState->cckPhyErrBase;
789 cckPhyErrCnt - aniState->cckPhyErrCount;
790 aniState->cckPhyErrCount = cckPhyErrCnt;
798 if (aniState->ofdmPhyErrCount > aniState->ofdmTrigHigh)
800 if (aniState->cckPhyErrCount > aniState->cckTrigHigh)