aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-06-15 09:25:25 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-06-20 14:44:43 -0400
commit198823fd002a7f9784648c24c72b7e8c9e73fd14 (patch)
treed13b19b8f02e7c3872a10ed1c8eec13b8be4d571
parent465dce62cdb35f49bc0e859fb23787e1229b62a3 (diff)
ath9k: remove MIB interrupt support
The new ANI implementation does not need it Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/ani.c40
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h1
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c26
4 files changed, 2 insertions, 67 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c
index 7d5367676d4e..da73fa2a77d6 100644
--- a/drivers/net/wireless/ath/ath9k/ani.c
+++ b/drivers/net/wireless/ath/ath9k/ani.c
@@ -490,46 +490,6 @@ void ath9k_hw_disable_mib_counters(struct ath_hw *ah)
490} 490}
491EXPORT_SYMBOL(ath9k_hw_disable_mib_counters); 491EXPORT_SYMBOL(ath9k_hw_disable_mib_counters);
492 492
493/*
494 * Process a MIB interrupt. We may potentially be invoked because
495 * any of the MIB counters overflow/trigger so don't assume we're
496 * here because a PHY error counter triggered.
497 */
498void ath9k_hw_proc_mib_event(struct ath_hw *ah)
499{
500 u32 phyCnt1, phyCnt2;
501
502 /* Reset these counters regardless */
503 REG_WRITE(ah, AR_FILT_OFDM, 0);
504 REG_WRITE(ah, AR_FILT_CCK, 0);
505 if (!(REG_READ(ah, AR_SLP_MIB_CTRL) & AR_SLP_MIB_PENDING))
506 REG_WRITE(ah, AR_SLP_MIB_CTRL, AR_SLP_MIB_CLEAR);
507
508 /* Clear the mib counters and save them in the stats */
509 ath9k_hw_update_mibstats(ah, &ah->ah_mibStats);
510
511 if (!DO_ANI(ah)) {
512 /*
513 * We must always clear the interrupt cause by
514 * resetting the phy error regs.
515 */
516 REG_WRITE(ah, AR_PHY_ERR_1, 0);
517 REG_WRITE(ah, AR_PHY_ERR_2, 0);
518 return;
519 }
520
521 /* NB: these are not reset-on-read */
522 phyCnt1 = REG_READ(ah, AR_PHY_ERR_1);
523 phyCnt2 = REG_READ(ah, AR_PHY_ERR_2);
524 if (((phyCnt1 & AR_MIBCNT_INTRMASK) == AR_MIBCNT_INTRMASK) ||
525 ((phyCnt2 & AR_MIBCNT_INTRMASK) == AR_MIBCNT_INTRMASK)) {
526
527 /* NB: always restart to insure the h/w counters are reset */
528 ath9k_ani_restart(ah);
529 }
530}
531EXPORT_SYMBOL(ath9k_hw_proc_mib_event);
532
533void ath9k_hw_ani_setup(struct ath_hw *ah) 493void ath9k_hw_ani_setup(struct ath_hw *ah)
534{ 494{
535 int i; 495 int i;
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index 2831258d9507..5c3192ffc196 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -348,8 +348,6 @@ void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status)
348 sc->debug.stats.istats.txok++; 348 sc->debug.stats.istats.txok++;
349 if (status & ATH9K_INT_TXURN) 349 if (status & ATH9K_INT_TXURN)
350 sc->debug.stats.istats.txurn++; 350 sc->debug.stats.istats.txurn++;
351 if (status & ATH9K_INT_MIB)
352 sc->debug.stats.istats.mib++;
353 if (status & ATH9K_INT_RXPHY) 351 if (status & ATH9K_INT_RXPHY)
354 sc->debug.stats.istats.rxphyerr++; 352 sc->debug.stats.istats.rxphyerr++;
355 if (status & ATH9K_INT_RXKCM) 353 if (status & ATH9K_INT_RXKCM)
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 111a046b44c6..b49e4b48f459 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -1021,7 +1021,6 @@ void ar9003_hw_attach_ops(struct ath_hw *ah);
1021void ar9002_hw_load_ani_reg(struct ath_hw *ah, struct ath9k_channel *chan); 1021void ar9002_hw_load_ani_reg(struct ath_hw *ah, struct ath9k_channel *chan);
1022 1022
1023void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning); 1023void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning);
1024void ath9k_hw_proc_mib_event(struct ath_hw *ah);
1025void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan); 1024void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan);
1026 1025
1027#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT 1026#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 52561b341d68..85f9ab4fa26e 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -516,24 +516,6 @@ irqreturn_t ath_isr(int irq, void *dev)
516 ath9k_hw_set_interrupts(ah); 516 ath9k_hw_set_interrupts(ah);
517 } 517 }
518 518
519 if (status & ATH9K_INT_MIB) {
520 /*
521 * Disable interrupts until we service the MIB
522 * interrupt; otherwise it will continue to
523 * fire.
524 */
525 ath9k_hw_disable_interrupts(ah);
526 /*
527 * Let the hal handle the event. We assume
528 * it will clear whatever condition caused
529 * the interrupt.
530 */
531 spin_lock(&common->cc_lock);
532 ath9k_hw_proc_mib_event(ah);
533 spin_unlock(&common->cc_lock);
534 ath9k_hw_enable_interrupts(ah);
535 }
536
537 if (!(ah->caps.hw_caps & ATH9K_HW_CAP_AUTOSLEEP)) 519 if (!(ah->caps.hw_caps & ATH9K_HW_CAP_AUTOSLEEP))
538 if (status & ATH9K_INT_TIM_TIMER) { 520 if (status & ATH9K_INT_TIM_TIMER) {
539 if (ATH_DBG_WARN_ON_ONCE(sc->ps_idle)) 521 if (ATH_DBG_WARN_ON_ONCE(sc->ps_idle))
@@ -959,14 +941,10 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw,
959 /* 941 /*
960 * Enable MIB interrupts when there are hardware phy counters. 942 * Enable MIB interrupts when there are hardware phy counters.
961 */ 943 */
962 if ((iter_data.nstations + iter_data.nadhocs + iter_data.nmeshes) > 0) { 944 if ((iter_data.nstations + iter_data.nadhocs + iter_data.nmeshes) > 0)
963 if (ah->config.enable_ani)
964 ah->imask |= ATH9K_INT_MIB;
965 ah->imask |= ATH9K_INT_TSFOOR; 945 ah->imask |= ATH9K_INT_TSFOOR;
966 } else { 946 else
967 ah->imask &= ~ATH9K_INT_MIB;
968 ah->imask &= ~ATH9K_INT_TSFOOR; 947 ah->imask &= ~ATH9K_INT_TSFOOR;
969 }
970 948
971 ath9k_hw_set_interrupts(ah); 949 ath9k_hw_set_interrupts(ah);
972 950