1 From: Miaoqing Pan <miaoqing@codeaurora.org>
2 Date: Fri, 15 Jan 2016 18:17:18 +0800
3 Subject: [PATCH] ath9k: clean up ANI per-channel pointer checking
5 commit c24bd3620c50 ("ath9k: Do not maintain ANI state per-channel")
6 removed per-channel handling, the code to check 'curchan' also
7 should be removed as never used.
9 Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
12 --- a/drivers/net/wireless/ath/ath9k/ani.c
13 +++ b/drivers/net/wireless/ath/ath9k/ani.c
14 @@ -126,12 +126,8 @@ static void ath9k_hw_update_mibstats(str
16 static void ath9k_ani_restart(struct ath_hw *ah)
18 - struct ar5416AniState *aniState;
22 + struct ar5416AniState *aniState = &ah->ani;
24 - aniState = &ah->ani;
25 aniState->listenTime = 0;
27 ENABLE_REGWRITE_BUFFER(ah);
28 @@ -221,12 +217,7 @@ static void ath9k_hw_set_ofdm_nil(struct
30 static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah)
32 - struct ar5416AniState *aniState;
37 - aniState = &ah->ani;
38 + struct ar5416AniState *aniState = &ah->ani;
40 if (aniState->ofdmNoiseImmunityLevel < ATH9K_ANI_OFDM_MAX_LEVEL)
41 ath9k_hw_set_ofdm_nil(ah, aniState->ofdmNoiseImmunityLevel + 1, false);
42 @@ -281,12 +272,7 @@ static void ath9k_hw_set_cck_nil(struct
44 static void ath9k_hw_ani_cck_err_trigger(struct ath_hw *ah)
46 - struct ar5416AniState *aniState;
51 - aniState = &ah->ani;
52 + struct ar5416AniState *aniState = &ah->ani;
54 if (aniState->cckNoiseImmunityLevel < ATH9K_ANI_CCK_MAX_LEVEL)
55 ath9k_hw_set_cck_nil(ah, aniState->cckNoiseImmunityLevel + 1,
56 @@ -299,9 +285,7 @@ static void ath9k_hw_ani_cck_err_trigger
58 static void ath9k_hw_ani_lower_immunity(struct ath_hw *ah)
60 - struct ar5416AniState *aniState;
62 - aniState = &ah->ani;
63 + struct ar5416AniState *aniState = &ah->ani;
65 /* lower OFDM noise immunity */
66 if (aniState->ofdmNoiseImmunityLevel > 0 &&
67 @@ -329,7 +313,7 @@ void ath9k_ani_reset(struct ath_hw *ah,
68 struct ath_common *common = ath9k_hw_common(ah);
69 int ofdm_nil, cck_nil;
75 BUG_ON(aniState == NULL);
76 @@ -416,14 +400,10 @@ static bool ath9k_hw_ani_read_counters(s
78 void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan)
80 - struct ar5416AniState *aniState;
81 + struct ar5416AniState *aniState = &ah->ani;
82 struct ath_common *common = ath9k_hw_common(ah);
83 u32 ofdmPhyErrRate, cckPhyErrRate;
88 - aniState = &ah->ani;
89 if (!ath9k_hw_ani_read_counters(ah))