mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
ath9k_hw: reduce struct ar5416AniState size
It is kept per-channel, so removing unnecessary (or constant) fields from it can save quite a bit of memory. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
f5ffe23aa0
commit
9dbac67da3
2 changed files with 6 additions and 14 deletions
|
@ -152,7 +152,8 @@ static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel,
|
||||||
ath_dbg(common, ANI, "**** ofdmlevel %d=>%d, rssi=%d[lo=%d hi=%d]\n",
|
ath_dbg(common, ANI, "**** ofdmlevel %d=>%d, rssi=%d[lo=%d hi=%d]\n",
|
||||||
aniState->ofdmNoiseImmunityLevel,
|
aniState->ofdmNoiseImmunityLevel,
|
||||||
immunityLevel, BEACON_RSSI(ah),
|
immunityLevel, BEACON_RSSI(ah),
|
||||||
aniState->rssiThrLow, aniState->rssiThrHigh);
|
ATH9K_ANI_RSSI_THR_LOW,
|
||||||
|
ATH9K_ANI_RSSI_THR_HIGH);
|
||||||
|
|
||||||
if (!scan)
|
if (!scan)
|
||||||
aniState->ofdmNoiseImmunityLevel = immunityLevel;
|
aniState->ofdmNoiseImmunityLevel = immunityLevel;
|
||||||
|
@ -173,7 +174,7 @@ static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel,
|
||||||
|
|
||||||
weak_sig = entry_ofdm->ofdm_weak_signal_on;
|
weak_sig = entry_ofdm->ofdm_weak_signal_on;
|
||||||
if (ah->opmode == NL80211_IFTYPE_STATION &&
|
if (ah->opmode == NL80211_IFTYPE_STATION &&
|
||||||
BEACON_RSSI(ah) <= aniState->rssiThrHigh)
|
BEACON_RSSI(ah) <= ATH9K_ANI_RSSI_THR_HIGH)
|
||||||
weak_sig = true;
|
weak_sig = true;
|
||||||
|
|
||||||
if (aniState->ofdmWeakSigDetect != weak_sig)
|
if (aniState->ofdmWeakSigDetect != weak_sig)
|
||||||
|
@ -216,11 +217,11 @@ static void ath9k_hw_set_cck_nil(struct ath_hw *ah, u_int8_t immunityLevel,
|
||||||
|
|
||||||
ath_dbg(common, ANI, "**** ccklevel %d=>%d, rssi=%d[lo=%d hi=%d]\n",
|
ath_dbg(common, ANI, "**** ccklevel %d=>%d, rssi=%d[lo=%d hi=%d]\n",
|
||||||
aniState->cckNoiseImmunityLevel, immunityLevel,
|
aniState->cckNoiseImmunityLevel, immunityLevel,
|
||||||
BEACON_RSSI(ah), aniState->rssiThrLow,
|
BEACON_RSSI(ah), ATH9K_ANI_RSSI_THR_LOW,
|
||||||
aniState->rssiThrHigh);
|
ATH9K_ANI_RSSI_THR_HIGH);
|
||||||
|
|
||||||
if (ah->opmode == NL80211_IFTYPE_STATION &&
|
if (ah->opmode == NL80211_IFTYPE_STATION &&
|
||||||
BEACON_RSSI(ah) <= aniState->rssiThrLow &&
|
BEACON_RSSI(ah) <= ATH9K_ANI_RSSI_THR_LOW &&
|
||||||
immunityLevel > ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI)
|
immunityLevel > ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI)
|
||||||
immunityLevel = ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI;
|
immunityLevel = ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI;
|
||||||
|
|
||||||
|
@ -514,8 +515,6 @@ void ath9k_hw_ani_init(struct ath_hw *ah)
|
||||||
|
|
||||||
ani->ofdmsTurn = true;
|
ani->ofdmsTurn = true;
|
||||||
|
|
||||||
ani->rssiThrHigh = ATH9K_ANI_RSSI_THR_HIGH;
|
|
||||||
ani->rssiThrLow = ATH9K_ANI_RSSI_THR_LOW;
|
|
||||||
ani->ofdmWeakSigDetect = ATH9K_ANI_USE_OFDM_WEAK_SIG;
|
ani->ofdmWeakSigDetect = ATH9K_ANI_USE_OFDM_WEAK_SIG;
|
||||||
ani->cckNoiseImmunityLevel = ATH9K_ANI_CCK_DEF_LEVEL;
|
ani->cckNoiseImmunityLevel = ATH9K_ANI_CCK_DEF_LEVEL;
|
||||||
ani->ofdmNoiseImmunityLevel = ATH9K_ANI_OFDM_DEF_LEVEL;
|
ani->ofdmNoiseImmunityLevel = ATH9K_ANI_OFDM_DEF_LEVEL;
|
||||||
|
|
|
@ -104,7 +104,6 @@ struct ath9k_ani_default {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ar5416AniState {
|
struct ar5416AniState {
|
||||||
struct ath9k_channel *c;
|
|
||||||
u8 noiseImmunityLevel;
|
u8 noiseImmunityLevel;
|
||||||
u8 ofdmNoiseImmunityLevel;
|
u8 ofdmNoiseImmunityLevel;
|
||||||
u8 cckNoiseImmunityLevel;
|
u8 cckNoiseImmunityLevel;
|
||||||
|
@ -113,15 +112,9 @@ struct ar5416AniState {
|
||||||
u8 spurImmunityLevel;
|
u8 spurImmunityLevel;
|
||||||
u8 firstepLevel;
|
u8 firstepLevel;
|
||||||
u8 ofdmWeakSigDetect;
|
u8 ofdmWeakSigDetect;
|
||||||
u8 cckWeakSigThreshold;
|
|
||||||
u32 listenTime;
|
u32 listenTime;
|
||||||
int32_t rssiThrLow;
|
|
||||||
int32_t rssiThrHigh;
|
|
||||||
u32 ofdmPhyErrCount;
|
u32 ofdmPhyErrCount;
|
||||||
u32 cckPhyErrCount;
|
u32 cckPhyErrCount;
|
||||||
int16_t pktRssi[2];
|
|
||||||
int16_t ofdmErrRssi[2];
|
|
||||||
int16_t cckErrRssi[2];
|
|
||||||
struct ath9k_ani_default iniDef;
|
struct ath9k_ani_default iniDef;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue