diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-03-06 16:30:48 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-07 13:51:52 -0500 |
commit | 6c1011e1918be17f7f8ccca5442cd517f9c29d17 (patch) | |
tree | 76bfc3b2e26e06cddff019115174448c3c26414e /drivers/net/wireless | |
parent | 84abd2cc066fc077c424d0faf7618be348a7efb2 (diff) |
iwlwifi: make tracing use device as identifier
Tracing used the priv pointer as an identifier,
which has the problem that we don't have it in
all code, and also some people say no pointers
should be "leaked" to userspace.
Use the device name instead, it is more useful
anyway.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-devtrace.h | 141 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-io.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | 2 |
6 files changed, 90 insertions, 86 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index f8163717d7d1..276570025e52 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -353,11 +353,12 @@ static void iwl_print_cont_event_trace(struct iwl_priv *priv, u32 base, | |||
353 | ev = iwl_read32(trans(priv), HBUS_TARG_MEM_RDAT); | 353 | ev = iwl_read32(trans(priv), HBUS_TARG_MEM_RDAT); |
354 | time = iwl_read32(trans(priv), HBUS_TARG_MEM_RDAT); | 354 | time = iwl_read32(trans(priv), HBUS_TARG_MEM_RDAT); |
355 | if (mode == 0) { | 355 | if (mode == 0) { |
356 | trace_iwlwifi_dev_ucode_cont_event(priv, 0, time, ev); | 356 | trace_iwlwifi_dev_ucode_cont_event( |
357 | trans(priv)->dev, 0, time, ev); | ||
357 | } else { | 358 | } else { |
358 | data = iwl_read32(trans(priv), HBUS_TARG_MEM_RDAT); | 359 | data = iwl_read32(trans(priv), HBUS_TARG_MEM_RDAT); |
359 | trace_iwlwifi_dev_ucode_cont_event(priv, time, | 360 | trace_iwlwifi_dev_ucode_cont_event( |
360 | data, ev); | 361 | trans(priv)->dev, time, data, ev); |
361 | } | 362 | } |
362 | } | 363 | } |
363 | /* Allow device to power down */ | 364 | /* Allow device to power down */ |
@@ -422,7 +423,7 @@ static void iwl_continuous_event_trace(struct iwl_priv *priv) | |||
422 | else | 423 | else |
423 | priv->event_log.wraps_once_count++; | 424 | priv->event_log.wraps_once_count++; |
424 | 425 | ||
425 | trace_iwlwifi_dev_ucode_wrap_event(priv, | 426 | trace_iwlwifi_dev_ucode_wrap_event(trans(priv)->dev, |
426 | num_wraps - priv->event_log.num_wraps, | 427 | num_wraps - priv->event_log.num_wraps, |
427 | next_entry, priv->event_log.next_entry); | 428 | next_entry, priv->event_log.next_entry); |
428 | 429 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-devtrace.h b/drivers/net/wireless/iwlwifi/iwl-devtrace.h index 96e62338cec0..06203d6a1d86 100644 --- a/drivers/net/wireless/iwlwifi/iwl-devtrace.h +++ b/drivers/net/wireless/iwlwifi/iwl-devtrace.h | |||
@@ -41,130 +41,134 @@ static inline void trace_ ## name(proto) {} | |||
41 | static inline void trace_ ## name(proto) {} | 41 | static inline void trace_ ## name(proto) {} |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | #define PRIV_ENTRY __field(void *, priv) | 44 | #define DEV_ENTRY __string(dev, dev_name(dev)) |
45 | #define PRIV_ASSIGN __entry->priv = priv | 45 | #define DEV_ASSIGN __assign_str(dev, dev_name(dev)) |
46 | 46 | ||
47 | #undef TRACE_SYSTEM | 47 | #undef TRACE_SYSTEM |
48 | #define TRACE_SYSTEM iwlwifi_io | 48 | #define TRACE_SYSTEM iwlwifi_io |
49 | 49 | ||
50 | TRACE_EVENT(iwlwifi_dev_ioread32, | 50 | TRACE_EVENT(iwlwifi_dev_ioread32, |
51 | TP_PROTO(void *priv, u32 offs, u32 val), | 51 | TP_PROTO(const struct device *dev, u32 offs, u32 val), |
52 | TP_ARGS(priv, offs, val), | 52 | TP_ARGS(dev, offs, val), |
53 | TP_STRUCT__entry( | 53 | TP_STRUCT__entry( |
54 | PRIV_ENTRY | 54 | DEV_ENTRY |
55 | __field(u32, offs) | 55 | __field(u32, offs) |
56 | __field(u32, val) | 56 | __field(u32, val) |
57 | ), | 57 | ), |
58 | TP_fast_assign( | 58 | TP_fast_assign( |
59 | PRIV_ASSIGN; | 59 | DEV_ASSIGN; |
60 | __entry->offs = offs; | 60 | __entry->offs = offs; |
61 | __entry->val = val; | 61 | __entry->val = val; |
62 | ), | 62 | ), |
63 | TP_printk("[%p] read io[%#x] = %#x", __entry->priv, __entry->offs, __entry->val) | 63 | TP_printk("[%s] read io[%#x] = %#x", |
64 | __get_str(dev), __entry->offs, __entry->val) | ||
64 | ); | 65 | ); |
65 | 66 | ||
66 | TRACE_EVENT(iwlwifi_dev_iowrite8, | 67 | TRACE_EVENT(iwlwifi_dev_iowrite8, |
67 | TP_PROTO(void *priv, u32 offs, u8 val), | 68 | TP_PROTO(const struct device *dev, u32 offs, u8 val), |
68 | TP_ARGS(priv, offs, val), | 69 | TP_ARGS(dev, offs, val), |
69 | TP_STRUCT__entry( | 70 | TP_STRUCT__entry( |
70 | PRIV_ENTRY | 71 | DEV_ENTRY |
71 | __field(u32, offs) | 72 | __field(u32, offs) |
72 | __field(u8, val) | 73 | __field(u8, val) |
73 | ), | 74 | ), |
74 | TP_fast_assign( | 75 | TP_fast_assign( |
75 | PRIV_ASSIGN; | 76 | DEV_ASSIGN; |
76 | __entry->offs = offs; | 77 | __entry->offs = offs; |
77 | __entry->val = val; | 78 | __entry->val = val; |
78 | ), | 79 | ), |
79 | TP_printk("[%p] write io[%#x] = %#x)", __entry->priv, __entry->offs, __entry->val) | 80 | TP_printk("[%s] write io[%#x] = %#x)", |
81 | __get_str(dev), __entry->offs, __entry->val) | ||
80 | ); | 82 | ); |
81 | 83 | ||
82 | TRACE_EVENT(iwlwifi_dev_iowrite32, | 84 | TRACE_EVENT(iwlwifi_dev_iowrite32, |
83 | TP_PROTO(void *priv, u32 offs, u32 val), | 85 | TP_PROTO(const struct device *dev, u32 offs, u32 val), |
84 | TP_ARGS(priv, offs, val), | 86 | TP_ARGS(dev, offs, val), |
85 | TP_STRUCT__entry( | 87 | TP_STRUCT__entry( |
86 | PRIV_ENTRY | 88 | DEV_ENTRY |
87 | __field(u32, offs) | 89 | __field(u32, offs) |
88 | __field(u32, val) | 90 | __field(u32, val) |
89 | ), | 91 | ), |
90 | TP_fast_assign( | 92 | TP_fast_assign( |
91 | PRIV_ASSIGN; | 93 | DEV_ASSIGN; |
92 | __entry->offs = offs; | 94 | __entry->offs = offs; |
93 | __entry->val = val; | 95 | __entry->val = val; |
94 | ), | 96 | ), |
95 | TP_printk("[%p] write io[%#x] = %#x)", __entry->priv, __entry->offs, __entry->val) | 97 | TP_printk("[%s] write io[%#x] = %#x)", |
98 | __get_str(dev), __entry->offs, __entry->val) | ||
96 | ); | 99 | ); |
97 | 100 | ||
98 | TRACE_EVENT(iwlwifi_dev_irq, | 101 | TRACE_EVENT(iwlwifi_dev_irq, |
99 | TP_PROTO(void *priv), | 102 | TP_PROTO(const struct device *dev), |
100 | TP_ARGS(priv), | 103 | TP_ARGS(dev), |
101 | TP_STRUCT__entry( | 104 | TP_STRUCT__entry( |
102 | PRIV_ENTRY | 105 | DEV_ENTRY |
103 | ), | 106 | ), |
104 | TP_fast_assign( | 107 | TP_fast_assign( |
105 | PRIV_ASSIGN; | 108 | DEV_ASSIGN; |
106 | ), | 109 | ), |
107 | /* TP_printk("") doesn't compile */ | 110 | /* TP_printk("") doesn't compile */ |
108 | TP_printk("%d", 0) | 111 | TP_printk("%d", 0) |
109 | ); | 112 | ); |
110 | 113 | ||
111 | TRACE_EVENT(iwlwifi_dev_ict_read, | 114 | TRACE_EVENT(iwlwifi_dev_ict_read, |
112 | TP_PROTO(void *priv, u32 index, u32 value), | 115 | TP_PROTO(const struct device *dev, u32 index, u32 value), |
113 | TP_ARGS(priv, index, value), | 116 | TP_ARGS(dev, index, value), |
114 | TP_STRUCT__entry( | 117 | TP_STRUCT__entry( |
115 | PRIV_ENTRY | 118 | DEV_ENTRY |
116 | __field(u32, index) | 119 | __field(u32, index) |
117 | __field(u32, value) | 120 | __field(u32, value) |
118 | ), | 121 | ), |
119 | TP_fast_assign( | 122 | TP_fast_assign( |
120 | PRIV_ASSIGN; | 123 | DEV_ASSIGN; |
121 | __entry->index = index; | 124 | __entry->index = index; |
122 | __entry->value = value; | 125 | __entry->value = value; |
123 | ), | 126 | ), |
124 | TP_printk("read ict[%d] = %#.8x", __entry->index, __entry->value) | 127 | TP_printk("[%s] read ict[%d] = %#.8x", |
128 | __get_str(dev), __entry->index, __entry->value) | ||
125 | ); | 129 | ); |
126 | 130 | ||
127 | #undef TRACE_SYSTEM | 131 | #undef TRACE_SYSTEM |
128 | #define TRACE_SYSTEM iwlwifi_ucode | 132 | #define TRACE_SYSTEM iwlwifi_ucode |
129 | 133 | ||
130 | TRACE_EVENT(iwlwifi_dev_ucode_cont_event, | 134 | TRACE_EVENT(iwlwifi_dev_ucode_cont_event, |
131 | TP_PROTO(void *priv, u32 time, u32 data, u32 ev), | 135 | TP_PROTO(const struct device *dev, u32 time, u32 data, u32 ev), |
132 | TP_ARGS(priv, time, data, ev), | 136 | TP_ARGS(dev, time, data, ev), |
133 | TP_STRUCT__entry( | 137 | TP_STRUCT__entry( |
134 | PRIV_ENTRY | 138 | DEV_ENTRY |
135 | 139 | ||
136 | __field(u32, time) | 140 | __field(u32, time) |
137 | __field(u32, data) | 141 | __field(u32, data) |
138 | __field(u32, ev) | 142 | __field(u32, ev) |
139 | ), | 143 | ), |
140 | TP_fast_assign( | 144 | TP_fast_assign( |
141 | PRIV_ASSIGN; | 145 | DEV_ASSIGN; |
142 | __entry->time = time; | 146 | __entry->time = time; |
143 | __entry->data = data; | 147 | __entry->data = data; |
144 | __entry->ev = ev; | 148 | __entry->ev = ev; |
145 | ), | 149 | ), |
146 | TP_printk("[%p] EVT_LOGT:%010u:0x%08x:%04u", | 150 | TP_printk("[%s] EVT_LOGT:%010u:0x%08x:%04u", |
147 | __entry->priv, __entry->time, __entry->data, __entry->ev) | 151 | __get_str(dev), __entry->time, __entry->data, __entry->ev) |
148 | ); | 152 | ); |
149 | 153 | ||
150 | TRACE_EVENT(iwlwifi_dev_ucode_wrap_event, | 154 | TRACE_EVENT(iwlwifi_dev_ucode_wrap_event, |
151 | TP_PROTO(void *priv, u32 wraps, u32 n_entry, u32 p_entry), | 155 | TP_PROTO(const struct device *dev, u32 wraps, u32 n_entry, u32 p_entry), |
152 | TP_ARGS(priv, wraps, n_entry, p_entry), | 156 | TP_ARGS(dev, wraps, n_entry, p_entry), |
153 | TP_STRUCT__entry( | 157 | TP_STRUCT__entry( |
154 | PRIV_ENTRY | 158 | DEV_ENTRY |
155 | 159 | ||
156 | __field(u32, wraps) | 160 | __field(u32, wraps) |
157 | __field(u32, n_entry) | 161 | __field(u32, n_entry) |
158 | __field(u32, p_entry) | 162 | __field(u32, p_entry) |
159 | ), | 163 | ), |
160 | TP_fast_assign( | 164 | TP_fast_assign( |
161 | PRIV_ASSIGN; | 165 | DEV_ASSIGN; |
162 | __entry->wraps = wraps; | 166 | __entry->wraps = wraps; |
163 | __entry->n_entry = n_entry; | 167 | __entry->n_entry = n_entry; |
164 | __entry->p_entry = p_entry; | 168 | __entry->p_entry = p_entry; |
165 | ), | 169 | ), |
166 | TP_printk("[%p] wraps=#%02d n=0x%X p=0x%X", | 170 | TP_printk("[%s] wraps=#%02d n=0x%X p=0x%X", |
167 | __entry->priv, __entry->wraps, __entry->n_entry, | 171 | __get_str(dev), __entry->wraps, __entry->n_entry, |
168 | __entry->p_entry) | 172 | __entry->p_entry) |
169 | ); | 173 | ); |
170 | 174 | ||
@@ -232,52 +236,52 @@ TRACE_EVENT(iwlwifi_dbg, | |||
232 | #define TRACE_SYSTEM iwlwifi | 236 | #define TRACE_SYSTEM iwlwifi |
233 | 237 | ||
234 | TRACE_EVENT(iwlwifi_dev_hcmd, | 238 | TRACE_EVENT(iwlwifi_dev_hcmd, |
235 | TP_PROTO(void *priv, u32 flags, | 239 | TP_PROTO(const struct device *dev, u32 flags, |
236 | const void *hcmd0, size_t len0, | 240 | const void *hcmd0, size_t len0, |
237 | const void *hcmd1, size_t len1, | 241 | const void *hcmd1, size_t len1, |
238 | const void *hcmd2, size_t len2), | 242 | const void *hcmd2, size_t len2), |
239 | TP_ARGS(priv, flags, hcmd0, len0, hcmd1, len1, hcmd2, len2), | 243 | TP_ARGS(dev, flags, hcmd0, len0, hcmd1, len1, hcmd2, len2), |
240 | TP_STRUCT__entry( | 244 | TP_STRUCT__entry( |
241 | PRIV_ENTRY | 245 | DEV_ENTRY |
242 | __dynamic_array(u8, hcmd0, len0) | 246 | __dynamic_array(u8, hcmd0, len0) |
243 | __dynamic_array(u8, hcmd1, len1) | 247 | __dynamic_array(u8, hcmd1, len1) |
244 | __dynamic_array(u8, hcmd2, len2) | 248 | __dynamic_array(u8, hcmd2, len2) |
245 | __field(u32, flags) | 249 | __field(u32, flags) |
246 | ), | 250 | ), |
247 | TP_fast_assign( | 251 | TP_fast_assign( |
248 | PRIV_ASSIGN; | 252 | DEV_ASSIGN; |
249 | memcpy(__get_dynamic_array(hcmd0), hcmd0, len0); | 253 | memcpy(__get_dynamic_array(hcmd0), hcmd0, len0); |
250 | memcpy(__get_dynamic_array(hcmd1), hcmd1, len1); | 254 | memcpy(__get_dynamic_array(hcmd1), hcmd1, len1); |
251 | memcpy(__get_dynamic_array(hcmd2), hcmd2, len2); | 255 | memcpy(__get_dynamic_array(hcmd2), hcmd2, len2); |
252 | __entry->flags = flags; | 256 | __entry->flags = flags; |
253 | ), | 257 | ), |
254 | TP_printk("[%p] hcmd %#.2x (%ssync)", | 258 | TP_printk("[%s] hcmd %#.2x (%ssync)", |
255 | __entry->priv, ((u8 *)__get_dynamic_array(hcmd0))[0], | 259 | __get_str(dev), ((u8 *)__get_dynamic_array(hcmd0))[0], |
256 | __entry->flags & CMD_ASYNC ? "a" : "") | 260 | __entry->flags & CMD_ASYNC ? "a" : "") |
257 | ); | 261 | ); |
258 | 262 | ||
259 | TRACE_EVENT(iwlwifi_dev_rx, | 263 | TRACE_EVENT(iwlwifi_dev_rx, |
260 | TP_PROTO(void *priv, void *rxbuf, size_t len), | 264 | TP_PROTO(const struct device *dev, void *rxbuf, size_t len), |
261 | TP_ARGS(priv, rxbuf, len), | 265 | TP_ARGS(dev, rxbuf, len), |
262 | TP_STRUCT__entry( | 266 | TP_STRUCT__entry( |
263 | PRIV_ENTRY | 267 | DEV_ENTRY |
264 | __dynamic_array(u8, rxbuf, len) | 268 | __dynamic_array(u8, rxbuf, len) |
265 | ), | 269 | ), |
266 | TP_fast_assign( | 270 | TP_fast_assign( |
267 | PRIV_ASSIGN; | 271 | DEV_ASSIGN; |
268 | memcpy(__get_dynamic_array(rxbuf), rxbuf, len); | 272 | memcpy(__get_dynamic_array(rxbuf), rxbuf, len); |
269 | ), | 273 | ), |
270 | TP_printk("[%p] RX cmd %#.2x", | 274 | TP_printk("[%s] RX cmd %#.2x", |
271 | __entry->priv, ((u8 *)__get_dynamic_array(rxbuf))[4]) | 275 | __get_str(dev), ((u8 *)__get_dynamic_array(rxbuf))[4]) |
272 | ); | 276 | ); |
273 | 277 | ||
274 | TRACE_EVENT(iwlwifi_dev_tx, | 278 | TRACE_EVENT(iwlwifi_dev_tx, |
275 | TP_PROTO(void *priv, void *tfd, size_t tfdlen, | 279 | TP_PROTO(const struct device *dev, void *tfd, size_t tfdlen, |
276 | void *buf0, size_t buf0_len, | 280 | void *buf0, size_t buf0_len, |
277 | void *buf1, size_t buf1_len), | 281 | void *buf1, size_t buf1_len), |
278 | TP_ARGS(priv, tfd, tfdlen, buf0, buf0_len, buf1, buf1_len), | 282 | TP_ARGS(dev, tfd, tfdlen, buf0, buf0_len, buf1, buf1_len), |
279 | TP_STRUCT__entry( | 283 | TP_STRUCT__entry( |
280 | PRIV_ENTRY | 284 | DEV_ENTRY |
281 | 285 | ||
282 | __field(size_t, framelen) | 286 | __field(size_t, framelen) |
283 | __dynamic_array(u8, tfd, tfdlen) | 287 | __dynamic_array(u8, tfd, tfdlen) |
@@ -291,29 +295,28 @@ TRACE_EVENT(iwlwifi_dev_tx, | |||
291 | __dynamic_array(u8, buf1, buf1_len) | 295 | __dynamic_array(u8, buf1, buf1_len) |
292 | ), | 296 | ), |
293 | TP_fast_assign( | 297 | TP_fast_assign( |
294 | PRIV_ASSIGN; | 298 | DEV_ASSIGN; |
295 | __entry->framelen = buf0_len + buf1_len; | 299 | __entry->framelen = buf0_len + buf1_len; |
296 | memcpy(__get_dynamic_array(tfd), tfd, tfdlen); | 300 | memcpy(__get_dynamic_array(tfd), tfd, tfdlen); |
297 | memcpy(__get_dynamic_array(buf0), buf0, buf0_len); | 301 | memcpy(__get_dynamic_array(buf0), buf0, buf0_len); |
298 | memcpy(__get_dynamic_array(buf1), buf1, buf1_len); | 302 | memcpy(__get_dynamic_array(buf1), buf1, buf1_len); |
299 | ), | 303 | ), |
300 | TP_printk("[%p] TX %.2x (%zu bytes)", | 304 | TP_printk("[%s] TX %.2x (%zu bytes)", |
301 | __entry->priv, | 305 | __get_str(dev), ((u8 *)__get_dynamic_array(buf0))[0], |
302 | ((u8 *)__get_dynamic_array(buf0))[0], | ||
303 | __entry->framelen) | 306 | __entry->framelen) |
304 | ); | 307 | ); |
305 | 308 | ||
306 | TRACE_EVENT(iwlwifi_dev_ucode_error, | 309 | TRACE_EVENT(iwlwifi_dev_ucode_error, |
307 | TP_PROTO(void *priv, u32 desc, u32 tsf_low, | 310 | TP_PROTO(const struct device *dev, u32 desc, u32 tsf_low, |
308 | u32 data1, u32 data2, u32 line, u32 blink1, | 311 | u32 data1, u32 data2, u32 line, u32 blink1, |
309 | u32 blink2, u32 ilink1, u32 ilink2, u32 bcon_time, | 312 | u32 blink2, u32 ilink1, u32 ilink2, u32 bcon_time, |
310 | u32 gp1, u32 gp2, u32 gp3, u32 ucode_ver, u32 hw_ver, | 313 | u32 gp1, u32 gp2, u32 gp3, u32 ucode_ver, u32 hw_ver, |
311 | u32 brd_ver), | 314 | u32 brd_ver), |
312 | TP_ARGS(priv, desc, tsf_low, data1, data2, line, | 315 | TP_ARGS(dev, desc, tsf_low, data1, data2, line, |
313 | blink1, blink2, ilink1, ilink2, bcon_time, gp1, gp2, | 316 | blink1, blink2, ilink1, ilink2, bcon_time, gp1, gp2, |
314 | gp3, ucode_ver, hw_ver, brd_ver), | 317 | gp3, ucode_ver, hw_ver, brd_ver), |
315 | TP_STRUCT__entry( | 318 | TP_STRUCT__entry( |
316 | PRIV_ENTRY | 319 | DEV_ENTRY |
317 | __field(u32, desc) | 320 | __field(u32, desc) |
318 | __field(u32, tsf_low) | 321 | __field(u32, tsf_low) |
319 | __field(u32, data1) | 322 | __field(u32, data1) |
@@ -332,7 +335,7 @@ TRACE_EVENT(iwlwifi_dev_ucode_error, | |||
332 | __field(u32, brd_ver) | 335 | __field(u32, brd_ver) |
333 | ), | 336 | ), |
334 | TP_fast_assign( | 337 | TP_fast_assign( |
335 | PRIV_ASSIGN; | 338 | DEV_ASSIGN; |
336 | __entry->desc = desc; | 339 | __entry->desc = desc; |
337 | __entry->tsf_low = tsf_low; | 340 | __entry->tsf_low = tsf_low; |
338 | __entry->data1 = data1; | 341 | __entry->data1 = data1; |
@@ -350,11 +353,11 @@ TRACE_EVENT(iwlwifi_dev_ucode_error, | |||
350 | __entry->hw_ver = hw_ver; | 353 | __entry->hw_ver = hw_ver; |
351 | __entry->brd_ver = brd_ver; | 354 | __entry->brd_ver = brd_ver; |
352 | ), | 355 | ), |
353 | TP_printk("[%p] #%02d %010u data 0x%08X 0x%08X line %u, " | 356 | TP_printk("[%s] #%02d %010u data 0x%08X 0x%08X line %u, " |
354 | "blink 0x%05X 0x%05X ilink 0x%05X 0x%05X " | 357 | "blink 0x%05X 0x%05X ilink 0x%05X 0x%05X " |
355 | "bcon_tm %010u gp 0x%08X 0x%08X 0x%08X uCode 0x%08X " | 358 | "bcon_tm %010u gp 0x%08X 0x%08X 0x%08X uCode 0x%08X " |
356 | "hw 0x%08X brd 0x%08X", | 359 | "hw 0x%08X brd 0x%08X", |
357 | __entry->priv, __entry->desc, __entry->tsf_low, | 360 | __get_str(dev), __entry->desc, __entry->tsf_low, |
358 | __entry->data1, | 361 | __entry->data1, |
359 | __entry->data2, __entry->line, __entry->blink1, | 362 | __entry->data2, __entry->line, __entry->blink1, |
360 | __entry->blink2, __entry->ilink1, __entry->ilink2, | 363 | __entry->blink2, __entry->ilink1, __entry->ilink2, |
@@ -364,23 +367,23 @@ TRACE_EVENT(iwlwifi_dev_ucode_error, | |||
364 | ); | 367 | ); |
365 | 368 | ||
366 | TRACE_EVENT(iwlwifi_dev_ucode_event, | 369 | TRACE_EVENT(iwlwifi_dev_ucode_event, |
367 | TP_PROTO(void *priv, u32 time, u32 data, u32 ev), | 370 | TP_PROTO(const struct device *dev, u32 time, u32 data, u32 ev), |
368 | TP_ARGS(priv, time, data, ev), | 371 | TP_ARGS(dev, time, data, ev), |
369 | TP_STRUCT__entry( | 372 | TP_STRUCT__entry( |
370 | PRIV_ENTRY | 373 | DEV_ENTRY |
371 | 374 | ||
372 | __field(u32, time) | 375 | __field(u32, time) |
373 | __field(u32, data) | 376 | __field(u32, data) |
374 | __field(u32, ev) | 377 | __field(u32, ev) |
375 | ), | 378 | ), |
376 | TP_fast_assign( | 379 | TP_fast_assign( |
377 | PRIV_ASSIGN; | 380 | DEV_ASSIGN; |
378 | __entry->time = time; | 381 | __entry->time = time; |
379 | __entry->data = data; | 382 | __entry->data = data; |
380 | __entry->ev = ev; | 383 | __entry->ev = ev; |
381 | ), | 384 | ), |
382 | TP_printk("[%p] EVT_LOGT:%010u:0x%08x:%04u", | 385 | TP_printk("[%s] EVT_LOGT:%010u:0x%08x:%04u", |
383 | __entry->priv, __entry->time, __entry->data, __entry->ev) | 386 | __get_str(dev), __entry->time, __entry->data, __entry->ev) |
384 | ); | 387 | ); |
385 | #endif /* __IWLWIFI_DEVICE_TRACE */ | 388 | #endif /* __IWLWIFI_DEVICE_TRACE */ |
386 | 389 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-io.h b/drivers/net/wireless/iwlwifi/iwl-io.h index 782486fc2f8f..1136dc19936a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-io.h +++ b/drivers/net/wireless/iwlwifi/iwl-io.h | |||
@@ -35,20 +35,20 @@ | |||
35 | 35 | ||
36 | static inline void iwl_write8(struct iwl_trans *trans, u32 ofs, u8 val) | 36 | static inline void iwl_write8(struct iwl_trans *trans, u32 ofs, u8 val) |
37 | { | 37 | { |
38 | trace_iwlwifi_dev_iowrite8(priv(trans), ofs, val); | 38 | trace_iwlwifi_dev_iowrite8(trans->dev, ofs, val); |
39 | iwl_trans_write8(trans, ofs, val); | 39 | iwl_trans_write8(trans, ofs, val); |
40 | } | 40 | } |
41 | 41 | ||
42 | static inline void iwl_write32(struct iwl_trans *trans, u32 ofs, u32 val) | 42 | static inline void iwl_write32(struct iwl_trans *trans, u32 ofs, u32 val) |
43 | { | 43 | { |
44 | trace_iwlwifi_dev_iowrite32(priv(trans), ofs, val); | 44 | trace_iwlwifi_dev_iowrite32(trans->dev, ofs, val); |
45 | iwl_trans_write32(trans, ofs, val); | 45 | iwl_trans_write32(trans, ofs, val); |
46 | } | 46 | } |
47 | 47 | ||
48 | static inline u32 iwl_read32(struct iwl_trans *trans, u32 ofs) | 48 | static inline u32 iwl_read32(struct iwl_trans *trans, u32 ofs) |
49 | { | 49 | { |
50 | u32 val = iwl_trans_read32(trans, ofs); | 50 | u32 val = iwl_trans_read32(trans, ofs); |
51 | trace_iwlwifi_dev_ioread32(priv(trans), ofs, val); | 51 | trace_iwlwifi_dev_ioread32(trans->dev, ofs, val); |
52 | return val; | 52 | return val; |
53 | } | 53 | } |
54 | 54 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c index 911a9f113f1f..33a933b78e52 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c | |||
@@ -388,7 +388,7 @@ static void iwl_rx_handle_rxbuf(struct iwl_trans *trans, | |||
388 | 388 | ||
389 | len = le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK; | 389 | len = le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK; |
390 | len += sizeof(u32); /* account for status word */ | 390 | len += sizeof(u32); /* account for status word */ |
391 | trace_iwlwifi_dev_rx(priv(trans), pkt, len); | 391 | trace_iwlwifi_dev_rx(trans->dev, pkt, len); |
392 | 392 | ||
393 | /* Reclaim a command buffer only if this packet is a response | 393 | /* Reclaim a command buffer only if this packet is a response |
394 | * to a (driver-originated) command. | 394 | * to a (driver-originated) command. |
@@ -632,7 +632,7 @@ static void iwl_dump_nic_error_log(struct iwl_trans *trans) | |||
632 | 632 | ||
633 | trans_pcie->isr_stats.err_code = table.error_id; | 633 | trans_pcie->isr_stats.err_code = table.error_id; |
634 | 634 | ||
635 | trace_iwlwifi_dev_ucode_error(priv(trans), table.error_id, table.tsf_low, | 635 | trace_iwlwifi_dev_ucode_error(trans->dev, table.error_id, table.tsf_low, |
636 | table.data1, table.data2, table.line, | 636 | table.data1, table.data2, table.line, |
637 | table.blink1, table.blink2, table.ilink1, | 637 | table.blink1, table.blink2, table.ilink1, |
638 | table.ilink2, table.bcon_time, table.gp1, | 638 | table.ilink2, table.bcon_time, table.gp1, |
@@ -764,7 +764,7 @@ static int iwl_print_event_log(struct iwl_trans *trans, u32 start_idx, | |||
764 | "EVT_LOG:0x%08x:%04u\n", | 764 | "EVT_LOG:0x%08x:%04u\n", |
765 | time, ev); | 765 | time, ev); |
766 | } else { | 766 | } else { |
767 | trace_iwlwifi_dev_ucode_event(priv(trans), 0, | 767 | trace_iwlwifi_dev_ucode_event(trans->dev, 0, |
768 | time, ev); | 768 | time, ev); |
769 | IWL_ERR(trans, "EVT_LOG:0x%08x:%04u\n", | 769 | IWL_ERR(trans, "EVT_LOG:0x%08x:%04u\n", |
770 | time, ev); | 770 | time, ev); |
@@ -778,7 +778,7 @@ static int iwl_print_event_log(struct iwl_trans *trans, u32 start_idx, | |||
778 | } else { | 778 | } else { |
779 | IWL_ERR(trans, "EVT_LOGT:%010u:0x%08x:%04u\n", | 779 | IWL_ERR(trans, "EVT_LOGT:%010u:0x%08x:%04u\n", |
780 | time, data, ev); | 780 | time, data, ev); |
781 | trace_iwlwifi_dev_ucode_event(priv(trans), time, | 781 | trace_iwlwifi_dev_ucode_event(trans->dev, time, |
782 | data, ev); | 782 | data, ev); |
783 | } | 783 | } |
784 | } | 784 | } |
@@ -1262,7 +1262,7 @@ static irqreturn_t iwl_isr(int irq, void *data) | |||
1262 | if (!trans) | 1262 | if (!trans) |
1263 | return IRQ_NONE; | 1263 | return IRQ_NONE; |
1264 | 1264 | ||
1265 | trace_iwlwifi_dev_irq(priv(trans)); | 1265 | trace_iwlwifi_dev_irq(trans->dev); |
1266 | 1266 | ||
1267 | trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); | 1267 | trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); |
1268 | 1268 | ||
@@ -1352,7 +1352,7 @@ irqreturn_t iwl_isr_ict(int irq, void *data) | |||
1352 | if (!trans_pcie->use_ict) | 1352 | if (!trans_pcie->use_ict) |
1353 | return iwl_isr(irq, data); | 1353 | return iwl_isr(irq, data); |
1354 | 1354 | ||
1355 | trace_iwlwifi_dev_irq(priv(trans)); | 1355 | trace_iwlwifi_dev_irq(trans->dev); |
1356 | 1356 | ||
1357 | spin_lock_irqsave(&trans_pcie->irq_lock, flags); | 1357 | spin_lock_irqsave(&trans_pcie->irq_lock, flags); |
1358 | 1358 | ||
@@ -1369,7 +1369,7 @@ irqreturn_t iwl_isr_ict(int irq, void *data) | |||
1369 | * This may be due to IRQ shared with another device, | 1369 | * This may be due to IRQ shared with another device, |
1370 | * or due to sporadic interrupts thrown from our NIC. */ | 1370 | * or due to sporadic interrupts thrown from our NIC. */ |
1371 | read = le32_to_cpu(trans_pcie->ict_tbl[trans_pcie->ict_index]); | 1371 | read = le32_to_cpu(trans_pcie->ict_tbl[trans_pcie->ict_index]); |
1372 | trace_iwlwifi_dev_ict_read(priv(trans), trans_pcie->ict_index, read); | 1372 | trace_iwlwifi_dev_ict_read(trans->dev, trans_pcie->ict_index, read); |
1373 | if (!read) { | 1373 | if (!read) { |
1374 | IWL_DEBUG_ISR(trans, "Ignore interrupt, inta == 0\n"); | 1374 | IWL_DEBUG_ISR(trans, "Ignore interrupt, inta == 0\n"); |
1375 | goto none; | 1375 | goto none; |
@@ -1388,7 +1388,7 @@ irqreturn_t iwl_isr_ict(int irq, void *data) | |||
1388 | iwl_queue_inc_wrap(trans_pcie->ict_index, ICT_COUNT); | 1388 | iwl_queue_inc_wrap(trans_pcie->ict_index, ICT_COUNT); |
1389 | 1389 | ||
1390 | read = le32_to_cpu(trans_pcie->ict_tbl[trans_pcie->ict_index]); | 1390 | read = le32_to_cpu(trans_pcie->ict_tbl[trans_pcie->ict_index]); |
1391 | trace_iwlwifi_dev_ict_read(priv(trans), trans_pcie->ict_index, | 1391 | trace_iwlwifi_dev_ict_read(trans->dev, trans_pcie->ict_index, |
1392 | read); | 1392 | read); |
1393 | } while (read); | 1393 | } while (read); |
1394 | 1394 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c index 2573f7149f16..844606b436ed 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c | |||
@@ -820,7 +820,7 @@ static int iwl_enqueue_hcmd(struct iwl_trans *trans, struct iwl_host_cmd *cmd) | |||
820 | /* check that tracing gets all possible blocks */ | 820 | /* check that tracing gets all possible blocks */ |
821 | BUILD_BUG_ON(IWL_MAX_CMD_TFDS + 1 != 3); | 821 | BUILD_BUG_ON(IWL_MAX_CMD_TFDS + 1 != 3); |
822 | #ifdef CONFIG_IWLWIFI_DEVICE_TRACING | 822 | #ifdef CONFIG_IWLWIFI_DEVICE_TRACING |
823 | trace_iwlwifi_dev_hcmd(priv(trans), cmd->flags, | 823 | trace_iwlwifi_dev_hcmd(trans->dev, cmd->flags, |
824 | trace_bufs[0], trace_lens[0], | 824 | trace_bufs[0], trace_lens[0], |
825 | trace_bufs[1], trace_lens[1], | 825 | trace_bufs[1], trace_lens[1], |
826 | trace_bufs[2], trace_lens[2]); | 826 | trace_bufs[2], trace_lens[2]); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c index 44050fa414d1..ef4e1222a318 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | |||
@@ -1468,7 +1468,7 @@ static int iwl_trans_pcie_tx(struct iwl_trans *trans, struct sk_buff *skb, | |||
1468 | dma_sync_single_for_device(trans->dev, txcmd_phys, firstlen, | 1468 | dma_sync_single_for_device(trans->dev, txcmd_phys, firstlen, |
1469 | DMA_BIDIRECTIONAL); | 1469 | DMA_BIDIRECTIONAL); |
1470 | 1470 | ||
1471 | trace_iwlwifi_dev_tx(priv(trans), | 1471 | trace_iwlwifi_dev_tx(trans->dev, |
1472 | &((struct iwl_tfd *)txq->tfds)[txq->q.write_ptr], | 1472 | &((struct iwl_tfd *)txq->tfds)[txq->q.write_ptr], |
1473 | sizeof(struct iwl_tfd), | 1473 | sizeof(struct iwl_tfd), |
1474 | &dev_cmd->hdr, firstlen, | 1474 | &dev_cmd->hdr, firstlen, |