summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ath/ath_hal/ar5212/ar5212.h2
-rw-r--r--sys/dev/ath/ath_hal/ar5212/ar5212_misc.c5
-rw-r--r--sys/dev/ath/ath_hal/ar5212/ar5212_reset.c3
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416_ani.c6
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416_reset.c3
5 files changed, 10 insertions, 9 deletions
diff --git a/sys/dev/ath/ath_hal/ar5212/ar5212.h b/sys/dev/ath/ath_hal/ar5212/ar5212.h
index 6a71fe8..6954456 100644
--- a/sys/dev/ath/ath_hal/ar5212/ar5212.h
+++ b/sys/dev/ath/ath_hal/ar5212/ar5212.h
@@ -320,7 +320,7 @@ struct ath_hal_5212 {
struct ar5212AniParams ah_aniParams5; /* 5GHz parameters */
struct ar5212AniState *ah_curani; /* cached last reference */
struct ar5212AniState ah_ani[AH_MAXCHAN]; /* per-channel state */
- HAL_CHANNEL_SURVEY ah_chansurvey[AH_MAXCHAN]; /* channel survey */
+ HAL_CHANNEL_SURVEY ah_chansurvey; /* channel survey */
/* AR5416 uses some of the AR5212 ANI code; these are the ANI methods */
HAL_BOOL (*ah_aniControl) (struct ath_hal *, HAL_ANI_CMD cmd, int param);
diff --git a/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c b/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
index 0e628b8..aaac04e 100644
--- a/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
+++ b/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
@@ -1092,10 +1092,7 @@ ar5212GetDiagState(struct ath_hal *ah, int request,
}
break;
case HAL_DIAG_CHANSURVEY:
- if (AH_PRIVATE(ah)->ah_curchan == NULL)
- return AH_FALSE;
- *result =
- &ahp->ah_chansurvey[AH_PRIVATE(ah)->ah_curchan->ic_devdata];
+ *result = &ahp->ah_chansurvey;
*resultsize = sizeof(HAL_CHANNEL_SURVEY);
return AH_TRUE;
}
diff --git a/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c b/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c
index 412c64d..eca2e1f 100644
--- a/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c
+++ b/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c
@@ -195,6 +195,9 @@ ar5212Reset(struct ath_hal *ah, HAL_OPMODE opmode,
saveFrameSeqCount = OS_REG_READ(ah, AR_D_SEQNUM);
} else
saveFrameSeqCount = 0; /* NB: silence compiler */
+
+ /* Blank the channel survey statistics */
+ OS_MEMZERO(&ahp->ah_chansurvey, sizeof(ahp->ah_chansurvey));
#if 0
/*
* XXX disable for now; this appears to sometimes cause OFDM
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c b/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c
index 9497ec6..269f745 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c
@@ -827,10 +827,8 @@ ar5416AniGetListenTime(struct ath_hal *ah)
ath_hal_printf(ah, "%s: ah_curchan = NULL?\n", __func__);
return (0);
}
- /* XXX bounds check? */
- if (AH_PRIVATE(ah)->ah_curchan != AH_NULL)
- cs =
- &ahp->ah_chansurvey[AH_PRIVATE(ah)->ah_curchan->ic_devdata];
+
+ cs = &ahp->ah_chansurvey;
/*
* Fetch the current statistics, squirrel away the current
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c b/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
index 1004f52..bd43d5d 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
@@ -118,6 +118,9 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMODE opmode,
}
HALASSERT(AH_PRIVATE(ah)->ah_eeversion >= AR_EEPROM_VER14_1);
+ /* Blank the channel survey statistics */
+ OS_MEMZERO(&ahp->ah_chansurvey, sizeof(ahp->ah_chansurvey));
+
/* XXX Turn on fast channel change for 5416 */
/*
* Preserve the bmiss rssi threshold and count threshold
OpenPOWER on IntegriCloud