From: Felix Fietkau <nbd@openwrt.org>
To: linux-wireless@vger.kernel.org
Cc: linville@tuxdriver.com, sujith@msujith.org
Subject: [PATCH v2 04/12] ath9k: add CAB queue info to debugfs
Date: Tue, 6 Aug 2013 14:18:05 +0200 [thread overview]
Message-ID: <1375791493-83971-4-git-send-email-nbd@openwrt.org> (raw)
In-Reply-To: <1375791493-83971-1-git-send-email-nbd@openwrt.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
drivers/net/wireless/ath/ath9k/debug.c | 43 +++++++++++++++++++++-------------
1 file changed, 27 insertions(+), 16 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index a155190..63b4d82 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -728,6 +728,28 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
return retval;
}
+static ssize_t print_queue(struct ath_softc *sc, struct ath_txq *txq,
+ char *buf, ssize_t size)
+{
+ ssize_t len = 0;
+
+ ath_txq_lock(sc, txq);
+
+ len += snprintf(buf + len, size - len, "%s: %d ",
+ "qnum", txq->axq_qnum);
+ len += snprintf(buf + len, size - len, "%s: %2d ",
+ "qdepth", txq->axq_depth);
+ len += snprintf(buf + len, size - len, "%s: %2d ",
+ "ampdu-depth", txq->axq_ampdu_depth);
+ len += snprintf(buf + len, size - len, "%s: %3d ",
+ "pending", txq->pending_frames);
+ len += snprintf(buf + len, size - len, "%s: %d\n",
+ "stopped", txq->stopped);
+
+ ath_txq_unlock(sc, txq);
+ return len;
+}
+
static ssize_t read_file_queues(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
@@ -745,24 +767,13 @@ static ssize_t read_file_queues(struct file *file, char __user *user_buf,
for (i = 0; i < IEEE80211_NUM_ACS; i++) {
txq = sc->tx.txq_map[i];
- len += snprintf(buf + len, size - len, "(%s): ", qname[i]);
-
- ath_txq_lock(sc, txq);
-
- len += snprintf(buf + len, size - len, "%s: %d ",
- "qnum", txq->axq_qnum);
- len += snprintf(buf + len, size - len, "%s: %2d ",
- "qdepth", txq->axq_depth);
- len += snprintf(buf + len, size - len, "%s: %2d ",
- "ampdu-depth", txq->axq_ampdu_depth);
- len += snprintf(buf + len, size - len, "%s: %3d ",
- "pending", txq->pending_frames);
- len += snprintf(buf + len, size - len, "%s: %d\n",
- "stopped", txq->stopped);
-
- ath_txq_unlock(sc, txq);
+ len += snprintf(buf + len, size - len, "(%s): ", qname[i]);
+ len += print_queue(sc, txq, buf + len, size - len);
}
+ len += snprintf(buf + len, size - len, "(CAB): ");
+ len += print_queue(sc, sc->beacon.cabq, buf + len, size - len);
+
if (len > size)
len = size;
--
1.8.0.2
next prev parent reply other threads:[~2013-08-06 12:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-06 12:18 [PATCH v2 01/12] ath9k: add utility functions for accessing tid queues Felix Fietkau
2013-08-06 12:18 ` [PATCH v2 02/12] ath9k: split tid retry packets into a separate queue Felix Fietkau
2013-08-06 12:18 ` [PATCH v2 03/12] ath9k: add function for getting the tx tid for a packet Felix Fietkau
2013-08-06 12:18 ` Felix Fietkau [this message]
2013-08-06 12:18 ` [PATCH v2 05/12] ath9k: simplify ath_tx_form_aggr Felix Fietkau
2013-08-06 12:18 ` [PATCH v2 06/12] ath9k: fix block ack window tracking check Felix Fietkau
2013-08-06 12:18 ` [PATCH v2 07/12] ath9k: prepare queueing code for handling unaggregated traffic Felix Fietkau
2013-08-06 12:18 ` [PATCH v2 08/12] ath9k: fix clearing expired A-MPDU subframes in tx completion Felix Fietkau
2013-08-06 12:18 ` [PATCH v2 09/12] ath9k: always clear ps filter bit on new assoc Felix Fietkau
2013-08-06 12:18 ` [PATCH v2 10/12] ath9k: use software queues for un-aggregated data packets Felix Fietkau
2013-08-06 12:18 ` [PATCH v2 11/12] ath9k: improve tx scheduling fairness Felix Fietkau
2013-08-06 12:18 ` [PATCH v2 12/12] ath9k: use software queueing for multicast traffic Felix Fietkau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1375791493-83971-4-git-send-email-nbd@openwrt.org \
--to=nbd@openwrt.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=sujith@msujith.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox