Linux wireless drivers development
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
	ipw3945-devel@lists.sourceforge.net,
	Johannes Berg <johannes.berg@intel.com>,
	Reinette Chatre <reinette.chatre@intel.com>
Subject: [PATCH 07/17] iwlwifi: improve station debugfs
Date: Thu, 13 May 2010 14:49:49 -0700	[thread overview]
Message-ID: <1273787399-9280-8-git-send-email-reinette.chatre@intel.com> (raw)
In-Reply-To: <1273787399-9280-1-git-send-email-reinette.chatre@intel.com>

From: Johannes Berg <johannes.berg@intel.com>

The stations debugfs entry doesn't even show
the stations' MAC addresses Also, the TID
information is formatted very oddly, and
misses the important tfds_in_queue variable.
Fix this to make the file more useful.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-debugfs.c |   60 +++++++++++----------------
 1 files changed, 25 insertions(+), 35 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
index 9793050..5e12c96 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
@@ -303,45 +303,35 @@ static ssize_t iwl_dbgfs_stations_read(struct file *file, char __user *user_buf,
 
 	for (i = 0; i < max_sta; i++) {
 		station = &priv->stations[i];
-		if (station->used) {
-			pos += scnprintf(buf + pos, bufsz - pos,
-					"station %d:\ngeneral data:\n", i+1);
-			pos += scnprintf(buf + pos, bufsz - pos, "id: %u\n",
-					station->sta.sta.sta_id);
-			pos += scnprintf(buf + pos, bufsz - pos, "mode: %u\n",
-					station->sta.mode);
-			pos += scnprintf(buf + pos, bufsz - pos,
-					"flags: 0x%x\n",
-					station->sta.station_flags_msk);
-			pos += scnprintf(buf + pos, bufsz - pos, "tid data:\n");
-			pos += scnprintf(buf + pos, bufsz - pos,
-					"seq_num\t\ttxq_id");
-			pos += scnprintf(buf + pos, bufsz - pos,
-					"\tframe_count\twait_for_ba\t");
-			pos += scnprintf(buf + pos, bufsz - pos,
-					"start_idx\tbitmap0\t");
-			pos += scnprintf(buf + pos, bufsz - pos,
-					"bitmap1\trate_n_flags");
-			pos += scnprintf(buf + pos, bufsz - pos, "\n");
+		if (!station->used)
+			continue;
+		pos += scnprintf(buf + pos, bufsz - pos,
+				 "station %d - addr: %pM, flags: %#x\n",
+				 i, station->sta.sta.addr,
+				 station->sta.station_flags_msk);
+		pos += scnprintf(buf + pos, bufsz - pos,
+				"TID\tseq_num\ttxq_id\tframes\ttfds\t");
+		pos += scnprintf(buf + pos, bufsz - pos,
+				"start_idx\tbitmap\t\t\trate_n_flags\n");
 
-			for (j = 0; j < MAX_TID_COUNT; j++) {
-				pos += scnprintf(buf + pos, bufsz - pos,
-						"[%d]:\t\t%u", j,
-						station->tid[j].seq_number);
-				pos += scnprintf(buf + pos, bufsz - pos,
-						"\t%u\t\t%u\t\t%u\t\t",
-						station->tid[j].agg.txq_id,
-						station->tid[j].agg.frame_count,
-						station->tid[j].agg.wait_for_ba);
+		for (j = 0; j < MAX_TID_COUNT; j++) {
+			pos += scnprintf(buf + pos, bufsz - pos,
+				"%d:\t%#x\t%#x\t%u\t%u\t%u\t\t%#.16llx\t%#x",
+				j, station->tid[j].seq_number,
+				station->tid[j].agg.txq_id,
+				station->tid[j].agg.frame_count,
+				station->tid[j].tfds_in_queue,
+				station->tid[j].agg.start_idx,
+				station->tid[j].agg.bitmap,
+				station->tid[j].agg.rate_n_flags);
+
+			if (station->tid[j].agg.wait_for_ba)
 				pos += scnprintf(buf + pos, bufsz - pos,
-						"%u\t%llu\t%u",
-						station->tid[j].agg.start_idx,
-						(unsigned long long)station->tid[j].agg.bitmap,
-						station->tid[j].agg.rate_n_flags);
-				pos += scnprintf(buf + pos, bufsz - pos, "\n");
-			}
+						 " - waitforba");
 			pos += scnprintf(buf + pos, bufsz - pos, "\n");
 		}
+
+		pos += scnprintf(buf + pos, bufsz - pos, "\n");
 	}
 
 	ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos);
-- 
1.6.3.3


  parent reply	other threads:[~2010-05-13 21:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-13 21:49 [PATCH 00/17] iwlwifi updates for 2.6.35 Reinette Chatre
2010-05-13 21:49 ` [PATCH 01/17] iwlwifi: introduce iwl_sta_id_or_broadcast Reinette Chatre
2010-05-13 21:49 ` [PATCH 02/17] iwlwifi: move _agn statistics related structure Reinette Chatre
2010-05-13 21:49 ` [PATCH 03/17] iwlwifi: separate statistics flag function for agn & 3945 Reinette Chatre
2010-05-13 21:49 ` [PATCH 04/17] iwlwifi: don't crash on firmware file missing info Reinette Chatre
2010-05-13 21:49 ` [PATCH 05/17] iwl3945: remove sequence number assignment Reinette Chatre
2010-05-13 21:49 ` [PATCH 06/17] iwlwifi: move iwl_free_tfds_in_queue to iwlagn Reinette Chatre
2010-05-13 21:49 ` Reinette Chatre [this message]
2010-05-13 21:49 ` [PATCH 08/17] iwlwifi: remove IWL_MULTICAST_ID Reinette Chatre
2010-05-13 21:49 ` [PATCH 09/17] iwlwifi: fix and add missing sta_lock usage Reinette Chatre
2010-05-13 21:49 ` [PATCH 10/17] iwlagn: use firmware event/error log information Reinette Chatre
2010-05-13 21:49 ` [PATCH 11/17] iwlwifi: enable remaining 6000 Gen2 devices Reinette Chatre
2010-05-13 21:49 ` [PATCH 12/17] iwlwifi: code cleanup for _agn devices Reinette Chatre
2010-05-13 21:49 ` [PATCH 13/17] iwlwifi: modify out-dated comments Reinette Chatre
2010-05-13 21:49 ` [PATCH 14/17] iwlwifi: split debug and debugfs options Reinette Chatre
2010-05-13 21:49 ` [PATCH 15/17] iwlwifi: use proper short slot/preamble settings Reinette Chatre
2010-05-13 21:49 ` [PATCH 16/17] iwlwifi: move ucode related function to iwl-agn-ucode.c Reinette Chatre
2010-05-13 21:49 ` [PATCH 17/17] iwlwifi: add new PCI IDs for 6000g2 devices Reinette Chatre

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=1273787399-9280-8-git-send-email-reinette.chatre@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=ipw3945-devel@lists.sourceforge.net \
    --cc=johannes.berg@intel.com \
    --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