Lines Matching defs:aniState
106 * This routine returns the index into the aniState array that
212 struct ar5212AniState *aniState = ahp->ah_curani;
213 const struct ar5212AniParams *params = aniState->params;
237 if (level > aniState->noiseImmunityLevel)
239 else if (level < aniState->noiseImmunityLevel)
241 aniState->noiseImmunityLevel = level;
286 aniState->ofdmWeakSigDetectOff = !on;
299 aniState->cckWeakSigThreshold = high;
313 if (level > aniState->firstepLevel)
315 else if (level < aniState->firstepLevel)
317 aniState->firstepLevel = level;
331 if (level > aniState->spurImmunityLevel)
333 else if (level < aniState->spurImmunityLevel)
335 aniState->spurImmunityLevel = level;
378 struct ar5212AniState *aniState;
386 aniState = ahp->ah_curani;
387 params = aniState->params;
389 if (aniState->noiseImmunityLevel+1 < params->maxNoiseImmunityLevel) {
391 aniState->noiseImmunityLevel + 1);
395 if (aniState->spurImmunityLevel+1 < params->maxSpurImmunityLevel) {
397 aniState->spurImmunityLevel + 1);
408 if (!aniState->ofdmWeakSigDetectOff) {
420 if (aniState->firstepLevel+1 < params->maxFirstepLevel) {
422 aniState->firstepLevel + 1);
430 if (aniState->ofdmWeakSigDetectOff)
434 if (aniState->firstepLevel+1 < params->maxFirstepLevel)
436 aniState->firstepLevel + 1);
446 if (!aniState->ofdmWeakSigDetectOff)
450 if (aniState->firstepLevel > 0)
464 struct ar5212AniState *aniState;
473 aniState = ahp->ah_curani;
474 params = aniState->params;
475 if (aniState->noiseImmunityLevel+1 < params->maxNoiseImmunityLevel) {
477 aniState->noiseImmunityLevel + 1);
488 if (aniState->firstepLevel+1 < params->maxFirstepLevel)
490 aniState->firstepLevel + 1);
498 if (aniState->firstepLevel > 0)
507 ar5416AniRestart(struct ath_hal *ah, struct ar5212AniState *aniState)
510 const struct ar5212AniParams *params = aniState->params;
512 aniState->listenTime = 0;
527 aniState->ofdmPhyErrCount = 0;
528 aniState->cckPhyErrCount = 0;
543 struct ar5212AniState *aniState;
548 aniState = &ahp->ah_ani[index];
549 ahp->ah_curani = aniState;
553 aniState->isSetup, opmode);
558 aniState->isSetup, opmode);
580 if (restore && aniState->isSetup) {
582 aniState->noiseImmunityLevel);
584 aniState->spurImmunityLevel);
586 !aniState->ofdmWeakSigDetectOff);
588 aniState->cckWeakSigThreshold);
590 aniState->firstepLevel);
598 aniState->isSetup = AH_TRUE;
600 ar5416AniRestart(ah, aniState);
653 struct ar5212AniState *aniState = ahp->ah_curani;
654 const struct ar5212AniParams *params = aniState->params;
659 ofdmPhyErrCnt - aniState->ofdmPhyErrCount;
660 aniState->ofdmPhyErrCount = ofdmPhyErrCnt;
664 cckPhyErrCnt - aniState->cckPhyErrCount;
665 aniState->cckPhyErrCount = cckPhyErrCnt;
673 if (aniState->ofdmPhyErrCount > params->ofdmTrigHigh)
675 if (aniState->cckPhyErrCount > params->cckTrigHigh)
678 ar5416AniRestart(ah, aniState);
686 struct ar5212AniState *aniState;
691 aniState = ahp->ah_curani;
692 params = aniState->params;
706 if (aniState->ofdmWeakSigDetectOff) {
712 if (aniState->firstepLevel > 0) {
714 aniState->firstepLevel - 1);
721 if (aniState->firstepLevel > 0) {
723 aniState->firstepLevel - 1);
729 if (aniState->spurImmunityLevel > 0) {
731 aniState->spurImmunityLevel - 1);
738 if (aniState->noiseImmunityLevel > 0) {
740 aniState->noiseImmunityLevel - 1);
759 struct ar5212AniState *aniState;
767 aniState = ahp->ah_curani;
768 if (aniState->cycleCount == 0 || aniState->cycleCount > cycleCount) {
777 int32_t ccdelta = cycleCount - aniState->cycleCount;
778 int32_t rfdelta = rxFrameCount - aniState->rxFrameCount;
779 int32_t tfdelta = txFrameCount - aniState->txFrameCount;
782 aniState->cycleCount = cycleCount;
783 aniState->txFrameCount = txFrameCount;
784 aniState->rxFrameCount = rxFrameCount;
792 updateMIBStats(struct ath_hal *ah, struct ar5212AniState *aniState)
795 const struct ar5212AniParams *params = aniState->params;
814 ofdmPhyErrCnt - aniState->ofdmPhyErrCount;
815 aniState->ofdmPhyErrCount = ofdmPhyErrCnt;
824 cckPhyErrCnt - aniState->cckPhyErrCount;
825 aniState->cckPhyErrCount = cckPhyErrCnt;
837 struct ar5212AniState *aniState = ahp->ah_curani;
843 /* XXX can aniState be null? */
844 if (aniState == AH_NULL)
853 ar5416AniRestart(ah, aniState);
856 aniState->listenTime += listenTime;
858 OS_MARK(ah, AH_MARK_ANI_POLL, aniState->listenTime);
860 params = aniState->params;
861 if (aniState->listenTime > 5*params->period) {
866 updateMIBStats(ah, aniState);
867 if (aniState->ofdmPhyErrCount <= aniState->listenTime *
869 aniState->cckPhyErrCount <= aniState->listenTime *
872 ar5416AniRestart(ah, aniState);
873 } else if (aniState->listenTime > params->period) {
874 updateMIBStats(ah, aniState);
876 if (aniState->ofdmPhyErrCount > aniState->listenTime *
879 ar5416AniRestart(ah, aniState);
880 } else if (aniState->cckPhyErrCount > aniState->listenTime *
883 ar5416AniRestart(ah, aniState);