aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2010-03-26 15:54:37 -0400
committerReinette Chatre <reinette.chatre@intel.com>2010-04-09 14:27:21 -0400
commit678b385d07835c6c21371c12eaaa3fba4de05168 (patch)
treef456c890f431cbf43174e5b0c001c5669d2d9827 /drivers/net/wireless/iwlwifi/iwl3945-base.c
parentace5d5de6bbaff00d3b5dd7ea8f160b570fdb726 (diff)
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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index c9188b9c5651..24e969440b31 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -1603,9 +1603,6 @@ static int iwl3945_print_last_event_logs(struct iwl_priv *priv, u32 capacity,
1603 return pos; 1603 return pos;
1604} 1604}
1605 1605
1606/* For sanity check only. Actual size is determined by uCode, typ. 512 */
1607#define IWL3945_MAX_EVENT_LOG_SIZE (512)
1608
1609#define DEFAULT_IWL3945_DUMP_EVENT_LOG_ENTRIES (20) 1606#define DEFAULT_IWL3945_DUMP_EVENT_LOG_ENTRIES (20)
1610 1607
1611int iwl3945_dump_nic_event_log(struct iwl_priv *priv, bool full_log, 1608int 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,
1632 num_wraps = iwl_read_targ_mem(priv, base + (2 * sizeof(u32))); 1629 num_wraps = iwl_read_targ_mem(priv, base + (2 * sizeof(u32)));
1633 next_entry = iwl_read_targ_mem(priv, base + (3 * sizeof(u32))); 1630 next_entry = iwl_read_targ_mem(priv, base + (3 * sizeof(u32)));
1634 1631
1635 if (capacity > IWL3945_MAX_EVENT_LOG_SIZE) { 1632 if (capacity > priv->cfg->max_event_log_size) {
1636 IWL_ERR(priv, "Log capacity %d is bogus, limit to %d entries\n", 1633 IWL_ERR(priv, "Log capacity %d is bogus, limit to %d entries\n",
1637 capacity, IWL3945_MAX_EVENT_LOG_SIZE); 1634 capacity, priv->cfg->max_event_log_size);
1638 capacity = IWL3945_MAX_EVENT_LOG_SIZE; 1635 capacity = priv->cfg->max_event_log_size;
1639 } 1636 }
1640 1637
1641 if (next_entry > IWL3945_MAX_EVENT_LOG_SIZE) { 1638 if (next_entry > priv->cfg->max_event_log_size) {
1642 IWL_ERR(priv, "Log write index %d is bogus, limit to %d\n", 1639 IWL_ERR(priv, "Log write index %d is bogus, limit to %d\n",
1643 next_entry, IWL3945_MAX_EVENT_LOG_SIZE); 1640 next_entry, priv->cfg->max_event_log_size);
1644 next_entry = IWL3945_MAX_EVENT_LOG_SIZE; 1641 next_entry = priv->cfg->max_event_log_size;
1645 } 1642 }
1646 1643
1647 size = num_wraps ? capacity : next_entry; 1644 size = num_wraps ? capacity : next_entry;