linux-wireless.vger.kernel.org archive mirror
 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 10/21] iwlwifi: remove duplicated debug functions
Date: Fri, 16 Apr 2010 14:52:27 -0700	[thread overview]
Message-ID: <1271454758-14351-11-git-send-email-reinette.chatre@intel.com> (raw)
In-Reply-To: <1271454758-14351-1-git-send-email-reinette.chatre@intel.com>

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

Use the show uCode statistics function for uCode debugging purposes only; it
is being duplicated in both debugfs and sysfs. remove the one from sysfs.

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-agn.c      |   39 ---------------------------
 drivers/net/wireless/iwlwifi/iwl3945-base.c |   39 ---------------------------
 2 files changed, 0 insertions(+), 78 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index e788722..8ac1546 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3177,44 +3177,6 @@ static ssize_t store_tx_power(struct device *d,
 
 static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, show_tx_power, store_tx_power);
 
-static ssize_t show_statistics(struct device *d,
-			       struct device_attribute *attr, char *buf)
-{
-	struct iwl_priv *priv = dev_get_drvdata(d);
-	u32 size = sizeof(struct iwl_notif_statistics);
-	u32 len = 0, ofs = 0;
-	u8 *data = (u8 *)&priv->statistics;
-	int rc = 0;
-
-	if (!iwl_is_alive(priv))
-		return -EAGAIN;
-
-	mutex_lock(&priv->mutex);
-	rc = iwl_send_statistics_request(priv, CMD_SYNC, false);
-	mutex_unlock(&priv->mutex);
-
-	if (rc) {
-		len = sprintf(buf,
-			      "Error sending statistics request: 0x%08X\n", rc);
-		return len;
-	}
-
-	while (size && (PAGE_SIZE - len)) {
-		hex_dump_to_buffer(data + ofs, size, 16, 1, buf + len,
-				   PAGE_SIZE - len, 1);
-		len = strlen(buf);
-		if (PAGE_SIZE - len)
-			buf[len++] = '\n';
-
-		ofs += 16;
-		size -= min(size, 16U);
-	}
-
-	return len;
-}
-
-static DEVICE_ATTR(statistics, S_IRUGO, show_statistics, NULL);
-
 static ssize_t show_rts_ht_protection(struct device *d,
 			     struct device_attribute *attr, char *buf)
 {
@@ -3404,7 +3366,6 @@ static void iwl_uninit_drv(struct iwl_priv *priv)
 }
 
 static struct attribute *iwl_sysfs_entries[] = {
-	&dev_attr_statistics.attr,
 	&dev_attr_temperature.attr,
 	&dev_attr_tx_power.attr,
 	&dev_attr_rts_ht_protection.attr,
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 06004d0..8da3375 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -3657,44 +3657,6 @@ static ssize_t show_channels(struct device *d,
 
 static DEVICE_ATTR(channels, S_IRUSR, show_channels, NULL);
 
-static ssize_t show_statistics(struct device *d,
-			       struct device_attribute *attr, char *buf)
-{
-	struct iwl_priv *priv = dev_get_drvdata(d);
-	u32 size = sizeof(struct iwl3945_notif_statistics);
-	u32 len = 0, ofs = 0;
-	u8 *data = (u8 *)&priv->_3945.statistics;
-	int rc = 0;
-
-	if (!iwl_is_alive(priv))
-		return -EAGAIN;
-
-	mutex_lock(&priv->mutex);
-	rc = iwl_send_statistics_request(priv, CMD_SYNC, false);
-	mutex_unlock(&priv->mutex);
-
-	if (rc) {
-		len = sprintf(buf,
-			      "Error sending statistics request: 0x%08X\n", rc);
-		return len;
-	}
-
-	while (size && (PAGE_SIZE - len)) {
-		hex_dump_to_buffer(data + ofs, size, 16, 1, buf + len,
-				   PAGE_SIZE - len, 1);
-		len = strlen(buf);
-		if (PAGE_SIZE - len)
-			buf[len++] = '\n';
-
-		ofs += 16;
-		size -= min(size, 16U);
-	}
-
-	return len;
-}
-
-static DEVICE_ATTR(statistics, S_IRUGO, show_statistics, NULL);
-
 static ssize_t show_antenna(struct device *d,
 			    struct device_attribute *attr, char *buf)
 {
@@ -3814,7 +3776,6 @@ static struct attribute *iwl3945_sysfs_entries[] = {
 	&dev_attr_filter_flags.attr,
 	&dev_attr_measurement.attr,
 	&dev_attr_retry_rate.attr,
-	&dev_attr_statistics.attr,
 	&dev_attr_status.attr,
 	&dev_attr_temperature.attr,
 	&dev_attr_tx_power.attr,
-- 
1.6.3.3


  parent reply	other threads:[~2010-04-16 21:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-16 21:52 [PATCH 00/21] iwlwifi updates for 2.6.35 Reinette Chatre
2010-04-16 21:52 ` [PATCH 01/21] iwlwifi: set correct single/dual stream mask Reinette Chatre
2010-04-16 21:52 ` [PATCH 02/21] iwlwifi: remove scan_bands logic Reinette Chatre
2010-04-16 21:52 ` [PATCH 03/21] iwlwifi: correct atomic bitops usage Reinette Chatre
2010-04-16 21:52 ` [PATCH 04/21] iwlwifi: remove next_scan_jiffies Reinette Chatre
2010-04-16 21:52 ` [PATCH 05/21] iwlwifi: remove scan_pass_start Reinette Chatre
2010-04-16 21:52 ` [PATCH 06/21] iwlwifi: rename priv->scan to priv->scan_cmd Reinette Chatre
2010-04-16 21:52 ` [PATCH 07/21] iwlwifi: trigger scan synchronously Reinette Chatre
2010-04-16 21:52 ` [PATCH 08/21] iwlwifi: more generic eeprom defines Reinette Chatre
2010-04-16 21:52 ` [PATCH 09/21] iwlwifi: bring up 6000 Series 2x2 AGN Gen2 adapters Reinette Chatre
2010-04-16 21:52 ` Reinette Chatre [this message]
2010-04-16 21:52 ` [PATCH 11/21] iwlwifi: add debugfs ops to iwlwifi Reinette Chatre
2010-04-16 21:52 ` [PATCH 12/21] iwlwifi: remove redundant iwl_dump_lq_cmd() Reinette Chatre
2010-04-16 21:52 ` [PATCH 13/21] iwlwifi: add hw revision for 6000g2 NIC Reinette Chatre
2010-04-16 21:52 ` [PATCH 14/21] iwlwifi: PA type for 6000g2 series Reinette Chatre
2010-04-16 21:52 ` [PATCH 15/21] iwlwifi: sanity check for turn on aggregation tid Reinette Chatre
2010-04-16 21:52 ` [PATCH 16/21] iwlwifi: more code clean up for agn devices Reinette Chatre
2010-04-16 21:52 ` [PATCH 17/21] iwlwifi: make BT coex config a virtual method Reinette Chatre
2010-04-16 21:52 ` [PATCH 18/21] iwlwifi: rename TX_CMD_FLG_BT_DIS_MSK Reinette Chatre
2010-04-16 21:52 ` [PATCH 19/21] iwlwifi: don't check monitor for scanning Reinette Chatre
2010-04-16 21:52 ` [PATCH 20/21] iwlwifi: remove monitor check Reinette Chatre
2010-04-16 21:52 ` [PATCH 21/21] iwlwifi: make scan antenna forcing more generic 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=1271454758-14351-11-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;
as well as URLs for NNTP newsgroup(s).