summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-10-07 02:28:13 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-10-11 16:41:13 -0400
commit030d6294351bfb0e29e2814bb8f6e6c2e25ffb54 (patch)
tree0806ba8083596a73a0c274dc251bcddadfc08814 /drivers/net/wireless/ath/ath9k/main.c
parent34d25810c7e73e49eed39a5d66170f3516a3c734 (diff)
downloadop-kernel-dev-030d6294351bfb0e29e2814bb8f6e6c2e25ffb54.zip
op-kernel-dev-030d6294351bfb0e29e2814bb8f6e6c2e25ffb54.tar.gz
ath9k: keep track of what's triggering hardware resets
Export how many times each of the reset triggers has fired through debugfs. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 9883186..366912f 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -679,6 +679,16 @@ void ath9k_tasklet(unsigned long data)
if ((status & ATH9K_INT_FATAL) ||
(status & ATH9K_INT_BB_WATCHDOG)) {
+#ifdef CONFIG_ATH9K_DEBUGFS
+ enum ath_reset_type type;
+
+ if (status & ATH9K_INT_FATAL)
+ type = RESET_TYPE_FATAL_INT;
+ else
+ type = RESET_TYPE_BB_WATCHDOG;
+
+ RESET_STAT_INC(sc, type);
+#endif
ieee80211_queue_work(sc->hw, &sc->hw_reset_work);
goto out;
}
@@ -995,8 +1005,10 @@ void ath_hw_check(struct work_struct *work)
ath_dbg(common, ATH_DBG_RESET, "Possible baseband hang, "
"busy=%d (try %d)\n", busy, sc->hw_busy_count + 1);
if (busy >= 99) {
- if (++sc->hw_busy_count >= 3)
+ if (++sc->hw_busy_count >= 3) {
+ RESET_STAT_INC(sc, RESET_TYPE_BB_HANG);
ieee80211_queue_work(sc->hw, &sc->hw_reset_work);
+ }
} else if (busy >= 0)
sc->hw_busy_count = 0;
@@ -1016,6 +1028,7 @@ static void ath_hw_pll_rx_hang_check(struct ath_softc *sc, u32 pll_sqsum)
/* Rx is hung for more than 500ms. Reset it */
ath_dbg(common, ATH_DBG_RESET,
"Possible RX hang, resetting");
+ RESET_STAT_INC(sc, RESET_TYPE_PLL_HANG);
ieee80211_queue_work(sc->hw, &sc->hw_reset_work);
count = 0;
}
OpenPOWER on IntegriCloud