iwlwifi: default max event log size

Size of event log is determined by uCode which is different per NICs.
Set the maximum event log size per device to better match uCode
configuration.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
This commit is contained in:
Wey-Yi Guy 2010-03-26 12:54:37 -07:00 committed by Reinette Chatre
parent ace5d5de6b
commit 678b385d07
8 changed files with 32 additions and 18 deletions

View File

@ -253,6 +253,7 @@ struct iwl_cfg iwl1000_bgn_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 128,
};
struct iwl_cfg iwl1000_bg_cfg = {
@ -282,6 +283,7 @@ struct iwl_cfg iwl1000_bg_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 128,
};
MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));

View File

@ -2770,6 +2770,7 @@ static struct iwl_cfg iwl3945_bg_cfg = {
.broken_powersave = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512,
};
static struct iwl_cfg iwl3945_abg_cfg = {
@ -2789,6 +2790,7 @@ static struct iwl_cfg iwl3945_abg_cfg = {
.broken_powersave = true,
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512,
};
DEFINE_PCI_DEVICE_TABLE(iwl3945_hw_card_ids) = {

View File

@ -2250,6 +2250,7 @@ struct iwl_cfg iwl4965_agn_cfg = {
.monitor_recover_period = IWL_MONITORING_PERIOD,
.temperature_kelvin = true,
.off_channel_workaround = true,
.max_event_log_size = 512,
};
/* Module firmware */

View File

@ -423,6 +423,7 @@ struct iwl_cfg iwl5300_agn_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512,
};
struct iwl_cfg iwl5100_bgn_cfg = {
@ -450,6 +451,7 @@ struct iwl_cfg iwl5100_bgn_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512,
};
struct iwl_cfg iwl5100_abg_cfg = {
@ -475,6 +477,7 @@ struct iwl_cfg iwl5100_abg_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512,
};
struct iwl_cfg iwl5100_agn_cfg = {
@ -502,6 +505,7 @@ struct iwl_cfg iwl5100_agn_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512,
};
struct iwl_cfg iwl5350_agn_cfg = {
@ -529,6 +533,7 @@ struct iwl_cfg iwl5350_agn_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512,
};
struct iwl_cfg iwl5150_agn_cfg = {
@ -556,6 +561,7 @@ struct iwl_cfg iwl5150_agn_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512,
};
struct iwl_cfg iwl5150_abg_cfg = {
@ -581,6 +587,7 @@ struct iwl_cfg iwl5150_abg_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 512,
};
MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));

View File

@ -394,6 +394,7 @@ struct iwl_cfg iwl6000i_g2_2agn_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 1024,
};
struct iwl_cfg iwl6000i_2agn_cfg = {
@ -427,6 +428,7 @@ struct iwl_cfg iwl6000i_2agn_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 1024,
};
struct iwl_cfg iwl6000i_2abg_cfg = {
@ -459,6 +461,7 @@ struct iwl_cfg iwl6000i_2abg_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 1024,
};
struct iwl_cfg iwl6000i_2bg_cfg = {
@ -491,6 +494,7 @@ struct iwl_cfg iwl6000i_2bg_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 1024,
};
struct iwl_cfg iwl6050_2agn_cfg = {
@ -524,6 +528,7 @@ struct iwl_cfg iwl6050_2agn_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1500,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 1024,
};
struct iwl_cfg iwl6050_2abg_cfg = {
@ -556,6 +561,7 @@ struct iwl_cfg iwl6050_2abg_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1500,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 1024,
};
struct iwl_cfg iwl6000_3agn_cfg = {
@ -589,6 +595,7 @@ struct iwl_cfg iwl6000_3agn_cfg = {
.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
.chain_noise_scale = 1000,
.monitor_recover_period = IWL_MONITORING_PERIOD,
.max_event_log_size = 1024,
};
MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));

View File

@ -1990,9 +1990,6 @@ static int iwl_print_last_event_logs(struct iwl_priv *priv, u32 capacity,
return pos;
}
/* For sanity check only. Actual size is determined by uCode, typ. 512 */
#define MAX_EVENT_LOG_SIZE (512)
#define DEFAULT_DUMP_EVENT_LOG_ENTRIES (20)
int iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log,
@ -2025,16 +2022,16 @@ int iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log,
num_wraps = iwl_read_targ_mem(priv, base + (2 * sizeof(u32)));
next_entry = iwl_read_targ_mem(priv, base + (3 * sizeof(u32)));
if (capacity > MAX_EVENT_LOG_SIZE) {
if (capacity > priv->cfg->max_event_log_size) {
IWL_ERR(priv, "Log capacity %d is bogus, limit to %d entries\n",
capacity, MAX_EVENT_LOG_SIZE);
capacity = MAX_EVENT_LOG_SIZE;
capacity, priv->cfg->max_event_log_size);
capacity = priv->cfg->max_event_log_size;
}
if (next_entry > MAX_EVENT_LOG_SIZE) {
if (next_entry > priv->cfg->max_event_log_size) {
IWL_ERR(priv, "Log write index %d is bogus, limit to %d\n",
next_entry, MAX_EVENT_LOG_SIZE);
next_entry = MAX_EVENT_LOG_SIZE;
next_entry, priv->cfg->max_event_log_size);
next_entry = priv->cfg->max_event_log_size;
}
size = num_wraps ? capacity : next_entry;

View File

@ -307,6 +307,7 @@ struct iwl_cfg {
u32 monitor_recover_period;
bool temperature_kelvin;
bool off_channel_workaround;
u32 max_event_log_size;
};
/***************************

View File

@ -1603,9 +1603,6 @@ static int iwl3945_print_last_event_logs(struct iwl_priv *priv, u32 capacity,
return pos;
}
/* For sanity check only. Actual size is determined by uCode, typ. 512 */
#define IWL3945_MAX_EVENT_LOG_SIZE (512)
#define DEFAULT_IWL3945_DUMP_EVENT_LOG_ENTRIES (20)
int iwl3945_dump_nic_event_log(struct iwl_priv *priv, bool full_log,
@ -1632,16 +1629,16 @@ int iwl3945_dump_nic_event_log(struct iwl_priv *priv, bool full_log,
num_wraps = iwl_read_targ_mem(priv, base + (2 * sizeof(u32)));
next_entry = iwl_read_targ_mem(priv, base + (3 * sizeof(u32)));
if (capacity > IWL3945_MAX_EVENT_LOG_SIZE) {
if (capacity > priv->cfg->max_event_log_size) {
IWL_ERR(priv, "Log capacity %d is bogus, limit to %d entries\n",
capacity, IWL3945_MAX_EVENT_LOG_SIZE);
capacity = IWL3945_MAX_EVENT_LOG_SIZE;
capacity, priv->cfg->max_event_log_size);
capacity = priv->cfg->max_event_log_size;
}
if (next_entry > IWL3945_MAX_EVENT_LOG_SIZE) {
if (next_entry > priv->cfg->max_event_log_size) {
IWL_ERR(priv, "Log write index %d is bogus, limit to %d\n",
next_entry, IWL3945_MAX_EVENT_LOG_SIZE);
next_entry = IWL3945_MAX_EVENT_LOG_SIZE;
next_entry, priv->cfg->max_event_log_size);
next_entry = priv->cfg->max_event_log_size;
}
size = num_wraps ? capacity : next_entry;