Commit 6e5c800e authored by Wey-Yi Guy's avatar Wey-Yi Guy Committed by Reinette Chatre

iwlwifi: use .cfg to enable/disable continuous ucode trace

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: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
parent 4e7033ef
...@@ -260,6 +260,7 @@ struct iwl_cfg iwl1000_bgn_cfg = { ...@@ -260,6 +260,7 @@ struct iwl_cfg iwl1000_bgn_cfg = {
.chain_noise_scale = 1000, .chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD, .monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 128, .max_event_log_size = 128,
.ucode_tracing = true,
}; };
struct iwl_cfg iwl1000_bg_cfg = { struct iwl_cfg iwl1000_bg_cfg = {
...@@ -289,6 +290,7 @@ struct iwl_cfg iwl1000_bg_cfg = { ...@@ -289,6 +290,7 @@ struct iwl_cfg iwl1000_bg_cfg = {
.chain_noise_scale = 1000, .chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD, .monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 128, .max_event_log_size = 128,
.ucode_tracing = true,
}; };
MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
...@@ -2263,7 +2263,7 @@ struct iwl_cfg iwl4965_agn_cfg = { ...@@ -2263,7 +2263,7 @@ struct iwl_cfg iwl4965_agn_cfg = {
.temperature_kelvin = true, .temperature_kelvin = true,
.max_event_log_size = 512, .max_event_log_size = 512,
.tx_power_by_driver = true, .tx_power_by_driver = true,
.ucode_tracing = true,
/* /*
* Force use of chains B and C for scan RX on 5 GHz band * Force use of chains B and C for scan RX on 5 GHz band
* because the device has off-channel reception on chain A. * because the device has off-channel reception on chain A.
......
...@@ -466,6 +466,7 @@ struct iwl_cfg iwl5300_agn_cfg = { ...@@ -466,6 +466,7 @@ struct iwl_cfg iwl5300_agn_cfg = {
.chain_noise_scale = 1000, .chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD, .monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512, .max_event_log_size = 512,
.ucode_tracing = true,
}; };
struct iwl_cfg iwl5100_bgn_cfg = { struct iwl_cfg iwl5100_bgn_cfg = {
...@@ -494,6 +495,7 @@ struct iwl_cfg iwl5100_bgn_cfg = { ...@@ -494,6 +495,7 @@ struct iwl_cfg iwl5100_bgn_cfg = {
.chain_noise_scale = 1000, .chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD, .monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512, .max_event_log_size = 512,
.ucode_tracing = true,
}; };
struct iwl_cfg iwl5100_abg_cfg = { struct iwl_cfg iwl5100_abg_cfg = {
...@@ -520,6 +522,7 @@ struct iwl_cfg iwl5100_abg_cfg = { ...@@ -520,6 +522,7 @@ struct iwl_cfg iwl5100_abg_cfg = {
.chain_noise_scale = 1000, .chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD, .monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512, .max_event_log_size = 512,
.ucode_tracing = true,
}; };
struct iwl_cfg iwl5100_agn_cfg = { struct iwl_cfg iwl5100_agn_cfg = {
...@@ -548,6 +551,7 @@ struct iwl_cfg iwl5100_agn_cfg = { ...@@ -548,6 +551,7 @@ struct iwl_cfg iwl5100_agn_cfg = {
.chain_noise_scale = 1000, .chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD, .monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512, .max_event_log_size = 512,
.ucode_tracing = true,
}; };
struct iwl_cfg iwl5350_agn_cfg = { struct iwl_cfg iwl5350_agn_cfg = {
...@@ -576,6 +580,7 @@ struct iwl_cfg iwl5350_agn_cfg = { ...@@ -576,6 +580,7 @@ struct iwl_cfg iwl5350_agn_cfg = {
.chain_noise_scale = 1000, .chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD, .monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512, .max_event_log_size = 512,
.ucode_tracing = true,
}; };
struct iwl_cfg iwl5150_agn_cfg = { struct iwl_cfg iwl5150_agn_cfg = {
...@@ -604,6 +609,7 @@ struct iwl_cfg iwl5150_agn_cfg = { ...@@ -604,6 +609,7 @@ struct iwl_cfg iwl5150_agn_cfg = {
.chain_noise_scale = 1000, .chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD, .monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512, .max_event_log_size = 512,
.ucode_tracing = true,
}; };
struct iwl_cfg iwl5150_abg_cfg = { struct iwl_cfg iwl5150_abg_cfg = {
...@@ -630,6 +636,7 @@ struct iwl_cfg iwl5150_abg_cfg = { ...@@ -630,6 +636,7 @@ struct iwl_cfg iwl5150_abg_cfg = {
.chain_noise_scale = 1000, .chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD, .monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512, .max_event_log_size = 512,
.ucode_tracing = true,
}; };
MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX)); MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
......
...@@ -442,6 +442,7 @@ struct iwl_cfg iwl6000g2a_2agn_cfg = { ...@@ -442,6 +442,7 @@ struct iwl_cfg iwl6000g2a_2agn_cfg = {
.chain_noise_scale = 1000, .chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD, .monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512, .max_event_log_size = 512,
.ucode_tracing = true,
}; };
/* /*
...@@ -479,6 +480,7 @@ struct iwl_cfg iwl6000i_2agn_cfg = { ...@@ -479,6 +480,7 @@ struct iwl_cfg iwl6000i_2agn_cfg = {
.chain_noise_scale = 1000, .chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD, .monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 1024, .max_event_log_size = 1024,
.ucode_tracing = true,
}; };
struct iwl_cfg iwl6000i_2abg_cfg = { struct iwl_cfg iwl6000i_2abg_cfg = {
...@@ -511,6 +513,7 @@ struct iwl_cfg iwl6000i_2abg_cfg = { ...@@ -511,6 +513,7 @@ struct iwl_cfg iwl6000i_2abg_cfg = {
.chain_noise_scale = 1000, .chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD, .monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 1024, .max_event_log_size = 1024,
.ucode_tracing = true,
}; };
struct iwl_cfg iwl6000i_2bg_cfg = { struct iwl_cfg iwl6000i_2bg_cfg = {
...@@ -543,6 +546,7 @@ struct iwl_cfg iwl6000i_2bg_cfg = { ...@@ -543,6 +546,7 @@ struct iwl_cfg iwl6000i_2bg_cfg = {
.chain_noise_scale = 1000, .chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD, .monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 1024, .max_event_log_size = 1024,
.ucode_tracing = true,
}; };
struct iwl_cfg iwl6050_2agn_cfg = { struct iwl_cfg iwl6050_2agn_cfg = {
...@@ -577,6 +581,7 @@ struct iwl_cfg iwl6050_2agn_cfg = { ...@@ -577,6 +581,7 @@ struct iwl_cfg iwl6050_2agn_cfg = {
.chain_noise_scale = 1500, .chain_noise_scale = 1500,
.monitor_recover_period = IWL_MONITORING_PERIOD, .monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 1024, .max_event_log_size = 1024,
.ucode_tracing = true,
}; };
struct iwl_cfg iwl6050_2abg_cfg = { struct iwl_cfg iwl6050_2abg_cfg = {
...@@ -609,6 +614,7 @@ struct iwl_cfg iwl6050_2abg_cfg = { ...@@ -609,6 +614,7 @@ struct iwl_cfg iwl6050_2abg_cfg = {
.chain_noise_scale = 1500, .chain_noise_scale = 1500,
.monitor_recover_period = IWL_MONITORING_PERIOD, .monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 1024, .max_event_log_size = 1024,
.ucode_tracing = true,
}; };
struct iwl_cfg iwl6000_3agn_cfg = { struct iwl_cfg iwl6000_3agn_cfg = {
...@@ -643,6 +649,7 @@ struct iwl_cfg iwl6000_3agn_cfg = { ...@@ -643,6 +649,7 @@ struct iwl_cfg iwl6000_3agn_cfg = {
.chain_noise_scale = 1000, .chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD, .monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 1024, .max_event_log_size = 1024,
.ucode_tracing = true,
}; };
MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
......
...@@ -320,6 +320,7 @@ struct iwl_cfg { ...@@ -320,6 +320,7 @@ struct iwl_cfg {
bool temperature_kelvin; bool temperature_kelvin;
u32 max_event_log_size; u32 max_event_log_size;
const bool tx_power_by_driver; const bool tx_power_by_driver;
const bool ucode_tracing;
u8 scan_antennas[IEEE80211_NUM_BANDS]; u8 scan_antennas[IEEE80211_NUM_BANDS];
}; };
......
...@@ -1640,8 +1640,9 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name) ...@@ -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) { 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(sensitivity, dir_debug, S_IRUSR);
DEBUGFS_ADD_FILE(chain_noise, 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_flags, dir_debug, S_IWUSR);
DEBUGFS_ADD_FILE(rxon_filter_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); DEBUGFS_ADD_BOOL(disable_sensitivity, dir_rf, &priv->disable_sens_cal);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment