diff options
author | Mohammed Shafi Shajakhan <mshajakhan@atheros.com> | 2011-04-22 07:57:01 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-25 14:50:20 -0400 |
commit | 6dde1aabf6759848512f19d76b89ee473584c46a (patch) | |
tree | 61fb3040f5173aa67c3d07d06cd8f2604602706d | |
parent | cedc7e3d0c847d602d2970120d0e4cca72f364a4 (diff) |
ath9k: Add TSFOOR interrupt stats in debug info
This helped the developers to fix an issue of chip not entering network
sleep during idle state, previously this was only available as a debug
message
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.h | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 34f191ec8e8c..bad1a87249b6 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c | |||
@@ -326,6 +326,8 @@ void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status) | |||
326 | sc->debug.stats.istats.dtimsync++; | 326 | sc->debug.stats.istats.dtimsync++; |
327 | if (status & ATH9K_INT_DTIM) | 327 | if (status & ATH9K_INT_DTIM) |
328 | sc->debug.stats.istats.dtim++; | 328 | sc->debug.stats.istats.dtim++; |
329 | if (status & ATH9K_INT_TSFOOR) | ||
330 | sc->debug.stats.istats.tsfoor++; | ||
329 | } | 331 | } |
330 | 332 | ||
331 | static ssize_t read_file_interrupt(struct file *file, char __user *user_buf, | 333 | static ssize_t read_file_interrupt(struct file *file, char __user *user_buf, |
@@ -380,8 +382,11 @@ static ssize_t read_file_interrupt(struct file *file, char __user *user_buf, | |||
380 | len += snprintf(buf + len, sizeof(buf) - len, | 382 | len += snprintf(buf + len, sizeof(buf) - len, |
381 | "%8s: %10u\n", "DTIM", sc->debug.stats.istats.dtim); | 383 | "%8s: %10u\n", "DTIM", sc->debug.stats.istats.dtim); |
382 | len += snprintf(buf + len, sizeof(buf) - len, | 384 | len += snprintf(buf + len, sizeof(buf) - len, |
385 | "%8s: %10u\n", "TSFOOR", sc->debug.stats.istats.tsfoor); | ||
386 | len += snprintf(buf + len, sizeof(buf) - len, | ||
383 | "%8s: %10u\n", "TOTAL", sc->debug.stats.istats.total); | 387 | "%8s: %10u\n", "TOTAL", sc->debug.stats.istats.total); |
384 | 388 | ||
389 | |||
385 | if (len > sizeof(buf)) | 390 | if (len > sizeof(buf)) |
386 | len = sizeof(buf); | 391 | len = sizeof(buf); |
387 | 392 | ||
diff --git a/drivers/net/wireless/ath/ath9k/debug.h b/drivers/net/wireless/ath/ath9k/debug.h index 1f9f8eada465..5488a324cc10 100644 --- a/drivers/net/wireless/ath/ath9k/debug.h +++ b/drivers/net/wireless/ath/ath9k/debug.h | |||
@@ -54,6 +54,9 @@ struct ath_buf; | |||
54 | * @dtimsync: DTIM sync lossage | 54 | * @dtimsync: DTIM sync lossage |
55 | * @dtim: RX Beacon with DTIM | 55 | * @dtim: RX Beacon with DTIM |
56 | * @bb_watchdog: Baseband watchdog | 56 | * @bb_watchdog: Baseband watchdog |
57 | * @tsfoor: TSF out of range, indicates that the corrected TSF received | ||
58 | * from a beacon differs from the PCU's internal TSF by more than a | ||
59 | * (programmable) threshold | ||
57 | */ | 60 | */ |
58 | struct ath_interrupt_stats { | 61 | struct ath_interrupt_stats { |
59 | u32 total; | 62 | u32 total; |
@@ -78,6 +81,7 @@ struct ath_interrupt_stats { | |||
78 | u32 dtimsync; | 81 | u32 dtimsync; |
79 | u32 dtim; | 82 | u32 dtim; |
80 | u32 bb_watchdog; | 83 | u32 bb_watchdog; |
84 | u32 tsfoor; | ||
81 | }; | 85 | }; |
82 | 86 | ||
83 | /** | 87 | /** |