svn commit: r227046 -
user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416
Adrian Chadd
adrian at FreeBSD.org
Thu Nov 3 02:48:15 UTC 2011
Author: adrian
Date: Thu Nov 3 02:48:15 2011
New Revision: 227046
URL: http://svn.freebsd.org/changeset/base/227046
Log:
Fix the ANI parameter count logic to properly explore all of the states.
Since the values are "max", not "Number of items", using >= means that
the last entry in each state would never be checked.
Modified:
user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c
Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Thu Nov 3 02:38:32 2011 (r227045)
+++ user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Thu Nov 3 02:48:15 2011 (r227046)
@@ -227,7 +227,7 @@ ar5416AniControl(struct ath_hal *ah, HAL
u_int level = param;
HALDEBUG(ah, HAL_DEBUG_ANI, "%s: HAL_ANI_NOISE_IMMUNITY_LEVEL: set level = %d\n", __func__, level);
- if (level >= params->maxNoiseImmunityLevel) {
+ if (level > params->maxNoiseImmunityLevel) {
HALDEBUG(ah, HAL_DEBUG_ANI,
"%s: immunity level out of range (%u > %u)\n",
__func__, level, params->maxNoiseImmunityLevel);
@@ -314,7 +314,7 @@ ar5416AniControl(struct ath_hal *ah, HAL
u_int level = param;
HALDEBUG(ah, HAL_DEBUG_ANI, "%s: HAL_ANI_FIRSTEP_LEVEL: level = %d\n", __func__, level);
- if (level >= params->maxFirstepLevel) {
+ if (level > params->maxFirstepLevel) {
HALDEBUG(ah, HAL_DEBUG_ANI,
"%s: firstep level out of range (%u > %u)\n",
__func__, level, params->maxFirstepLevel);
@@ -333,7 +333,7 @@ ar5416AniControl(struct ath_hal *ah, HAL
u_int level = param;
HALDEBUG(ah, HAL_DEBUG_ANI, "%s: HAL_ANI_SPUR_IMMUNITY_LEVEL: level = %d\n", __func__, level);
- if (level >= params->maxSpurImmunityLevel) {
+ if (level > params->maxSpurImmunityLevel) {
HALDEBUG(ah, HAL_DEBUG_ANI,
"%s: spur immunity level out of range (%u > %u)\n",
__func__, level, params->maxSpurImmunityLevel);
More information about the svn-src-user
mailing list