public inbox for linux-wireless@vger.kernel.org
 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,
	Wey-Yi Guy <wey-yi.w.guy@intel.com>,
	Reinette Chatre <reinette.chatre@intel.com>
Subject: [PATCH 09/16] iwlwifi: align tx/rx statistics debugfs format
Date: Fri, 13 Nov 2009 11:56:31 -0800	[thread overview]
Message-ID: <1258142198-3223-10-git-send-email-reinette.chatre@intel.com> (raw)
In-Reply-To: <1258142198-3223-1-git-send-email-reinette.chatre@intel.com>

From: Wey-Yi Guy <wey-yi.w.guy@intel.com>

Align the format for tx_statistics and rx_statistics debugfs output for
better readability

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-debugfs.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
index 45a5edd..ba9c96f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
@@ -131,21 +131,22 @@ static ssize_t iwl_dbgfs_tx_statistics_read(struct file *file,
 
 	int cnt;
 	ssize_t ret;
-	const size_t bufsz = 100 + sizeof(char) * 24 * (MANAGEMENT_MAX + CONTROL_MAX);
+	const size_t bufsz = 100 +
+		sizeof(char) * 50 * (MANAGEMENT_MAX + CONTROL_MAX);
 	buf = kzalloc(bufsz, GFP_KERNEL);
 	if (!buf)
 		return -ENOMEM;
 	pos += scnprintf(buf + pos, bufsz - pos, "Management:\n");
 	for (cnt = 0; cnt < MANAGEMENT_MAX; cnt++) {
 		pos += scnprintf(buf + pos, bufsz - pos,
-				 "\t%s\t\t: %u\n",
+				 "\t%25s\t\t: %u\n",
 				 get_mgmt_string(cnt),
 				 priv->tx_stats.mgmt[cnt]);
 	}
 	pos += scnprintf(buf + pos, bufsz - pos, "Control\n");
 	for (cnt = 0; cnt < CONTROL_MAX; cnt++) {
 		pos += scnprintf(buf + pos, bufsz - pos,
-				 "\t%s\t\t: %u\n",
+				 "\t%25s\t\t: %u\n",
 				 get_ctrl_string(cnt),
 				 priv->tx_stats.ctrl[cnt]);
 	}
@@ -190,7 +191,7 @@ static ssize_t iwl_dbgfs_rx_statistics_read(struct file *file,
 	int cnt;
 	ssize_t ret;
 	const size_t bufsz = 100 +
-		sizeof(char) * 24 * (MANAGEMENT_MAX + CONTROL_MAX);
+		sizeof(char) * 50 * (MANAGEMENT_MAX + CONTROL_MAX);
 	buf = kzalloc(bufsz, GFP_KERNEL);
 	if (!buf)
 		return -ENOMEM;
@@ -198,14 +199,14 @@ static ssize_t iwl_dbgfs_rx_statistics_read(struct file *file,
 	pos += scnprintf(buf + pos, bufsz - pos, "Management:\n");
 	for (cnt = 0; cnt < MANAGEMENT_MAX; cnt++) {
 		pos += scnprintf(buf + pos, bufsz - pos,
-				 "\t%s\t\t: %u\n",
+				 "\t%25s\t\t: %u\n",
 				 get_mgmt_string(cnt),
 				 priv->rx_stats.mgmt[cnt]);
 	}
 	pos += scnprintf(buf + pos, bufsz - pos, "Control:\n");
 	for (cnt = 0; cnt < CONTROL_MAX; cnt++) {
 		pos += scnprintf(buf + pos, bufsz - pos,
-				 "\t%s\t\t: %u\n",
+				 "\t%25s\t\t: %u\n",
 				 get_ctrl_string(cnt),
 				 priv->rx_stats.ctrl[cnt]);
 	}
-- 
1.5.6.3


  parent reply	other threads:[~2009-11-13 19:56 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-13 19:56 [PATCH 00/16] iwlwifi updates 11/13/2009 Reinette Chatre
2009-11-13 19:56 ` [PATCH 01/16] iwlwifi: validate enhanced tx power entry Reinette Chatre
2009-11-13 19:56 ` [PATCH 02/16] iwlwifi: disable coex until implementation ready for 6x50 Reinette Chatre
2009-11-13 19:56 ` [PATCH 03/16] iwlwifi: remove unused parameter from iwl_channel_info Reinette Chatre
2009-11-13 19:56 ` [PATCH 04/16] iwlwifi: drop non-production PCI-IDs for 6x50 series Reinette Chatre
2009-11-14 15:26   ` Gábor Stefanik
2009-11-16 14:24     ` Guy, Wey-Yi
2009-11-13 19:56 ` [PATCH 05/16] iwlwifi: remove external reference for non-exist data structure Reinette Chatre
2009-11-13 19:56 ` [PATCH 06/16] iwlwifi: update reply_statistics_cmd with 'clear' parameter Reinette Chatre
2009-11-13 19:56 ` [PATCH 07/16] iwl3945: Reset saved POWER_TABLE_CMD in "up" Reinette Chatre
2009-11-13 19:56 ` [PATCH 08/16] iwlwifi: eliminate the possible 1/2 dBm tx power loss in 6x00 & 6x50 series Reinette Chatre
2009-11-13 19:56 ` Reinette Chatre [this message]
2009-11-13 19:56 ` [PATCH 10/16] iwlagn: power up device before initializing EEPROM Reinette Chatre
2009-11-13 19:56 ` [PATCH 11/16] iwlwifi: fix bugs in beacon configuration Reinette Chatre
2009-11-13 19:56 ` [PATCH 12/16] iwlwifi: make iwlwifi send beacons Reinette Chatre
2009-11-13 19:56 ` [PATCH 13/16] iwlwifi: report PS filtered status Reinette Chatre
2009-11-13 19:56 ` [PATCH 14/16] iwlwifi: add sleep_tx_count ucode station API Reinette Chatre
2009-11-13 19:56 ` [PATCH 15/16] iwlwifi: handle unicast PS buffering Reinette Chatre
2009-11-13 22:14   ` Maxim Levitsky
2009-11-13 22:20     ` Johannes Berg
2009-11-18 23:34       ` Maxim Levitsky
2009-11-18 23:46         ` Johannes Berg
2009-11-13 19:56 ` [PATCH 16/16] iwlwifi: Add comments about CSR registers Reinette Chatre
2009-11-13 20:12 ` [PATCH 00/16] iwlwifi updates 11/13/2009 Luis R. Rodriguez
2009-11-13 20:41   ` 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=1258142198-3223-10-git-send-email-reinette.chatre@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=ipw3945-devel@lists.sourceforge.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=wey-yi.w.guy@intel.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