Date: Wed, 9 Nov 2011 05:41:40 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r227378 - head/sys/dev/ath/ath_hal/ar5416 Message-ID: <201111090541.pA95feFa066686@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Wed Nov 9 05:41:40 2011 New Revision: 227378 URL: http://svn.freebsd.org/changeset/base/227378 Log: Add logic to ANI to tweak the firstep parameter when in hostap mode. This is normally done based on the beacon RSSI but this isn't available in hostap mode. Obtained from: Atheros Sponsored by: Hobnob, Inc. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Wed Nov 9 05:39:17 2011 (r227377) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Wed Nov 9 05:41:40 2011 (r227378) @@ -396,6 +396,18 @@ ar5416AniOfdmErrTrigger(struct ath_hal * return; } + /* + * In the case of AP mode operation, we cannot bucketize beacons + * according to RSSI. Instead, raise Firstep level, up to max, and + * simply return. + */ + if (AH_PRIVATE(ah)->ah_opmode == HAL_M_HOSTAP) { + if (aniState->firstepLevel < params->maxFirstepLevel) { + if (ar5416AniControl(ah, HAL_ANI_FIRSTEP_LEVEL, + aniState->firstepLevel + 1)) + return; + } + } if (ANI_ENA_RSSI(ah)) { int32_t rssi = BEACON_RSSI(ahp); if (rssi > params->rssiThrHigh) { @@ -713,6 +725,19 @@ ar5416AniLowerImmunity(struct ath_hal *a aniState = ahp->ah_curani; params = aniState->params; + + /* + * In the case of AP mode operation, we cannot bucketize beacons + * according to RSSI. Instead, lower Firstep level, down to min, and + * simply return. + */ + if (AH_PRIVATE(ah)->ah_opmode == HAL_M_HOSTAP) { + if (aniState->firstepLevel > 0) { + if (ar5416AniControl(ah, HAL_ANI_FIRSTEP_LEVEL, + aniState->firstepLevel - 1)) + return; + } + } if (ANI_ENA_RSSI(ah)) { int32_t rssi = BEACON_RSSI(ahp); if (rssi > params->rssiThrHigh) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111090541.pA95feFa066686>