From: Kalle Valo <kalle.valo@iki.fi>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH v2 01/11] wl1251: add tx queue status to debugfs
Date: Mon, 30 Nov 2009 10:17:38 +0200 [thread overview]
Message-ID: <20091130081738.17360.1065.stgit@tikku> (raw)
In-Reply-To: <20091130081706.17360.48084.stgit@tikku>
From: Kalle Valo <kalle.valo@nokia.com>
Sometimes when debugging the state is good info.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
---
drivers/net/wireless/wl12xx/wl1251.h | 1 +
drivers/net/wireless/wl12xx/wl1251_debugfs.c | 23 +++++++++++++++++++++++
2 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/wl1251.h b/drivers/net/wireless/wl12xx/wl1251.h
index 054533f..6301578 100644
--- a/drivers/net/wireless/wl12xx/wl1251.h
+++ b/drivers/net/wireless/wl12xx/wl1251.h
@@ -247,6 +247,7 @@ struct wl1251_debugfs {
struct dentry *rxpipe_tx_xfr_host_int_trig_rx_data;
struct dentry *tx_queue_len;
+ struct dentry *tx_queue_status;
struct dentry *retry_count;
struct dentry *excessive_retries;
diff --git a/drivers/net/wireless/wl12xx/wl1251_debugfs.c b/drivers/net/wireless/wl12xx/wl1251_debugfs.c
index a007230..0ccba57 100644
--- a/drivers/net/wireless/wl12xx/wl1251_debugfs.c
+++ b/drivers/net/wireless/wl12xx/wl1251_debugfs.c
@@ -237,6 +237,27 @@ static const struct file_operations tx_queue_len_ops = {
.open = wl1251_open_file_generic,
};
+static ssize_t tx_queue_status_read(struct file *file, char __user *userbuf,
+ size_t count, loff_t *ppos)
+{
+ struct wl1251 *wl = file->private_data;
+ char buf[3], status;
+ int len;
+
+ if (wl->tx_queue_stopped)
+ status = 's';
+ else
+ status = 'r';
+
+ len = scnprintf(buf, sizeof(buf), "%c\n", status);
+ return simple_read_from_buffer(userbuf, count, ppos, buf, len);
+}
+
+static const struct file_operations tx_queue_status_ops = {
+ .read = tx_queue_status_read,
+ .open = wl1251_open_file_generic,
+};
+
static void wl1251_debugfs_delete_files(struct wl1251 *wl)
{
DEBUGFS_FWSTATS_DEL(tx, internal_desc_overflow);
@@ -331,6 +352,7 @@ static void wl1251_debugfs_delete_files(struct wl1251 *wl)
DEBUGFS_FWSTATS_DEL(rxpipe, tx_xfr_host_int_trig_rx_data);
DEBUGFS_DEL(tx_queue_len);
+ DEBUGFS_DEL(tx_queue_status);
DEBUGFS_DEL(retry_count);
DEBUGFS_DEL(excessive_retries);
}
@@ -431,6 +453,7 @@ static int wl1251_debugfs_add_files(struct wl1251 *wl)
DEBUGFS_FWSTATS_ADD(rxpipe, tx_xfr_host_int_trig_rx_data);
DEBUGFS_ADD(tx_queue_len, wl->debugfs.rootdir);
+ DEBUGFS_ADD(tx_queue_status, wl->debugfs.rootdir);
DEBUGFS_ADD(retry_count, wl->debugfs.rootdir);
DEBUGFS_ADD(excessive_retries, wl->debugfs.rootdir);
next prev parent reply other threads:[~2009-11-30 8:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-30 8:17 [PATCH v2 00/11] wl1251 WMM support and minor fixes Kalle Valo
2009-11-30 8:17 ` Kalle Valo [this message]
2009-11-30 8:17 ` [PATCH v2 02/11] wl1251: print a debug message when tx_queue is full Kalle Valo
2009-11-30 8:17 ` [PATCH v2 03/11] wl1251: fix error handling in wl1251_op_config() Kalle Valo
2009-11-30 8:17 ` [PATCH v2 04/11] wl1251: reduce ELP wakeup timeout Kalle Valo
2009-11-30 8:18 ` [PATCH v2 05/11] wl1251: simplify ELP wakeup time calculation Kalle Valo
2009-11-30 8:18 ` [PATCH v2 06/11] wl1251: use __dev_alloc_skb() on RX Kalle Valo
2009-11-30 8:18 ` [PATCH v2 07/11] wl1251: implement acx_ac_cfg to configure hardware queues Kalle Valo
2009-11-30 8:18 ` [PATCH v2 08/11] wl1251: implement wl1251_acx_tid_cfg() Kalle Valo
2009-11-30 8:18 ` [PATCH v2 09/11] wl1251: implement WMM Kalle Valo
2009-11-30 8:18 ` [PATCH v2 10/11] wl1251: update tx_hdr when aliging skb in tx Kalle Valo
2009-11-30 8:18 ` [PATCH v2 11/11] wl1251: enable WMM Kalle Valo
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=20091130081738.17360.1065.stgit@tikku \
--to=kalle.valo@iki.fi \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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;
as well as URLs for NNTP newsgroup(s).