Lines Matching defs:aniState
102 * This routine returns the index into the aniState array that
261 struct ar5212AniState *aniState = ahp->ah_curani;
262 const struct ar5212AniParams *params = aniState->params;
286 if (level > aniState->noiseImmunityLevel)
288 else if (level < aniState->noiseImmunityLevel)
290 aniState->noiseImmunityLevel = level;
324 aniState->ofdmWeakSigDetectOff = !on;
337 aniState->cckWeakSigThreshold = high;
351 if (level > aniState->firstepLevel)
353 else if (level < aniState->firstepLevel)
355 aniState->firstepLevel = level;
369 if (level > aniState->spurImmunityLevel)
371 else if (level < aniState->spurImmunityLevel)
373 aniState->spurImmunityLevel = level;
423 struct ar5212AniState *aniState;
431 aniState = ahp->ah_curani;
432 params = aniState->params;
434 if (aniState->noiseImmunityLevel+1 <= params->maxNoiseImmunityLevel) {
436 aniState->noiseImmunityLevel + 1);
438 aniState->noiseImmunityLevel + 1);
442 if (aniState->spurImmunityLevel+1 <= params->maxSpurImmunityLevel) {
444 aniState->spurImmunityLevel + 1);
446 aniState->spurImmunityLevel + 1);
457 if (!aniState->ofdmWeakSigDetectOff) {
471 if (aniState->firstepLevel+1 <= params->maxFirstepLevel) {
474 aniState->firstepLevel+1);
476 aniState->firstepLevel + 1);
484 if (aniState->ofdmWeakSigDetectOff) {
491 if (aniState->firstepLevel+1 <= params->maxFirstepLevel) {
494 aniState->firstepLevel+1);
496 aniState->firstepLevel + 1);
507 if (!aniState->ofdmWeakSigDetectOff) {
515 if (aniState->firstepLevel > 0) {
519 aniState->firstepLevel);
534 struct ar5212AniState *aniState;
543 aniState = ahp->ah_curani;
544 params = aniState->params;
545 if (aniState->noiseImmunityLevel+1 <= params->maxNoiseImmunityLevel) {
547 aniState->noiseImmunityLevel + 1);
549 aniState->noiseImmunityLevel + 1);
560 if (aniState->firstepLevel+1 < params->maxFirstepLevel) {
563 aniState->firstepLevel+1);
565 aniState->firstepLevel + 1);
574 if (aniState->firstepLevel > 0) {
578 aniState->firstepLevel);
588 ar5212AniRestart(struct ath_hal *ah, struct ar5212AniState *aniState)
592 aniState->listenTime = 0;
594 const struct ar5212AniParams *params = aniState->params;
607 aniState->ofdmPhyErrCount = 0;
608 aniState->cckPhyErrCount = 0;
623 struct ar5212AniState *aniState;
628 aniState = &ahp->ah_ani[index];
629 ahp->ah_curani = aniState;
633 aniState->isSetup, opmode);
638 aniState->isSetup, opmode);
660 if (restore && aniState->isSetup) {
662 aniState->noiseImmunityLevel);
664 aniState->spurImmunityLevel);
666 !aniState->ofdmWeakSigDetectOff);
668 aniState->cckWeakSigThreshold);
670 aniState->firstepLevel);
678 aniState->isSetup = AH_TRUE;
680 ar5212AniRestart(ah, aniState);
731 struct ar5212AniState *aniState = ahp->ah_curani;
732 const struct ar5212AniParams *params = aniState->params;
737 ofdmPhyErrCnt - aniState->ofdmPhyErrCount;
738 aniState->ofdmPhyErrCount = ofdmPhyErrCnt;
742 cckPhyErrCnt - aniState->cckPhyErrCount;
743 aniState->cckPhyErrCount = cckPhyErrCnt;
751 if (aniState->ofdmPhyErrCount > params->ofdmTrigHigh)
753 if (aniState->cckPhyErrCount > params->cckTrigHigh)
756 ar5212AniRestart(ah, aniState);
764 struct ar5212AniState *aniState;
769 aniState = ahp->ah_curani;
770 params = aniState->params;
772 aniState->ofdmPhyErrCount++;
774 if (aniState->ofdmPhyErrCount > params->ofdmTrigHigh) {
776 ar5212AniRestart(ah, aniState);
779 aniState->cckPhyErrCount++;
781 if (aniState->cckPhyErrCount > params->cckTrigHigh) {
783 ar5212AniRestart(ah, aniState);
792 struct ar5212AniState *aniState;
797 aniState = ahp->ah_curani;
798 params = aniState->params;
812 if (aniState->ofdmWeakSigDetectOff) {
820 if (aniState->firstepLevel > 0) {
823 aniState->firstepLevel-1);
825 aniState->firstepLevel - 1);
832 if (aniState->firstepLevel > 0) {
835 aniState->firstepLevel-1);
837 aniState->firstepLevel - 1);
843 if (aniState->spurImmunityLevel > 0) {
845 __func__, aniState->spurImmunityLevel-1);
847 aniState->spurImmunityLevel - 1);
854 if (aniState->noiseImmunityLevel > 0) {
856 __func__, aniState->noiseImmunityLevel-1);
858 aniState->noiseImmunityLevel - 1);
877 struct ar5212AniState *aniState;
885 aniState = ahp->ah_curani;
886 if (aniState->cycleCount == 0 || aniState->cycleCount > cycleCount) {
895 int32_t ccdelta = cycleCount - aniState->cycleCount;
896 int32_t rfdelta = rxFrameCount - aniState->rxFrameCount;
897 int32_t tfdelta = txFrameCount - aniState->txFrameCount;
900 aniState->cycleCount = cycleCount;
901 aniState->txFrameCount = txFrameCount;
902 aniState->rxFrameCount = rxFrameCount;
910 updateMIBStats(struct ath_hal *ah, struct ar5212AniState *aniState)
913 const struct ar5212AniParams *params = aniState->params;
934 ofdmPhyErrCnt - aniState->ofdmPhyErrCount;
935 aniState->ofdmPhyErrCount = ofdmPhyErrCnt;
944 cckPhyErrCnt - aniState->cckPhyErrCount;
945 aniState->cckPhyErrCount = cckPhyErrCnt;
957 struct ar5212AniState *aniState = ahp->ah_curani;
963 /* XXX can aniState be null? */
964 if (aniState == AH_NULL)
973 ar5212AniRestart(ah, aniState);
976 aniState->listenTime += listenTime;
978 OS_MARK(ah, AH_MARK_ANI_POLL, aniState->listenTime);
980 params = aniState->params;
981 if (aniState->listenTime > 5*params->period) {
987 updateMIBStats(ah, aniState);
988 if (aniState->ofdmPhyErrCount <= aniState->listenTime *
990 aniState->cckPhyErrCount <= aniState->listenTime *
993 ar5212AniRestart(ah, aniState);
994 } else if (aniState->listenTime > params->period) {
996 updateMIBStats(ah, aniState);
998 if (aniState->ofdmPhyErrCount > aniState->listenTime *
1002 aniState->ofdmPhyErrCount, aniState->listenTime);
1004 ar5212AniRestart(ah, aniState);
1005 } else if (aniState->cckPhyErrCount > aniState->listenTime *
1009 aniState->cckPhyErrCount, aniState->listenTime);
1011 ar5212AniRestart(ah, aniState);