aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2011-08-26 02:11:09 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-29 15:30:28 -0400
commit6bb7884758965ad0afd67801f0f41cefd53d0b0c (patch)
treee23f6f1d2ef2e0cd1c6dac7bea60f94b8056479f
parent16db88ba51d669ef63c58990771a47208913152c (diff)
iwlagn: remove references to priv from the transport layer
Continue to the clean up of the priv dereferencing from the transport layer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans-int-pcie.h7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c124
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans.c4
5 files changed, 70 insertions, 69 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 9c5f08a938eb..bbdc475c74dd 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -1402,7 +1402,7 @@ int iwl_alive_start(struct iwl_priv *priv)
1402 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; 1402 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
1403 1403
1404 /*TODO: this should go to the transport layer */ 1404 /*TODO: this should go to the transport layer */
1405 iwl_reset_ict(priv); 1405 iwl_reset_ict(trans(priv));
1406 1406
1407 IWL_DEBUG_INFO(priv, "Runtime Alive received.\n"); 1407 IWL_DEBUG_INFO(priv, "Runtime Alive received.\n");
1408 1408
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h
index c30299da4daf..3508c12de25f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.h
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.h
@@ -111,7 +111,7 @@ extern struct iwl_cfg iwl135_bgn_cfg;
111 111
112extern struct ieee80211_ops iwlagn_hw_ops; 112extern struct ieee80211_ops iwlagn_hw_ops;
113 113
114int iwl_reset_ict(struct iwl_priv *priv); 114int iwl_reset_ict(struct iwl_trans *trans);
115 115
116static inline void iwl_set_calib_hdr(struct iwl_calib_hdr *hdr, u8 cmd) 116static inline void iwl_set_calib_hdr(struct iwl_calib_hdr *hdr, u8 cmd)
117{ 117{
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-int-pcie.h b/drivers/net/wireless/iwlwifi/iwl-trans-int-pcie.h
index 0e4efb0e189b..59c6b3c673e4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-int-pcie.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-int-pcie.h
@@ -130,7 +130,7 @@ void iwl_rx_queue_update_write_ptr(struct iwl_trans *trans,
130/***************************************************** 130/*****************************************************
131* ICT 131* ICT
132******************************************************/ 132******************************************************/
133int iwl_reset_ict(struct iwl_priv *priv); 133int iwl_reset_ict(struct iwl_trans *trans);
134void iwl_disable_ict(struct iwl_trans *trans); 134void iwl_disable_ict(struct iwl_trans *trans);
135int iwl_alloc_isr_ict(struct iwl_trans *trans); 135int iwl_alloc_isr_ict(struct iwl_trans *trans);
136void iwl_free_isr_ict(struct iwl_trans *trans); 136void iwl_free_isr_ict(struct iwl_trans *trans);
@@ -167,12 +167,11 @@ void iwl_tx_queue_reclaim(struct iwl_trans *trans, int txq_id, int index,
167/***************************************************** 167/*****************************************************
168* Error handling 168* Error handling
169******************************************************/ 169******************************************************/
170int iwl_dump_nic_event_log(struct iwl_priv *priv, 170int iwl_dump_nic_event_log(struct iwl_trans *trans, bool full_log,
171 bool full_log, char **buf, bool display); 171 char **buf, bool display);
172int iwl_dump_fh(struct iwl_trans *trans, char **buf, bool display); 172int iwl_dump_fh(struct iwl_trans *trans, char **buf, bool display);
173void iwl_dump_csr(struct iwl_trans *trans); 173void iwl_dump_csr(struct iwl_trans *trans);
174 174
175
176static inline void iwl_disable_interrupts(struct iwl_trans *trans) 175static inline void iwl_disable_interrupts(struct iwl_trans *trans)
177{ 176{
178 clear_bit(STATUS_INT_ENABLED, &trans->shrd->status); 177 clear_bit(STATUS_INT_ENABLED, &trans->shrd->status);
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c
index 0b6c5278e28b..7f8ac2ed49ab 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c
@@ -565,11 +565,11 @@ static const char *desc_lookup(u32 num)
565#define ERROR_START_OFFSET (1 * sizeof(u32)) 565#define ERROR_START_OFFSET (1 * sizeof(u32))
566#define ERROR_ELEM_SIZE (7 * sizeof(u32)) 566#define ERROR_ELEM_SIZE (7 * sizeof(u32))
567 567
568static void iwl_dump_nic_error_log(struct iwl_priv *priv) 568static void iwl_dump_nic_error_log(struct iwl_trans *trans)
569{ 569{
570 u32 base; 570 u32 base;
571 struct iwl_error_event_table table; 571 struct iwl_error_event_table table;
572 struct iwl_trans *trans = trans(priv); 572 struct iwl_priv *priv = priv(trans);
573 struct iwl_trans_pcie *trans_pcie = 573 struct iwl_trans_pcie *trans_pcie =
574 IWL_TRANS_GET_PCIE_TRANS(trans); 574 IWL_TRANS_GET_PCIE_TRANS(trans);
575 575
@@ -583,7 +583,7 @@ static void iwl_dump_nic_error_log(struct iwl_priv *priv)
583 } 583 }
584 584
585 if (!iwlagn_hw_valid_rtc_data_addr(base)) { 585 if (!iwlagn_hw_valid_rtc_data_addr(base)) {
586 IWL_ERR(priv, 586 IWL_ERR(trans,
587 "Not valid error log pointer 0x%08X for %s uCode\n", 587 "Not valid error log pointer 0x%08X for %s uCode\n",
588 base, 588 base,
589 (priv->ucode_type == IWL_UCODE_INIT) 589 (priv->ucode_type == IWL_UCODE_INIT)
@@ -594,9 +594,9 @@ static void iwl_dump_nic_error_log(struct iwl_priv *priv)
594 iwl_read_targ_mem_words(priv, base, &table, sizeof(table)); 594 iwl_read_targ_mem_words(priv, base, &table, sizeof(table));
595 595
596 if (ERROR_START_OFFSET <= table.valid * ERROR_ELEM_SIZE) { 596 if (ERROR_START_OFFSET <= table.valid * ERROR_ELEM_SIZE) {
597 IWL_ERR(priv, "Start IWL Error Log Dump:\n"); 597 IWL_ERR(trans, "Start IWL Error Log Dump:\n");
598 IWL_ERR(priv, "Status: 0x%08lX, count: %d\n", 598 IWL_ERR(trans, "Status: 0x%08lX, count: %d\n",
599 priv->shrd->status, table.valid); 599 trans->shrd->status, table.valid);
600 } 600 }
601 601
602 trans_pcie->isr_stats.err_code = table.error_id; 602 trans_pcie->isr_stats.err_code = table.error_id;
@@ -607,33 +607,34 @@ static void iwl_dump_nic_error_log(struct iwl_priv *priv)
607 table.ilink2, table.bcon_time, table.gp1, 607 table.ilink2, table.bcon_time, table.gp1,
608 table.gp2, table.gp3, table.ucode_ver, 608 table.gp2, table.gp3, table.ucode_ver,
609 table.hw_ver, table.brd_ver); 609 table.hw_ver, table.brd_ver);
610 IWL_ERR(priv, "0x%08X | %-28s\n", table.error_id, 610 IWL_ERR(trans, "0x%08X | %-28s\n", table.error_id,
611 desc_lookup(table.error_id)); 611 desc_lookup(table.error_id));
612 IWL_ERR(priv, "0x%08X | uPc\n", table.pc); 612 IWL_ERR(trans, "0x%08X | uPc\n", table.pc);
613 IWL_ERR(priv, "0x%08X | branchlink1\n", table.blink1); 613 IWL_ERR(trans, "0x%08X | branchlink1\n", table.blink1);
614 IWL_ERR(priv, "0x%08X | branchlink2\n", table.blink2); 614 IWL_ERR(trans, "0x%08X | branchlink2\n", table.blink2);
615 IWL_ERR(priv, "0x%08X | interruptlink1\n", table.ilink1); 615 IWL_ERR(trans, "0x%08X | interruptlink1\n", table.ilink1);
616 IWL_ERR(priv, "0x%08X | interruptlink2\n", table.ilink2); 616 IWL_ERR(trans, "0x%08X | interruptlink2\n", table.ilink2);
617 IWL_ERR(priv, "0x%08X | data1\n", table.data1); 617 IWL_ERR(trans, "0x%08X | data1\n", table.data1);
618 IWL_ERR(priv, "0x%08X | data2\n", table.data2); 618 IWL_ERR(trans, "0x%08X | data2\n", table.data2);
619 IWL_ERR(priv, "0x%08X | line\n", table.line); 619 IWL_ERR(trans, "0x%08X | line\n", table.line);
620 IWL_ERR(priv, "0x%08X | beacon time\n", table.bcon_time); 620 IWL_ERR(trans, "0x%08X | beacon time\n", table.bcon_time);
621 IWL_ERR(priv, "0x%08X | tsf low\n", table.tsf_low); 621 IWL_ERR(trans, "0x%08X | tsf low\n", table.tsf_low);
622 IWL_ERR(priv, "0x%08X | tsf hi\n", table.tsf_hi); 622 IWL_ERR(trans, "0x%08X | tsf hi\n", table.tsf_hi);
623 IWL_ERR(priv, "0x%08X | time gp1\n", table.gp1); 623 IWL_ERR(trans, "0x%08X | time gp1\n", table.gp1);
624 IWL_ERR(priv, "0x%08X | time gp2\n", table.gp2); 624 IWL_ERR(trans, "0x%08X | time gp2\n", table.gp2);
625 IWL_ERR(priv, "0x%08X | time gp3\n", table.gp3); 625 IWL_ERR(trans, "0x%08X | time gp3\n", table.gp3);
626 IWL_ERR(priv, "0x%08X | uCode version\n", table.ucode_ver); 626 IWL_ERR(trans, "0x%08X | uCode version\n", table.ucode_ver);
627 IWL_ERR(priv, "0x%08X | hw version\n", table.hw_ver); 627 IWL_ERR(trans, "0x%08X | hw version\n", table.hw_ver);
628 IWL_ERR(priv, "0x%08X | board version\n", table.brd_ver); 628 IWL_ERR(trans, "0x%08X | board version\n", table.brd_ver);
629 IWL_ERR(priv, "0x%08X | hcmd\n", table.hcmd); 629 IWL_ERR(trans, "0x%08X | hcmd\n", table.hcmd);
630} 630}
631 631
632/** 632/**
633 * iwl_irq_handle_error - called for HW or SW error interrupt from card 633 * iwl_irq_handle_error - called for HW or SW error interrupt from card
634 */ 634 */
635static void iwl_irq_handle_error(struct iwl_priv *priv) 635static void iwl_irq_handle_error(struct iwl_trans *trans)
636{ 636{
637 struct iwl_priv *priv = priv(trans);
637 /* W/A for WiFi/WiMAX coex and WiMAX own the RF */ 638 /* W/A for WiFi/WiMAX coex and WiMAX own the RF */
638 if (priv->cfg->internal_wimax_coex && 639 if (priv->cfg->internal_wimax_coex &&
639 (!(iwl_read_prph(priv, APMG_CLK_CTRL_REG) & 640 (!(iwl_read_prph(priv, APMG_CLK_CTRL_REG) &
@@ -644,22 +645,22 @@ static void iwl_irq_handle_error(struct iwl_priv *priv)
644 * Keep the restart process from trying to send host 645 * Keep the restart process from trying to send host
645 * commands by clearing the ready bit. 646 * commands by clearing the ready bit.
646 */ 647 */
647 clear_bit(STATUS_READY, &priv->shrd->status); 648 clear_bit(STATUS_READY, &trans->shrd->status);
648 clear_bit(STATUS_HCMD_ACTIVE, &priv->shrd->status); 649 clear_bit(STATUS_HCMD_ACTIVE, &trans->shrd->status);
649 wake_up_interruptible(&priv->wait_command_queue); 650 wake_up_interruptible(&priv->wait_command_queue);
650 IWL_ERR(priv, "RF is used by WiMAX\n"); 651 IWL_ERR(trans, "RF is used by WiMAX\n");
651 return; 652 return;
652 } 653 }
653 654
654 IWL_ERR(priv, "Loaded firmware version: %s\n", 655 IWL_ERR(trans, "Loaded firmware version: %s\n",
655 priv->hw->wiphy->fw_version); 656 priv->hw->wiphy->fw_version);
656 657
657 iwl_dump_nic_error_log(priv); 658 iwl_dump_nic_error_log(trans);
658 iwl_dump_csr(trans(priv)); 659 iwl_dump_csr(trans);
659 iwl_dump_fh(trans(priv), NULL, false); 660 iwl_dump_fh(trans, NULL, false);
660 iwl_dump_nic_event_log(priv, false, NULL, false); 661 iwl_dump_nic_event_log(trans, false, NULL, false);
661#ifdef CONFIG_IWLWIFI_DEBUG 662#ifdef CONFIG_IWLWIFI_DEBUG
662 if (iwl_get_debug_level(priv->shrd) & IWL_DL_FW_ERRORS) 663 if (iwl_get_debug_level(trans->shrd) & IWL_DL_FW_ERRORS)
663 iwl_print_rx_config_cmd(priv, 664 iwl_print_rx_config_cmd(priv,
664 &priv->contexts[IWL_RXON_CTX_BSS]); 665 &priv->contexts[IWL_RXON_CTX_BSS]);
665#endif 666#endif
@@ -673,7 +674,7 @@ static void iwl_irq_handle_error(struct iwl_priv *priv)
673 * iwl_print_event_log - Dump error event log to syslog 674 * iwl_print_event_log - Dump error event log to syslog
674 * 675 *
675 */ 676 */
676static int iwl_print_event_log(struct iwl_priv *priv, u32 start_idx, 677static int iwl_print_event_log(struct iwl_trans *trans, u32 start_idx,
677 u32 num_events, u32 mode, 678 u32 num_events, u32 mode,
678 int pos, char **buf, size_t bufsz) 679 int pos, char **buf, size_t bufsz)
679{ 680{
@@ -683,6 +684,7 @@ static int iwl_print_event_log(struct iwl_priv *priv, u32 start_idx,
683 u32 ptr; /* SRAM byte address of log data */ 684 u32 ptr; /* SRAM byte address of log data */
684 u32 ev, time, data; /* event log data */ 685 u32 ev, time, data; /* event log data */
685 unsigned long reg_flags; 686 unsigned long reg_flags;
687 struct iwl_priv *priv = priv(trans);
686 688
687 if (num_events == 0) 689 if (num_events == 0)
688 return pos; 690 return pos;
@@ -725,7 +727,7 @@ static int iwl_print_event_log(struct iwl_priv *priv, u32 start_idx,
725 } else { 727 } else {
726 trace_iwlwifi_dev_ucode_event(priv, 0, 728 trace_iwlwifi_dev_ucode_event(priv, 0,
727 time, ev); 729 time, ev);
728 IWL_ERR(priv, "EVT_LOG:0x%08x:%04u\n", 730 IWL_ERR(trans, "EVT_LOG:0x%08x:%04u\n",
729 time, ev); 731 time, ev);
730 } 732 }
731 } else { 733 } else {
@@ -735,7 +737,7 @@ static int iwl_print_event_log(struct iwl_priv *priv, u32 start_idx,
735 "EVT_LOGT:%010u:0x%08x:%04u\n", 737 "EVT_LOGT:%010u:0x%08x:%04u\n",
736 time, data, ev); 738 time, data, ev);
737 } else { 739 } else {
738 IWL_ERR(priv, "EVT_LOGT:%010u:0x%08x:%04u\n", 740 IWL_ERR(trans, "EVT_LOGT:%010u:0x%08x:%04u\n",
739 time, data, ev); 741 time, data, ev);
740 trace_iwlwifi_dev_ucode_event(priv, time, 742 trace_iwlwifi_dev_ucode_event(priv, time,
741 data, ev); 743 data, ev);
@@ -752,7 +754,7 @@ static int iwl_print_event_log(struct iwl_priv *priv, u32 start_idx,
752/** 754/**
753 * iwl_print_last_event_logs - Dump the newest # of event log to syslog 755 * iwl_print_last_event_logs - Dump the newest # of event log to syslog
754 */ 756 */
755static int iwl_print_last_event_logs(struct iwl_priv *priv, u32 capacity, 757static int iwl_print_last_event_logs(struct iwl_trans *trans, u32 capacity,
756 u32 num_wraps, u32 next_entry, 758 u32 num_wraps, u32 next_entry,
757 u32 size, u32 mode, 759 u32 size, u32 mode,
758 int pos, char **buf, size_t bufsz) 760 int pos, char **buf, size_t bufsz)
@@ -763,22 +765,22 @@ static int iwl_print_last_event_logs(struct iwl_priv *priv, u32 capacity,
763 */ 765 */
764 if (num_wraps) { 766 if (num_wraps) {
765 if (next_entry < size) { 767 if (next_entry < size) {
766 pos = iwl_print_event_log(priv, 768 pos = iwl_print_event_log(trans,
767 capacity - (size - next_entry), 769 capacity - (size - next_entry),
768 size - next_entry, mode, 770 size - next_entry, mode,
769 pos, buf, bufsz); 771 pos, buf, bufsz);
770 pos = iwl_print_event_log(priv, 0, 772 pos = iwl_print_event_log(trans, 0,
771 next_entry, mode, 773 next_entry, mode,
772 pos, buf, bufsz); 774 pos, buf, bufsz);
773 } else 775 } else
774 pos = iwl_print_event_log(priv, next_entry - size, 776 pos = iwl_print_event_log(trans, next_entry - size,
775 size, mode, pos, buf, bufsz); 777 size, mode, pos, buf, bufsz);
776 } else { 778 } else {
777 if (next_entry < size) { 779 if (next_entry < size) {
778 pos = iwl_print_event_log(priv, 0, next_entry, 780 pos = iwl_print_event_log(trans, 0, next_entry,
779 mode, pos, buf, bufsz); 781 mode, pos, buf, bufsz);
780 } else { 782 } else {
781 pos = iwl_print_event_log(priv, next_entry - size, 783 pos = iwl_print_event_log(trans, next_entry - size,
782 size, mode, pos, buf, bufsz); 784 size, mode, pos, buf, bufsz);
783 } 785 }
784 } 786 }
@@ -787,7 +789,7 @@ static int iwl_print_last_event_logs(struct iwl_priv *priv, u32 capacity,
787 789
788#define DEFAULT_DUMP_EVENT_LOG_ENTRIES (20) 790#define DEFAULT_DUMP_EVENT_LOG_ENTRIES (20)
789 791
790int iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log, 792int iwl_dump_nic_event_log(struct iwl_trans *trans, bool full_log,
791 char **buf, bool display) 793 char **buf, bool display)
792{ 794{
793 u32 base; /* SRAM byte address of event log header */ 795 u32 base; /* SRAM byte address of event log header */
@@ -799,6 +801,7 @@ int iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log,
799 u32 logsize; 801 u32 logsize;
800 int pos = 0; 802 int pos = 0;
801 size_t bufsz = 0; 803 size_t bufsz = 0;
804 struct iwl_priv *priv = priv(trans);
802 805
803 base = priv->device_pointers.log_event_table; 806 base = priv->device_pointers.log_event_table;
804 if (priv->ucode_type == IWL_UCODE_INIT) { 807 if (priv->ucode_type == IWL_UCODE_INIT) {
@@ -812,7 +815,7 @@ int iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log,
812 } 815 }
813 816
814 if (!iwlagn_hw_valid_rtc_data_addr(base)) { 817 if (!iwlagn_hw_valid_rtc_data_addr(base)) {
815 IWL_ERR(priv, 818 IWL_ERR(trans,
816 "Invalid event log pointer 0x%08X for %s uCode\n", 819 "Invalid event log pointer 0x%08X for %s uCode\n",
817 base, 820 base,
818 (priv->ucode_type == IWL_UCODE_INIT) 821 (priv->ucode_type == IWL_UCODE_INIT)
@@ -827,13 +830,13 @@ int iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log,
827 next_entry = iwl_read_targ_mem(priv, base + (3 * sizeof(u32))); 830 next_entry = iwl_read_targ_mem(priv, base + (3 * sizeof(u32)));
828 831
829 if (capacity > logsize) { 832 if (capacity > logsize) {
830 IWL_ERR(priv, "Log capacity %d is bogus, limit to %d entries\n", 833 IWL_ERR(trans, "Log capacity %d is bogus, limit to %d "
831 capacity, logsize); 834 "entries\n", capacity, logsize);
832 capacity = logsize; 835 capacity = logsize;
833 } 836 }
834 837
835 if (next_entry > logsize) { 838 if (next_entry > logsize) {
836 IWL_ERR(priv, "Log write index %d is bogus, limit to %d\n", 839 IWL_ERR(trans, "Log write index %d is bogus, limit to %d\n",
837 next_entry, logsize); 840 next_entry, logsize);
838 next_entry = logsize; 841 next_entry = logsize;
839 } 842 }
@@ -842,7 +845,7 @@ int iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log,
842 845
843 /* bail out if nothing in log */ 846 /* bail out if nothing in log */
844 if (size == 0) { 847 if (size == 0) {
845 IWL_ERR(priv, "Start IWL Event Log Dump: nothing in log\n"); 848 IWL_ERR(trans, "Start IWL Event Log Dump: nothing in log\n");
846 return pos; 849 return pos;
847 } 850 }
848 851
@@ -850,14 +853,14 @@ int iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log,
850 priv->bt_ch_announce = iwlagn_mod_params.bt_ch_announce; 853 priv->bt_ch_announce = iwlagn_mod_params.bt_ch_announce;
851 854
852#ifdef CONFIG_IWLWIFI_DEBUG 855#ifdef CONFIG_IWLWIFI_DEBUG
853 if (!(iwl_get_debug_level(priv->shrd) & IWL_DL_FW_ERRORS) && !full_log) 856 if (!(iwl_get_debug_level(trans->shrd) & IWL_DL_FW_ERRORS) && !full_log)
854 size = (size > DEFAULT_DUMP_EVENT_LOG_ENTRIES) 857 size = (size > DEFAULT_DUMP_EVENT_LOG_ENTRIES)
855 ? DEFAULT_DUMP_EVENT_LOG_ENTRIES : size; 858 ? DEFAULT_DUMP_EVENT_LOG_ENTRIES : size;
856#else 859#else
857 size = (size > DEFAULT_DUMP_EVENT_LOG_ENTRIES) 860 size = (size > DEFAULT_DUMP_EVENT_LOG_ENTRIES)
858 ? DEFAULT_DUMP_EVENT_LOG_ENTRIES : size; 861 ? DEFAULT_DUMP_EVENT_LOG_ENTRIES : size;
859#endif 862#endif
860 IWL_ERR(priv, "Start IWL Event Log Dump: display last %u entries\n", 863 IWL_ERR(trans, "Start IWL Event Log Dump: display last %u entries\n",
861 size); 864 size);
862 865
863#ifdef CONFIG_IWLWIFI_DEBUG 866#ifdef CONFIG_IWLWIFI_DEBUG
@@ -870,25 +873,25 @@ int iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log,
870 if (!*buf) 873 if (!*buf)
871 return -ENOMEM; 874 return -ENOMEM;
872 } 875 }
873 if ((iwl_get_debug_level(priv->shrd) & IWL_DL_FW_ERRORS) || full_log) { 876 if ((iwl_get_debug_level(trans->shrd) & IWL_DL_FW_ERRORS) || full_log) {
874 /* 877 /*
875 * if uCode has wrapped back to top of log, 878 * if uCode has wrapped back to top of log,
876 * start at the oldest entry, 879 * start at the oldest entry,
877 * i.e the next one that uCode would fill. 880 * i.e the next one that uCode would fill.
878 */ 881 */
879 if (num_wraps) 882 if (num_wraps)
880 pos = iwl_print_event_log(priv, next_entry, 883 pos = iwl_print_event_log(trans, next_entry,
881 capacity - next_entry, mode, 884 capacity - next_entry, mode,
882 pos, buf, bufsz); 885 pos, buf, bufsz);
883 /* (then/else) start at top of log */ 886 /* (then/else) start at top of log */
884 pos = iwl_print_event_log(priv, 0, 887 pos = iwl_print_event_log(trans, 0,
885 next_entry, mode, pos, buf, bufsz); 888 next_entry, mode, pos, buf, bufsz);
886 } else 889 } else
887 pos = iwl_print_last_event_logs(priv, capacity, num_wraps, 890 pos = iwl_print_last_event_logs(trans, capacity, num_wraps,
888 next_entry, size, mode, 891 next_entry, size, mode,
889 pos, buf, bufsz); 892 pos, buf, bufsz);
890#else 893#else
891 pos = iwl_print_last_event_logs(priv, capacity, num_wraps, 894 pos = iwl_print_last_event_logs(trans, capacity, num_wraps,
892 next_entry, size, mode, 895 next_entry, size, mode,
893 pos, buf, bufsz); 896 pos, buf, bufsz);
894#endif 897#endif
@@ -951,7 +954,7 @@ void iwl_irq_tasklet(struct iwl_trans *trans)
951 iwl_disable_interrupts(trans); 954 iwl_disable_interrupts(trans);
952 955
953 isr_stats->hw++; 956 isr_stats->hw++;
954 iwl_irq_handle_error(priv(trans)); 957 iwl_irq_handle_error(trans);
955 958
956 handled |= CSR_INT_BIT_HW_ERR; 959 handled |= CSR_INT_BIT_HW_ERR;
957 960
@@ -1020,7 +1023,7 @@ void iwl_irq_tasklet(struct iwl_trans *trans)
1020 IWL_ERR(trans, "Microcode SW error detected. " 1023 IWL_ERR(trans, "Microcode SW error detected. "
1021 " Restarting 0x%X.\n", inta); 1024 " Restarting 0x%X.\n", inta);
1022 isr_stats->sw++; 1025 isr_stats->sw++;
1023 iwl_irq_handle_error(priv(trans)); 1026 iwl_irq_handle_error(trans);
1024 handled |= CSR_INT_BIT_SW_ERR; 1027 handled |= CSR_INT_BIT_SW_ERR;
1025 } 1028 }
1026 1029
@@ -1188,11 +1191,10 @@ int iwl_alloc_isr_ict(struct iwl_trans *trans)
1188/* Device is going up inform it about using ICT interrupt table, 1191/* Device is going up inform it about using ICT interrupt table,
1189 * also we need to tell the driver to start using ICT interrupt. 1192 * also we need to tell the driver to start using ICT interrupt.
1190 */ 1193 */
1191int iwl_reset_ict(struct iwl_priv *priv) 1194int iwl_reset_ict(struct iwl_trans *trans)
1192{ 1195{
1193 u32 val; 1196 u32 val;
1194 unsigned long flags; 1197 unsigned long flags;
1195 struct iwl_trans *trans = trans(priv);
1196 struct iwl_trans_pcie *trans_pcie = 1198 struct iwl_trans_pcie *trans_pcie =
1197 IWL_TRANS_GET_PCIE_TRANS(trans); 1199 IWL_TRANS_GET_PCIE_TRANS(trans);
1198 1200
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.c b/drivers/net/wireless/iwlwifi/iwl-trans.c
index e55636e1deaf..2ffacb2b2d77 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.c
@@ -1528,7 +1528,7 @@ static ssize_t iwl_dbgfs_log_event_read(struct file *file,
1528 int pos = 0; 1528 int pos = 0;
1529 ssize_t ret = -ENOMEM; 1529 ssize_t ret = -ENOMEM;
1530 1530
1531 ret = pos = iwl_dump_nic_event_log(priv(trans), true, &buf, true); 1531 ret = pos = iwl_dump_nic_event_log(trans, true, &buf, true);
1532 if (buf) { 1532 if (buf) {
1533 ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos); 1533 ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos);
1534 kfree(buf); 1534 kfree(buf);
@@ -1552,7 +1552,7 @@ static ssize_t iwl_dbgfs_log_event_write(struct file *file,
1552 if (sscanf(buf, "%d", &event_log_flag) != 1) 1552 if (sscanf(buf, "%d", &event_log_flag) != 1)
1553 return -EFAULT; 1553 return -EFAULT;
1554 if (event_log_flag == 1) 1554 if (event_log_flag == 1)
1555 iwl_dump_nic_event_log(priv(trans), true, NULL, false); 1555 iwl_dump_nic_event_log(trans, true, NULL, false);
1556 1556
1557 return count; 1557 return count;
1558} 1558}