diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/debug.c')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/debug.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c index 4cccc29964f6..6583a82a0783 100644 --- a/drivers/net/wireless/ath/ath5k/debug.c +++ b/drivers/net/wireless/ath/ath5k/debug.c | |||
@@ -312,6 +312,7 @@ static const struct { | |||
312 | { ATH5K_DEBUG_DUMP_TX, "dumptx", "print transmit skb content" }, | 312 | { ATH5K_DEBUG_DUMP_TX, "dumptx", "print transmit skb content" }, |
313 | { ATH5K_DEBUG_DUMPBANDS, "dumpbands", "dump bands" }, | 313 | { ATH5K_DEBUG_DUMPBANDS, "dumpbands", "dump bands" }, |
314 | { ATH5K_DEBUG_ANI, "ani", "adaptive noise immunity" }, | 314 | { ATH5K_DEBUG_ANI, "ani", "adaptive noise immunity" }, |
315 | { ATH5K_DEBUG_DESC, "desc", "descriptor chains" }, | ||
315 | { ATH5K_DEBUG_ANY, "all", "show all debug levels" }, | 316 | { ATH5K_DEBUG_ANY, "all", "show all debug levels" }, |
316 | }; | 317 | }; |
317 | 318 | ||
@@ -762,7 +763,7 @@ static ssize_t read_file_queue(struct file *file, char __user *user_buf, | |||
762 | 763 | ||
763 | struct ath5k_txq *txq; | 764 | struct ath5k_txq *txq; |
764 | struct ath5k_buf *bf, *bf0; | 765 | struct ath5k_buf *bf, *bf0; |
765 | int i, n = 0; | 766 | int i, n; |
766 | 767 | ||
767 | len += snprintf(buf+len, sizeof(buf)-len, | 768 | len += snprintf(buf+len, sizeof(buf)-len, |
768 | "available txbuffers: %d\n", sc->txbuf_len); | 769 | "available txbuffers: %d\n", sc->txbuf_len); |
@@ -776,9 +777,16 @@ static ssize_t read_file_queue(struct file *file, char __user *user_buf, | |||
776 | if (!txq->setup) | 777 | if (!txq->setup) |
777 | continue; | 778 | continue; |
778 | 779 | ||
780 | n = 0; | ||
781 | spin_lock_bh(&txq->lock); | ||
779 | list_for_each_entry_safe(bf, bf0, &txq->q, list) | 782 | list_for_each_entry_safe(bf, bf0, &txq->q, list) |
780 | n++; | 783 | n++; |
781 | len += snprintf(buf+len, sizeof(buf)-len, " len: %d\n", n); | 784 | spin_unlock_bh(&txq->lock); |
785 | |||
786 | len += snprintf(buf+len, sizeof(buf)-len, | ||
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); | ||
782 | } | 790 | } |
783 | 791 | ||
784 | if (len > sizeof(buf)) | 792 | if (len > sizeof(buf)) |
@@ -955,7 +963,7 @@ ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah) | |||
955 | struct ath5k_rx_status rs = {}; | 963 | struct ath5k_rx_status rs = {}; |
956 | int status; | 964 | int status; |
957 | 965 | ||
958 | if (likely(!(sc->debug.level & ATH5K_DEBUG_RESET))) | 966 | if (likely(!(sc->debug.level & ATH5K_DEBUG_DESC))) |
959 | return; | 967 | return; |
960 | 968 | ||
961 | printk(KERN_DEBUG "rxdp %x, rxlink %p\n", | 969 | printk(KERN_DEBUG "rxdp %x, rxlink %p\n", |
@@ -997,7 +1005,7 @@ ath5k_debug_printtxbuf(struct ath5k_softc *sc, struct ath5k_buf *bf) | |||
997 | struct ath5k_tx_status ts = {}; | 1005 | struct ath5k_tx_status ts = {}; |
998 | int done; | 1006 | int done; |
999 | 1007 | ||
1000 | if (likely(!(sc->debug.level & ATH5K_DEBUG_RESET))) | 1008 | if (likely(!(sc->debug.level & ATH5K_DEBUG_DESC))) |
1001 | return; | 1009 | return; |
1002 | 1010 | ||
1003 | done = sc->ah->ah_proc_tx_desc(sc->ah, bf->desc, &ts); | 1011 | done = sc->ah->ah_proc_tx_desc(sc->ah, bf->desc, &ts); |