• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/net/wireless/ath/ath9k/

Lines Matching defs:aniState

144 	struct ar5416AniState *aniState;
150 aniState = ah->curani;
151 aniState->listenTime = 0;
153 if (aniState->ofdmTrigHigh > AR_PHY_COUNTMAX) {
154 aniState->ofdmPhyErrBase = 0;
158 aniState->ofdmPhyErrBase =
159 AR_PHY_COUNTMAX - aniState->ofdmTrigHigh;
161 if (aniState->cckTrigHigh > AR_PHY_COUNTMAX) {
162 aniState->cckPhyErrBase = 0;
166 aniState->cckPhyErrBase =
167 AR_PHY_COUNTMAX - aniState->cckTrigHigh;
171 aniState->ofdmPhyErrBase,
172 aniState->cckPhyErrBase);
176 REG_WRITE(ah, AR_PHY_ERR_1, aniState->ofdmPhyErrBase);
177 REG_WRITE(ah, AR_PHY_ERR_2, aniState->cckPhyErrBase);
186 aniState->ofdmPhyErrCount = 0;
187 aniState->cckPhyErrCount = 0;
192 struct ar5416AniState *aniState;
198 aniState = ah->curani;
199 aniState->listenTime = 0;
201 aniState->ofdmPhyErrBase = 0;
202 aniState->cckPhyErrBase = 0;
206 aniState->ofdmPhyErrBase,
207 aniState->cckPhyErrBase);
211 REG_WRITE(ah, AR_PHY_ERR_1, aniState->ofdmPhyErrBase);
212 REG_WRITE(ah, AR_PHY_ERR_2, aniState->cckPhyErrBase);
221 aniState->ofdmPhyErrCount = 0;
222 aniState->cckPhyErrCount = 0;
228 struct ar5416AniState *aniState;
234 aniState = ah->curani;
236 if (aniState->noiseImmunityLevel < HAL_NOISE_IMMUNE_MAX) {
238 aniState->noiseImmunityLevel + 1)) {
243 if (aniState->spurImmunityLevel < HAL_SPUR_IMMUNE_MAX) {
245 aniState->spurImmunityLevel + 1)) {
251 if (aniState->firstepLevel < HAL_FIRST_STEP_MAX) {
253 aniState->firstepLevel + 1);
258 if (rssi > aniState->rssiThrHigh) {
259 if (!aniState->ofdmWeakSigDetectOff) {
268 if (aniState->firstepLevel < HAL_FIRST_STEP_MAX) {
270 aniState->firstepLevel + 1);
273 } else if (rssi > aniState->rssiThrLow) {
274 if (aniState->ofdmWeakSigDetectOff)
278 if (aniState->firstepLevel < HAL_FIRST_STEP_MAX)
280 aniState->firstepLevel + 1);
285 if (!aniState->ofdmWeakSigDetectOff)
289 if (aniState->firstepLevel > 0)
300 struct ar5416AniState *aniState;
306 aniState = ah->curani;
307 if (aniState->noiseImmunityLevel < HAL_NOISE_IMMUNE_MAX) {
309 aniState->noiseImmunityLevel + 1)) {
314 if (aniState->firstepLevel < HAL_FIRST_STEP_MAX) {
316 aniState->firstepLevel + 1);
321 if (rssi > aniState->rssiThrLow) {
322 if (aniState->firstepLevel < HAL_FIRST_STEP_MAX)
324 aniState->firstepLevel + 1);
328 if (aniState->firstepLevel > 0)
338 struct ar5416AniState *aniState = ah->curani;
343 aniState->noiseFloor = BEACON_RSSI(ah);
347 aniState->ofdmNoiseImmunityLevel,
348 immunityLevel, aniState->noiseFloor,
349 aniState->rssiThrLow, aniState->rssiThrHigh);
351 aniState->ofdmNoiseImmunityLevel = immunityLevel;
353 entry_ofdm = &ofdm_level_table[aniState->ofdmNoiseImmunityLevel];
354 entry_cck = &cck_level_table[aniState->cckNoiseImmunityLevel];
356 if (aniState->spurImmunityLevel != entry_ofdm->spur_immunity_level)
361 if (aniState->firstepLevel != entry_ofdm->fir_step_level &&
369 aniState->noiseFloor <= aniState->rssiThrHigh) {
370 if (aniState->ofdmWeakSigDetectOff)
375 else if (aniState->ofdmWeakSigDetectOff ==
385 struct ar5416AniState *aniState;
390 aniState = ah->curani;
392 if (aniState->ofdmNoiseImmunityLevel < ATH9K_ANI_OFDM_MAX_LEVEL)
393 ath9k_hw_set_ofdm_nil(ah, aniState->ofdmNoiseImmunityLevel + 1);
401 struct ar5416AniState *aniState = ah->curani;
406 aniState->noiseFloor = BEACON_RSSI(ah);
409 aniState->cckNoiseImmunityLevel, immunityLevel,
410 aniState->noiseFloor, aniState->rssiThrLow,
411 aniState->rssiThrHigh);
415 aniState->noiseFloor <= aniState->rssiThrLow &&
419 aniState->cckNoiseImmunityLevel = immunityLevel;
421 entry_ofdm = &ofdm_level_table[aniState->ofdmNoiseImmunityLevel];
422 entry_cck = &cck_level_table[aniState->cckNoiseImmunityLevel];
424 if (aniState->firstepLevel != entry_cck->fir_step_level &&
434 if (aniState->mrcCCKOff == entry_cck->mrc_cck_on)
442 struct ar5416AniState *aniState;
447 aniState = ah->curani;
449 if (aniState->cckNoiseImmunityLevel < ATH9K_ANI_CCK_MAX_LEVEL)
450 ath9k_hw_set_cck_nil(ah, aniState->cckNoiseImmunityLevel + 1);
455 struct ar5416AniState *aniState;
458 aniState = ah->curani;
461 if (aniState->firstepLevel > 0) {
463 aniState->firstepLevel - 1))
468 if (rssi > aniState->rssiThrHigh) {
469 } else if (rssi > aniState->rssiThrLow) {
470 if (aniState->ofdmWeakSigDetectOff) {
476 if (aniState->firstepLevel > 0) {
479 aniState->firstepLevel - 1) == true)
483 if (aniState->firstepLevel > 0) {
486 aniState->firstepLevel - 1) == true)
492 if (aniState->spurImmunityLevel > 0) {
494 aniState->spurImmunityLevel - 1))
498 if (aniState->noiseImmunityLevel > 0) {
500 aniState->noiseImmunityLevel - 1);
511 struct ar5416AniState *aniState;
513 aniState = ah->curani;
516 if (aniState->ofdmNoiseImmunityLevel > 0 &&
517 (aniState->ofdmsTurn || aniState->cckNoiseImmunityLevel == 0)) {
518 ath9k_hw_set_ofdm_nil(ah, aniState->ofdmNoiseImmunityLevel - 1);
523 if (aniState->cckNoiseImmunityLevel > 0)
524 ath9k_hw_set_cck_nil(ah, aniState->cckNoiseImmunityLevel - 1);
550 struct ar5416AniState *aniState;
559 aniState = ah->curani;
560 if (aniState->cycleCount == 0 || aniState->cycleCount > cycleCount) {
564 "1st call: aniState->cycleCount=%d\n",
565 aniState->cycleCount);
567 int32_t ccdelta = cycleCount - aniState->cycleCount;
568 int32_t rfdelta = rxFrameCount - aniState->rxFrameCount;
569 int32_t tfdelta = txFrameCount - aniState->txFrameCount;
586 aniState->cycleCount = cycleCount;
587 aniState->txFrameCount = txFrameCount;
588 aniState->rxFrameCount = rxFrameCount;
595 struct ar5416AniState *aniState;
604 aniState = &ah->ani[index];
605 ah->curani = aniState;
650 if (aniState->noiseImmunityLevel != 0)
652 aniState->noiseImmunityLevel);
653 if (aniState->spurImmunityLevel != 0)
655 aniState->spurImmunityLevel);
656 if (aniState->ofdmWeakSigDetectOff)
658 !aniState->ofdmWeakSigDetectOff);
659 if (aniState->cckWeakSigThreshold)
661 aniState->cckWeakSigThreshold);
662 if (aniState->firstepLevel != 0)
664 aniState->firstepLevel);
686 struct ar5416AniState *aniState = ah->curani;
693 BUG_ON(aniState == NULL);
719 if (aniState->ofdmNoiseImmunityLevel !=
721 aniState->cckNoiseImmunityLevel !=
731 aniState->ofdmNoiseImmunityLevel,
732 aniState->cckNoiseImmunityLevel);
749 aniState->ofdmNoiseImmunityLevel,
750 aniState->cckNoiseImmunityLevel);
753 aniState->ofdmNoiseImmunityLevel);
755 aniState->cckNoiseImmunityLevel);
776 struct ar5416AniState *aniState;
785 aniState = ah->curani;
794 aniState->listenTime += listenTime;
801 if (phyCnt1 < aniState->ofdmPhyErrBase ||
802 phyCnt2 < aniState->cckPhyErrBase) {
803 if (phyCnt1 < aniState->ofdmPhyErrBase) {
808 aniState->ofdmPhyErrBase);
810 aniState->ofdmPhyErrBase);
814 if (phyCnt2 < aniState->cckPhyErrBase) {
819 aniState->cckPhyErrBase);
821 aniState->cckPhyErrBase);
828 ofdmPhyErrCnt = phyCnt1 - aniState->ofdmPhyErrBase;
830 ofdmPhyErrCnt - aniState->ofdmPhyErrCount;
831 aniState->ofdmPhyErrCount = ofdmPhyErrCnt;
833 cckPhyErrCnt = phyCnt2 - aniState->cckPhyErrBase;
835 cckPhyErrCnt - aniState->cckPhyErrCount;
836 aniState->cckPhyErrCount = cckPhyErrCnt;
838 if (aniState->listenTime > 5 * ah->aniperiod) {
839 if (aniState->ofdmPhyErrCount <= aniState->listenTime *
840 aniState->ofdmTrigLow / 1000 &&
841 aniState->cckPhyErrCount <= aniState->listenTime *
842 aniState->cckTrigLow / 1000)
845 } else if (aniState->listenTime > ah->aniperiod) {
846 if (aniState->ofdmPhyErrCount > aniState->listenTime *
847 aniState->ofdmTrigHigh / 1000) {
850 } else if (aniState->cckPhyErrCount >
851 aniState->listenTime * aniState->cckTrigHigh /
862 struct ar5416AniState *aniState;
872 aniState = ah->curani;
873 if (WARN_ON(!aniState))
887 aniState->listenTime += listenTime;
894 if (phyCnt1 < aniState->ofdmPhyErrBase ||
895 phyCnt2 < aniState->cckPhyErrBase) {
896 if (phyCnt1 < aniState->ofdmPhyErrBase) {
901 aniState->ofdmPhyErrBase);
903 aniState->ofdmPhyErrBase);
907 if (phyCnt2 < aniState->cckPhyErrBase) {
912 aniState->cckPhyErrBase);
914 aniState->cckPhyErrBase);
921 ofdmPhyErrCnt = phyCnt1 - aniState->ofdmPhyErrBase;
923 ofdmPhyErrCnt - aniState->ofdmPhyErrCount;
924 aniState->ofdmPhyErrCount = ofdmPhyErrCnt;
926 cckPhyErrCnt = phyCnt2 - aniState->cckPhyErrBase;
928 cckPhyErrCnt - aniState->cckPhyErrCount;
929 aniState->cckPhyErrCount = cckPhyErrCnt;
935 aniState->ofdmPhyErrBase,
938 aniState->cckPhyErrBase,
941 ofdmPhyErrRate = aniState->ofdmPhyErrCount * 1000 /
942 aniState->listenTime;
943 cckPhyErrRate = aniState->cckPhyErrCount * 1000 /
944 aniState->listenTime;
949 listenTime, aniState->ofdmNoiseImmunityLevel,
950 ofdmPhyErrRate, aniState->cckNoiseImmunityLevel,
951 cckPhyErrRate, aniState->ofdmsTurn);
953 if (aniState->listenTime > 5 * ah->aniperiod) {
954 if (ofdmPhyErrRate <= aniState->ofdmTrigLow &&
955 cckPhyErrRate <= aniState->cckTrigLow) {
960 aniState->listenTime,
961 aniState->ofdmNoiseImmunityLevel,
963 aniState->ofdmTrigLow,
964 aniState->cckNoiseImmunityLevel,
966 aniState->cckTrigLow);
968 aniState->ofdmsTurn = !aniState->ofdmsTurn;
973 aniState->listenTime, ofdmPhyErrRate, cckPhyErrRate);
975 } else if (aniState->listenTime > ah->aniperiod) {
977 if (ofdmPhyErrRate > aniState->ofdmTrigHigh &&
978 (cckPhyErrRate <= aniState->cckTrigHigh ||
979 aniState->ofdmsTurn)) {
983 aniState->listenTime,
984 aniState->ofdmNoiseImmunityLevel,
986 aniState->ofdmTrigHigh);
989 aniState->ofdmsTurn = false;
990 } else if (cckPhyErrRate > aniState->cckTrigHigh) {
994 aniState->listenTime,
995 aniState->cckNoiseImmunityLevel,
997 aniState->cckTrigHigh);
1000 aniState->ofdmsTurn = true;
1116 struct ar5416AniState *aniState = ah->curani;
1120 ofdmPhyErrCnt = phyCnt1 - aniState->ofdmPhyErrBase;
1122 ofdmPhyErrCnt - aniState->ofdmPhyErrCount;
1123 aniState->ofdmPhyErrCount = ofdmPhyErrCnt;
1125 cckPhyErrCnt = phyCnt2 - aniState->cckPhyErrBase;
1127 cckPhyErrCnt - aniState->cckPhyErrCount;
1128 aniState->cckPhyErrCount = cckPhyErrCnt;
1136 if (aniState->ofdmPhyErrCount > aniState->ofdmTrigHigh)
1138 if (aniState->cckPhyErrCount > aniState->cckTrigHigh)