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,
	Wey-Yi Guy <wey-yi.w.guy@intel.com>,
	Reinette Chatre <reinette.chatre@intel.com>
Subject: [PATCH 07/47] iwlwifi: use .cfg to enable/disable continuous ucode trace
Date: Mon, 10 May 2010 15:27:38 -0700	[thread overview]
Message-ID: <1273530498-11876-8-git-send-email-reinette.chatre@intel.com> (raw)
In-Reply-To: <1273530498-11876-1-git-send-email-reinette.chatre@intel.com>

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

Instead of checking device type for enable/disable continuous ucode
trace function; put it in .cfg for better control and more
flexibilities.

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-1000.c    |    2 ++
 drivers/net/wireless/iwlwifi/iwl-4965.c    |    2 +-
 drivers/net/wireless/iwlwifi/iwl-5000.c    |    7 +++++++
 drivers/net/wireless/iwlwifi/iwl-6000.c    |    7 +++++++
 drivers/net/wireless/iwlwifi/iwl-core.h    |    1 +
 drivers/net/wireless/iwlwifi/iwl-debugfs.c |    3 ++-
 6 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index fb59af2..f9f8a56 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -260,6 +260,7 @@ struct iwl_cfg iwl1000_bgn_cfg = {
 	.chain_noise_scale = 1000,
 	.monitor_recover_period = IWL_MONITORING_PERIOD,
 	.max_event_log_size = 128,
+	.ucode_tracing = true,
 };
 
 struct iwl_cfg iwl1000_bg_cfg = {
@@ -289,6 +290,7 @@ struct iwl_cfg iwl1000_bg_cfg = {
 	.chain_noise_scale = 1000,
 	.monitor_recover_period = IWL_MONITORING_PERIOD,
 	.max_event_log_size = 128,
+	.ucode_tracing = true,
 };
 
 MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 460aea3..a756fd4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2263,7 +2263,7 @@ struct iwl_cfg iwl4965_agn_cfg = {
 	.temperature_kelvin = true,
 	.max_event_log_size = 512,
 	.tx_power_by_driver = true,
-
+	.ucode_tracing = true,
 	/*
 	 * Force use of chains B and C for scan RX on 5 GHz band
 	 * because the device has off-channel reception on chain A.
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 115d3ea..c32db49 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -466,6 +466,7 @@ struct iwl_cfg iwl5300_agn_cfg = {
 	.chain_noise_scale = 1000,
 	.monitor_recover_period = IWL_MONITORING_PERIOD,
 	.max_event_log_size = 512,
+	.ucode_tracing = true,
 };
 
 struct iwl_cfg iwl5100_bgn_cfg = {
@@ -494,6 +495,7 @@ struct iwl_cfg iwl5100_bgn_cfg = {
 	.chain_noise_scale = 1000,
 	.monitor_recover_period = IWL_MONITORING_PERIOD,
 	.max_event_log_size = 512,
+	.ucode_tracing = true,
 };
 
 struct iwl_cfg iwl5100_abg_cfg = {
@@ -520,6 +522,7 @@ struct iwl_cfg iwl5100_abg_cfg = {
 	.chain_noise_scale = 1000,
 	.monitor_recover_period = IWL_MONITORING_PERIOD,
 	.max_event_log_size = 512,
+	.ucode_tracing = true,
 };
 
 struct iwl_cfg iwl5100_agn_cfg = {
@@ -548,6 +551,7 @@ struct iwl_cfg iwl5100_agn_cfg = {
 	.chain_noise_scale = 1000,
 	.monitor_recover_period = IWL_MONITORING_PERIOD,
 	.max_event_log_size = 512,
+	.ucode_tracing = true,
 };
 
 struct iwl_cfg iwl5350_agn_cfg = {
@@ -576,6 +580,7 @@ struct iwl_cfg iwl5350_agn_cfg = {
 	.chain_noise_scale = 1000,
 	.monitor_recover_period = IWL_MONITORING_PERIOD,
 	.max_event_log_size = 512,
+	.ucode_tracing = true,
 };
 
 struct iwl_cfg iwl5150_agn_cfg = {
@@ -604,6 +609,7 @@ struct iwl_cfg iwl5150_agn_cfg = {
 	.chain_noise_scale = 1000,
 	.monitor_recover_period = IWL_MONITORING_PERIOD,
 	.max_event_log_size = 512,
+	.ucode_tracing = true,
 };
 
 struct iwl_cfg iwl5150_abg_cfg = {
@@ -630,6 +636,7 @@ struct iwl_cfg iwl5150_abg_cfg = {
 	.chain_noise_scale = 1000,
 	.monitor_recover_period = IWL_MONITORING_PERIOD,
 	.max_event_log_size = 512,
+	.ucode_tracing = true,
 };
 
 MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index f057087..7cd45fe 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -442,6 +442,7 @@ struct iwl_cfg iwl6000g2a_2agn_cfg = {
 	.chain_noise_scale = 1000,
 	.monitor_recover_period = IWL_MONITORING_PERIOD,
 	.max_event_log_size = 512,
+	.ucode_tracing = true,
 };
 
 /*
@@ -479,6 +480,7 @@ struct iwl_cfg iwl6000i_2agn_cfg = {
 	.chain_noise_scale = 1000,
 	.monitor_recover_period = IWL_MONITORING_PERIOD,
 	.max_event_log_size = 1024,
+	.ucode_tracing = true,
 };
 
 struct iwl_cfg iwl6000i_2abg_cfg = {
@@ -511,6 +513,7 @@ struct iwl_cfg iwl6000i_2abg_cfg = {
 	.chain_noise_scale = 1000,
 	.monitor_recover_period = IWL_MONITORING_PERIOD,
 	.max_event_log_size = 1024,
+	.ucode_tracing = true,
 };
 
 struct iwl_cfg iwl6000i_2bg_cfg = {
@@ -543,6 +546,7 @@ struct iwl_cfg iwl6000i_2bg_cfg = {
 	.chain_noise_scale = 1000,
 	.monitor_recover_period = IWL_MONITORING_PERIOD,
 	.max_event_log_size = 1024,
+	.ucode_tracing = true,
 };
 
 struct iwl_cfg iwl6050_2agn_cfg = {
@@ -577,6 +581,7 @@ struct iwl_cfg iwl6050_2agn_cfg = {
 	.chain_noise_scale = 1500,
 	.monitor_recover_period = IWL_MONITORING_PERIOD,
 	.max_event_log_size = 1024,
+	.ucode_tracing = true,
 };
 
 struct iwl_cfg iwl6050_2abg_cfg = {
@@ -609,6 +614,7 @@ struct iwl_cfg iwl6050_2abg_cfg = {
 	.chain_noise_scale = 1500,
 	.monitor_recover_period = IWL_MONITORING_PERIOD,
 	.max_event_log_size = 1024,
+	.ucode_tracing = true,
 };
 
 struct iwl_cfg iwl6000_3agn_cfg = {
@@ -643,6 +649,7 @@ struct iwl_cfg iwl6000_3agn_cfg = {
 	.chain_noise_scale = 1000,
 	.monitor_recover_period = IWL_MONITORING_PERIOD,
 	.max_event_log_size = 1024,
+	.ucode_tracing = true,
 };
 
 MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 60d26e4..5034dc0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -320,6 +320,7 @@ struct iwl_cfg {
 	bool temperature_kelvin;
 	u32 max_event_log_size;
 	const bool tx_power_by_driver;
+	const bool ucode_tracing;
 	u8 scan_antennas[IEEE80211_NUM_BANDS];
 };
 
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
index 0faadf3..59355fa 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
@@ -1640,8 +1640,9 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name)
 	if ((priv->hw_rev & CSR_HW_REV_TYPE_MSK) != CSR_HW_REV_TYPE_3945) {
 		DEBUGFS_ADD_FILE(sensitivity, dir_debug, S_IRUSR);
 		DEBUGFS_ADD_FILE(chain_noise, dir_debug, S_IRUSR);
-		DEBUGFS_ADD_FILE(ucode_tracing, dir_debug, S_IWUSR | S_IRUSR);
 	}
+	if (priv->cfg->ucode_tracing)
+		DEBUGFS_ADD_FILE(ucode_tracing, dir_debug, S_IWUSR | S_IRUSR);
 	DEBUGFS_ADD_FILE(rxon_flags, dir_debug, S_IWUSR);
 	DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, S_IWUSR);
 	DEBUGFS_ADD_BOOL(disable_sensitivity, dir_rf, &priv->disable_sens_cal);
-- 
1.6.3.3


  parent reply	other threads:[~2010-05-10 22:28 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-10 22:27 [PATCH 00/47] iwlwifi updates for 2.6.35 Reinette Chatre
2010-05-10 22:27 ` [PATCH 01/47] iwlwifi: rename 6000 series Gen2 devices to Gen2a Reinette Chatre
2010-05-10 22:46   ` Gábor Stefanik
2010-05-10 22:52     ` Zhao, Shanyu
2010-05-10 22:27 ` [PATCH 02/47] iwl3945: fix scan races Reinette Chatre
2010-05-10 22:27 ` [PATCH 03/47] iwlwifi: remove powersave debugfs if it is not supported Reinette Chatre
2010-05-10 22:27 ` [PATCH 04/47] iwlwifi: rename "tx_power" to "chain_tx_power" Reinette Chatre
2010-05-10 22:27 ` [PATCH 05/47] iwlwifi: use vif iwl_bss_info_changed Reinette Chatre
2010-05-10 22:27 ` [PATCH 06/47] iwlwifi: remove device type checking for tx power in debugfs Reinette Chatre
2010-05-10 22:27 ` Reinette Chatre [this message]
2010-05-10 22:27 ` [PATCH 08/47] iwlwifi: use cfg to configure calibration operation Reinette Chatre
2010-05-10 22:27 ` [PATCH 09/47] iwlwifi: give correct return information for tx power debugfs Reinette Chatre
2010-05-10 22:27 ` [PATCH 10/47] iwlwifi: wimax co-exist code clean up Reinette Chatre
2010-05-10 22:27 ` [PATCH 11/47] iwlwifi: checking for all the possible failure cases Reinette Chatre
2010-05-10 22:27 ` [PATCH 12/47] iwlwifi: dump firmware build info in error case Reinette Chatre
2010-05-10 22:27 ` [PATCH 13/47] iwlwifi: make bcast LQ command available for later restore actions Reinette Chatre
2010-05-10 22:27 ` [PATCH 14/47] iwl3945: use iwl3945_add_bcast_station Reinette Chatre
2010-05-10 22:27 ` [PATCH 15/47] iwlwifi: pass address to iwl_remove_station Reinette Chatre
2010-05-10 22:27 ` [PATCH 16/47] iwlwifi: manage IBSS station properly Reinette Chatre
2010-05-10 22:27 ` [PATCH 17/47] iwlagn: show and store firmware build number Reinette Chatre
2010-05-10 22:27 ` [PATCH 18/47] iwl3945: remove ucode access indirection Reinette Chatre
2010-05-10 22:27 ` [PATCH 19/47] iwlwifi: remove ucode virtual functions Reinette Chatre
2010-05-10 22:27 ` [PATCH 20/47] iwlwifi: move eeprom version printout to eeprom init Reinette Chatre
2010-05-10 22:27 ` [PATCH 21/47] iwlagn: prepare for new firmware file format Reinette Chatre
2010-05-10 22:27 ` [PATCH 22/47] iwlagn: implement loading a new firmware file type Reinette Chatre
2010-05-10 22:27 ` [PATCH 23/47] iwl3945: add plcp error checking Reinette Chatre
2010-05-10 22:27 ` [PATCH 24/47] iwlwifi: remove rts_threshold Reinette Chatre
2010-05-10 22:27 ` [PATCH 25/47] iwlagn: move iwl_get_ra_sta_id to 4965 Reinette Chatre
2010-05-10 22:27 ` [PATCH 26/47] iwlagn: use vif->type to check station Reinette Chatre
2010-05-10 22:27 ` [PATCH 27/47] iwlwifi: apply filter flags directly Reinette Chatre
2010-05-10 22:27 ` [PATCH 28/47] iwlwifi: push virtual interface through Reinette Chatre
2010-05-10 22:28 ` [PATCH 29/47] iwlagn: use virtual interface in TX aggregation handling Reinette Chatre
2010-05-10 22:28 ` [PATCH 30/47] iwlwifi: remove useless priv->vif check Reinette Chatre
2010-05-10 22:28 ` [PATCH 31/47] iwlwifi: use vif in iwl_ht_conf Reinette Chatre
2010-05-10 22:28 ` [PATCH 32/47] iwlwifi: note that priv->bssid is used only by 3945 Reinette Chatre
2010-05-10 22:28 ` [PATCH 33/47] iwlwifi: fix iwl_sta_init_lq station ID Reinette Chatre
2010-05-10 22:28 ` [PATCH 34/47] iwlwifi: split allocation/sending local station LQ Reinette Chatre
2010-05-10 22:28 ` [PATCH 35/47] iwlwifi: rework broadcast station management Reinette Chatre
2010-05-10 22:28 ` [PATCH 36/47] iwlagn: work around rate scaling reset delay Reinette Chatre
2010-05-10 22:28 ` [PATCH 37/47] iwlwifi: "tx power per chain" are part of ucode_tx_stats Reinette Chatre
2010-05-10 22:28 ` [PATCH 38/47] iwlwifi: provide more comments for cfg structure Reinette Chatre
2010-05-10 22:28 ` [PATCH 39/47] iwlwifi: track station IDs Reinette Chatre
2010-05-10 22:28 ` [PATCH 40/47] iwlwifi: add iwl_sta_id() Reinette Chatre
2010-05-10 22:28 ` [PATCH 41/47] iwlwifi: use iwl_find_station less Reinette Chatre
2010-05-10 22:28 ` [PATCH 42/47] iwlagn: use iwl_sta_id() for aggregation Reinette Chatre
2010-05-10 22:28 ` [PATCH 43/47] iwlwifi: use iwl_sta_id() for TKIP key update Reinette Chatre
2010-05-10 22:28 ` [PATCH 44/47] iwlwifi: move iwl_find_station() to 4965 Reinette Chatre
2010-05-10 22:28 ` [PATCH 45/47] iwlwifi: rename iwl_add_local_station Reinette Chatre
2010-05-10 22:28 ` [PATCH 46/47] iwlwifi: remove pointless HT check Reinette Chatre
2010-05-10 22:28 ` [PATCH 47/47] iwlwifi: clear driver stations when going down 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=1273530498-11876-8-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