Loading drivers/net/wireless/ath/ath9k/ani.c +22 −35 Original line number Original line Diff line number Diff line Loading @@ -118,10 +118,10 @@ static void ath9k_ani_restart(struct ath_hw *ah) { { struct ar5416AniState *aniState; struct ar5416AniState *aniState; if (!DO_ANI(ah)) if (!ah->curchan) return; return; aniState = &ah->curchan->ani; aniState = &ah->ani; aniState->listenTime = 0; aniState->listenTime = 0; ENABLE_REGWRITE_BUFFER(ah); ENABLE_REGWRITE_BUFFER(ah); Loading @@ -143,7 +143,7 @@ static void ath9k_ani_restart(struct ath_hw *ah) static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel, static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel, bool scan) bool scan) { { struct ar5416AniState *aniState = &ah->curchan->ani; struct ar5416AniState *aniState = &ah->ani; struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah); const struct ani_ofdm_level_entry *entry_ofdm; const struct ani_ofdm_level_entry *entry_ofdm; const struct ani_cck_level_entry *entry_cck; const struct ani_cck_level_entry *entry_cck; Loading Loading @@ -195,10 +195,10 @@ static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah) { { struct ar5416AniState *aniState; struct ar5416AniState *aniState; if (!DO_ANI(ah)) if (!ah->curchan) return; return; aniState = &ah->curchan->ani; aniState = &ah->ani; if (aniState->ofdmNoiseImmunityLevel < ATH9K_ANI_OFDM_MAX_LEVEL) if (aniState->ofdmNoiseImmunityLevel < ATH9K_ANI_OFDM_MAX_LEVEL) ath9k_hw_set_ofdm_nil(ah, aniState->ofdmNoiseImmunityLevel + 1, false); ath9k_hw_set_ofdm_nil(ah, aniState->ofdmNoiseImmunityLevel + 1, false); Loading @@ -210,7 +210,7 @@ static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah) static void ath9k_hw_set_cck_nil(struct ath_hw *ah, u_int8_t immunityLevel, static void ath9k_hw_set_cck_nil(struct ath_hw *ah, u_int8_t immunityLevel, bool scan) bool scan) { { struct ar5416AniState *aniState = &ah->curchan->ani; struct ar5416AniState *aniState = &ah->ani; struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah); const struct ani_ofdm_level_entry *entry_ofdm; const struct ani_ofdm_level_entry *entry_ofdm; const struct ani_cck_level_entry *entry_cck; const struct ani_cck_level_entry *entry_cck; Loading Loading @@ -251,10 +251,10 @@ static void ath9k_hw_ani_cck_err_trigger(struct ath_hw *ah) { { struct ar5416AniState *aniState; struct ar5416AniState *aniState; if (!DO_ANI(ah)) if (!ah->curchan) return; return; aniState = &ah->curchan->ani; aniState = &ah->ani; if (aniState->cckNoiseImmunityLevel < ATH9K_ANI_CCK_MAX_LEVEL) if (aniState->cckNoiseImmunityLevel < ATH9K_ANI_CCK_MAX_LEVEL) ath9k_hw_set_cck_nil(ah, aniState->cckNoiseImmunityLevel + 1, ath9k_hw_set_cck_nil(ah, aniState->cckNoiseImmunityLevel + 1, Loading @@ -269,7 +269,7 @@ static void ath9k_hw_ani_lower_immunity(struct ath_hw *ah) { { struct ar5416AniState *aniState; struct ar5416AniState *aniState; aniState = &ah->curchan->ani; aniState = &ah->ani; /* lower OFDM noise immunity */ /* lower OFDM noise immunity */ if (aniState->ofdmNoiseImmunityLevel > 0 && if (aniState->ofdmNoiseImmunityLevel > 0 && Loading @@ -292,12 +292,12 @@ static void ath9k_hw_ani_lower_immunity(struct ath_hw *ah) */ */ void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning) void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning) { { struct ar5416AniState *aniState = &ah->curchan->ani; struct ar5416AniState *aniState = &ah->ani; struct ath9k_channel *chan = ah->curchan; struct ath9k_channel *chan = ah->curchan; struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah); int ofdm_nil, cck_nil; int ofdm_nil, cck_nil; if (!DO_ANI(ah)) if (!ah->curchan) return; return; BUG_ON(aniState == NULL); BUG_ON(aniState == NULL); Loading Loading @@ -380,7 +380,7 @@ void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning) static bool ath9k_hw_ani_read_counters(struct ath_hw *ah) static bool ath9k_hw_ani_read_counters(struct ath_hw *ah) { { struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah); struct ar5416AniState *aniState = &ah->curchan->ani; struct ar5416AniState *aniState = &ah->ani; u32 phyCnt1, phyCnt2; u32 phyCnt1, phyCnt2; int32_t listenTime; int32_t listenTime; Loading Loading @@ -415,10 +415,10 @@ void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan) struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah); u32 ofdmPhyErrRate, cckPhyErrRate; u32 ofdmPhyErrRate, cckPhyErrRate; if (!DO_ANI(ah)) if (!ah->curchan) return; return; aniState = &ah->curchan->ani; aniState = &ah->ani; if (!ath9k_hw_ani_read_counters(ah)) if (!ath9k_hw_ani_read_counters(ah)) return; return; Loading Loading @@ -490,32 +490,22 @@ EXPORT_SYMBOL(ath9k_hw_disable_mib_counters); void ath9k_hw_ani_init(struct ath_hw *ah) void ath9k_hw_ani_init(struct ath_hw *ah) { { struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah); int i; struct ar5416AniState *ani = &ah->ani; ath_dbg(common, ANI, "Initialize ANI\n"); ath_dbg(common, ANI, "Initialize ANI\n"); ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH; ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH; ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW; ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW; ah->config.cck_trig_high = ATH9K_ANI_CCK_TRIG_HIGH; ah->config.cck_trig_high = ATH9K_ANI_CCK_TRIG_HIGH; ah->config.cck_trig_low = ATH9K_ANI_CCK_TRIG_LOW; ah->config.cck_trig_low = ATH9K_ANI_CCK_TRIG_LOW; for (i = 0; i < ARRAY_SIZE(ah->channels); i++) { struct ath9k_channel *chan = &ah->channels[i]; struct ar5416AniState *ani = &chan->ani; ani->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL; ani->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL; ani->firstepLevel = ATH9K_ANI_FIRSTEP_LVL; ani->firstepLevel = ATH9K_ANI_FIRSTEP_LVL; ani->mrcCCK = AR_SREV_9300_20_OR_LATER(ah) ? true : false; ani->mrcCCK = AR_SREV_9300_20_OR_LATER(ah) ? true : false; ani->ofdmsTurn = true; ani->ofdmsTurn = true; ani->ofdmWeakSigDetect = true; 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; } /* /* * since we expect some ongoing maintenance on the tables, let's sanity * since we expect some ongoing maintenance on the tables, let's sanity Loading @@ -524,9 +514,6 @@ void ath9k_hw_ani_init(struct ath_hw *ah) ah->aniperiod = ATH9K_ANI_PERIOD; ah->aniperiod = ATH9K_ANI_PERIOD; ah->config.ani_poll_interval = ATH9K_ANI_POLLINTERVAL; ah->config.ani_poll_interval = ATH9K_ANI_POLLINTERVAL; if (ah->config.enable_ani) ah->proc_phyerr |= HAL_PROCESS_ANI; ath9k_ani_restart(ah); ath9k_ani_restart(ah); ath9k_enable_mib_counters(ah); ath9k_enable_mib_counters(ah); } } drivers/net/wireless/ath/ath9k/ani.h +1 −11 Original line number Original line Diff line number Diff line Loading @@ -17,10 +17,6 @@ #ifndef ANI_H #ifndef ANI_H #define ANI_H #define ANI_H #define HAL_PROCESS_ANI 0x00000001 #define DO_ANI(ah) (((ah)->proc_phyerr & HAL_PROCESS_ANI) && ah->curchan) #define BEACON_RSSI(ahp) (ahp->stats.avgbrssi) #define BEACON_RSSI(ahp) (ahp->stats.avgbrssi) /* units are errors per second */ /* units are errors per second */ Loading @@ -38,11 +34,7 @@ #define ATH9K_ANI_CCK_TRIG_LOW 300 #define ATH9K_ANI_CCK_TRIG_LOW 300 #define ATH9K_ANI_NOISE_IMMUNE_LVL 4 #define ATH9K_ANI_NOISE_IMMUNE_LVL 4 #define ATH9K_ANI_USE_OFDM_WEAK_SIG true #define ATH9K_ANI_CCK_WEAK_SIG_THR false #define ATH9K_ANI_SPUR_IMMUNE_LVL 3 #define ATH9K_ANI_SPUR_IMMUNE_LVL 3 #define ATH9K_ANI_FIRSTEP_LVL 2 #define ATH9K_ANI_FIRSTEP_LVL 2 #define ATH9K_ANI_RSSI_THR_HIGH 40 #define ATH9K_ANI_RSSI_THR_HIGH 40 Loading Loading @@ -111,7 +103,7 @@ struct ar5416AniState { u8 mrcCCK; u8 mrcCCK; u8 spurImmunityLevel; u8 spurImmunityLevel; u8 firstepLevel; u8 firstepLevel; u8 ofdmWeakSigDetect; bool ofdmWeakSigDetect; u32 listenTime; u32 listenTime; u32 ofdmPhyErrCount; u32 ofdmPhyErrCount; u32 cckPhyErrCount; u32 cckPhyErrCount; Loading @@ -119,8 +111,6 @@ struct ar5416AniState { }; }; struct ar5416Stats { struct ar5416Stats { u32 ast_ani_niup; u32 ast_ani_nidown; u32 ast_ani_spurup; u32 ast_ani_spurup; u32 ast_ani_spurdown; u32 ast_ani_spurdown; u32 ast_ani_ofdmon; u32 ast_ani_ofdmon; Loading drivers/net/wireless/ath/ath9k/ar5008_phy.c +3 −3 Original line number Original line Diff line number Diff line Loading @@ -931,7 +931,7 @@ static bool ar5008_hw_ani_control_new(struct ath_hw *ah, { { struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah); struct ath9k_channel *chan = ah->curchan; struct ath9k_channel *chan = ah->curchan; struct ar5416AniState *aniState = &chan->ani; struct ar5416AniState *aniState = &ah->ani; s32 value, value2; s32 value, value2; switch (cmd & ah->ani_function) { switch (cmd & ah->ani_function) { Loading Loading @@ -1207,7 +1207,7 @@ static void ar5008_hw_ani_cache_ini_regs(struct ath_hw *ah) { { struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah); struct ath9k_channel *chan = ah->curchan; struct ath9k_channel *chan = ah->curchan; struct ar5416AniState *aniState = &chan->ani; struct ar5416AniState *aniState = &ah->ani; struct ath9k_ani_default *iniDef; struct ath9k_ani_default *iniDef; u32 val; u32 val; Loading Loading @@ -1251,7 +1251,7 @@ static void ar5008_hw_ani_cache_ini_regs(struct ath_hw *ah) /* these levels just got reset to defaults by the INI */ /* these levels just got reset to defaults by the INI */ aniState->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL; aniState->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL; aniState->firstepLevel = ATH9K_ANI_FIRSTEP_LVL; aniState->firstepLevel = ATH9K_ANI_FIRSTEP_LVL; aniState->ofdmWeakSigDetect = ATH9K_ANI_USE_OFDM_WEAK_SIG; aniState->ofdmWeakSigDetect = true; aniState->mrcCCK = false; /* not available on pre AR9003 */ aniState->mrcCCK = false; /* not available on pre AR9003 */ } } Loading drivers/net/wireless/ath/ath9k/ar9002_hw.c +0 −4 Original line number Original line Diff line number Diff line Loading @@ -38,10 +38,6 @@ static int ar9002_hw_init_mode_regs(struct ath_hw *ah) else else INIT_INI_ARRAY(&ah->iniPcieSerdes, INIT_INI_ARRAY(&ah->iniPcieSerdes, ar9280PciePhy_clkreq_always_on_L1_9280); ar9280PciePhy_clkreq_always_on_L1_9280); #ifdef CONFIG_PM_SLEEP INIT_INI_ARRAY(&ah->iniPcieSerdesWow, ar9280PciePhy_awow); #endif if (AR_SREV_9287_11_OR_LATER(ah)) { if (AR_SREV_9287_11_OR_LATER(ah)) { INIT_INI_ARRAY(&ah->iniModes, ar9287Modes_9287_1_1); INIT_INI_ARRAY(&ah->iniModes, ar9287Modes_9287_1_1); Loading drivers/net/wireless/ath/ath9k/ar9002_initvals.h +0 −14 Original line number Original line Diff line number Diff line Loading @@ -925,20 +925,6 @@ static const u32 ar9280PciePhy_clkreq_always_on_L1_9280[][2] = { {0x00004044, 0x00000000}, {0x00004044, 0x00000000}, }; }; static const u32 ar9280PciePhy_awow[][2] = { /* Addr allmodes */ {0x00004040, 0x9248fd00}, {0x00004040, 0x24924924}, {0x00004040, 0xa8000019}, {0x00004040, 0x13160820}, {0x00004040, 0xe5980560}, {0x00004040, 0xc01dcffd}, {0x00004040, 0x1aaabe41}, {0x00004040, 0xbe105554}, {0x00004040, 0x00043007}, {0x00004044, 0x00000000}, }; static const u32 ar9285Modes_9285_1_2[][5] = { static const u32 ar9285Modes_9285_1_2[][5] = { /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ {0x00001030, 0x00000230, 0x00000460, 0x000002c0, 0x00000160}, {0x00001030, 0x00000230, 0x00000460, 0x000002c0, 0x00000160}, Loading Loading
drivers/net/wireless/ath/ath9k/ani.c +22 −35 Original line number Original line Diff line number Diff line Loading @@ -118,10 +118,10 @@ static void ath9k_ani_restart(struct ath_hw *ah) { { struct ar5416AniState *aniState; struct ar5416AniState *aniState; if (!DO_ANI(ah)) if (!ah->curchan) return; return; aniState = &ah->curchan->ani; aniState = &ah->ani; aniState->listenTime = 0; aniState->listenTime = 0; ENABLE_REGWRITE_BUFFER(ah); ENABLE_REGWRITE_BUFFER(ah); Loading @@ -143,7 +143,7 @@ static void ath9k_ani_restart(struct ath_hw *ah) static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel, static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel, bool scan) bool scan) { { struct ar5416AniState *aniState = &ah->curchan->ani; struct ar5416AniState *aniState = &ah->ani; struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah); const struct ani_ofdm_level_entry *entry_ofdm; const struct ani_ofdm_level_entry *entry_ofdm; const struct ani_cck_level_entry *entry_cck; const struct ani_cck_level_entry *entry_cck; Loading Loading @@ -195,10 +195,10 @@ static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah) { { struct ar5416AniState *aniState; struct ar5416AniState *aniState; if (!DO_ANI(ah)) if (!ah->curchan) return; return; aniState = &ah->curchan->ani; aniState = &ah->ani; if (aniState->ofdmNoiseImmunityLevel < ATH9K_ANI_OFDM_MAX_LEVEL) if (aniState->ofdmNoiseImmunityLevel < ATH9K_ANI_OFDM_MAX_LEVEL) ath9k_hw_set_ofdm_nil(ah, aniState->ofdmNoiseImmunityLevel + 1, false); ath9k_hw_set_ofdm_nil(ah, aniState->ofdmNoiseImmunityLevel + 1, false); Loading @@ -210,7 +210,7 @@ static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah) static void ath9k_hw_set_cck_nil(struct ath_hw *ah, u_int8_t immunityLevel, static void ath9k_hw_set_cck_nil(struct ath_hw *ah, u_int8_t immunityLevel, bool scan) bool scan) { { struct ar5416AniState *aniState = &ah->curchan->ani; struct ar5416AniState *aniState = &ah->ani; struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah); const struct ani_ofdm_level_entry *entry_ofdm; const struct ani_ofdm_level_entry *entry_ofdm; const struct ani_cck_level_entry *entry_cck; const struct ani_cck_level_entry *entry_cck; Loading Loading @@ -251,10 +251,10 @@ static void ath9k_hw_ani_cck_err_trigger(struct ath_hw *ah) { { struct ar5416AniState *aniState; struct ar5416AniState *aniState; if (!DO_ANI(ah)) if (!ah->curchan) return; return; aniState = &ah->curchan->ani; aniState = &ah->ani; if (aniState->cckNoiseImmunityLevel < ATH9K_ANI_CCK_MAX_LEVEL) if (aniState->cckNoiseImmunityLevel < ATH9K_ANI_CCK_MAX_LEVEL) ath9k_hw_set_cck_nil(ah, aniState->cckNoiseImmunityLevel + 1, ath9k_hw_set_cck_nil(ah, aniState->cckNoiseImmunityLevel + 1, Loading @@ -269,7 +269,7 @@ static void ath9k_hw_ani_lower_immunity(struct ath_hw *ah) { { struct ar5416AniState *aniState; struct ar5416AniState *aniState; aniState = &ah->curchan->ani; aniState = &ah->ani; /* lower OFDM noise immunity */ /* lower OFDM noise immunity */ if (aniState->ofdmNoiseImmunityLevel > 0 && if (aniState->ofdmNoiseImmunityLevel > 0 && Loading @@ -292,12 +292,12 @@ static void ath9k_hw_ani_lower_immunity(struct ath_hw *ah) */ */ void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning) void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning) { { struct ar5416AniState *aniState = &ah->curchan->ani; struct ar5416AniState *aniState = &ah->ani; struct ath9k_channel *chan = ah->curchan; struct ath9k_channel *chan = ah->curchan; struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah); int ofdm_nil, cck_nil; int ofdm_nil, cck_nil; if (!DO_ANI(ah)) if (!ah->curchan) return; return; BUG_ON(aniState == NULL); BUG_ON(aniState == NULL); Loading Loading @@ -380,7 +380,7 @@ void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning) static bool ath9k_hw_ani_read_counters(struct ath_hw *ah) static bool ath9k_hw_ani_read_counters(struct ath_hw *ah) { { struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah); struct ar5416AniState *aniState = &ah->curchan->ani; struct ar5416AniState *aniState = &ah->ani; u32 phyCnt1, phyCnt2; u32 phyCnt1, phyCnt2; int32_t listenTime; int32_t listenTime; Loading Loading @@ -415,10 +415,10 @@ void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan) struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah); u32 ofdmPhyErrRate, cckPhyErrRate; u32 ofdmPhyErrRate, cckPhyErrRate; if (!DO_ANI(ah)) if (!ah->curchan) return; return; aniState = &ah->curchan->ani; aniState = &ah->ani; if (!ath9k_hw_ani_read_counters(ah)) if (!ath9k_hw_ani_read_counters(ah)) return; return; Loading Loading @@ -490,32 +490,22 @@ EXPORT_SYMBOL(ath9k_hw_disable_mib_counters); void ath9k_hw_ani_init(struct ath_hw *ah) void ath9k_hw_ani_init(struct ath_hw *ah) { { struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah); int i; struct ar5416AniState *ani = &ah->ani; ath_dbg(common, ANI, "Initialize ANI\n"); ath_dbg(common, ANI, "Initialize ANI\n"); ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH; ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH; ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW; ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW; ah->config.cck_trig_high = ATH9K_ANI_CCK_TRIG_HIGH; ah->config.cck_trig_high = ATH9K_ANI_CCK_TRIG_HIGH; ah->config.cck_trig_low = ATH9K_ANI_CCK_TRIG_LOW; ah->config.cck_trig_low = ATH9K_ANI_CCK_TRIG_LOW; for (i = 0; i < ARRAY_SIZE(ah->channels); i++) { struct ath9k_channel *chan = &ah->channels[i]; struct ar5416AniState *ani = &chan->ani; ani->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL; ani->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL; ani->firstepLevel = ATH9K_ANI_FIRSTEP_LVL; ani->firstepLevel = ATH9K_ANI_FIRSTEP_LVL; ani->mrcCCK = AR_SREV_9300_20_OR_LATER(ah) ? true : false; ani->mrcCCK = AR_SREV_9300_20_OR_LATER(ah) ? true : false; ani->ofdmsTurn = true; ani->ofdmsTurn = true; ani->ofdmWeakSigDetect = true; 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; } /* /* * since we expect some ongoing maintenance on the tables, let's sanity * since we expect some ongoing maintenance on the tables, let's sanity Loading @@ -524,9 +514,6 @@ void ath9k_hw_ani_init(struct ath_hw *ah) ah->aniperiod = ATH9K_ANI_PERIOD; ah->aniperiod = ATH9K_ANI_PERIOD; ah->config.ani_poll_interval = ATH9K_ANI_POLLINTERVAL; ah->config.ani_poll_interval = ATH9K_ANI_POLLINTERVAL; if (ah->config.enable_ani) ah->proc_phyerr |= HAL_PROCESS_ANI; ath9k_ani_restart(ah); ath9k_ani_restart(ah); ath9k_enable_mib_counters(ah); ath9k_enable_mib_counters(ah); } }
drivers/net/wireless/ath/ath9k/ani.h +1 −11 Original line number Original line Diff line number Diff line Loading @@ -17,10 +17,6 @@ #ifndef ANI_H #ifndef ANI_H #define ANI_H #define ANI_H #define HAL_PROCESS_ANI 0x00000001 #define DO_ANI(ah) (((ah)->proc_phyerr & HAL_PROCESS_ANI) && ah->curchan) #define BEACON_RSSI(ahp) (ahp->stats.avgbrssi) #define BEACON_RSSI(ahp) (ahp->stats.avgbrssi) /* units are errors per second */ /* units are errors per second */ Loading @@ -38,11 +34,7 @@ #define ATH9K_ANI_CCK_TRIG_LOW 300 #define ATH9K_ANI_CCK_TRIG_LOW 300 #define ATH9K_ANI_NOISE_IMMUNE_LVL 4 #define ATH9K_ANI_NOISE_IMMUNE_LVL 4 #define ATH9K_ANI_USE_OFDM_WEAK_SIG true #define ATH9K_ANI_CCK_WEAK_SIG_THR false #define ATH9K_ANI_SPUR_IMMUNE_LVL 3 #define ATH9K_ANI_SPUR_IMMUNE_LVL 3 #define ATH9K_ANI_FIRSTEP_LVL 2 #define ATH9K_ANI_FIRSTEP_LVL 2 #define ATH9K_ANI_RSSI_THR_HIGH 40 #define ATH9K_ANI_RSSI_THR_HIGH 40 Loading Loading @@ -111,7 +103,7 @@ struct ar5416AniState { u8 mrcCCK; u8 mrcCCK; u8 spurImmunityLevel; u8 spurImmunityLevel; u8 firstepLevel; u8 firstepLevel; u8 ofdmWeakSigDetect; bool ofdmWeakSigDetect; u32 listenTime; u32 listenTime; u32 ofdmPhyErrCount; u32 ofdmPhyErrCount; u32 cckPhyErrCount; u32 cckPhyErrCount; Loading @@ -119,8 +111,6 @@ struct ar5416AniState { }; }; struct ar5416Stats { struct ar5416Stats { u32 ast_ani_niup; u32 ast_ani_nidown; u32 ast_ani_spurup; u32 ast_ani_spurup; u32 ast_ani_spurdown; u32 ast_ani_spurdown; u32 ast_ani_ofdmon; u32 ast_ani_ofdmon; Loading
drivers/net/wireless/ath/ath9k/ar5008_phy.c +3 −3 Original line number Original line Diff line number Diff line Loading @@ -931,7 +931,7 @@ static bool ar5008_hw_ani_control_new(struct ath_hw *ah, { { struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah); struct ath9k_channel *chan = ah->curchan; struct ath9k_channel *chan = ah->curchan; struct ar5416AniState *aniState = &chan->ani; struct ar5416AniState *aniState = &ah->ani; s32 value, value2; s32 value, value2; switch (cmd & ah->ani_function) { switch (cmd & ah->ani_function) { Loading Loading @@ -1207,7 +1207,7 @@ static void ar5008_hw_ani_cache_ini_regs(struct ath_hw *ah) { { struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah); struct ath9k_channel *chan = ah->curchan; struct ath9k_channel *chan = ah->curchan; struct ar5416AniState *aniState = &chan->ani; struct ar5416AniState *aniState = &ah->ani; struct ath9k_ani_default *iniDef; struct ath9k_ani_default *iniDef; u32 val; u32 val; Loading Loading @@ -1251,7 +1251,7 @@ static void ar5008_hw_ani_cache_ini_regs(struct ath_hw *ah) /* these levels just got reset to defaults by the INI */ /* these levels just got reset to defaults by the INI */ aniState->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL; aniState->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL; aniState->firstepLevel = ATH9K_ANI_FIRSTEP_LVL; aniState->firstepLevel = ATH9K_ANI_FIRSTEP_LVL; aniState->ofdmWeakSigDetect = ATH9K_ANI_USE_OFDM_WEAK_SIG; aniState->ofdmWeakSigDetect = true; aniState->mrcCCK = false; /* not available on pre AR9003 */ aniState->mrcCCK = false; /* not available on pre AR9003 */ } } Loading
drivers/net/wireless/ath/ath9k/ar9002_hw.c +0 −4 Original line number Original line Diff line number Diff line Loading @@ -38,10 +38,6 @@ static int ar9002_hw_init_mode_regs(struct ath_hw *ah) else else INIT_INI_ARRAY(&ah->iniPcieSerdes, INIT_INI_ARRAY(&ah->iniPcieSerdes, ar9280PciePhy_clkreq_always_on_L1_9280); ar9280PciePhy_clkreq_always_on_L1_9280); #ifdef CONFIG_PM_SLEEP INIT_INI_ARRAY(&ah->iniPcieSerdesWow, ar9280PciePhy_awow); #endif if (AR_SREV_9287_11_OR_LATER(ah)) { if (AR_SREV_9287_11_OR_LATER(ah)) { INIT_INI_ARRAY(&ah->iniModes, ar9287Modes_9287_1_1); INIT_INI_ARRAY(&ah->iniModes, ar9287Modes_9287_1_1); Loading
drivers/net/wireless/ath/ath9k/ar9002_initvals.h +0 −14 Original line number Original line Diff line number Diff line Loading @@ -925,20 +925,6 @@ static const u32 ar9280PciePhy_clkreq_always_on_L1_9280[][2] = { {0x00004044, 0x00000000}, {0x00004044, 0x00000000}, }; }; static const u32 ar9280PciePhy_awow[][2] = { /* Addr allmodes */ {0x00004040, 0x9248fd00}, {0x00004040, 0x24924924}, {0x00004040, 0xa8000019}, {0x00004040, 0x13160820}, {0x00004040, 0xe5980560}, {0x00004040, 0xc01dcffd}, {0x00004040, 0x1aaabe41}, {0x00004040, 0xbe105554}, {0x00004040, 0x00043007}, {0x00004044, 0x00000000}, }; static const u32 ar9285Modes_9285_1_2[][5] = { static const u32 ar9285Modes_9285_1_2[][5] = { /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ {0x00001030, 0x00000230, 0x00000460, 0x000002c0, 0x00000160}, {0x00001030, 0x00000230, 0x00000460, 0x000002c0, 0x00000160}, Loading