diff options
author | Bruno Randolf <br1@einfach.org> | 2010-09-16 22:37:02 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-09-21 11:05:14 -0400 |
commit | 923e5b3d3d773b9956b943ac64f782d5a127bdea (patch) | |
tree | 04baaf5b5f2edb1b467f6e9debc075c2bb2b62cc /drivers | |
parent | 4edd761f4075b03be5932682a2f7b9368dc9e536 (diff) |
ath5k: Count how many times a queue got stuck
Add a counter to show how many times a queue got stuck in the debugfs queue
file.
Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/debug.c | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index afedfeba13dd..cae9fe4676e7 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -892,6 +892,7 @@ ath5k_txq_setup(struct ath5k_softc *sc, | |||
892 | txq->setup = true; | 892 | txq->setup = true; |
893 | txq->txq_len = 0; | 893 | txq->txq_len = 0; |
894 | txq->txq_poll_mark = false; | 894 | txq->txq_poll_mark = false; |
895 | txq->txq_stuck = 0; | ||
895 | } | 896 | } |
896 | return &sc->txqs[qnum]; | 897 | return &sc->txqs[qnum]; |
897 | } | 898 | } |
@@ -2193,6 +2194,7 @@ ath5k_tx_complete_poll_work(struct work_struct *work) | |||
2193 | "TX queue stuck %d\n", | 2194 | "TX queue stuck %d\n", |
2194 | txq->qnum); | 2195 | txq->qnum); |
2195 | needreset = true; | 2196 | needreset = true; |
2197 | txq->txq_stuck++; | ||
2196 | spin_unlock_bh(&txq->lock); | 2198 | spin_unlock_bh(&txq->lock); |
2197 | break; | 2199 | break; |
2198 | } else { | 2200 | } else { |
diff --git a/drivers/net/wireless/ath/ath5k/base.h b/drivers/net/wireless/ath/ath5k/base.h index d8e2674aec71..7f9d0d3018e8 100644 --- a/drivers/net/wireless/ath/ath5k/base.h +++ b/drivers/net/wireless/ath/ath5k/base.h | |||
@@ -88,6 +88,7 @@ struct ath5k_txq { | |||
88 | bool setup; | 88 | bool setup; |
89 | int txq_len; /* number of queued buffers */ | 89 | int txq_len; /* number of queued buffers */ |
90 | bool txq_poll_mark; | 90 | bool txq_poll_mark; |
91 | unsigned int txq_stuck; /* informational counter */ | ||
91 | }; | 92 | }; |
92 | 93 | ||
93 | #define ATH5K_LED_MAX_NAME_LEN 31 | 94 | #define ATH5K_LED_MAX_NAME_LEN 31 |
diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c index b2c610ba8b7e..6583a82a0783 100644 --- a/drivers/net/wireless/ath/ath5k/debug.c +++ b/drivers/net/wireless/ath/ath5k/debug.c | |||
@@ -785,6 +785,8 @@ static ssize_t read_file_queue(struct file *file, char __user *user_buf, | |||
785 | 785 | ||
786 | len += snprintf(buf+len, sizeof(buf)-len, | 786 | len += snprintf(buf+len, sizeof(buf)-len, |
787 | " len: %d bufs: %d\n", txq->txq_len, n); | 787 | " len: %d bufs: %d\n", txq->txq_len, n); |
788 | len += snprintf(buf+len, sizeof(buf)-len, | ||
789 | " stuck: %d\n", txq->txq_stuck); | ||
788 | } | 790 | } |
789 | 791 | ||
790 | if (len > sizeof(buf)) | 792 | if (len > sizeof(buf)) |