aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/iwlwifi/Kconfig18
-rw-r--r--drivers/net/wireless/iwlwifi/Makefile7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-devtrace.c13
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-devtrace.h178
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-eeprom.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-io.h16
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-tx.c14
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c8
9 files changed, 256 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/Kconfig b/drivers/net/wireless/iwlwifi/Kconfig
index eb62c20e8019..48d8f2cf566c 100644
--- a/drivers/net/wireless/iwlwifi/Kconfig
+++ b/drivers/net/wireless/iwlwifi/Kconfig
@@ -49,6 +49,24 @@ config IWLWIFI_DEBUGFS
49 ---help--- 49 ---help---
50 Enable creation of debugfs files for the iwlwifi drivers. 50 Enable creation of debugfs files for the iwlwifi drivers.
51 51
52config IWLWIFI_DEVICE_TRACING
53 bool "iwlwifi device access tracing"
54 depends on IWLWIFI
55 depends on EVENT_TRACING
56 help
57 Say Y here to trace all commands, including TX frames and IO
58 accesses, sent to the device. If you say yes, iwlwifi will
59 register with the ftrace framework for event tracing and dump
60 all this information to the ringbuffer, you may need to
61 increase the ringbuffer size. See the ftrace documentation
62 for more information.
63
64 When tracing is not enabled, this option still has some
65 (though rather small) overhead.
66
67 If unsure, say Y so we can help you better when problems
68 occur.
69
52config IWLAGN 70config IWLAGN
53 tristate "Intel Wireless WiFi Next Gen AGN (iwlagn)" 71 tristate "Intel Wireless WiFi Next Gen AGN (iwlagn)"
54 depends on IWLWIFI 72 depends on IWLWIFI
diff --git a/drivers/net/wireless/iwlwifi/Makefile b/drivers/net/wireless/iwlwifi/Makefile
index 1d4e0a226fd4..3f31d866054b 100644
--- a/drivers/net/wireless/iwlwifi/Makefile
+++ b/drivers/net/wireless/iwlwifi/Makefile
@@ -5,7 +5,11 @@ iwlcore-objs += iwl-scan.o
5iwlcore-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o 5iwlcore-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o
6iwlcore-$(CONFIG_IWLWIFI_LEDS) += iwl-led.o 6iwlcore-$(CONFIG_IWLWIFI_LEDS) += iwl-led.o
7iwlcore-$(CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT) += iwl-spectrum.o 7iwlcore-$(CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT) += iwl-spectrum.o
8iwlcore-$(CONFIG_IWLWIFI_DEVICE_TRACING) += iwl-devtrace.o
8 9
10CFLAGS_iwl-devtrace.o := -I$(src)
11
12# AGN
9obj-$(CONFIG_IWLAGN) += iwlagn.o 13obj-$(CONFIG_IWLAGN) += iwlagn.o
10iwlagn-objs := iwl-agn.o iwl-agn-rs.o 14iwlagn-objs := iwl-agn.o iwl-agn-rs.o
11 15
@@ -14,7 +18,6 @@ iwlagn-$(CONFIG_IWL5000) += iwl-5000.o
14iwlagn-$(CONFIG_IWL5000) += iwl-6000.o 18iwlagn-$(CONFIG_IWL5000) += iwl-6000.o
15iwlagn-$(CONFIG_IWL5000) += iwl-1000.o 19iwlagn-$(CONFIG_IWL5000) += iwl-1000.o
16 20
21# 3945
17obj-$(CONFIG_IWL3945) += iwl3945.o 22obj-$(CONFIG_IWL3945) += iwl3945.o
18iwl3945-objs := iwl3945-base.o iwl-3945.o iwl-3945-rs.o iwl-3945-led.o 23iwl3945-objs := iwl3945-base.o iwl-3945.o iwl-3945-rs.o iwl-3945-led.o
19
20
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 26c66b4ffd60..4fb50d0eb536 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -791,6 +791,9 @@ void iwl_rx_handle(struct iwl_priv *priv)
791 PCI_DMA_FROMDEVICE); 791 PCI_DMA_FROMDEVICE);
792 pkt = (struct iwl_rx_packet *)rxb->skb->data; 792 pkt = (struct iwl_rx_packet *)rxb->skb->data;
793 793
794 trace_iwlwifi_dev_rx(priv, pkt,
795 le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK);
796
794 /* Reclaim a command buffer only if this packet is a response 797 /* Reclaim a command buffer only if this packet is a response
795 * to a (driver-originated) command. 798 * to a (driver-originated) command.
796 * If the packet (e.g. Rx frame) originated from uCode, 799 * If the packet (e.g. Rx frame) originated from uCode,
@@ -1610,6 +1613,9 @@ void iwl_dump_nic_error_log(struct iwl_priv *priv)
1610 line = iwl_read_targ_mem(priv, base + 9 * sizeof(u32)); 1613 line = iwl_read_targ_mem(priv, base + 9 * sizeof(u32));
1611 time = iwl_read_targ_mem(priv, base + 11 * sizeof(u32)); 1614 time = iwl_read_targ_mem(priv, base + 11 * sizeof(u32));
1612 1615
1616 trace_iwlwifi_dev_ucode_error(priv, desc, time, data1, data2, line,
1617 blink1, blink2, ilink1, ilink2);
1618
1613 IWL_ERR(priv, "Desc Time " 1619 IWL_ERR(priv, "Desc Time "
1614 "data1 data2 line\n"); 1620 "data1 data2 line\n");
1615 IWL_ERR(priv, "%-28s (#%02d) %010u 0x%08X 0x%08X %u\n", 1621 IWL_ERR(priv, "%-28s (#%02d) %010u 0x%08X 0x%08X %u\n",
@@ -1658,12 +1664,14 @@ static void iwl_print_event_log(struct iwl_priv *priv, u32 start_idx,
1658 ptr += sizeof(u32); 1664 ptr += sizeof(u32);
1659 if (mode == 0) { 1665 if (mode == 0) {
1660 /* data, ev */ 1666 /* data, ev */
1667 trace_iwlwifi_dev_ucode_event(priv, 0, time, ev);
1661 IWL_ERR(priv, "EVT_LOG:0x%08x:%04u\n", time, ev); 1668 IWL_ERR(priv, "EVT_LOG:0x%08x:%04u\n", time, ev);
1662 } else { 1669 } else {
1663 data = iwl_read_targ_mem(priv, ptr); 1670 data = iwl_read_targ_mem(priv, ptr);
1664 ptr += sizeof(u32); 1671 ptr += sizeof(u32);
1665 IWL_ERR(priv, "EVT_LOGT:%010u:0x%08x:%04u\n", 1672 IWL_ERR(priv, "EVT_LOGT:%010u:0x%08x:%04u\n",
1666 time, data, ev); 1673 time, data, ev);
1674 trace_iwlwifi_dev_ucode_event(priv, time, data, ev);
1667 } 1675 }
1668 } 1676 }
1669} 1677}
diff --git a/drivers/net/wireless/iwlwifi/iwl-devtrace.c b/drivers/net/wireless/iwlwifi/iwl-devtrace.c
new file mode 100644
index 000000000000..4ef5acaa556d
--- /dev/null
+++ b/drivers/net/wireless/iwlwifi/iwl-devtrace.c
@@ -0,0 +1,13 @@
1#include <linux/module.h>
2
3/* sparse doesn't like tracepoint macros */
4#ifndef __CHECKER__
5#define CREATE_TRACE_POINTS
6#include "iwl-devtrace.h"
7
8EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_ioread32);
9EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_iowrite32);
10EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_rx);
11EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_ucode_event);
12EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_ucode_error);
13#endif
diff --git a/drivers/net/wireless/iwlwifi/iwl-devtrace.h b/drivers/net/wireless/iwlwifi/iwl-devtrace.h
new file mode 100644
index 000000000000..8c7159208da1
--- /dev/null
+++ b/drivers/net/wireless/iwlwifi/iwl-devtrace.h
@@ -0,0 +1,178 @@
1#if !defined(__IWLWIFI_DEVICE_TRACE) || defined(TRACE_HEADER_MULTI_READ)
2#define __IWLWIFI_DEVICE_TRACE
3
4#include <linux/tracepoint.h>
5#include "iwl-dev.h"
6
7#if !defined(CONFIG_IWLWIFI_DEVICE_TRACING) || defined(__CHECKER__)
8#undef TRACE_EVENT
9#define TRACE_EVENT(name, proto, ...) \
10static inline void trace_ ## name(proto) {}
11#endif
12
13#define PRIV_ENTRY __field(struct iwl_priv *, priv)
14#define PRIV_ASSIGN __entry->priv = priv
15
16#undef TRACE_SYSTEM
17#define TRACE_SYSTEM iwlwifi
18
19TRACE_EVENT(iwlwifi_dev_ioread32,
20 TP_PROTO(struct iwl_priv *priv, u32 offs, u32 val),
21 TP_ARGS(priv, offs, val),
22 TP_STRUCT__entry(
23 PRIV_ENTRY
24 __field(u32, offs)
25 __field(u32, val)
26 ),
27 TP_fast_assign(
28 PRIV_ASSIGN;
29 __entry->offs = offs;
30 __entry->val = val;
31 ),
32 TP_printk("[%p] read io[%#x] = %#x", __entry->priv, __entry->offs, __entry->val)
33);
34
35TRACE_EVENT(iwlwifi_dev_iowrite32,
36 TP_PROTO(struct iwl_priv *priv, u32 offs, u32 val),
37 TP_ARGS(priv, offs, val),
38 TP_STRUCT__entry(
39 PRIV_ENTRY
40 __field(u32, offs)
41 __field(u32, val)
42 ),
43 TP_fast_assign(
44 PRIV_ASSIGN;
45 __entry->offs = offs;
46 __entry->val = val;
47 ),
48 TP_printk("[%p] write io[%#x] = %#x)", __entry->priv, __entry->offs, __entry->val)
49);
50
51TRACE_EVENT(iwlwifi_dev_hcmd,
52 TP_PROTO(struct iwl_priv *priv, void *hcmd, size_t len, u32 flags),
53 TP_ARGS(priv, hcmd, len, flags),
54 TP_STRUCT__entry(
55 PRIV_ENTRY
56 __dynamic_array(u8, hcmd, len)
57 __field(u32, flags)
58 ),
59 TP_fast_assign(
60 PRIV_ASSIGN;
61 memcpy(__get_dynamic_array(hcmd), hcmd, len);
62 __entry->flags = flags;
63 ),
64 TP_printk("[%p] hcmd %#.2x (%ssync)",
65 __entry->priv, ((u8 *)__get_dynamic_array(hcmd))[0],
66 __entry->flags & CMD_ASYNC ? "a" : "")
67);
68
69TRACE_EVENT(iwlwifi_dev_rx,
70 TP_PROTO(struct iwl_priv *priv, void *rxbuf, size_t len),
71 TP_ARGS(priv, rxbuf, len),
72 TP_STRUCT__entry(
73 PRIV_ENTRY
74 __dynamic_array(u8, rxbuf, len)
75 ),
76 TP_fast_assign(
77 PRIV_ASSIGN;
78 memcpy(__get_dynamic_array(rxbuf), rxbuf, len);
79 ),
80 TP_printk("[%p] RX cmd %#.2x",
81 __entry->priv, ((u8 *)__get_dynamic_array(rxbuf))[4])
82);
83
84TRACE_EVENT(iwlwifi_dev_tx,
85 TP_PROTO(struct iwl_priv *priv, void *tfd, size_t tfdlen,
86 void *buf0, size_t buf0_len,
87 void *buf1, size_t buf1_len),
88 TP_ARGS(priv, tfd, tfdlen, buf0, buf0_len, buf1, buf1_len),
89 TP_STRUCT__entry(
90 PRIV_ENTRY
91
92 __field(size_t, framelen)
93 __dynamic_array(u8, tfd, tfdlen)
94
95 /*
96 * Do not insert between or below these items,
97 * we want to keep the frame together (except
98 * for the possible padding).
99 */
100 __dynamic_array(u8, buf0, buf0_len)
101 __dynamic_array(u8, buf1, buf1_len)
102 ),
103 TP_fast_assign(
104 PRIV_ASSIGN;
105 __entry->framelen = buf0_len + buf1_len;
106 memcpy(__get_dynamic_array(tfd), tfd, tfdlen);
107 memcpy(__get_dynamic_array(buf0), buf0, buf0_len);
108 memcpy(__get_dynamic_array(buf1), buf1, buf0_len);
109 ),
110 TP_printk("[%p] TX %.2x (%zu bytes)",
111 __entry->priv,
112 ((u8 *)__get_dynamic_array(buf0))[0],
113 __entry->framelen)
114);
115
116TRACE_EVENT(iwlwifi_dev_ucode_error,
117 TP_PROTO(struct iwl_priv *priv, u32 desc, u32 time,
118 u32 data1, u32 data2, u32 line, u32 blink1,
119 u32 blink2, u32 ilink1, u32 ilink2),
120 TP_ARGS(priv, desc, time, data1, data2, line,
121 blink1, blink2, ilink1, ilink2),
122 TP_STRUCT__entry(
123 PRIV_ENTRY
124 __field(u32, desc)
125 __field(u32, time)
126 __field(u32, data1)
127 __field(u32, data2)
128 __field(u32, line)
129 __field(u32, blink1)
130 __field(u32, blink2)
131 __field(u32, ilink1)
132 __field(u32, ilink2)
133 ),
134 TP_fast_assign(
135 PRIV_ASSIGN;
136 __entry->desc = desc;
137 __entry->time = time;
138 __entry->data1 = data1;
139 __entry->data2 = data2;
140 __entry->line = line;
141 __entry->blink1 = blink1;
142 __entry->blink2 = blink2;
143 __entry->ilink1 = ilink1;
144 __entry->ilink2 = ilink2;
145 ),
146 TP_printk("[%p] #%02d %010u data 0x%08X 0x%08X line %u, "
147 "blink 0x%05X 0x%05X ilink 0x%05X 0x%05X",
148 __entry->priv, __entry->desc, __entry->time, __entry->data1,
149 __entry->data2, __entry->line, __entry->blink1,
150 __entry->blink2, __entry->ilink1, __entry->ilink2)
151);
152
153TRACE_EVENT(iwlwifi_dev_ucode_event,
154 TP_PROTO(struct iwl_priv *priv, u32 time, u32 data, u32 ev),
155 TP_ARGS(priv, time, data, ev),
156 TP_STRUCT__entry(
157 PRIV_ENTRY
158
159 __field(u32, time)
160 __field(u32, data)
161 __field(u32, ev)
162 ),
163 TP_fast_assign(
164 PRIV_ASSIGN;
165 __entry->time = time;
166 __entry->data = data;
167 __entry->ev = ev;
168 ),
169 TP_printk("[%p] EVT_LOGT:%010u:0x%08x:%04u",
170 __entry->priv, __entry->time, __entry->data, __entry->ev)
171);
172#endif /* __IWLWIFI_DEVICE_TRACE */
173
174#undef TRACE_INCLUDE_PATH
175#define TRACE_INCLUDE_PATH .
176#undef TRACE_INCLUDE_FILE
177#define TRACE_INCLUDE_FILE iwl-devtrace
178#include <trace/define_trace.h>
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.h b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
index 643142f913b6..fee6f0c7503e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-eeprom.h
+++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
@@ -63,6 +63,8 @@
63#ifndef __iwl_eeprom_h__ 63#ifndef __iwl_eeprom_h__
64#define __iwl_eeprom_h__ 64#define __iwl_eeprom_h__
65 65
66#include <net/mac80211.h>
67
66struct iwl_priv; 68struct iwl_priv;
67 69
68/* 70/*
diff --git a/drivers/net/wireless/iwlwifi/iwl-io.h b/drivers/net/wireless/iwlwifi/iwl-io.h
index d30cb0275d19..0a078b082833 100644
--- a/drivers/net/wireless/iwlwifi/iwl-io.h
+++ b/drivers/net/wireless/iwlwifi/iwl-io.h
@@ -32,6 +32,7 @@
32#include <linux/io.h> 32#include <linux/io.h>
33 33
34#include "iwl-debug.h" 34#include "iwl-debug.h"
35#include "iwl-devtrace.h"
35 36
36/* 37/*
37 * IO, register, and NIC memory access functions 38 * IO, register, and NIC memory access functions
@@ -61,7 +62,12 @@
61 * 62 *
62 */ 63 */
63 64
64#define _iwl_write32(priv, ofs, val) iowrite32((val), (priv)->hw_base + (ofs)) 65static inline void _iwl_write32(struct iwl_priv *priv, u32 ofs, u32 val)
66{
67 trace_iwlwifi_dev_iowrite32(priv, ofs, val);
68 iowrite32(val, priv->hw_base + ofs);
69}
70
65#ifdef CONFIG_IWLWIFI_DEBUG 71#ifdef CONFIG_IWLWIFI_DEBUG
66static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *priv, 72static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *priv,
67 u32 ofs, u32 val) 73 u32 ofs, u32 val)
@@ -75,7 +81,13 @@ static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *priv,
75#define iwl_write32(priv, ofs, val) _iwl_write32(priv, ofs, val) 81#define iwl_write32(priv, ofs, val) _iwl_write32(priv, ofs, val)
76#endif 82#endif
77 83
78#define _iwl_read32(priv, ofs) ioread32((priv)->hw_base + (ofs)) 84static inline u32 _iwl_read32(struct iwl_priv *priv, u32 ofs)
85{
86 u32 val = ioread32(priv->hw_base + ofs);
87 trace_iwlwifi_dev_ioread32(priv, ofs, val);
88 return val;
89}
90
79#ifdef CONFIG_IWLWIFI_DEBUG 91#ifdef CONFIG_IWLWIFI_DEBUG
80static inline u32 __iwl_read32(char *f, u32 l, struct iwl_priv *priv, u32 ofs) 92static inline u32 __iwl_read32(char *f, u32 l, struct iwl_priv *priv, u32 ofs)
81{ 93{
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 2ba9725beff9..c832ba085dba 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -709,7 +709,7 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
709 dma_addr_t phys_addr; 709 dma_addr_t phys_addr;
710 dma_addr_t txcmd_phys; 710 dma_addr_t txcmd_phys;
711 dma_addr_t scratch_phys; 711 dma_addr_t scratch_phys;
712 u16 len, len_org; 712 u16 len, len_org, firstlen, secondlen;
713 u16 seq_number = 0; 713 u16 seq_number = 0;
714 __le16 fc; 714 __le16 fc;
715 u8 hdr_len; 715 u8 hdr_len;
@@ -842,7 +842,7 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
842 sizeof(struct iwl_cmd_header) + hdr_len; 842 sizeof(struct iwl_cmd_header) + hdr_len;
843 843
844 len_org = len; 844 len_org = len;
845 len = (len + 3) & ~3; 845 firstlen = len = (len + 3) & ~3;
846 846
847 if (len_org != len) 847 if (len_org != len)
848 len_org = 1; 848 len_org = 1;
@@ -876,7 +876,7 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
876 876
877 /* Set up TFD's 2nd entry to point directly to remainder of skb, 877 /* Set up TFD's 2nd entry to point directly to remainder of skb,
878 * if any (802.11 null frames have no payload). */ 878 * if any (802.11 null frames have no payload). */
879 len = skb->len - hdr_len; 879 secondlen = len = skb->len - hdr_len;
880 if (len) { 880 if (len) {
881 phys_addr = pci_map_single(priv->pci_dev, skb->data + hdr_len, 881 phys_addr = pci_map_single(priv->pci_dev, skb->data + hdr_len,
882 len, PCI_DMA_TODEVICE); 882 len, PCI_DMA_TODEVICE);
@@ -910,6 +910,12 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
910 pci_dma_sync_single_for_device(priv->pci_dev, txcmd_phys, 910 pci_dma_sync_single_for_device(priv->pci_dev, txcmd_phys,
911 len, PCI_DMA_BIDIRECTIONAL); 911 len, PCI_DMA_BIDIRECTIONAL);
912 912
913 trace_iwlwifi_dev_tx(priv,
914 &((struct iwl_tfd *)txq->tfds)[txq->q.write_ptr],
915 sizeof(struct iwl_tfd),
916 &out_cmd->hdr, firstlen,
917 skb->data + hdr_len, secondlen);
918
913 /* Tell device the write index *just past* this latest filled TFD */ 919 /* Tell device the write index *just past* this latest filled TFD */
914 q->write_ptr = iwl_queue_inc_wrap(q->write_ptr, q->n_bd); 920 q->write_ptr = iwl_queue_inc_wrap(q->write_ptr, q->n_bd);
915 ret = iwl_txq_update_write_ptr(priv, txq); 921 ret = iwl_txq_update_write_ptr(priv, txq);
@@ -1044,6 +1050,8 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
1044 pci_unmap_addr_set(out_meta, mapping, phys_addr); 1050 pci_unmap_addr_set(out_meta, mapping, phys_addr);
1045 pci_unmap_len_set(out_meta, len, fix_size); 1051 pci_unmap_len_set(out_meta, len, fix_size);
1046 1052
1053 trace_iwlwifi_dev_hcmd(priv, &out_cmd->hdr, fix_size, cmd->flags);
1054
1047 priv->cfg->ops->lib->txq_attach_buf_to_tfd(priv, txq, 1055 priv->cfg->ops->lib->txq_attach_buf_to_tfd(priv, txq,
1048 phys_addr, fix_size, 1, 1056 phys_addr, fix_size, 1,
1049 U32_PAD(cmd->len)); 1057 U32_PAD(cmd->len));
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 3575e7fbadc7..d0d1b7f4c396 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -1404,6 +1404,9 @@ static void iwl3945_rx_handle(struct iwl_priv *priv)
1404 PCI_DMA_FROMDEVICE); 1404 PCI_DMA_FROMDEVICE);
1405 pkt = (struct iwl_rx_packet *)rxb->skb->data; 1405 pkt = (struct iwl_rx_packet *)rxb->skb->data;
1406 1406
1407 trace_iwlwifi_dev_rx(priv, pkt,
1408 le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK);
1409
1407 /* Reclaim a command buffer only if this packet is a response 1410 /* Reclaim a command buffer only if this packet is a response
1408 * to a (driver-originated) command. 1411 * to a (driver-originated) command.
1409 * If the packet (e.g. Rx frame) originated from uCode, 1412 * If the packet (e.g. Rx frame) originated from uCode,
@@ -1549,8 +1552,9 @@ void iwl3945_dump_nic_error_log(struct iwl_priv *priv)
1549 "%-13s (#%d) %010u 0x%05X 0x%05X 0x%05X 0x%05X %u\n\n", 1552 "%-13s (#%d) %010u 0x%05X 0x%05X 0x%05X 0x%05X %u\n\n",
1550 desc_lookup(desc), desc, time, blink1, blink2, 1553 desc_lookup(desc), desc, time, blink1, blink2,
1551 ilink1, ilink2, data1); 1554 ilink1, ilink2, data1);
1555 trace_iwlwifi_dev_ucode_error(priv, desc, time, data1, 0,
1556 0, blink1, blink2, ilink1, ilink2);
1552 } 1557 }
1553
1554} 1558}
1555 1559
1556#define EVENT_START_OFFSET (6 * sizeof(u32)) 1560#define EVENT_START_OFFSET (6 * sizeof(u32))
@@ -1590,10 +1594,12 @@ static void iwl3945_print_event_log(struct iwl_priv *priv, u32 start_idx,
1590 if (mode == 0) { 1594 if (mode == 0) {
1591 /* data, ev */ 1595 /* data, ev */
1592 IWL_ERR(priv, "0x%08x\t%04u\n", time, ev); 1596 IWL_ERR(priv, "0x%08x\t%04u\n", time, ev);
1597 trace_iwlwifi_dev_ucode_event(priv, 0, time, ev);
1593 } else { 1598 } else {
1594 data = iwl_read_targ_mem(priv, ptr); 1599 data = iwl_read_targ_mem(priv, ptr);
1595 ptr += sizeof(u32); 1600 ptr += sizeof(u32);
1596 IWL_ERR(priv, "%010u\t0x%08x\t%04u\n", time, data, ev); 1601 IWL_ERR(priv, "%010u\t0x%08x\t%04u\n", time, data, ev);
1602 trace_iwlwifi_dev_ucode_event(priv, time, data, ev);
1597 } 1603 }
1598 } 1604 }
1599} 1605}