ath9k_hw: clean up ANI state handling

ANI state is kept per channel, so instead of keeping an array of ANI states
with an arbitrary size of 255, move the ANI state into the channel struct.

Move some config settings that are not per-channel out of
the per-channel struct to save some memory.

With those changes, ath9k_ani_restart_old and ath9k_ani_restart_new can
be merged into a single function.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Felix Fietkau
2010-10-04 20:09:47 +02:00
committad av John W. Linville
förälder 71ea420992
incheckning 093115b7fd
6 ändrade filer med 112 tillägg och 262 borttagningar

Visa fil

@@ -346,6 +346,7 @@ struct ath9k_hw_cal_data {
struct ath9k_channel {
struct ieee80211_channel *chan;
struct ar5416AniState ani;
u16 channel;
u32 channelFlags;
u32 chanmode;
@@ -752,8 +753,6 @@ struct ath_hw {
/* ANI */
u32 proc_phyerr;
u32 aniperiod;
struct ar5416AniState *curani;
struct ar5416AniState ani[255];
int totalSizeDesired[5];
int coarse_high[5];
int coarse_low[5];