After thinking about this a bit more, let's not keep statistics per-channel
in the HAL. That's very memory hungry (32k just for channel statistics) which would be better served by keeping a summary in the ANI state. Or, later, keep a survey history in net80211. So: * Migrate the ah_chansurvey array to be a single entry, for the current channel. * Change the ioctl interface and ANI code to just reference that. * Clear the ah_chansurvey array during channel reset, both in the AR5212 and AR5416 reset path.
This commit is contained in:
parent
5a239e7000
commit
6af850068c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=234774
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user