1 --- a/drivers/net/wireless/ath/ath9k/ani.c
2 +++ b/drivers/net/wireless/ath/ath9k/ani.c
3 @@ -104,11 +104,6 @@ static const struct ani_cck_level_entry
4 #define ATH9K_ANI_CCK_DEF_LEVEL \
5 2 /* default level - matches the INI settings */
7 -static bool use_new_ani(struct ath_hw *ah)
9 - return AR_SREV_9300_20_OR_LATER(ah) || modparam_force_new_ani;
12 static void ath9k_hw_update_mibstats(struct ath_hw *ah,
13 struct ath9k_mib_stats *stats)
15 @@ -131,11 +126,6 @@ static void ath9k_ani_restart(struct ath
16 aniState = &ah->curchan->ani;
17 aniState->listenTime = 0;
19 - if (!use_new_ani(ah)) {
20 - ofdm_base = AR_PHY_COUNTMAX - ah->config.ofdm_trig_high;
21 - cck_base = AR_PHY_COUNTMAX - ah->config.cck_trig_high;
24 ath_dbg(common, ANI, "Writing ofdmbase=%u cckbase=%u\n",
27 @@ -154,110 +144,6 @@ static void ath9k_ani_restart(struct ath
28 aniState->cckPhyErrCount = 0;
31 -static void ath9k_hw_ani_ofdm_err_trigger_old(struct ath_hw *ah)
33 - struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
34 - struct ar5416AniState *aniState;
37 - aniState = &ah->curchan->ani;
39 - if (aniState->noiseImmunityLevel < HAL_NOISE_IMMUNE_MAX) {
40 - if (ath9k_hw_ani_control(ah, ATH9K_ANI_NOISE_IMMUNITY_LEVEL,
41 - aniState->noiseImmunityLevel + 1)) {
46 - if (aniState->spurImmunityLevel < HAL_SPUR_IMMUNE_MAX) {
47 - if (ath9k_hw_ani_control(ah, ATH9K_ANI_SPUR_IMMUNITY_LEVEL,
48 - aniState->spurImmunityLevel + 1)) {
53 - if (ah->opmode != NL80211_IFTYPE_STATION) {
54 - if (aniState->firstepLevel < HAL_FIRST_STEP_MAX) {
55 - ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
56 - aniState->firstepLevel + 1);
60 - rssi = BEACON_RSSI(ah);
61 - if (rssi > aniState->rssiThrHigh) {
62 - if (aniState->ofdmWeakSigDetect) {
63 - if (ath9k_hw_ani_control(ah,
64 - ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
66 - ath9k_hw_ani_control(ah,
67 - ATH9K_ANI_SPUR_IMMUNITY_LEVEL, 0);
71 - if (aniState->firstepLevel < HAL_FIRST_STEP_MAX) {
72 - ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
73 - aniState->firstepLevel + 1);
76 - } else if (rssi > aniState->rssiThrLow) {
77 - if (!aniState->ofdmWeakSigDetect)
78 - ath9k_hw_ani_control(ah,
79 - ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
81 - if (aniState->firstepLevel < HAL_FIRST_STEP_MAX)
82 - ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
83 - aniState->firstepLevel + 1);
86 - if ((conf->channel->band == IEEE80211_BAND_2GHZ) &&
87 - !conf_is_ht(conf)) {
88 - if (aniState->ofdmWeakSigDetect)
89 - ath9k_hw_ani_control(ah,
90 - ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
92 - if (aniState->firstepLevel > 0)
93 - ath9k_hw_ani_control(ah,
94 - ATH9K_ANI_FIRSTEP_LEVEL, 0);
100 -static void ath9k_hw_ani_cck_err_trigger_old(struct ath_hw *ah)
102 - struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
103 - struct ar5416AniState *aniState;
106 - aniState = &ah->curchan->ani;
107 - if (aniState->noiseImmunityLevel < HAL_NOISE_IMMUNE_MAX) {
108 - if (ath9k_hw_ani_control(ah, ATH9K_ANI_NOISE_IMMUNITY_LEVEL,
109 - aniState->noiseImmunityLevel + 1)) {
113 - if (ah->opmode != NL80211_IFTYPE_STATION) {
114 - if (aniState->firstepLevel < HAL_FIRST_STEP_MAX) {
115 - ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
116 - aniState->firstepLevel + 1);
120 - rssi = BEACON_RSSI(ah);
121 - if (rssi > aniState->rssiThrLow) {
122 - if (aniState->firstepLevel < HAL_FIRST_STEP_MAX)
123 - ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
124 - aniState->firstepLevel + 1);
126 - if ((conf->channel->band == IEEE80211_BAND_2GHZ) &&
127 - !conf_is_ht(conf)) {
128 - if (aniState->firstepLevel > 0)
129 - ath9k_hw_ani_control(ah,
130 - ATH9K_ANI_FIRSTEP_LEVEL, 0);
135 /* Adjust the OFDM Noise Immunity Level */
136 static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel)
138 @@ -309,11 +195,6 @@ static void ath9k_hw_ani_ofdm_err_trigge
142 - if (!use_new_ani(ah)) {
143 - ath9k_hw_ani_ofdm_err_trigger_old(ah);
147 aniState = &ah->curchan->ani;
149 if (aniState->ofdmNoiseImmunityLevel < ATH9K_ANI_OFDM_MAX_LEVEL)
150 @@ -371,70 +252,12 @@ static void ath9k_hw_ani_cck_err_trigger
154 - if (!use_new_ani(ah)) {
155 - ath9k_hw_ani_cck_err_trigger_old(ah);
159 aniState = &ah->curchan->ani;
161 if (aniState->cckNoiseImmunityLevel < ATH9K_ANI_CCK_MAX_LEVEL)
162 ath9k_hw_set_cck_nil(ah, aniState->cckNoiseImmunityLevel + 1);
165 -static void ath9k_hw_ani_lower_immunity_old(struct ath_hw *ah)
167 - struct ar5416AniState *aniState;
170 - aniState = &ah->curchan->ani;
172 - if (ah->opmode != NL80211_IFTYPE_STATION) {
173 - if (aniState->firstepLevel > 0) {
174 - if (ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
175 - aniState->firstepLevel - 1))
179 - rssi = BEACON_RSSI(ah);
180 - if (rssi > aniState->rssiThrHigh) {
181 - /* XXX: Handle me */
182 - } else if (rssi > aniState->rssiThrLow) {
183 - if (!aniState->ofdmWeakSigDetect) {
184 - if (ath9k_hw_ani_control(ah,
185 - ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
189 - if (aniState->firstepLevel > 0) {
190 - if (ath9k_hw_ani_control(ah,
191 - ATH9K_ANI_FIRSTEP_LEVEL,
192 - aniState->firstepLevel - 1))
196 - if (aniState->firstepLevel > 0) {
197 - if (ath9k_hw_ani_control(ah,
198 - ATH9K_ANI_FIRSTEP_LEVEL,
199 - aniState->firstepLevel - 1))
205 - if (aniState->spurImmunityLevel > 0) {
206 - if (ath9k_hw_ani_control(ah, ATH9K_ANI_SPUR_IMMUNITY_LEVEL,
207 - aniState->spurImmunityLevel - 1))
211 - if (aniState->noiseImmunityLevel > 0) {
212 - ath9k_hw_ani_control(ah, ATH9K_ANI_NOISE_IMMUNITY_LEVEL,
213 - aniState->noiseImmunityLevel - 1);
219 * only lower either OFDM or CCK errors per turn
220 * we lower the other one next time
221 @@ -445,11 +268,6 @@ static void ath9k_hw_ani_lower_immunity(
223 aniState = &ah->curchan->ani;
225 - if (!use_new_ani(ah)) {
226 - ath9k_hw_ani_lower_immunity_old(ah);
230 /* lower OFDM noise immunity */
231 if (aniState->ofdmNoiseImmunityLevel > 0 &&
232 (aniState->ofdmsTurn || aniState->cckNoiseImmunityLevel == 0)) {
233 @@ -462,71 +280,6 @@ static void ath9k_hw_ani_lower_immunity(
234 ath9k_hw_set_cck_nil(ah, aniState->cckNoiseImmunityLevel - 1);
237 -static void ath9k_ani_reset_old(struct ath_hw *ah, bool is_scanning)
239 - struct ar5416AniState *aniState;
240 - struct ath9k_channel *chan = ah->curchan;
241 - struct ath_common *common = ath9k_hw_common(ah);
246 - aniState = &ah->curchan->ani;
248 - if (ah->opmode != NL80211_IFTYPE_STATION) {
249 - ath_dbg(common, ANI, "Reset ANI state opmode %u\n", ah->opmode);
250 - ah->stats.ast_ani_reset++;
252 - if (ah->opmode == NL80211_IFTYPE_AP) {
254 - * ath9k_hw_ani_control() will only process items set on
257 - if (IS_CHAN_2GHZ(chan))
258 - ah->ani_function = (ATH9K_ANI_SPUR_IMMUNITY_LEVEL |
259 - ATH9K_ANI_FIRSTEP_LEVEL);
261 - ah->ani_function = 0;
264 - ath9k_hw_ani_control(ah, ATH9K_ANI_NOISE_IMMUNITY_LEVEL, 0);
265 - ath9k_hw_ani_control(ah, ATH9K_ANI_SPUR_IMMUNITY_LEVEL, 0);
266 - ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL, 0);
267 - ath9k_hw_ani_control(ah, ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
268 - !ATH9K_ANI_USE_OFDM_WEAK_SIG);
269 - ath9k_hw_ani_control(ah, ATH9K_ANI_CCK_WEAK_SIGNAL_THR,
270 - ATH9K_ANI_CCK_WEAK_SIG_THR);
272 - ath9k_ani_restart(ah);
276 - if (aniState->noiseImmunityLevel != 0)
277 - ath9k_hw_ani_control(ah, ATH9K_ANI_NOISE_IMMUNITY_LEVEL,
278 - aniState->noiseImmunityLevel);
279 - if (aniState->spurImmunityLevel != 0)
280 - ath9k_hw_ani_control(ah, ATH9K_ANI_SPUR_IMMUNITY_LEVEL,
281 - aniState->spurImmunityLevel);
282 - if (!aniState->ofdmWeakSigDetect)
283 - ath9k_hw_ani_control(ah, ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
284 - aniState->ofdmWeakSigDetect);
285 - if (aniState->cckWeakSigThreshold)
286 - ath9k_hw_ani_control(ah, ATH9K_ANI_CCK_WEAK_SIGNAL_THR,
287 - aniState->cckWeakSigThreshold);
288 - if (aniState->firstepLevel != 0)
289 - ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
290 - aniState->firstepLevel);
292 - ath9k_ani_restart(ah);
294 - ENABLE_REGWRITE_BUFFER(ah);
296 - REG_WRITE(ah, AR_PHY_ERR_MASK_1, AR_PHY_ERR_OFDM_TIMING);
297 - REG_WRITE(ah, AR_PHY_ERR_MASK_2, AR_PHY_ERR_CCK_TIMING);
299 - REGWRITE_BUFFER_FLUSH(ah);
303 * Restore the ANI parameters in the HAL and reset the statistics.
304 * This routine should be called for every hardware reset and for
305 @@ -541,9 +294,6 @@ void ath9k_ani_reset(struct ath_hw *ah,
309 - if (!use_new_ani(ah))
310 - return ath9k_ani_reset_old(ah, is_scanning);
312 BUG_ON(aniState == NULL);
313 ah->stats.ast_ani_reset++;
315 @@ -640,11 +390,6 @@ static bool ath9k_hw_ani_read_counters(s
319 - if (!use_new_ani(ah)) {
320 - ofdm_base = AR_PHY_COUNTMAX - ah->config.ofdm_trig_high;
321 - cck_base = AR_PHY_COUNTMAX - ah->config.cck_trig_high;
324 aniState->listenTime += listenTime;
326 ath9k_hw_update_mibstats(ah, &ah->ah_mibStats);
327 @@ -652,26 +397,6 @@ static bool ath9k_hw_ani_read_counters(s
328 phyCnt1 = REG_READ(ah, AR_PHY_ERR_1);
329 phyCnt2 = REG_READ(ah, AR_PHY_ERR_2);
331 - if (!use_new_ani(ah) && (phyCnt1 < ofdm_base || phyCnt2 < cck_base)) {
332 - if (phyCnt1 < ofdm_base) {
333 - ath_dbg(common, ANI,
334 - "phyCnt1 0x%x, resetting counter value to 0x%x\n",
335 - phyCnt1, ofdm_base);
336 - REG_WRITE(ah, AR_PHY_ERR_1, ofdm_base);
337 - REG_WRITE(ah, AR_PHY_ERR_MASK_1,
338 - AR_PHY_ERR_OFDM_TIMING);
340 - if (phyCnt2 < cck_base) {
341 - ath_dbg(common, ANI,
342 - "phyCnt2 0x%x, resetting counter value to 0x%x\n",
343 - phyCnt2, cck_base);
344 - REG_WRITE(ah, AR_PHY_ERR_2, cck_base);
345 - REG_WRITE(ah, AR_PHY_ERR_MASK_2,
346 - AR_PHY_ERR_CCK_TIMING);
351 ofdmPhyErrCnt = phyCnt1 - ofdm_base;
352 ah->stats.ast_ani_ofdmerrs +=
353 ofdmPhyErrCnt - aniState->ofdmPhyErrCount;
354 @@ -810,9 +535,6 @@ void ath9k_hw_proc_mib_event(struct ath_
355 if (((phyCnt1 & AR_MIBCNT_INTRMASK) == AR_MIBCNT_INTRMASK) ||
356 ((phyCnt2 & AR_MIBCNT_INTRMASK) == AR_MIBCNT_INTRMASK)) {
358 - if (!use_new_ani(ah))
359 - ath9k_hw_ani_read_counters(ah);
361 /* NB: always restart to insure the h/w counters are reset */
362 ath9k_ani_restart(ah);
364 @@ -843,45 +565,28 @@ void ath9k_hw_ani_init(struct ath_hw *ah
366 ath_dbg(common, ANI, "Initialize ANI\n");
368 - if (use_new_ani(ah)) {
369 - ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH_NEW;
370 - ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW_NEW;
371 + ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH_NEW;
372 + ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW_NEW;
374 - ah->config.cck_trig_high = ATH9K_ANI_CCK_TRIG_HIGH_NEW;
375 - ah->config.cck_trig_low = ATH9K_ANI_CCK_TRIG_LOW_NEW;
377 - ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH_OLD;
378 - ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW_OLD;
380 - ah->config.cck_trig_high = ATH9K_ANI_CCK_TRIG_HIGH_OLD;
381 - ah->config.cck_trig_low = ATH9K_ANI_CCK_TRIG_LOW_OLD;
383 + ah->config.cck_trig_high = ATH9K_ANI_CCK_TRIG_HIGH_NEW;
384 + ah->config.cck_trig_low = ATH9K_ANI_CCK_TRIG_LOW_NEW;
386 for (i = 0; i < ARRAY_SIZE(ah->channels); i++) {
387 struct ath9k_channel *chan = &ah->channels[i];
388 struct ar5416AniState *ani = &chan->ani;
390 - if (use_new_ani(ah)) {
391 - ani->spurImmunityLevel =
392 - ATH9K_ANI_SPUR_IMMUNE_LVL_NEW;
393 + ani->spurImmunityLevel =
394 + ATH9K_ANI_SPUR_IMMUNE_LVL_NEW;
396 - ani->firstepLevel = ATH9K_ANI_FIRSTEP_LVL_NEW;
397 + ani->firstepLevel = ATH9K_ANI_FIRSTEP_LVL_NEW;
399 - if (AR_SREV_9300_20_OR_LATER(ah))
401 - !ATH9K_ANI_ENABLE_MRC_CCK;
403 - ani->mrcCCKOff = true;
405 - ani->ofdmsTurn = true;
407 - ani->spurImmunityLevel =
408 - ATH9K_ANI_SPUR_IMMUNE_LVL_OLD;
409 - ani->firstepLevel = ATH9K_ANI_FIRSTEP_LVL_OLD;
410 + if (AR_SREV_9300_20_OR_LATER(ah))
412 + !ATH9K_ANI_ENABLE_MRC_CCK;
414 + ani->mrcCCKOff = true;
416 - ani->cckWeakSigThreshold =
417 - ATH9K_ANI_CCK_WEAK_SIG_THR;
419 + ani->ofdmsTurn = true;
421 ani->rssiThrHigh = ATH9K_ANI_RSSI_THR_HIGH;
422 ani->rssiThrLow = ATH9K_ANI_RSSI_THR_LOW;
423 @@ -895,13 +600,8 @@ void ath9k_hw_ani_init(struct ath_hw *ah
424 * since we expect some ongoing maintenance on the tables, let's sanity
425 * check here default level should not modify INI setting.
427 - if (use_new_ani(ah)) {
428 - ah->aniperiod = ATH9K_ANI_PERIOD_NEW;
429 - ah->config.ani_poll_interval = ATH9K_ANI_POLLINTERVAL_NEW;
431 - ah->aniperiod = ATH9K_ANI_PERIOD_OLD;
432 - ah->config.ani_poll_interval = ATH9K_ANI_POLLINTERVAL_OLD;
434 + ah->aniperiod = ATH9K_ANI_PERIOD_NEW;
435 + ah->config.ani_poll_interval = ATH9K_ANI_POLLINTERVAL_NEW;
437 if (ah->config.enable_ani)
438 ah->proc_phyerr |= HAL_PROCESS_ANI;
439 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
440 +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
441 @@ -995,141 +995,6 @@ static u32 ar5008_hw_compute_pll_control
445 -static bool ar5008_hw_ani_control_old(struct ath_hw *ah,
446 - enum ath9k_ani_cmd cmd,
449 - struct ar5416AniState *aniState = &ah->curchan->ani;
450 - struct ath_common *common = ath9k_hw_common(ah);
452 - switch (cmd & ah->ani_function) {
453 - case ATH9K_ANI_NOISE_IMMUNITY_LEVEL:{
456 - if (level >= ARRAY_SIZE(ah->totalSizeDesired)) {
457 - ath_dbg(common, ANI, "level out of range (%u > %zu)\n",
458 - level, ARRAY_SIZE(ah->totalSizeDesired));
462 - REG_RMW_FIELD(ah, AR_PHY_DESIRED_SZ,
463 - AR_PHY_DESIRED_SZ_TOT_DES,
464 - ah->totalSizeDesired[level]);
465 - REG_RMW_FIELD(ah, AR_PHY_AGC_CTL1,
466 - AR_PHY_AGC_CTL1_COARSE_LOW,
467 - ah->coarse_low[level]);
468 - REG_RMW_FIELD(ah, AR_PHY_AGC_CTL1,
469 - AR_PHY_AGC_CTL1_COARSE_HIGH,
470 - ah->coarse_high[level]);
471 - REG_RMW_FIELD(ah, AR_PHY_FIND_SIG,
472 - AR_PHY_FIND_SIG_FIRPWR,
473 - ah->firpwr[level]);
475 - if (level > aniState->noiseImmunityLevel)
476 - ah->stats.ast_ani_niup++;
477 - else if (level < aniState->noiseImmunityLevel)
478 - ah->stats.ast_ani_nidown++;
479 - aniState->noiseImmunityLevel = level;
482 - case ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION:{
483 - u32 on = param ? 1 : 0;
486 - REG_SET_BIT(ah, AR_PHY_SFCORR_LOW,
487 - AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW);
489 - REG_CLR_BIT(ah, AR_PHY_SFCORR_LOW,
490 - AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW);
492 - if (on != aniState->ofdmWeakSigDetect) {
494 - ah->stats.ast_ani_ofdmon++;
496 - ah->stats.ast_ani_ofdmoff++;
497 - aniState->ofdmWeakSigDetect = on;
501 - case ATH9K_ANI_CCK_WEAK_SIGNAL_THR:{
502 - static const int weakSigThrCck[] = { 8, 6 };
503 - u32 high = param ? 1 : 0;
505 - REG_RMW_FIELD(ah, AR_PHY_CCK_DETECT,
506 - AR_PHY_CCK_DETECT_WEAK_SIG_THR_CCK,
507 - weakSigThrCck[high]);
508 - if (high != aniState->cckWeakSigThreshold) {
510 - ah->stats.ast_ani_cckhigh++;
512 - ah->stats.ast_ani_ccklow++;
513 - aniState->cckWeakSigThreshold = high;
517 - case ATH9K_ANI_FIRSTEP_LEVEL:{
518 - static const int firstep[] = { 0, 4, 8 };
521 - if (level >= ARRAY_SIZE(firstep)) {
522 - ath_dbg(common, ANI, "level out of range (%u > %zu)\n",
523 - level, ARRAY_SIZE(firstep));
526 - REG_RMW_FIELD(ah, AR_PHY_FIND_SIG,
527 - AR_PHY_FIND_SIG_FIRSTEP,
529 - if (level > aniState->firstepLevel)
530 - ah->stats.ast_ani_stepup++;
531 - else if (level < aniState->firstepLevel)
532 - ah->stats.ast_ani_stepdown++;
533 - aniState->firstepLevel = level;
536 - case ATH9K_ANI_SPUR_IMMUNITY_LEVEL:{
537 - static const int cycpwrThr1[] = { 2, 4, 6, 8, 10, 12, 14, 16 };
540 - if (level >= ARRAY_SIZE(cycpwrThr1)) {
541 - ath_dbg(common, ANI, "level out of range (%u > %zu)\n",
542 - level, ARRAY_SIZE(cycpwrThr1));
545 - REG_RMW_FIELD(ah, AR_PHY_TIMING5,
546 - AR_PHY_TIMING5_CYCPWR_THR1,
547 - cycpwrThr1[level]);
548 - if (level > aniState->spurImmunityLevel)
549 - ah->stats.ast_ani_spurup++;
550 - else if (level < aniState->spurImmunityLevel)
551 - ah->stats.ast_ani_spurdown++;
552 - aniState->spurImmunityLevel = level;
555 - case ATH9K_ANI_PRESENT:
558 - ath_dbg(common, ANI, "invalid cmd %u\n", cmd);
562 - ath_dbg(common, ANI, "ANI parameters:\n");
563 - ath_dbg(common, ANI,
564 - "noiseImmunityLevel=%d, spurImmunityLevel=%d, ofdmWeakSigDetect=%d\n",
565 - aniState->noiseImmunityLevel,
566 - aniState->spurImmunityLevel,
567 - aniState->ofdmWeakSigDetect);
568 - ath_dbg(common, ANI,
569 - "cckWeakSigThreshold=%d, firstepLevel=%d, listenTime=%d\n",
570 - aniState->cckWeakSigThreshold,
571 - aniState->firstepLevel,
572 - aniState->listenTime);
573 - ath_dbg(common, ANI, "ofdmPhyErrCount=%d, cckPhyErrCount=%d\n\n",
574 - aniState->ofdmPhyErrCount,
575 - aniState->cckPhyErrCount);
580 static bool ar5008_hw_ani_control_new(struct ath_hw *ah,
581 enum ath9k_ani_cmd cmd,
583 @@ -1545,11 +1410,8 @@ void ar5008_hw_attach_phy_ops(struct ath
584 priv_ops->do_getnf = ar5008_hw_do_getnf;
585 priv_ops->set_radar_params = ar5008_hw_set_radar_params;
587 - if (modparam_force_new_ani) {
588 - priv_ops->ani_control = ar5008_hw_ani_control_new;
589 - priv_ops->ani_cache_ini_regs = ar5008_hw_ani_cache_ini_regs;
591 - priv_ops->ani_control = ar5008_hw_ani_control_old;
592 + priv_ops->ani_control = ar5008_hw_ani_control_new;
593 + priv_ops->ani_cache_ini_regs = ar5008_hw_ani_cache_ini_regs;
595 if (AR_SREV_9100(ah) || AR_SREV_9160_10_OR_LATER(ah))
596 priv_ops->compute_pll_control = ar9160_hw_compute_pll_control;
597 --- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c
598 +++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c
600 #include "ar9002_initvals.h"
601 #include "ar9002_phy.h"
603 -int modparam_force_new_ani;
604 -module_param_named(force_new_ani, modparam_force_new_ani, int, 0444);
605 -MODULE_PARM_DESC(force_new_ani, "Force new ANI for AR5008, AR9001, AR9002");
607 /* General hardware code for the A5008/AR9001/AR9002 hadware families */
609 static void ar9002_hw_init_mode_regs(struct ath_hw *ah)
610 --- a/drivers/net/wireless/ath/ath9k/hw.h
611 +++ b/drivers/net/wireless/ath/ath9k/hw.h
612 @@ -1021,14 +1021,7 @@ void ar9002_hw_attach_ops(struct ath_hw
613 void ar9003_hw_attach_ops(struct ath_hw *ah);
615 void ar9002_hw_load_ani_reg(struct ath_hw *ah, struct ath9k_channel *chan);
617 - * ANI work can be shared between all families but a next
618 - * generation implementation of ANI will be used only for AR9003 only
619 - * for now as the other families still need to be tested with the same
620 - * next generation ANI. Feel free to start testing it though for the
621 - * older families (AR5008, AR9001, AR9002) by using modparam_force_new_ani.
623 -extern int modparam_force_new_ani;
625 void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning);
626 void ath9k_hw_proc_mib_event(struct ath_hw *ah);
627 void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan);