Commit 6dde1aab authored by Mohammed Shafi Shajakhan's avatar Mohammed Shafi Shajakhan Committed by John W. Linville
Browse files

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: default avatarMohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent cedc7e3d
...@@ -326,6 +326,8 @@ void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status) ...@@ -326,6 +326,8 @@ void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status)
sc->debug.stats.istats.dtimsync++; sc->debug.stats.istats.dtimsync++;
if (status & ATH9K_INT_DTIM) if (status & ATH9K_INT_DTIM)
sc->debug.stats.istats.dtim++; sc->debug.stats.istats.dtim++;
if (status & ATH9K_INT_TSFOOR)
sc->debug.stats.istats.tsfoor++;
} }
static ssize_t read_file_interrupt(struct file *file, char __user *user_buf, static ssize_t read_file_interrupt(struct file *file, char __user *user_buf,
...@@ -379,9 +381,12 @@ static ssize_t read_file_interrupt(struct file *file, char __user *user_buf, ...@@ -379,9 +381,12 @@ static ssize_t read_file_interrupt(struct file *file, char __user *user_buf,
"%8s: %10u\n", "DTIMSYNC", sc->debug.stats.istats.dtimsync); "%8s: %10u\n", "DTIMSYNC", sc->debug.stats.istats.dtimsync);
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "DTIM", sc->debug.stats.istats.dtim); "%8s: %10u\n", "DTIM", sc->debug.stats.istats.dtim);
len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "TSFOOR", sc->debug.stats.istats.tsfoor);
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "TOTAL", sc->debug.stats.istats.total); "%8s: %10u\n", "TOTAL", sc->debug.stats.istats.total);
if (len > sizeof(buf)) if (len > sizeof(buf))
len = sizeof(buf); len = sizeof(buf);
......
...@@ -54,6 +54,9 @@ struct ath_buf; ...@@ -54,6 +54,9 @@ struct ath_buf;
* @dtimsync: DTIM sync lossage * @dtimsync: DTIM sync lossage
* @dtim: RX Beacon with DTIM * @dtim: RX Beacon with DTIM
* @bb_watchdog: Baseband watchdog * @bb_watchdog: Baseband watchdog
* @tsfoor: TSF out of range, indicates that the corrected TSF received
* from a beacon differs from the PCU's internal TSF by more than a
* (programmable) threshold
*/ */
struct ath_interrupt_stats { struct ath_interrupt_stats {
u32 total; u32 total;
...@@ -78,6 +81,7 @@ struct ath_interrupt_stats { ...@@ -78,6 +81,7 @@ struct ath_interrupt_stats {
u32 dtimsync; u32 dtimsync;
u32 dtim; u32 dtim;
u32 bb_watchdog; u32 bb_watchdog;
u32 tsfoor;
}; };
/** /**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment