diff options
author | Ben Greear <greearb@candelatech.com> | 2011-01-10 02:11:45 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-21 15:32:22 -0500 |
commit | 2dac4fb97a41af1e6b7ab9f59c837d20838e92da (patch) | |
tree | 3c127ad35b4a269b0c3cce375298c315c7850413 /drivers/net/wireless/ath/ath9k/debug.c | |
parent | 233536e126056f65a8aac7ff38788d19dbb53299 (diff) |
ath9k: Add more information to debugfs xmit file.
Should help debug strange tx lockup type issues.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/debug.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 5075faa618d3..577bc5a9835b 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c | |||
@@ -599,13 +599,25 @@ do { \ | |||
599 | (unsigned int)(sc->tx.txq[WME_AC_VO].elem)); \ | 599 | (unsigned int)(sc->tx.txq[WME_AC_VO].elem)); \ |
600 | } while(0) | 600 | } while(0) |
601 | 601 | ||
602 | #define PRQLE(str, elem) \ | ||
603 | do { \ | ||
604 | len += snprintf(buf + len, size - len, \ | ||
605 | "%s%13i%11i%10i%10i\n", str, \ | ||
606 | list_empty(&sc->tx.txq[WME_AC_BE].elem), \ | ||
607 | list_empty(&sc->tx.txq[WME_AC_BK].elem), \ | ||
608 | list_empty(&sc->tx.txq[WME_AC_VI].elem), \ | ||
609 | list_empty(&sc->tx.txq[WME_AC_VO].elem)); \ | ||
610 | } while (0) | ||
611 | |||
602 | static ssize_t read_file_xmit(struct file *file, char __user *user_buf, | 612 | static ssize_t read_file_xmit(struct file *file, char __user *user_buf, |
603 | size_t count, loff_t *ppos) | 613 | size_t count, loff_t *ppos) |
604 | { | 614 | { |
605 | struct ath_softc *sc = file->private_data; | 615 | struct ath_softc *sc = file->private_data; |
606 | char *buf; | 616 | char *buf; |
607 | unsigned int len = 0, size = 2048; | 617 | unsigned int len = 0, size = 4000; |
618 | int i; | ||
608 | ssize_t retval = 0; | 619 | ssize_t retval = 0; |
620 | char tmp[32]; | ||
609 | 621 | ||
610 | buf = kzalloc(size, GFP_KERNEL); | 622 | buf = kzalloc(size, GFP_KERNEL); |
611 | if (buf == NULL) | 623 | if (buf == NULL) |
@@ -628,13 +640,26 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf, | |||
628 | PR("DELIM Underrun: ", delim_underrun); | 640 | PR("DELIM Underrun: ", delim_underrun); |
629 | PR("TX-Pkts-All: ", tx_pkts_all); | 641 | PR("TX-Pkts-All: ", tx_pkts_all); |
630 | PR("TX-Bytes-All: ", tx_bytes_all); | 642 | PR("TX-Bytes-All: ", tx_bytes_all); |
643 | PR("hw-put-tx-buf: ", puttxbuf); | ||
644 | PR("hw-tx-start: ", txstart); | ||
645 | PR("hw-tx-proc-desc: ", txprocdesc); | ||
631 | 646 | ||
632 | PRX("axq-qnum: ", axq_qnum); | 647 | PRX("axq-qnum: ", axq_qnum); |
633 | PRX("axq-depth: ", axq_depth); | 648 | PRX("axq-depth: ", axq_depth); |
649 | PRX("axq-ampdu_depth: ", axq_ampdu_depth); | ||
634 | PRX("axq-stopped ", stopped); | 650 | PRX("axq-stopped ", stopped); |
635 | PRX("tx-in-progress ", axq_tx_inprogress); | 651 | PRX("tx-in-progress ", axq_tx_inprogress); |
636 | PRX("pending-frames ", pending_frames); | 652 | PRX("pending-frames ", pending_frames); |
637 | 653 | PRX("txq_headidx: ", txq_headidx); | |
654 | PRX("txq_tailidx: ", txq_headidx); | ||
655 | |||
656 | PRQLE("axq_q empty: ", axq_q); | ||
657 | PRQLE("axq_acq empty: ", axq_acq); | ||
658 | PRQLE("txq_fifo_pending: ", txq_fifo_pending); | ||
659 | for (i = 0; i < ATH_TXFIFO_DEPTH; i++) { | ||
660 | snprintf(tmp, sizeof(tmp) - 1, "txq_fifo[%i] empty: ", i); | ||
661 | PRQLE(tmp, txq_fifo[i]); | ||
662 | } | ||
638 | if (len > size) | 663 | if (len > size) |
639 | len = size; | 664 | len = size; |
640 | 665 | ||