aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
diff options
context:
space:
mode:
authorDon Fry <donald.h.fry@intel.com>2012-02-07 17:03:55 -0500
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2012-02-17 13:56:08 -0500
commit8655112d91f247f6b96c9b1285658c141238ce90 (patch)
tree3c37c3e2e45c13e9fa1e666c6d377af34e57a8b6 /drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
parent60396183a4e7adce7aa71f801e47b063fe1f70a8 (diff)
iwlwifi: move event and err pointers to iwl_nic
Move the ucode offset pointers to the iwl_nic as they are nic related. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
index e06342656cea..6715d04b72f4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
@@ -34,6 +34,7 @@
34#include "iwl-core.h" 34#include "iwl-core.h"
35#include "iwl-io.h" 35#include "iwl-io.h"
36#include "iwl-trans-pcie-int.h" 36#include "iwl-trans-pcie-int.h"
37#include "iwl-wifi.h"
37 38
38#ifdef CONFIG_IWLWIFI_IDI 39#ifdef CONFIG_IWLWIFI_IDI
39#include "iwl-amfh.h" 40#include "iwl-amfh.h"
@@ -589,17 +590,17 @@ static void iwl_dump_nic_error_log(struct iwl_trans *trans)
589{ 590{
590 u32 base; 591 u32 base;
591 struct iwl_error_event_table table; 592 struct iwl_error_event_table table;
592 struct iwl_priv *priv = priv(trans); 593 struct iwl_nic *nic = nic(trans);
593 struct iwl_trans_pcie *trans_pcie = 594 struct iwl_trans_pcie *trans_pcie =
594 IWL_TRANS_GET_PCIE_TRANS(trans); 595 IWL_TRANS_GET_PCIE_TRANS(trans);
595 596
596 base = trans->shrd->device_pointers.error_event_table; 597 base = trans->shrd->device_pointers.error_event_table;
597 if (trans->shrd->ucode_type == IWL_UCODE_INIT) { 598 if (trans->shrd->ucode_type == IWL_UCODE_INIT) {
598 if (!base) 599 if (!base)
599 base = priv->init_errlog_ptr; 600 base = nic->init_errlog_ptr;
600 } else { 601 } else {
601 if (!base) 602 if (!base)
602 base = priv->inst_errlog_ptr; 603 base = nic->inst_errlog_ptr;
603 } 604 }
604 605
605 if (!iwlagn_hw_valid_rtc_data_addr(base)) { 606 if (!iwlagn_hw_valid_rtc_data_addr(base)) {
@@ -611,7 +612,7 @@ static void iwl_dump_nic_error_log(struct iwl_trans *trans)
611 return; 612 return;
612 } 613 }
613 614
614 iwl_read_targ_mem_words(trans(priv), base, &table, sizeof(table)); 615 iwl_read_targ_mem_words(trans, base, &table, sizeof(table));
615 616
616 if (ERROR_START_OFFSET <= table.valid * ERROR_ELEM_SIZE) { 617 if (ERROR_START_OFFSET <= table.valid * ERROR_ELEM_SIZE) {
617 IWL_ERR(trans, "Start IWL Error Log Dump:\n"); 618 IWL_ERR(trans, "Start IWL Error Log Dump:\n");
@@ -621,7 +622,7 @@ static void iwl_dump_nic_error_log(struct iwl_trans *trans)
621 622
622 trans_pcie->isr_stats.err_code = table.error_id; 623 trans_pcie->isr_stats.err_code = table.error_id;
623 624
624 trace_iwlwifi_dev_ucode_error(priv, table.error_id, table.tsf_low, 625 trace_iwlwifi_dev_ucode_error(priv(nic), table.error_id, table.tsf_low,
625 table.data1, table.data2, table.line, 626 table.data1, table.data2, table.line,
626 table.blink1, table.blink2, table.ilink1, 627 table.blink1, table.blink2, table.ilink1,
627 table.ilink2, table.bcon_time, table.gp1, 628 table.ilink2, table.bcon_time, table.gp1,
@@ -718,7 +719,7 @@ static int iwl_print_event_log(struct iwl_trans *trans, u32 start_idx,
718 u32 ptr; /* SRAM byte address of log data */ 719 u32 ptr; /* SRAM byte address of log data */
719 u32 ev, time, data; /* event log data */ 720 u32 ev, time, data; /* event log data */
720 unsigned long reg_flags; 721 unsigned long reg_flags;
721 struct iwl_priv *priv = priv(trans); 722 struct iwl_nic *nic = nic(trans);
722 723
723 if (num_events == 0) 724 if (num_events == 0)
724 return pos; 725 return pos;
@@ -726,10 +727,10 @@ static int iwl_print_event_log(struct iwl_trans *trans, u32 start_idx,
726 base = trans->shrd->device_pointers.log_event_table; 727 base = trans->shrd->device_pointers.log_event_table;
727 if (trans->shrd->ucode_type == IWL_UCODE_INIT) { 728 if (trans->shrd->ucode_type == IWL_UCODE_INIT) {
728 if (!base) 729 if (!base)
729 base = priv->init_evtlog_ptr; 730 base = nic->init_evtlog_ptr;
730 } else { 731 } else {
731 if (!base) 732 if (!base)
732 base = priv->inst_evtlog_ptr; 733 base = nic->inst_evtlog_ptr;
733 } 734 }
734 735
735 if (mode == 0) 736 if (mode == 0)
@@ -759,7 +760,7 @@ static int iwl_print_event_log(struct iwl_trans *trans, u32 start_idx,
759 "EVT_LOG:0x%08x:%04u\n", 760 "EVT_LOG:0x%08x:%04u\n",
760 time, ev); 761 time, ev);
761 } else { 762 } else {
762 trace_iwlwifi_dev_ucode_event(priv, 0, 763 trace_iwlwifi_dev_ucode_event(priv(trans), 0,
763 time, ev); 764 time, ev);
764 IWL_ERR(trans, "EVT_LOG:0x%08x:%04u\n", 765 IWL_ERR(trans, "EVT_LOG:0x%08x:%04u\n",
765 time, ev); 766 time, ev);
@@ -773,7 +774,7 @@ static int iwl_print_event_log(struct iwl_trans *trans, u32 start_idx,
773 } else { 774 } else {
774 IWL_ERR(trans, "EVT_LOGT:%010u:0x%08x:%04u\n", 775 IWL_ERR(trans, "EVT_LOGT:%010u:0x%08x:%04u\n",
775 time, data, ev); 776 time, data, ev);
776 trace_iwlwifi_dev_ucode_event(priv, time, 777 trace_iwlwifi_dev_ucode_event(priv(trans), time,
777 data, ev); 778 data, ev);
778 } 779 }
779 } 780 }
@@ -835,17 +836,17 @@ int iwl_dump_nic_event_log(struct iwl_trans *trans, bool full_log,
835 u32 logsize; 836 u32 logsize;
836 int pos = 0; 837 int pos = 0;
837 size_t bufsz = 0; 838 size_t bufsz = 0;
838 struct iwl_priv *priv = priv(trans); 839 struct iwl_nic *nic = nic(trans);
839 840
840 base = trans->shrd->device_pointers.log_event_table; 841 base = trans->shrd->device_pointers.log_event_table;
841 if (trans->shrd->ucode_type == IWL_UCODE_INIT) { 842 if (trans->shrd->ucode_type == IWL_UCODE_INIT) {
842 logsize = priv->init_evtlog_size; 843 logsize = nic->init_evtlog_size;
843 if (!base) 844 if (!base)
844 base = priv->init_evtlog_ptr; 845 base = nic->init_evtlog_ptr;
845 } else { 846 } else {
846 logsize = priv->inst_evtlog_size; 847 logsize = nic->inst_evtlog_size;
847 if (!base) 848 if (!base)
848 base = priv->inst_evtlog_ptr; 849 base = nic->inst_evtlog_ptr;
849 } 850 }
850 851
851 if (!iwlagn_hw_valid_rtc_data_addr(base)) { 852 if (!iwlagn_hw_valid_rtc_data_addr(base)) {