Lines Matching refs:aniState
177 struct ar5212AniState *aniState = ahp->ah_curani; in ar5416AniControl() local
184 if (aniState != AH_NULL) in ar5416AniControl()
185 params = aniState->params; in ar5416AniControl()
245 if (level > aniState->noiseImmunityLevel) in ar5416AniControl()
247 else if (level < aniState->noiseImmunityLevel) in ar5416AniControl()
249 aniState->noiseImmunityLevel = level; in ar5416AniControl()
295 aniState->ofdmWeakSigDetectOff = !on; in ar5416AniControl()
309 aniState->cckWeakSigThreshold = high; in ar5416AniControl()
324 if (level > aniState->firstepLevel) in ar5416AniControl()
326 else if (level < aniState->firstepLevel) in ar5416AniControl()
328 aniState->firstepLevel = level; in ar5416AniControl()
344 if (level > aniState->spurImmunityLevel) in ar5416AniControl()
346 else if (level < aniState->spurImmunityLevel) in ar5416AniControl()
348 aniState->spurImmunityLevel = level; in ar5416AniControl()
370 struct ar5212AniState *aniState; in ar5416AniOfdmErrTrigger() local
378 aniState = ahp->ah_curani; in ar5416AniOfdmErrTrigger()
379 params = aniState->params; in ar5416AniOfdmErrTrigger()
381 if (aniState->noiseImmunityLevel+1 < params->maxNoiseImmunityLevel) { in ar5416AniOfdmErrTrigger()
383 aniState->noiseImmunityLevel + 1)) in ar5416AniOfdmErrTrigger()
387 if (aniState->spurImmunityLevel+1 < params->maxSpurImmunityLevel) { in ar5416AniOfdmErrTrigger()
389 aniState->spurImmunityLevel + 1)) in ar5416AniOfdmErrTrigger()
399 if (aniState->firstepLevel < params->maxFirstepLevel) { in ar5416AniOfdmErrTrigger()
401 aniState->firstepLevel + 1)) in ar5416AniOfdmErrTrigger()
412 if (!aniState->ofdmWeakSigDetectOff) { in ar5416AniOfdmErrTrigger()
424 if (aniState->firstepLevel < params->maxFirstepLevel) { in ar5416AniOfdmErrTrigger()
426 aniState->firstepLevel + 1)) in ar5416AniOfdmErrTrigger()
434 if (aniState->ofdmWeakSigDetectOff) in ar5416AniOfdmErrTrigger()
438 if (aniState->firstepLevel < params->maxFirstepLevel) in ar5416AniOfdmErrTrigger()
440 aniState->firstepLevel + 1)) in ar5416AniOfdmErrTrigger()
449 if (!aniState->ofdmWeakSigDetectOff) in ar5416AniOfdmErrTrigger()
453 if (aniState->firstepLevel > 0) in ar5416AniOfdmErrTrigger()
467 struct ar5212AniState *aniState; in ar5416AniCckErrTrigger() local
476 aniState = ahp->ah_curani; in ar5416AniCckErrTrigger()
477 params = aniState->params; in ar5416AniCckErrTrigger()
479 aniState->noiseImmunityLevel+1 < params->maxNoiseImmunityLevel)) { in ar5416AniCckErrTrigger()
481 aniState->noiseImmunityLevel + 1); in ar5416AniCckErrTrigger()
492 if (aniState->firstepLevel < params->maxFirstepLevel) in ar5416AniCckErrTrigger()
494 aniState->firstepLevel + 1); in ar5416AniCckErrTrigger()
501 if (aniState->firstepLevel > 0) in ar5416AniCckErrTrigger()
510 ar5416AniRestart(struct ath_hal *ah, struct ar5212AniState *aniState) in ar5416AniRestart() argument
513 const struct ar5212AniParams *params = aniState->params; in ar5416AniRestart()
515 aniState->listenTime = 0; in ar5416AniRestart()
530 aniState->ofdmPhyErrCount = 0; in ar5416AniRestart()
531 aniState->cckPhyErrCount = 0; in ar5416AniRestart()
548 struct ar5212AniState *aniState = &ahp->ah_ani[chan->ic_devdata]; in ar5416AniReset() local
552 OS_MEMZERO(aniState, sizeof(*aniState)); in ar5416AniReset()
554 aniState->params = &ahp->ah_aniParams24; in ar5416AniReset()
556 aniState->params = &ahp->ah_aniParams5; in ar5416AniReset()
560 ahp->ah_curani = aniState; in ar5416AniReset()
615 aniState->noiseImmunityLevel); in ar5416AniReset()
617 aniState->spurImmunityLevel); in ar5416AniReset()
619 !aniState->ofdmWeakSigDetectOff); in ar5416AniReset()
621 aniState->cckWeakSigThreshold); in ar5416AniReset()
623 aniState->firstepLevel); in ar5416AniReset()
637 enableAniMIBCounters(ah, aniState->params); in ar5416AniReset()
638 ar5416AniRestart(ah, aniState); in ar5416AniReset()
692 struct ar5212AniState *aniState = ahp->ah_curani; in ar5416ProcessMibIntr() local
693 const struct ar5212AniParams *params = aniState->params; in ar5416ProcessMibIntr()
698 ofdmPhyErrCnt - aniState->ofdmPhyErrCount; in ar5416ProcessMibIntr()
699 aniState->ofdmPhyErrCount = ofdmPhyErrCnt; in ar5416ProcessMibIntr()
703 cckPhyErrCnt - aniState->cckPhyErrCount; in ar5416ProcessMibIntr()
704 aniState->cckPhyErrCount = cckPhyErrCnt; in ar5416ProcessMibIntr()
712 if (aniState->ofdmPhyErrCount > params->ofdmTrigHigh) in ar5416ProcessMibIntr()
714 if (aniState->cckPhyErrCount > params->cckTrigHigh) in ar5416ProcessMibIntr()
717 ar5416AniRestart(ah, aniState); in ar5416ProcessMibIntr()
725 struct ar5212AniState *aniState; in ar5416AniLowerImmunity() local
730 aniState = ahp->ah_curani; in ar5416AniLowerImmunity()
731 params = aniState->params; in ar5416AniLowerImmunity()
739 if (aniState->firstepLevel > 0) { in ar5416AniLowerImmunity()
741 aniState->firstepLevel - 1)) in ar5416AniLowerImmunity()
758 if (aniState->ofdmWeakSigDetectOff) { in ar5416AniLowerImmunity()
764 if (aniState->firstepLevel > 0) { in ar5416AniLowerImmunity()
766 aniState->firstepLevel - 1)) in ar5416AniLowerImmunity()
773 if (aniState->firstepLevel > 0) { in ar5416AniLowerImmunity()
775 aniState->firstepLevel - 1)) in ar5416AniLowerImmunity()
781 if (aniState->spurImmunityLevel > 0) { in ar5416AniLowerImmunity()
783 aniState->spurImmunityLevel - 1)) in ar5416AniLowerImmunity()
790 if (aniState->noiseImmunityLevel > 0) { in ar5416AniLowerImmunity()
792 aniState->noiseImmunityLevel - 1)) in ar5416AniLowerImmunity()
816 struct ar5212AniState *aniState = NULL; in ar5416AniGetListenTime() local
838 aniState = ahp->ah_curani; in ar5416AniGetListenTime()
854 AH5416(ah)->ah_cycleCount - aniState->cycleCount; in ar5416AniGetListenTime()
856 AH5416(ah)->ah_rxBusy - aniState->rxFrameCount; in ar5416AniGetListenTime()
858 AH5416(ah)->ah_txBusy - aniState->txFrameCount; in ar5416AniGetListenTime()
866 aniState->cycleCount = AH5416(ah)->ah_cycleCount; in ar5416AniGetListenTime()
867 aniState->rxFrameCount = AH5416(ah)->ah_rxBusy; in ar5416AniGetListenTime()
868 aniState->txFrameCount = AH5416(ah)->ah_txBusy; in ar5416AniGetListenTime()
878 updateMIBStats(struct ath_hal *ah, struct ar5212AniState *aniState) in updateMIBStats() argument
881 const struct ar5212AniParams *params = aniState->params; in updateMIBStats()
900 ofdmPhyErrCnt - aniState->ofdmPhyErrCount; in updateMIBStats()
901 aniState->ofdmPhyErrCount = ofdmPhyErrCnt; in updateMIBStats()
910 cckPhyErrCnt - aniState->cckPhyErrCount; in updateMIBStats()
911 aniState->cckPhyErrCount = cckPhyErrCnt; in updateMIBStats()
930 struct ar5212AniState *aniState = ahp->ah_curani; in ar5416AniPoll() local
938 if (aniState == AH_NULL) in ar5416AniPoll()
949 ar5416AniRestart(ah, aniState); in ar5416AniPoll()
955 aniState->listenTime += listenTime; in ar5416AniPoll()
957 OS_MARK(ah, AH_MARK_ANI_POLL, aniState->listenTime); in ar5416AniPoll()
959 params = aniState->params; in ar5416AniPoll()
960 if (aniState->listenTime > 5*params->period) { in ar5416AniPoll()
965 updateMIBStats(ah, aniState); in ar5416AniPoll()
966 if (aniState->ofdmPhyErrCount <= aniState->listenTime * in ar5416AniPoll()
968 aniState->cckPhyErrCount <= aniState->listenTime * in ar5416AniPoll()
973 ar5416AniRestart(ah, aniState); in ar5416AniPoll()
974 } else if (aniState->listenTime > params->period) { in ar5416AniPoll()
975 updateMIBStats(ah, aniState); in ar5416AniPoll()
977 if (aniState->ofdmPhyErrCount > aniState->listenTime * in ar5416AniPoll()
981 aniState->ofdmPhyErrCount, aniState->listenTime); in ar5416AniPoll()
983 ar5416AniRestart(ah, aniState); in ar5416AniPoll()
984 } else if (aniState->cckPhyErrCount > aniState->listenTime * in ar5416AniPoll()
988 aniState->cckPhyErrCount, aniState->listenTime); in ar5416AniPoll()
990 ar5416AniRestart(ah, aniState); in ar5416AniPoll()