]>
Commit | Line | Data |
---|---|---|
0a2b8bb2 JB |
1 | #if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define __MAC80211_DRIVER_TRACE | |
3 | ||
4 | #include <linux/tracepoint.h> | |
5 | #include <net/mac80211.h> | |
6 | #include "ieee80211_i.h" | |
7 | ||
0a2b8bb2 JB |
8 | #undef TRACE_SYSTEM |
9 | #define TRACE_SYSTEM mac80211 | |
10 | ||
11 | #define MAXNAME 32 | |
12 | #define LOCAL_ENTRY __array(char, wiphy_name, 32) | |
13 | #define LOCAL_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME) | |
14 | #define LOCAL_PR_FMT "%s" | |
15 | #define LOCAL_PR_ARG __entry->wiphy_name | |
16 | ||
17 | #define STA_ENTRY __array(char, sta_addr, ETH_ALEN) | |
18 | #define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN)) | |
19 | #define STA_PR_FMT " sta:%pM" | |
20 | #define STA_PR_ARG __entry->sta_addr | |
21 | ||
2ca27bcf JB |
22 | #define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \ |
23 | __field(bool, p2p) \ | |
12375ef9 | 24 | __string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>") |
2ca27bcf JB |
25 | #define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \ |
26 | __entry->p2p = sdata->vif.p2p; \ | |
f142c6b9 | 27 | __assign_str(vif_name, sdata->dev ? sdata->dev->name : sdata->name) |
2ca27bcf JB |
28 | #define VIF_PR_FMT " vif:%s(%d%s)" |
29 | #define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : "" | |
0a2b8bb2 | 30 | |
675a0b04 KB |
31 | #define CHANDEF_ENTRY __field(u32, control_freq) \ |
32 | __field(u32, chan_width) \ | |
33 | __field(u32, center_freq1) \ | |
5a32aff3 | 34 | __field(u32, center_freq2) |
675a0b04 KB |
35 | #define CHANDEF_ASSIGN(c) \ |
36 | __entry->control_freq = (c)->chan ? (c)->chan->center_freq : 0; \ | |
37 | __entry->chan_width = (c)->width; \ | |
38 | __entry->center_freq1 = (c)->center_freq1; \ | |
757af6fe | 39 | __entry->center_freq2 = (c)->center_freq2; |
5a32aff3 | 40 | #define CHANDEF_PR_FMT " control:%d MHz width:%d center: %d/%d MHz" |
675a0b04 | 41 | #define CHANDEF_PR_ARG __entry->control_freq, __entry->chan_width, \ |
5a32aff3 JB |
42 | __entry->center_freq1, __entry->center_freq2 |
43 | ||
21f659bf EP |
44 | #define MIN_CHANDEF_ENTRY \ |
45 | __field(u32, min_control_freq) \ | |
46 | __field(u32, min_chan_width) \ | |
47 | __field(u32, min_center_freq1) \ | |
48 | __field(u32, min_center_freq2) | |
49 | ||
50 | #define MIN_CHANDEF_ASSIGN(c) \ | |
51 | __entry->min_control_freq = (c)->chan ? (c)->chan->center_freq : 0; \ | |
52 | __entry->min_chan_width = (c)->width; \ | |
53 | __entry->min_center_freq1 = (c)->center_freq1; \ | |
54 | __entry->min_center_freq2 = (c)->center_freq2; | |
55 | #define MIN_CHANDEF_PR_FMT " min_control:%d MHz min_width:%d min_center: %d/%d MHz" | |
56 | #define MIN_CHANDEF_PR_ARG __entry->min_control_freq, __entry->min_chan_width, \ | |
57 | __entry->min_center_freq1, __entry->min_center_freq2 | |
58 | ||
675a0b04 | 59 | #define CHANCTX_ENTRY CHANDEF_ENTRY \ |
21f659bf | 60 | MIN_CHANDEF_ENTRY \ |
675a0b04 | 61 | __field(u8, rx_chains_static) \ |
04ecd257 | 62 | __field(u8, rx_chains_dynamic) |
675a0b04 | 63 | #define CHANCTX_ASSIGN CHANDEF_ASSIGN(&ctx->conf.def) \ |
21f659bf | 64 | MIN_CHANDEF_ASSIGN(&ctx->conf.min_def) \ |
675a0b04 | 65 | __entry->rx_chains_static = ctx->conf.rx_chains_static; \ |
04ecd257 | 66 | __entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic |
21f659bf EP |
67 | #define CHANCTX_PR_FMT CHANDEF_PR_FMT MIN_CHANDEF_PR_FMT " chains:%d/%d" |
68 | #define CHANCTX_PR_ARG CHANDEF_PR_ARG, MIN_CHANDEF_PR_ARG, \ | |
04ecd257 | 69 | __entry->rx_chains_static, __entry->rx_chains_dynamic |
c3645eac MK |
70 | |
71 | ||
72 | ||
b5878a2d JB |
73 | /* |
74 | * Tracing for driver callbacks. | |
75 | */ | |
76 | ||
ba99d93b | 77 | DECLARE_EVENT_CLASS(local_only_evt, |
4efc76bd JB |
78 | TP_PROTO(struct ieee80211_local *local), |
79 | TP_ARGS(local), | |
80 | TP_STRUCT__entry( | |
81 | LOCAL_ENTRY | |
82 | ), | |
83 | TP_fast_assign( | |
84 | LOCAL_ASSIGN; | |
85 | ), | |
86 | TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG) | |
87 | ); | |
0a2b8bb2 | 88 | |
92ddc111 LC |
89 | DECLARE_EVENT_CLASS(local_sdata_addr_evt, |
90 | TP_PROTO(struct ieee80211_local *local, | |
91 | struct ieee80211_sub_if_data *sdata), | |
92 | TP_ARGS(local, sdata), | |
93 | ||
94 | TP_STRUCT__entry( | |
95 | LOCAL_ENTRY | |
96 | VIF_ENTRY | |
d458cdf7 | 97 | __array(char, addr, ETH_ALEN) |
92ddc111 LC |
98 | ), |
99 | ||
100 | TP_fast_assign( | |
101 | LOCAL_ASSIGN; | |
102 | VIF_ASSIGN; | |
d458cdf7 | 103 | memcpy(__entry->addr, sdata->vif.addr, ETH_ALEN); |
92ddc111 LC |
104 | ), |
105 | ||
106 | TP_printk( | |
107 | LOCAL_PR_FMT VIF_PR_FMT " addr:%pM", | |
108 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr | |
109 | ) | |
110 | ); | |
111 | ||
112 | DECLARE_EVENT_CLASS(local_u32_evt, | |
113 | TP_PROTO(struct ieee80211_local *local, u32 value), | |
114 | TP_ARGS(local, value), | |
115 | ||
116 | TP_STRUCT__entry( | |
117 | LOCAL_ENTRY | |
118 | __field(u32, value) | |
119 | ), | |
120 | ||
121 | TP_fast_assign( | |
122 | LOCAL_ASSIGN; | |
123 | __entry->value = value; | |
124 | ), | |
125 | ||
126 | TP_printk( | |
127 | LOCAL_PR_FMT " value:%d", | |
128 | LOCAL_PR_ARG, __entry->value | |
129 | ) | |
130 | ); | |
131 | ||
79f460ca LC |
132 | DECLARE_EVENT_CLASS(local_sdata_evt, |
133 | TP_PROTO(struct ieee80211_local *local, | |
134 | struct ieee80211_sub_if_data *sdata), | |
135 | TP_ARGS(local, sdata), | |
136 | ||
137 | TP_STRUCT__entry( | |
138 | LOCAL_ENTRY | |
139 | VIF_ENTRY | |
140 | ), | |
141 | ||
142 | TP_fast_assign( | |
143 | LOCAL_ASSIGN; | |
144 | VIF_ASSIGN; | |
145 | ), | |
146 | ||
147 | TP_printk( | |
148 | LOCAL_PR_FMT VIF_PR_FMT, | |
149 | LOCAL_PR_ARG, VIF_PR_ARG | |
150 | ) | |
151 | ); | |
152 | ||
ba99d93b JB |
153 | DEFINE_EVENT(local_only_evt, drv_return_void, |
154 | TP_PROTO(struct ieee80211_local *local), | |
155 | TP_ARGS(local) | |
156 | ); | |
157 | ||
4efc76bd JB |
158 | TRACE_EVENT(drv_return_int, |
159 | TP_PROTO(struct ieee80211_local *local, int ret), | |
0a2b8bb2 | 160 | TP_ARGS(local, ret), |
0a2b8bb2 JB |
161 | TP_STRUCT__entry( |
162 | LOCAL_ENTRY | |
163 | __field(int, ret) | |
164 | ), | |
4efc76bd JB |
165 | TP_fast_assign( |
166 | LOCAL_ASSIGN; | |
167 | __entry->ret = ret; | |
168 | ), | |
169 | TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret) | |
170 | ); | |
0a2b8bb2 | 171 | |
e8306f98 VN |
172 | TRACE_EVENT(drv_return_bool, |
173 | TP_PROTO(struct ieee80211_local *local, bool ret), | |
174 | TP_ARGS(local, ret), | |
175 | TP_STRUCT__entry( | |
176 | LOCAL_ENTRY | |
177 | __field(bool, ret) | |
178 | ), | |
179 | TP_fast_assign( | |
180 | LOCAL_ASSIGN; | |
181 | __entry->ret = ret; | |
182 | ), | |
183 | TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ? | |
184 | "true" : "false") | |
185 | ); | |
186 | ||
4efc76bd JB |
187 | TRACE_EVENT(drv_return_u64, |
188 | TP_PROTO(struct ieee80211_local *local, u64 ret), | |
189 | TP_ARGS(local, ret), | |
190 | TP_STRUCT__entry( | |
191 | LOCAL_ENTRY | |
192 | __field(u64, ret) | |
193 | ), | |
0a2b8bb2 JB |
194 | TP_fast_assign( |
195 | LOCAL_ASSIGN; | |
196 | __entry->ret = ret; | |
197 | ), | |
4efc76bd JB |
198 | TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret) |
199 | ); | |
200 | ||
ba99d93b | 201 | DEFINE_EVENT(local_only_evt, drv_start, |
4efc76bd | 202 | TP_PROTO(struct ieee80211_local *local), |
ba99d93b | 203 | TP_ARGS(local) |
0a2b8bb2 JB |
204 | ); |
205 | ||
e352114f BG |
206 | DEFINE_EVENT(local_u32_evt, drv_get_et_strings, |
207 | TP_PROTO(struct ieee80211_local *local, u32 sset), | |
208 | TP_ARGS(local, sset) | |
209 | ); | |
210 | ||
211 | DEFINE_EVENT(local_u32_evt, drv_get_et_sset_count, | |
212 | TP_PROTO(struct ieee80211_local *local, u32 sset), | |
213 | TP_ARGS(local, sset) | |
214 | ); | |
215 | ||
216 | DEFINE_EVENT(local_only_evt, drv_get_et_stats, | |
217 | TP_PROTO(struct ieee80211_local *local), | |
218 | TP_ARGS(local) | |
219 | ); | |
220 | ||
eecc4800 JB |
221 | DEFINE_EVENT(local_only_evt, drv_suspend, |
222 | TP_PROTO(struct ieee80211_local *local), | |
223 | TP_ARGS(local) | |
224 | ); | |
225 | ||
226 | DEFINE_EVENT(local_only_evt, drv_resume, | |
227 | TP_PROTO(struct ieee80211_local *local), | |
228 | TP_ARGS(local) | |
229 | ); | |
230 | ||
6d52563f JB |
231 | TRACE_EVENT(drv_set_wakeup, |
232 | TP_PROTO(struct ieee80211_local *local, bool enabled), | |
233 | TP_ARGS(local, enabled), | |
234 | TP_STRUCT__entry( | |
235 | LOCAL_ENTRY | |
236 | __field(bool, enabled) | |
237 | ), | |
238 | TP_fast_assign( | |
239 | LOCAL_ASSIGN; | |
240 | __entry->enabled = enabled; | |
241 | ), | |
242 | TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled) | |
243 | ); | |
244 | ||
ba99d93b | 245 | DEFINE_EVENT(local_only_evt, drv_stop, |
0a2b8bb2 | 246 | TP_PROTO(struct ieee80211_local *local), |
ba99d93b | 247 | TP_ARGS(local) |
0a2b8bb2 JB |
248 | ); |
249 | ||
92ddc111 | 250 | DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface, |
0a2b8bb2 | 251 | TP_PROTO(struct ieee80211_local *local, |
4efc76bd | 252 | struct ieee80211_sub_if_data *sdata), |
92ddc111 | 253 | TP_ARGS(local, sdata) |
0a2b8bb2 JB |
254 | ); |
255 | ||
34d4bc4d JB |
256 | TRACE_EVENT(drv_change_interface, |
257 | TP_PROTO(struct ieee80211_local *local, | |
258 | struct ieee80211_sub_if_data *sdata, | |
2ca27bcf | 259 | enum nl80211_iftype type, bool p2p), |
34d4bc4d | 260 | |
2ca27bcf | 261 | TP_ARGS(local, sdata, type, p2p), |
34d4bc4d JB |
262 | |
263 | TP_STRUCT__entry( | |
264 | LOCAL_ENTRY | |
265 | VIF_ENTRY | |
266 | __field(u32, new_type) | |
2ca27bcf | 267 | __field(bool, new_p2p) |
34d4bc4d JB |
268 | ), |
269 | ||
270 | TP_fast_assign( | |
271 | LOCAL_ASSIGN; | |
272 | VIF_ASSIGN; | |
273 | __entry->new_type = type; | |
2ca27bcf | 274 | __entry->new_p2p = p2p; |
34d4bc4d JB |
275 | ), |
276 | ||
277 | TP_printk( | |
2ca27bcf JB |
278 | LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s", |
279 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type, | |
280 | __entry->new_p2p ? "/p2p" : "" | |
34d4bc4d JB |
281 | ) |
282 | ); | |
283 | ||
92ddc111 LC |
284 | DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface, |
285 | TP_PROTO(struct ieee80211_local *local, | |
286 | struct ieee80211_sub_if_data *sdata), | |
287 | TP_ARGS(local, sdata) | |
0a2b8bb2 JB |
288 | ); |
289 | ||
290 | TRACE_EVENT(drv_config, | |
291 | TP_PROTO(struct ieee80211_local *local, | |
4efc76bd | 292 | u32 changed), |
0a2b8bb2 | 293 | |
4efc76bd | 294 | TP_ARGS(local, changed), |
0a2b8bb2 JB |
295 | |
296 | TP_STRUCT__entry( | |
297 | LOCAL_ENTRY | |
298 | __field(u32, changed) | |
f911ab83 JB |
299 | __field(u32, flags) |
300 | __field(int, power_level) | |
301 | __field(int, dynamic_ps_timeout) | |
302 | __field(int, max_sleep_period) | |
303 | __field(u16, listen_interval) | |
304 | __field(u8, long_frame_max_tx_count) | |
305 | __field(u8, short_frame_max_tx_count) | |
675a0b04 | 306 | CHANDEF_ENTRY |
0f78231b | 307 | __field(int, smps) |
0a2b8bb2 JB |
308 | ), |
309 | ||
310 | TP_fast_assign( | |
311 | LOCAL_ASSIGN; | |
312 | __entry->changed = changed; | |
f911ab83 JB |
313 | __entry->flags = local->hw.conf.flags; |
314 | __entry->power_level = local->hw.conf.power_level; | |
315 | __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout; | |
316 | __entry->max_sleep_period = local->hw.conf.max_sleep_period; | |
317 | __entry->listen_interval = local->hw.conf.listen_interval; | |
3d01be72 JB |
318 | __entry->long_frame_max_tx_count = |
319 | local->hw.conf.long_frame_max_tx_count; | |
320 | __entry->short_frame_max_tx_count = | |
321 | local->hw.conf.short_frame_max_tx_count; | |
675a0b04 | 322 | CHANDEF_ASSIGN(&local->hw.conf.chandef) |
0f78231b | 323 | __entry->smps = local->hw.conf.smps_mode; |
0a2b8bb2 JB |
324 | ), |
325 | ||
326 | TP_printk( | |
675a0b04 KB |
327 | LOCAL_PR_FMT " ch:%#x" CHANDEF_PR_FMT, |
328 | LOCAL_PR_ARG, __entry->changed, CHANDEF_PR_ARG | |
0a2b8bb2 JB |
329 | ) |
330 | ); | |
331 | ||
332 | TRACE_EVENT(drv_bss_info_changed, | |
333 | TP_PROTO(struct ieee80211_local *local, | |
12375ef9 | 334 | struct ieee80211_sub_if_data *sdata, |
0a2b8bb2 JB |
335 | struct ieee80211_bss_conf *info, |
336 | u32 changed), | |
337 | ||
12375ef9 | 338 | TP_ARGS(local, sdata, info, changed), |
0a2b8bb2 JB |
339 | |
340 | TP_STRUCT__entry( | |
341 | LOCAL_ENTRY | |
342 | VIF_ENTRY | |
1724ffbc | 343 | __field(u32, changed) |
0a2b8bb2 | 344 | __field(bool, assoc) |
1724ffbc JB |
345 | __field(bool, ibss_joined) |
346 | __field(bool, ibss_creator) | |
0a2b8bb2 JB |
347 | __field(u16, aid) |
348 | __field(bool, cts) | |
349 | __field(bool, shortpre) | |
350 | __field(bool, shortslot) | |
1724ffbc | 351 | __field(bool, enable_beacon) |
0a2b8bb2 JB |
352 | __field(u8, dtimper) |
353 | __field(u16, bcnint) | |
354 | __field(u16, assoc_cap) | |
8c358bcd JB |
355 | __field(u64, sync_tsf) |
356 | __field(u32, sync_device_ts) | |
ef429dad | 357 | __field(u8, sync_dtim_count) |
0a2b8bb2 | 358 | __field(u32, basic_rates) |
1724ffbc | 359 | __array(int, mcast_rate, IEEE80211_NUM_BANDS) |
f911ab83 | 360 | __field(u16, ht_operation_mode) |
1724ffbc JB |
361 | __field(s32, cqm_rssi_thold); |
362 | __field(s32, cqm_rssi_hyst); | |
4bf88530 JB |
363 | __field(u32, channel_width); |
364 | __field(u32, channel_cfreq1); | |
0f19b41e JB |
365 | __dynamic_array(u32, arp_addr_list, |
366 | info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ? | |
367 | IEEE80211_BSS_ARP_ADDR_LIST_LEN : | |
368 | info->arp_addr_cnt); | |
369 | __field(int, arp_addr_cnt); | |
1724ffbc JB |
370 | __field(bool, qos); |
371 | __field(bool, idle); | |
372 | __field(bool, ps); | |
373 | __dynamic_array(u8, ssid, info->ssid_len); | |
374 | __field(bool, hidden_ssid); | |
1ea6f9c0 | 375 | __field(int, txpower) |
67baf663 | 376 | __field(u8, p2p_oppps_ctwindow) |
0a2b8bb2 JB |
377 | ), |
378 | ||
379 | TP_fast_assign( | |
380 | LOCAL_ASSIGN; | |
381 | VIF_ASSIGN; | |
382 | __entry->changed = changed; | |
383 | __entry->aid = info->aid; | |
384 | __entry->assoc = info->assoc; | |
1724ffbc JB |
385 | __entry->ibss_joined = info->ibss_joined; |
386 | __entry->ibss_creator = info->ibss_creator; | |
0a2b8bb2 JB |
387 | __entry->shortpre = info->use_short_preamble; |
388 | __entry->cts = info->use_cts_prot; | |
389 | __entry->shortslot = info->use_short_slot; | |
1724ffbc | 390 | __entry->enable_beacon = info->enable_beacon; |
0a2b8bb2 JB |
391 | __entry->dtimper = info->dtim_period; |
392 | __entry->bcnint = info->beacon_int; | |
393 | __entry->assoc_cap = info->assoc_capability; | |
8c358bcd JB |
394 | __entry->sync_tsf = info->sync_tsf; |
395 | __entry->sync_device_ts = info->sync_device_ts; | |
ef429dad | 396 | __entry->sync_dtim_count = info->sync_dtim_count; |
0a2b8bb2 | 397 | __entry->basic_rates = info->basic_rates; |
1724ffbc JB |
398 | memcpy(__entry->mcast_rate, info->mcast_rate, |
399 | sizeof(__entry->mcast_rate)); | |
f911ab83 | 400 | __entry->ht_operation_mode = info->ht_operation_mode; |
1724ffbc JB |
401 | __entry->cqm_rssi_thold = info->cqm_rssi_thold; |
402 | __entry->cqm_rssi_hyst = info->cqm_rssi_hyst; | |
4bf88530 JB |
403 | __entry->channel_width = info->chandef.width; |
404 | __entry->channel_cfreq1 = info->chandef.center_freq1; | |
0f19b41e | 405 | __entry->arp_addr_cnt = info->arp_addr_cnt; |
1724ffbc | 406 | memcpy(__get_dynamic_array(arp_addr_list), info->arp_addr_list, |
0f19b41e JB |
407 | sizeof(u32) * (info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ? |
408 | IEEE80211_BSS_ARP_ADDR_LIST_LEN : | |
409 | info->arp_addr_cnt)); | |
1724ffbc JB |
410 | __entry->qos = info->qos; |
411 | __entry->idle = info->idle; | |
412 | __entry->ps = info->ps; | |
413 | memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len); | |
414 | __entry->hidden_ssid = info->hidden_ssid; | |
1ea6f9c0 | 415 | __entry->txpower = info->txpower; |
67baf663 | 416 | __entry->p2p_oppps_ctwindow = info->p2p_noa_attr.oppps_ctwindow; |
0a2b8bb2 JB |
417 | ), |
418 | ||
419 | TP_printk( | |
420 | LOCAL_PR_FMT VIF_PR_FMT " changed:%#x", | |
421 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed | |
422 | ) | |
423 | ); | |
424 | ||
3ac64bee | 425 | TRACE_EVENT(drv_prepare_multicast, |
4efc76bd | 426 | TP_PROTO(struct ieee80211_local *local, int mc_count), |
3ac64bee | 427 | |
4efc76bd | 428 | TP_ARGS(local, mc_count), |
3ac64bee JB |
429 | |
430 | TP_STRUCT__entry( | |
431 | LOCAL_ENTRY | |
432 | __field(int, mc_count) | |
3ac64bee JB |
433 | ), |
434 | ||
435 | TP_fast_assign( | |
436 | LOCAL_ASSIGN; | |
437 | __entry->mc_count = mc_count; | |
3ac64bee JB |
438 | ), |
439 | ||
440 | TP_printk( | |
4efc76bd JB |
441 | LOCAL_PR_FMT " prepare mc (%d)", |
442 | LOCAL_PR_ARG, __entry->mc_count | |
3ac64bee JB |
443 | ) |
444 | ); | |
445 | ||
0a2b8bb2 JB |
446 | TRACE_EVENT(drv_configure_filter, |
447 | TP_PROTO(struct ieee80211_local *local, | |
448 | unsigned int changed_flags, | |
449 | unsigned int *total_flags, | |
3ac64bee | 450 | u64 multicast), |
0a2b8bb2 | 451 | |
3ac64bee | 452 | TP_ARGS(local, changed_flags, total_flags, multicast), |
0a2b8bb2 JB |
453 | |
454 | TP_STRUCT__entry( | |
455 | LOCAL_ENTRY | |
456 | __field(unsigned int, changed) | |
457 | __field(unsigned int, total) | |
3ac64bee | 458 | __field(u64, multicast) |
0a2b8bb2 JB |
459 | ), |
460 | ||
461 | TP_fast_assign( | |
462 | LOCAL_ASSIGN; | |
463 | __entry->changed = changed_flags; | |
464 | __entry->total = *total_flags; | |
3ac64bee | 465 | __entry->multicast = multicast; |
0a2b8bb2 JB |
466 | ), |
467 | ||
468 | TP_printk( | |
3ac64bee JB |
469 | LOCAL_PR_FMT " changed:%#x total:%#x", |
470 | LOCAL_PR_ARG, __entry->changed, __entry->total | |
0a2b8bb2 JB |
471 | ) |
472 | ); | |
473 | ||
474 | TRACE_EVENT(drv_set_tim, | |
475 | TP_PROTO(struct ieee80211_local *local, | |
4efc76bd | 476 | struct ieee80211_sta *sta, bool set), |
0a2b8bb2 | 477 | |
4efc76bd | 478 | TP_ARGS(local, sta, set), |
0a2b8bb2 JB |
479 | |
480 | TP_STRUCT__entry( | |
481 | LOCAL_ENTRY | |
482 | STA_ENTRY | |
483 | __field(bool, set) | |
0a2b8bb2 JB |
484 | ), |
485 | ||
486 | TP_fast_assign( | |
487 | LOCAL_ASSIGN; | |
488 | STA_ASSIGN; | |
489 | __entry->set = set; | |
0a2b8bb2 JB |
490 | ), |
491 | ||
492 | TP_printk( | |
4efc76bd | 493 | LOCAL_PR_FMT STA_PR_FMT " set:%d", |
15ac7c47 | 494 | LOCAL_PR_ARG, STA_PR_ARG, __entry->set |
0a2b8bb2 JB |
495 | ) |
496 | ); | |
497 | ||
498 | TRACE_EVENT(drv_set_key, | |
499 | TP_PROTO(struct ieee80211_local *local, | |
12375ef9 | 500 | enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata, |
0a2b8bb2 | 501 | struct ieee80211_sta *sta, |
4efc76bd | 502 | struct ieee80211_key_conf *key), |
0a2b8bb2 | 503 | |
4efc76bd | 504 | TP_ARGS(local, cmd, sdata, sta, key), |
0a2b8bb2 JB |
505 | |
506 | TP_STRUCT__entry( | |
507 | LOCAL_ENTRY | |
508 | VIF_ENTRY | |
509 | STA_ENTRY | |
97359d12 | 510 | __field(u32, cipher) |
0a2b8bb2 JB |
511 | __field(u8, hw_key_idx) |
512 | __field(u8, flags) | |
513 | __field(s8, keyidx) | |
0a2b8bb2 JB |
514 | ), |
515 | ||
516 | TP_fast_assign( | |
517 | LOCAL_ASSIGN; | |
518 | VIF_ASSIGN; | |
519 | STA_ASSIGN; | |
97359d12 | 520 | __entry->cipher = key->cipher; |
0a2b8bb2 JB |
521 | __entry->flags = key->flags; |
522 | __entry->keyidx = key->keyidx; | |
523 | __entry->hw_key_idx = key->hw_key_idx; | |
0a2b8bb2 JB |
524 | ), |
525 | ||
526 | TP_printk( | |
4efc76bd JB |
527 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT, |
528 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG | |
0a2b8bb2 JB |
529 | ) |
530 | ); | |
531 | ||
532 | TRACE_EVENT(drv_update_tkip_key, | |
533 | TP_PROTO(struct ieee80211_local *local, | |
b3fbdcf4 | 534 | struct ieee80211_sub_if_data *sdata, |
0a2b8bb2 | 535 | struct ieee80211_key_conf *conf, |
b3fbdcf4 | 536 | struct ieee80211_sta *sta, u32 iv32), |
0a2b8bb2 | 537 | |
b3fbdcf4 | 538 | TP_ARGS(local, sdata, conf, sta, iv32), |
0a2b8bb2 JB |
539 | |
540 | TP_STRUCT__entry( | |
541 | LOCAL_ENTRY | |
b3fbdcf4 JB |
542 | VIF_ENTRY |
543 | STA_ENTRY | |
0a2b8bb2 JB |
544 | __field(u32, iv32) |
545 | ), | |
546 | ||
547 | TP_fast_assign( | |
548 | LOCAL_ASSIGN; | |
b3fbdcf4 JB |
549 | VIF_ASSIGN; |
550 | STA_ASSIGN; | |
0a2b8bb2 JB |
551 | __entry->iv32 = iv32; |
552 | ), | |
553 | ||
554 | TP_printk( | |
b3fbdcf4 JB |
555 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x", |
556 | LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32 | |
0a2b8bb2 JB |
557 | ) |
558 | ); | |
559 | ||
79f460ca | 560 | DEFINE_EVENT(local_sdata_evt, drv_hw_scan, |
0a2b8bb2 | 561 | TP_PROTO(struct ieee80211_local *local, |
79f460ca LC |
562 | struct ieee80211_sub_if_data *sdata), |
563 | TP_ARGS(local, sdata) | |
564 | ); | |
0a2b8bb2 | 565 | |
b856439b EP |
566 | DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan, |
567 | TP_PROTO(struct ieee80211_local *local, | |
568 | struct ieee80211_sub_if_data *sdata), | |
569 | TP_ARGS(local, sdata) | |
570 | ); | |
571 | ||
79f460ca LC |
572 | DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start, |
573 | TP_PROTO(struct ieee80211_local *local, | |
574 | struct ieee80211_sub_if_data *sdata), | |
575 | TP_ARGS(local, sdata) | |
576 | ); | |
0a2b8bb2 | 577 | |
79f460ca LC |
578 | DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop, |
579 | TP_PROTO(struct ieee80211_local *local, | |
580 | struct ieee80211_sub_if_data *sdata), | |
581 | TP_ARGS(local, sdata) | |
0a2b8bb2 JB |
582 | ); |
583 | ||
ba99d93b | 584 | DEFINE_EVENT(local_only_evt, drv_sw_scan_start, |
0a2b8bb2 | 585 | TP_PROTO(struct ieee80211_local *local), |
ba99d93b | 586 | TP_ARGS(local) |
0a2b8bb2 JB |
587 | ); |
588 | ||
ba99d93b | 589 | DEFINE_EVENT(local_only_evt, drv_sw_scan_complete, |
0a2b8bb2 | 590 | TP_PROTO(struct ieee80211_local *local), |
ba99d93b | 591 | TP_ARGS(local) |
0a2b8bb2 JB |
592 | ); |
593 | ||
594 | TRACE_EVENT(drv_get_stats, | |
595 | TP_PROTO(struct ieee80211_local *local, | |
596 | struct ieee80211_low_level_stats *stats, | |
597 | int ret), | |
598 | ||
599 | TP_ARGS(local, stats, ret), | |
600 | ||
601 | TP_STRUCT__entry( | |
602 | LOCAL_ENTRY | |
603 | __field(int, ret) | |
604 | __field(unsigned int, ackfail) | |
605 | __field(unsigned int, rtsfail) | |
606 | __field(unsigned int, fcserr) | |
607 | __field(unsigned int, rtssucc) | |
608 | ), | |
609 | ||
610 | TP_fast_assign( | |
611 | LOCAL_ASSIGN; | |
612 | __entry->ret = ret; | |
613 | __entry->ackfail = stats->dot11ACKFailureCount; | |
614 | __entry->rtsfail = stats->dot11RTSFailureCount; | |
615 | __entry->fcserr = stats->dot11FCSErrorCount; | |
616 | __entry->rtssucc = stats->dot11RTSSuccessCount; | |
617 | ), | |
618 | ||
619 | TP_printk( | |
620 | LOCAL_PR_FMT " ret:%d", | |
621 | LOCAL_PR_ARG, __entry->ret | |
622 | ) | |
623 | ); | |
624 | ||
625 | TRACE_EVENT(drv_get_tkip_seq, | |
626 | TP_PROTO(struct ieee80211_local *local, | |
627 | u8 hw_key_idx, u32 *iv32, u16 *iv16), | |
628 | ||
629 | TP_ARGS(local, hw_key_idx, iv32, iv16), | |
630 | ||
631 | TP_STRUCT__entry( | |
632 | LOCAL_ENTRY | |
633 | __field(u8, hw_key_idx) | |
634 | __field(u32, iv32) | |
635 | __field(u16, iv16) | |
636 | ), | |
637 | ||
638 | TP_fast_assign( | |
639 | LOCAL_ASSIGN; | |
640 | __entry->hw_key_idx = hw_key_idx; | |
641 | __entry->iv32 = *iv32; | |
642 | __entry->iv16 = *iv16; | |
643 | ), | |
644 | ||
645 | TP_printk( | |
646 | LOCAL_PR_FMT, LOCAL_PR_ARG | |
647 | ) | |
648 | ); | |
649 | ||
92ddc111 | 650 | DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold, |
f23a4780 | 651 | TP_PROTO(struct ieee80211_local *local, u32 value), |
92ddc111 | 652 | TP_ARGS(local, value) |
f23a4780 AN |
653 | ); |
654 | ||
92ddc111 | 655 | DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold, |
4efc76bd | 656 | TP_PROTO(struct ieee80211_local *local, u32 value), |
92ddc111 | 657 | TP_ARGS(local, value) |
310bc676 LT |
658 | ); |
659 | ||
660 | TRACE_EVENT(drv_set_coverage_class, | |
4efc76bd | 661 | TP_PROTO(struct ieee80211_local *local, u8 value), |
310bc676 | 662 | |
4efc76bd | 663 | TP_ARGS(local, value), |
310bc676 LT |
664 | |
665 | TP_STRUCT__entry( | |
666 | LOCAL_ENTRY | |
667 | __field(u8, value) | |
310bc676 LT |
668 | ), |
669 | ||
670 | TP_fast_assign( | |
0a2b8bb2 | 671 | LOCAL_ASSIGN; |
0a2b8bb2 JB |
672 | __entry->value = value; |
673 | ), | |
674 | ||
675 | TP_printk( | |
4efc76bd JB |
676 | LOCAL_PR_FMT " value:%d", |
677 | LOCAL_PR_ARG, __entry->value | |
0a2b8bb2 JB |
678 | ) |
679 | ); | |
680 | ||
681 | TRACE_EVENT(drv_sta_notify, | |
682 | TP_PROTO(struct ieee80211_local *local, | |
12375ef9 | 683 | struct ieee80211_sub_if_data *sdata, |
0a2b8bb2 JB |
684 | enum sta_notify_cmd cmd, |
685 | struct ieee80211_sta *sta), | |
686 | ||
12375ef9 | 687 | TP_ARGS(local, sdata, cmd, sta), |
0a2b8bb2 JB |
688 | |
689 | TP_STRUCT__entry( | |
690 | LOCAL_ENTRY | |
691 | VIF_ENTRY | |
692 | STA_ENTRY | |
693 | __field(u32, cmd) | |
694 | ), | |
695 | ||
696 | TP_fast_assign( | |
697 | LOCAL_ASSIGN; | |
698 | VIF_ASSIGN; | |
699 | STA_ASSIGN; | |
700 | __entry->cmd = cmd; | |
701 | ), | |
702 | ||
703 | TP_printk( | |
704 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d", | |
705 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd | |
706 | ) | |
707 | ); | |
708 | ||
f09603a2 JB |
709 | TRACE_EVENT(drv_sta_state, |
710 | TP_PROTO(struct ieee80211_local *local, | |
711 | struct ieee80211_sub_if_data *sdata, | |
712 | struct ieee80211_sta *sta, | |
713 | enum ieee80211_sta_state old_state, | |
714 | enum ieee80211_sta_state new_state), | |
715 | ||
716 | TP_ARGS(local, sdata, sta, old_state, new_state), | |
717 | ||
718 | TP_STRUCT__entry( | |
719 | LOCAL_ENTRY | |
720 | VIF_ENTRY | |
721 | STA_ENTRY | |
722 | __field(u32, old_state) | |
723 | __field(u32, new_state) | |
724 | ), | |
725 | ||
726 | TP_fast_assign( | |
727 | LOCAL_ASSIGN; | |
728 | VIF_ASSIGN; | |
729 | STA_ASSIGN; | |
730 | __entry->old_state = old_state; | |
731 | __entry->new_state = new_state; | |
732 | ), | |
733 | ||
734 | TP_printk( | |
735 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d", | |
736 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, | |
737 | __entry->old_state, __entry->new_state | |
738 | ) | |
739 | ); | |
740 | ||
8f727ef3 JB |
741 | TRACE_EVENT(drv_sta_rc_update, |
742 | TP_PROTO(struct ieee80211_local *local, | |
743 | struct ieee80211_sub_if_data *sdata, | |
744 | struct ieee80211_sta *sta, | |
745 | u32 changed), | |
746 | ||
747 | TP_ARGS(local, sdata, sta, changed), | |
748 | ||
749 | TP_STRUCT__entry( | |
750 | LOCAL_ENTRY | |
751 | VIF_ENTRY | |
752 | STA_ENTRY | |
753 | __field(u32, changed) | |
754 | ), | |
755 | ||
756 | TP_fast_assign( | |
757 | LOCAL_ASSIGN; | |
758 | VIF_ASSIGN; | |
759 | STA_ASSIGN; | |
760 | __entry->changed = changed; | |
761 | ), | |
762 | ||
763 | TP_printk( | |
764 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x", | |
765 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed | |
766 | ) | |
767 | ); | |
768 | ||
34e89507 JB |
769 | TRACE_EVENT(drv_sta_add, |
770 | TP_PROTO(struct ieee80211_local *local, | |
771 | struct ieee80211_sub_if_data *sdata, | |
4efc76bd | 772 | struct ieee80211_sta *sta), |
34e89507 | 773 | |
4efc76bd | 774 | TP_ARGS(local, sdata, sta), |
34e89507 JB |
775 | |
776 | TP_STRUCT__entry( | |
777 | LOCAL_ENTRY | |
778 | VIF_ENTRY | |
779 | STA_ENTRY | |
34e89507 JB |
780 | ), |
781 | ||
782 | TP_fast_assign( | |
783 | LOCAL_ASSIGN; | |
784 | VIF_ASSIGN; | |
785 | STA_ASSIGN; | |
34e89507 JB |
786 | ), |
787 | ||
788 | TP_printk( | |
4efc76bd JB |
789 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT, |
790 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG | |
34e89507 JB |
791 | ) |
792 | ); | |
793 | ||
794 | TRACE_EVENT(drv_sta_remove, | |
795 | TP_PROTO(struct ieee80211_local *local, | |
796 | struct ieee80211_sub_if_data *sdata, | |
797 | struct ieee80211_sta *sta), | |
798 | ||
799 | TP_ARGS(local, sdata, sta), | |
800 | ||
801 | TP_STRUCT__entry( | |
802 | LOCAL_ENTRY | |
803 | VIF_ENTRY | |
804 | STA_ENTRY | |
805 | ), | |
806 | ||
807 | TP_fast_assign( | |
808 | LOCAL_ASSIGN; | |
809 | VIF_ASSIGN; | |
810 | STA_ASSIGN; | |
811 | ), | |
812 | ||
813 | TP_printk( | |
814 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT, | |
815 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG | |
816 | ) | |
817 | ); | |
818 | ||
0a2b8bb2 | 819 | TRACE_EVENT(drv_conf_tx, |
f6f3def3 EP |
820 | TP_PROTO(struct ieee80211_local *local, |
821 | struct ieee80211_sub_if_data *sdata, | |
a3304b0a | 822 | u16 ac, const struct ieee80211_tx_queue_params *params), |
0a2b8bb2 | 823 | |
a3304b0a | 824 | TP_ARGS(local, sdata, ac, params), |
0a2b8bb2 JB |
825 | |
826 | TP_STRUCT__entry( | |
827 | LOCAL_ENTRY | |
f6f3def3 | 828 | VIF_ENTRY |
a3304b0a | 829 | __field(u16, ac) |
0a2b8bb2 JB |
830 | __field(u16, txop) |
831 | __field(u16, cw_min) | |
832 | __field(u16, cw_max) | |
833 | __field(u8, aifs) | |
f6f3def3 | 834 | __field(bool, uapsd) |
0a2b8bb2 JB |
835 | ), |
836 | ||
837 | TP_fast_assign( | |
838 | LOCAL_ASSIGN; | |
f6f3def3 | 839 | VIF_ASSIGN; |
a3304b0a | 840 | __entry->ac = ac; |
0a2b8bb2 JB |
841 | __entry->txop = params->txop; |
842 | __entry->cw_max = params->cw_max; | |
843 | __entry->cw_min = params->cw_min; | |
844 | __entry->aifs = params->aifs; | |
f6f3def3 | 845 | __entry->uapsd = params->uapsd; |
0a2b8bb2 JB |
846 | ), |
847 | ||
848 | TP_printk( | |
a3304b0a JB |
849 | LOCAL_PR_FMT VIF_PR_FMT " AC:%d", |
850 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac | |
0a2b8bb2 JB |
851 | ) |
852 | ); | |
853 | ||
37a41b4a EP |
854 | DEFINE_EVENT(local_sdata_evt, drv_get_tsf, |
855 | TP_PROTO(struct ieee80211_local *local, | |
856 | struct ieee80211_sub_if_data *sdata), | |
857 | TP_ARGS(local, sdata) | |
0a2b8bb2 JB |
858 | ); |
859 | ||
860 | TRACE_EVENT(drv_set_tsf, | |
37a41b4a EP |
861 | TP_PROTO(struct ieee80211_local *local, |
862 | struct ieee80211_sub_if_data *sdata, | |
863 | u64 tsf), | |
0a2b8bb2 | 864 | |
37a41b4a | 865 | TP_ARGS(local, sdata, tsf), |
0a2b8bb2 JB |
866 | |
867 | TP_STRUCT__entry( | |
868 | LOCAL_ENTRY | |
37a41b4a | 869 | VIF_ENTRY |
0a2b8bb2 JB |
870 | __field(u64, tsf) |
871 | ), | |
872 | ||
873 | TP_fast_assign( | |
874 | LOCAL_ASSIGN; | |
37a41b4a | 875 | VIF_ASSIGN; |
0a2b8bb2 JB |
876 | __entry->tsf = tsf; |
877 | ), | |
878 | ||
879 | TP_printk( | |
37a41b4a EP |
880 | LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu", |
881 | LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf | |
0a2b8bb2 JB |
882 | ) |
883 | ); | |
884 | ||
37a41b4a EP |
885 | DEFINE_EVENT(local_sdata_evt, drv_reset_tsf, |
886 | TP_PROTO(struct ieee80211_local *local, | |
887 | struct ieee80211_sub_if_data *sdata), | |
888 | TP_ARGS(local, sdata) | |
0a2b8bb2 JB |
889 | ); |
890 | ||
ba99d93b | 891 | DEFINE_EVENT(local_only_evt, drv_tx_last_beacon, |
4efc76bd | 892 | TP_PROTO(struct ieee80211_local *local), |
ba99d93b | 893 | TP_ARGS(local) |
0a2b8bb2 JB |
894 | ); |
895 | ||
896 | TRACE_EVENT(drv_ampdu_action, | |
897 | TP_PROTO(struct ieee80211_local *local, | |
12375ef9 | 898 | struct ieee80211_sub_if_data *sdata, |
0a2b8bb2 JB |
899 | enum ieee80211_ampdu_mlme_action action, |
900 | struct ieee80211_sta *sta, u16 tid, | |
0b01f030 | 901 | u16 *ssn, u8 buf_size), |
0a2b8bb2 | 902 | |
0b01f030 | 903 | TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size), |
0a2b8bb2 JB |
904 | |
905 | TP_STRUCT__entry( | |
906 | LOCAL_ENTRY | |
907 | STA_ENTRY | |
908 | __field(u32, action) | |
909 | __field(u16, tid) | |
910 | __field(u16, ssn) | |
0b01f030 | 911 | __field(u8, buf_size) |
c951ad35 | 912 | VIF_ENTRY |
0a2b8bb2 JB |
913 | ), |
914 | ||
915 | TP_fast_assign( | |
916 | LOCAL_ASSIGN; | |
c951ad35 | 917 | VIF_ASSIGN; |
0a2b8bb2 | 918 | STA_ASSIGN; |
0a2b8bb2 JB |
919 | __entry->action = action; |
920 | __entry->tid = tid; | |
3092ad05 | 921 | __entry->ssn = ssn ? *ssn : 0; |
0b01f030 | 922 | __entry->buf_size = buf_size; |
0a2b8bb2 JB |
923 | ), |
924 | ||
925 | TP_printk( | |
0b01f030 JB |
926 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d", |
927 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action, | |
928 | __entry->tid, __entry->buf_size | |
0a2b8bb2 JB |
929 | ) |
930 | ); | |
a80f7c0b | 931 | |
c466d4ef JL |
932 | TRACE_EVENT(drv_get_survey, |
933 | TP_PROTO(struct ieee80211_local *local, int idx, | |
934 | struct survey_info *survey), | |
935 | ||
936 | TP_ARGS(local, idx, survey), | |
937 | ||
938 | TP_STRUCT__entry( | |
939 | LOCAL_ENTRY | |
940 | __field(int, idx) | |
941 | ), | |
942 | ||
943 | TP_fast_assign( | |
944 | LOCAL_ASSIGN; | |
945 | __entry->idx = idx; | |
946 | ), | |
947 | ||
948 | TP_printk( | |
949 | LOCAL_PR_FMT " idx:%d", | |
950 | LOCAL_PR_ARG, __entry->idx | |
951 | ) | |
952 | ); | |
953 | ||
a80f7c0b | 954 | TRACE_EVENT(drv_flush, |
39ecc01d JB |
955 | TP_PROTO(struct ieee80211_local *local, |
956 | u32 queues, bool drop), | |
a80f7c0b | 957 | |
39ecc01d | 958 | TP_ARGS(local, queues, drop), |
a80f7c0b JB |
959 | |
960 | TP_STRUCT__entry( | |
961 | LOCAL_ENTRY | |
962 | __field(bool, drop) | |
39ecc01d | 963 | __field(u32, queues) |
a80f7c0b JB |
964 | ), |
965 | ||
966 | TP_fast_assign( | |
967 | LOCAL_ASSIGN; | |
968 | __entry->drop = drop; | |
39ecc01d | 969 | __entry->queues = queues; |
a80f7c0b JB |
970 | ), |
971 | ||
972 | TP_printk( | |
39ecc01d JB |
973 | LOCAL_PR_FMT " queues:0x%x drop:%d", |
974 | LOCAL_PR_ARG, __entry->queues, __entry->drop | |
a80f7c0b JB |
975 | ) |
976 | ); | |
b5878a2d | 977 | |
5ce6e438 JB |
978 | TRACE_EVENT(drv_channel_switch, |
979 | TP_PROTO(struct ieee80211_local *local, | |
980 | struct ieee80211_channel_switch *ch_switch), | |
981 | ||
982 | TP_ARGS(local, ch_switch), | |
983 | ||
984 | TP_STRUCT__entry( | |
985 | LOCAL_ENTRY | |
85220d71 | 986 | CHANDEF_ENTRY |
5ce6e438 JB |
987 | __field(u64, timestamp) |
988 | __field(bool, block_tx) | |
5ce6e438 JB |
989 | __field(u8, count) |
990 | ), | |
991 | ||
992 | TP_fast_assign( | |
993 | LOCAL_ASSIGN; | |
85220d71 | 994 | CHANDEF_ASSIGN(&ch_switch->chandef) |
5ce6e438 JB |
995 | __entry->timestamp = ch_switch->timestamp; |
996 | __entry->block_tx = ch_switch->block_tx; | |
5ce6e438 JB |
997 | __entry->count = ch_switch->count; |
998 | ), | |
999 | ||
1000 | TP_printk( | |
85220d71 JB |
1001 | LOCAL_PR_FMT " new " CHANDEF_PR_FMT " count:%d", |
1002 | LOCAL_PR_ARG, CHANDEF_PR_ARG, __entry->count | |
5ce6e438 JB |
1003 | ) |
1004 | ); | |
1005 | ||
15d96753 BR |
1006 | TRACE_EVENT(drv_set_antenna, |
1007 | TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret), | |
1008 | ||
1009 | TP_ARGS(local, tx_ant, rx_ant, ret), | |
1010 | ||
1011 | TP_STRUCT__entry( | |
1012 | LOCAL_ENTRY | |
1013 | __field(u32, tx_ant) | |
1014 | __field(u32, rx_ant) | |
1015 | __field(int, ret) | |
1016 | ), | |
1017 | ||
1018 | TP_fast_assign( | |
1019 | LOCAL_ASSIGN; | |
1020 | __entry->tx_ant = tx_ant; | |
1021 | __entry->rx_ant = rx_ant; | |
1022 | __entry->ret = ret; | |
1023 | ), | |
1024 | ||
1025 | TP_printk( | |
1026 | LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d", | |
1027 | LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret | |
1028 | ) | |
1029 | ); | |
1030 | ||
1031 | TRACE_EVENT(drv_get_antenna, | |
1032 | TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret), | |
1033 | ||
1034 | TP_ARGS(local, tx_ant, rx_ant, ret), | |
1035 | ||
1036 | TP_STRUCT__entry( | |
1037 | LOCAL_ENTRY | |
1038 | __field(u32, tx_ant) | |
1039 | __field(u32, rx_ant) | |
1040 | __field(int, ret) | |
1041 | ), | |
1042 | ||
1043 | TP_fast_assign( | |
1044 | LOCAL_ASSIGN; | |
1045 | __entry->tx_ant = tx_ant; | |
1046 | __entry->rx_ant = rx_ant; | |
1047 | __entry->ret = ret; | |
1048 | ), | |
1049 | ||
1050 | TP_printk( | |
1051 | LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d", | |
1052 | LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret | |
1053 | ) | |
1054 | ); | |
1055 | ||
21f83589 | 1056 | TRACE_EVENT(drv_remain_on_channel, |
49884568 EP |
1057 | TP_PROTO(struct ieee80211_local *local, |
1058 | struct ieee80211_sub_if_data *sdata, | |
1059 | struct ieee80211_channel *chan, | |
d339d5ca IP |
1060 | unsigned int duration, |
1061 | enum ieee80211_roc_type type), | |
21f83589 | 1062 | |
d339d5ca | 1063 | TP_ARGS(local, sdata, chan, duration, type), |
21f83589 JB |
1064 | |
1065 | TP_STRUCT__entry( | |
1066 | LOCAL_ENTRY | |
49884568 | 1067 | VIF_ENTRY |
21f83589 | 1068 | __field(int, center_freq) |
21f83589 | 1069 | __field(unsigned int, duration) |
d339d5ca | 1070 | __field(u32, type) |
21f83589 JB |
1071 | ), |
1072 | ||
1073 | TP_fast_assign( | |
1074 | LOCAL_ASSIGN; | |
49884568 | 1075 | VIF_ASSIGN; |
21f83589 | 1076 | __entry->center_freq = chan->center_freq; |
21f83589 | 1077 | __entry->duration = duration; |
d339d5ca | 1078 | __entry->type = type; |
21f83589 JB |
1079 | ), |
1080 | ||
1081 | TP_printk( | |
d339d5ca | 1082 | LOCAL_PR_FMT VIF_PR_FMT " freq:%dMHz duration:%dms type=%d", |
49884568 | 1083 | LOCAL_PR_ARG, VIF_PR_ARG, |
d339d5ca | 1084 | __entry->center_freq, __entry->duration, __entry->type |
21f83589 JB |
1085 | ) |
1086 | ); | |
1087 | ||
ba99d93b | 1088 | DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel, |
21f83589 | 1089 | TP_PROTO(struct ieee80211_local *local), |
ba99d93b | 1090 | TP_ARGS(local) |
21f83589 JB |
1091 | ); |
1092 | ||
38c09159 JL |
1093 | TRACE_EVENT(drv_set_ringparam, |
1094 | TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx), | |
1095 | ||
1096 | TP_ARGS(local, tx, rx), | |
1097 | ||
1098 | TP_STRUCT__entry( | |
1099 | LOCAL_ENTRY | |
1100 | __field(u32, tx) | |
1101 | __field(u32, rx) | |
1102 | ), | |
1103 | ||
1104 | TP_fast_assign( | |
1105 | LOCAL_ASSIGN; | |
1106 | __entry->tx = tx; | |
1107 | __entry->rx = rx; | |
1108 | ), | |
1109 | ||
1110 | TP_printk( | |
1111 | LOCAL_PR_FMT " tx:%d rx %d", | |
1112 | LOCAL_PR_ARG, __entry->tx, __entry->rx | |
1113 | ) | |
1114 | ); | |
1115 | ||
1116 | TRACE_EVENT(drv_get_ringparam, | |
1117 | TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max, | |
1118 | u32 *rx, u32 *rx_max), | |
1119 | ||
1120 | TP_ARGS(local, tx, tx_max, rx, rx_max), | |
1121 | ||
1122 | TP_STRUCT__entry( | |
1123 | LOCAL_ENTRY | |
1124 | __field(u32, tx) | |
1125 | __field(u32, tx_max) | |
1126 | __field(u32, rx) | |
1127 | __field(u32, rx_max) | |
1128 | ), | |
1129 | ||
1130 | TP_fast_assign( | |
1131 | LOCAL_ASSIGN; | |
1132 | __entry->tx = *tx; | |
1133 | __entry->tx_max = *tx_max; | |
1134 | __entry->rx = *rx; | |
1135 | __entry->rx_max = *rx_max; | |
1136 | ), | |
1137 | ||
1138 | TP_printk( | |
1139 | LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d", | |
1140 | LOCAL_PR_ARG, | |
1141 | __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max | |
1142 | ) | |
1143 | ); | |
1144 | ||
e8306f98 VN |
1145 | DEFINE_EVENT(local_only_evt, drv_tx_frames_pending, |
1146 | TP_PROTO(struct ieee80211_local *local), | |
1147 | TP_ARGS(local) | |
1148 | ); | |
1149 | ||
5f16a436 JB |
1150 | DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait, |
1151 | TP_PROTO(struct ieee80211_local *local), | |
1152 | TP_ARGS(local) | |
1153 | ); | |
1154 | ||
bdbfd6b5 SM |
1155 | TRACE_EVENT(drv_set_bitrate_mask, |
1156 | TP_PROTO(struct ieee80211_local *local, | |
1157 | struct ieee80211_sub_if_data *sdata, | |
1158 | const struct cfg80211_bitrate_mask *mask), | |
1159 | ||
1160 | TP_ARGS(local, sdata, mask), | |
1161 | ||
1162 | TP_STRUCT__entry( | |
1163 | LOCAL_ENTRY | |
1164 | VIF_ENTRY | |
1165 | __field(u32, legacy_2g) | |
1166 | __field(u32, legacy_5g) | |
1167 | ), | |
1168 | ||
1169 | TP_fast_assign( | |
1170 | LOCAL_ASSIGN; | |
1171 | VIF_ASSIGN; | |
1172 | __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy; | |
1173 | __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy; | |
1174 | ), | |
1175 | ||
1176 | TP_printk( | |
1177 | LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x", | |
1178 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g | |
1179 | ) | |
1180 | ); | |
1181 | ||
c68f4b89 JB |
1182 | TRACE_EVENT(drv_set_rekey_data, |
1183 | TP_PROTO(struct ieee80211_local *local, | |
1184 | struct ieee80211_sub_if_data *sdata, | |
1185 | struct cfg80211_gtk_rekey_data *data), | |
1186 | ||
1187 | TP_ARGS(local, sdata, data), | |
1188 | ||
1189 | TP_STRUCT__entry( | |
1190 | LOCAL_ENTRY | |
1191 | VIF_ENTRY | |
1192 | __array(u8, kek, NL80211_KEK_LEN) | |
1193 | __array(u8, kck, NL80211_KCK_LEN) | |
1194 | __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN) | |
1195 | ), | |
1196 | ||
1197 | TP_fast_assign( | |
1198 | LOCAL_ASSIGN; | |
1199 | VIF_ASSIGN; | |
1200 | memcpy(__entry->kek, data->kek, NL80211_KEK_LEN); | |
1201 | memcpy(__entry->kck, data->kck, NL80211_KCK_LEN); | |
1202 | memcpy(__entry->replay_ctr, data->replay_ctr, | |
1203 | NL80211_REPLAY_CTR_LEN); | |
1204 | ), | |
1205 | ||
1206 | TP_printk(LOCAL_PR_FMT VIF_PR_FMT, | |
1207 | LOCAL_PR_ARG, VIF_PR_ARG) | |
1208 | ); | |
1209 | ||
615f7b9b MV |
1210 | TRACE_EVENT(drv_rssi_callback, |
1211 | TP_PROTO(struct ieee80211_local *local, | |
887da917 | 1212 | struct ieee80211_sub_if_data *sdata, |
615f7b9b MV |
1213 | enum ieee80211_rssi_event rssi_event), |
1214 | ||
887da917 | 1215 | TP_ARGS(local, sdata, rssi_event), |
615f7b9b MV |
1216 | |
1217 | TP_STRUCT__entry( | |
1218 | LOCAL_ENTRY | |
887da917 | 1219 | VIF_ENTRY |
615f7b9b MV |
1220 | __field(u32, rssi_event) |
1221 | ), | |
1222 | ||
1223 | TP_fast_assign( | |
1224 | LOCAL_ASSIGN; | |
887da917 | 1225 | VIF_ASSIGN; |
615f7b9b MV |
1226 | __entry->rssi_event = rssi_event; |
1227 | ), | |
1228 | ||
1229 | TP_printk( | |
887da917 EG |
1230 | LOCAL_PR_FMT VIF_PR_FMT " rssi_event:%d", |
1231 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->rssi_event | |
615f7b9b MV |
1232 | ) |
1233 | ); | |
1234 | ||
40b96408 | 1235 | DECLARE_EVENT_CLASS(release_evt, |
4049e09a JB |
1236 | TP_PROTO(struct ieee80211_local *local, |
1237 | struct ieee80211_sta *sta, | |
1238 | u16 tids, int num_frames, | |
1239 | enum ieee80211_frame_release_type reason, | |
1240 | bool more_data), | |
1241 | ||
1242 | TP_ARGS(local, sta, tids, num_frames, reason, more_data), | |
1243 | ||
1244 | TP_STRUCT__entry( | |
1245 | LOCAL_ENTRY | |
1246 | STA_ENTRY | |
1247 | __field(u16, tids) | |
1248 | __field(int, num_frames) | |
1249 | __field(int, reason) | |
1250 | __field(bool, more_data) | |
1251 | ), | |
1252 | ||
1253 | TP_fast_assign( | |
1254 | LOCAL_ASSIGN; | |
1255 | STA_ASSIGN; | |
1256 | __entry->tids = tids; | |
1257 | __entry->num_frames = num_frames; | |
1258 | __entry->reason = reason; | |
1259 | __entry->more_data = more_data; | |
1260 | ), | |
1261 | ||
1262 | TP_printk( | |
1263 | LOCAL_PR_FMT STA_PR_FMT | |
1264 | " TIDs:0x%.4x frames:%d reason:%d more:%d", | |
1265 | LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames, | |
1266 | __entry->reason, __entry->more_data | |
1267 | ) | |
1268 | ); | |
1269 | ||
40b96408 JB |
1270 | DEFINE_EVENT(release_evt, drv_release_buffered_frames, |
1271 | TP_PROTO(struct ieee80211_local *local, | |
1272 | struct ieee80211_sta *sta, | |
1273 | u16 tids, int num_frames, | |
1274 | enum ieee80211_frame_release_type reason, | |
1275 | bool more_data), | |
1276 | ||
1277 | TP_ARGS(local, sta, tids, num_frames, reason, more_data) | |
1278 | ); | |
1279 | ||
1280 | DEFINE_EVENT(release_evt, drv_allow_buffered_frames, | |
1281 | TP_PROTO(struct ieee80211_local *local, | |
1282 | struct ieee80211_sta *sta, | |
1283 | u16 tids, int num_frames, | |
1284 | enum ieee80211_frame_release_type reason, | |
1285 | bool more_data), | |
1286 | ||
1287 | TP_ARGS(local, sta, tids, num_frames, reason, more_data) | |
1288 | ); | |
1289 | ||
66572cfc VG |
1290 | TRACE_EVENT(drv_get_rssi, |
1291 | TP_PROTO(struct ieee80211_local *local, struct ieee80211_sta *sta, | |
1292 | s8 rssi, int ret), | |
1293 | ||
1294 | TP_ARGS(local, sta, rssi, ret), | |
1295 | ||
1296 | TP_STRUCT__entry( | |
1297 | LOCAL_ENTRY | |
1298 | STA_ENTRY | |
1299 | __field(s8, rssi) | |
1300 | __field(int, ret) | |
1301 | ), | |
1302 | ||
1303 | TP_fast_assign( | |
1304 | LOCAL_ASSIGN; | |
1305 | STA_ASSIGN; | |
1306 | __entry->rssi = rssi; | |
1307 | __entry->ret = ret; | |
1308 | ), | |
1309 | ||
1310 | TP_printk( | |
1311 | LOCAL_PR_FMT STA_PR_FMT " rssi:%d ret:%d", | |
1312 | LOCAL_PR_ARG, STA_PR_ARG, __entry->rssi, __entry->ret | |
1313 | ) | |
1314 | ); | |
1315 | ||
a1845fc7 JB |
1316 | DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx, |
1317 | TP_PROTO(struct ieee80211_local *local, | |
1318 | struct ieee80211_sub_if_data *sdata), | |
1319 | ||
1320 | TP_ARGS(local, sdata) | |
1321 | ); | |
1322 | ||
c3645eac MK |
1323 | DECLARE_EVENT_CLASS(local_chanctx, |
1324 | TP_PROTO(struct ieee80211_local *local, | |
1325 | struct ieee80211_chanctx *ctx), | |
1326 | ||
1327 | TP_ARGS(local, ctx), | |
1328 | ||
1329 | TP_STRUCT__entry( | |
1330 | LOCAL_ENTRY | |
1331 | CHANCTX_ENTRY | |
1332 | ), | |
1333 | ||
1334 | TP_fast_assign( | |
1335 | LOCAL_ASSIGN; | |
1336 | CHANCTX_ASSIGN; | |
1337 | ), | |
1338 | ||
1339 | TP_printk( | |
1340 | LOCAL_PR_FMT CHANCTX_PR_FMT, | |
1341 | LOCAL_PR_ARG, CHANCTX_PR_ARG | |
1342 | ) | |
1343 | ); | |
1344 | ||
1345 | DEFINE_EVENT(local_chanctx, drv_add_chanctx, | |
1346 | TP_PROTO(struct ieee80211_local *local, | |
1347 | struct ieee80211_chanctx *ctx), | |
1348 | TP_ARGS(local, ctx) | |
1349 | ); | |
1350 | ||
1351 | DEFINE_EVENT(local_chanctx, drv_remove_chanctx, | |
1352 | TP_PROTO(struct ieee80211_local *local, | |
1353 | struct ieee80211_chanctx *ctx), | |
1354 | TP_ARGS(local, ctx) | |
1355 | ); | |
1356 | ||
1357 | TRACE_EVENT(drv_change_chanctx, | |
1358 | TP_PROTO(struct ieee80211_local *local, | |
1359 | struct ieee80211_chanctx *ctx, | |
1360 | u32 changed), | |
1361 | ||
1362 | TP_ARGS(local, ctx, changed), | |
1363 | ||
1364 | TP_STRUCT__entry( | |
1365 | LOCAL_ENTRY | |
1366 | CHANCTX_ENTRY | |
1367 | __field(u32, changed) | |
1368 | ), | |
1369 | ||
1370 | TP_fast_assign( | |
1371 | LOCAL_ASSIGN; | |
1372 | CHANCTX_ASSIGN; | |
1373 | __entry->changed = changed; | |
1374 | ), | |
1375 | ||
1376 | TP_printk( | |
1377 | LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x", | |
1378 | LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed | |
1379 | ) | |
1380 | ); | |
1381 | ||
1382 | DECLARE_EVENT_CLASS(local_sdata_chanctx, | |
1383 | TP_PROTO(struct ieee80211_local *local, | |
1384 | struct ieee80211_sub_if_data *sdata, | |
1385 | struct ieee80211_chanctx *ctx), | |
1386 | ||
1387 | TP_ARGS(local, sdata, ctx), | |
1388 | ||
1389 | TP_STRUCT__entry( | |
1390 | LOCAL_ENTRY | |
1391 | VIF_ENTRY | |
1392 | CHANCTX_ENTRY | |
1393 | ), | |
1394 | ||
1395 | TP_fast_assign( | |
1396 | LOCAL_ASSIGN; | |
1397 | VIF_ASSIGN; | |
1398 | CHANCTX_ASSIGN; | |
1399 | ), | |
1400 | ||
1401 | TP_printk( | |
1402 | LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT, | |
1403 | LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG | |
1404 | ) | |
1405 | ); | |
1406 | ||
1407 | DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx, | |
1408 | TP_PROTO(struct ieee80211_local *local, | |
1409 | struct ieee80211_sub_if_data *sdata, | |
1410 | struct ieee80211_chanctx *ctx), | |
1411 | TP_ARGS(local, sdata, ctx) | |
1412 | ); | |
1413 | ||
1414 | DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx, | |
1415 | TP_PROTO(struct ieee80211_local *local, | |
1416 | struct ieee80211_sub_if_data *sdata, | |
1417 | struct ieee80211_chanctx *ctx), | |
1418 | TP_ARGS(local, sdata, ctx) | |
1419 | ); | |
1420 | ||
1041638f JB |
1421 | TRACE_EVENT(drv_start_ap, |
1422 | TP_PROTO(struct ieee80211_local *local, | |
1423 | struct ieee80211_sub_if_data *sdata, | |
1424 | struct ieee80211_bss_conf *info), | |
1425 | ||
1426 | TP_ARGS(local, sdata, info), | |
1427 | ||
1428 | TP_STRUCT__entry( | |
1429 | LOCAL_ENTRY | |
1430 | VIF_ENTRY | |
1431 | __field(u8, dtimper) | |
1432 | __field(u16, bcnint) | |
1433 | __dynamic_array(u8, ssid, info->ssid_len); | |
1434 | __field(bool, hidden_ssid); | |
1435 | ), | |
1436 | ||
1437 | TP_fast_assign( | |
1438 | LOCAL_ASSIGN; | |
1439 | VIF_ASSIGN; | |
1440 | __entry->dtimper = info->dtim_period; | |
1441 | __entry->bcnint = info->beacon_int; | |
1442 | memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len); | |
1443 | __entry->hidden_ssid = info->hidden_ssid; | |
1444 | ), | |
1445 | ||
1446 | TP_printk( | |
1447 | LOCAL_PR_FMT VIF_PR_FMT, | |
1448 | LOCAL_PR_ARG, VIF_PR_ARG | |
1449 | ) | |
1450 | ); | |
1451 | ||
1452 | DEFINE_EVENT(local_sdata_evt, drv_stop_ap, | |
1453 | TP_PROTO(struct ieee80211_local *local, | |
1454 | struct ieee80211_sub_if_data *sdata), | |
1455 | TP_ARGS(local, sdata) | |
1456 | ); | |
1457 | ||
9214ad7f JB |
1458 | DEFINE_EVENT(local_only_evt, drv_restart_complete, |
1459 | TP_PROTO(struct ieee80211_local *local), | |
1460 | TP_ARGS(local) | |
1461 | ); | |
1462 | ||
a65240c1 JB |
1463 | #if IS_ENABLED(CONFIG_IPV6) |
1464 | DEFINE_EVENT(local_sdata_evt, drv_ipv6_addr_change, | |
1465 | TP_PROTO(struct ieee80211_local *local, | |
1466 | struct ieee80211_sub_if_data *sdata), | |
1467 | TP_ARGS(local, sdata) | |
1468 | ); | |
1469 | #endif | |
1470 | ||
55fff501 JB |
1471 | TRACE_EVENT(drv_join_ibss, |
1472 | TP_PROTO(struct ieee80211_local *local, | |
1473 | struct ieee80211_sub_if_data *sdata, | |
1474 | struct ieee80211_bss_conf *info), | |
1475 | ||
1476 | TP_ARGS(local, sdata, info), | |
1477 | ||
1478 | TP_STRUCT__entry( | |
1479 | LOCAL_ENTRY | |
1480 | VIF_ENTRY | |
1481 | __field(u8, dtimper) | |
1482 | __field(u16, bcnint) | |
1483 | __dynamic_array(u8, ssid, info->ssid_len); | |
1484 | ), | |
1485 | ||
1486 | TP_fast_assign( | |
1487 | LOCAL_ASSIGN; | |
1488 | VIF_ASSIGN; | |
1489 | __entry->dtimper = info->dtim_period; | |
1490 | __entry->bcnint = info->beacon_int; | |
1491 | memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len); | |
1492 | ), | |
1493 | ||
1494 | TP_printk( | |
1495 | LOCAL_PR_FMT VIF_PR_FMT, | |
1496 | LOCAL_PR_ARG, VIF_PR_ARG | |
1497 | ) | |
1498 | ); | |
1499 | ||
1500 | DEFINE_EVENT(local_sdata_evt, drv_leave_ibss, | |
1501 | TP_PROTO(struct ieee80211_local *local, | |
1502 | struct ieee80211_sub_if_data *sdata), | |
1503 | TP_ARGS(local, sdata) | |
1504 | ); | |
1505 | ||
b5878a2d JB |
1506 | /* |
1507 | * Tracing for API calls that drivers call. | |
1508 | */ | |
1509 | ||
1510 | TRACE_EVENT(api_start_tx_ba_session, | |
1511 | TP_PROTO(struct ieee80211_sta *sta, u16 tid), | |
1512 | ||
1513 | TP_ARGS(sta, tid), | |
1514 | ||
1515 | TP_STRUCT__entry( | |
1516 | STA_ENTRY | |
1517 | __field(u16, tid) | |
1518 | ), | |
1519 | ||
1520 | TP_fast_assign( | |
1521 | STA_ASSIGN; | |
1522 | __entry->tid = tid; | |
1523 | ), | |
1524 | ||
1525 | TP_printk( | |
1526 | STA_PR_FMT " tid:%d", | |
1527 | STA_PR_ARG, __entry->tid | |
1528 | ) | |
1529 | ); | |
1530 | ||
1531 | TRACE_EVENT(api_start_tx_ba_cb, | |
1532 | TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid), | |
1533 | ||
1534 | TP_ARGS(sdata, ra, tid), | |
1535 | ||
1536 | TP_STRUCT__entry( | |
1537 | VIF_ENTRY | |
1538 | __array(u8, ra, ETH_ALEN) | |
1539 | __field(u16, tid) | |
1540 | ), | |
1541 | ||
1542 | TP_fast_assign( | |
1543 | VIF_ASSIGN; | |
1544 | memcpy(__entry->ra, ra, ETH_ALEN); | |
1545 | __entry->tid = tid; | |
1546 | ), | |
1547 | ||
1548 | TP_printk( | |
1549 | VIF_PR_FMT " ra:%pM tid:%d", | |
1550 | VIF_PR_ARG, __entry->ra, __entry->tid | |
1551 | ) | |
1552 | ); | |
1553 | ||
1554 | TRACE_EVENT(api_stop_tx_ba_session, | |
6a8579d0 | 1555 | TP_PROTO(struct ieee80211_sta *sta, u16 tid), |
b5878a2d | 1556 | |
6a8579d0 | 1557 | TP_ARGS(sta, tid), |
b5878a2d JB |
1558 | |
1559 | TP_STRUCT__entry( | |
1560 | STA_ENTRY | |
1561 | __field(u16, tid) | |
b5878a2d JB |
1562 | ), |
1563 | ||
1564 | TP_fast_assign( | |
1565 | STA_ASSIGN; | |
1566 | __entry->tid = tid; | |
b5878a2d JB |
1567 | ), |
1568 | ||
1569 | TP_printk( | |
6a8579d0 JB |
1570 | STA_PR_FMT " tid:%d", |
1571 | STA_PR_ARG, __entry->tid | |
b5878a2d JB |
1572 | ) |
1573 | ); | |
1574 | ||
1575 | TRACE_EVENT(api_stop_tx_ba_cb, | |
1576 | TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid), | |
1577 | ||
1578 | TP_ARGS(sdata, ra, tid), | |
1579 | ||
1580 | TP_STRUCT__entry( | |
1581 | VIF_ENTRY | |
1582 | __array(u8, ra, ETH_ALEN) | |
1583 | __field(u16, tid) | |
1584 | ), | |
1585 | ||
1586 | TP_fast_assign( | |
1587 | VIF_ASSIGN; | |
1588 | memcpy(__entry->ra, ra, ETH_ALEN); | |
1589 | __entry->tid = tid; | |
1590 | ), | |
1591 | ||
1592 | TP_printk( | |
1593 | VIF_PR_FMT " ra:%pM tid:%d", | |
1594 | VIF_PR_ARG, __entry->ra, __entry->tid | |
1595 | ) | |
1596 | ); | |
1597 | ||
ba99d93b | 1598 | DEFINE_EVENT(local_only_evt, api_restart_hw, |
b5878a2d | 1599 | TP_PROTO(struct ieee80211_local *local), |
ba99d93b | 1600 | TP_ARGS(local) |
b5878a2d JB |
1601 | ); |
1602 | ||
1603 | TRACE_EVENT(api_beacon_loss, | |
1604 | TP_PROTO(struct ieee80211_sub_if_data *sdata), | |
1605 | ||
1606 | TP_ARGS(sdata), | |
1607 | ||
1608 | TP_STRUCT__entry( | |
1609 | VIF_ENTRY | |
1610 | ), | |
1611 | ||
1612 | TP_fast_assign( | |
1613 | VIF_ASSIGN; | |
1614 | ), | |
1615 | ||
1616 | TP_printk( | |
1617 | VIF_PR_FMT, | |
1618 | VIF_PR_ARG | |
1619 | ) | |
1620 | ); | |
1621 | ||
1622 | TRACE_EVENT(api_connection_loss, | |
1623 | TP_PROTO(struct ieee80211_sub_if_data *sdata), | |
1624 | ||
1625 | TP_ARGS(sdata), | |
1626 | ||
1627 | TP_STRUCT__entry( | |
1628 | VIF_ENTRY | |
1629 | ), | |
1630 | ||
1631 | TP_fast_assign( | |
1632 | VIF_ASSIGN; | |
1633 | ), | |
1634 | ||
1635 | TP_printk( | |
1636 | VIF_PR_FMT, | |
1637 | VIF_PR_ARG | |
1638 | ) | |
1639 | ); | |
1640 | ||
1641 | TRACE_EVENT(api_cqm_rssi_notify, | |
1642 | TP_PROTO(struct ieee80211_sub_if_data *sdata, | |
1643 | enum nl80211_cqm_rssi_threshold_event rssi_event), | |
1644 | ||
1645 | TP_ARGS(sdata, rssi_event), | |
1646 | ||
1647 | TP_STRUCT__entry( | |
1648 | VIF_ENTRY | |
1649 | __field(u32, rssi_event) | |
1650 | ), | |
1651 | ||
1652 | TP_fast_assign( | |
1653 | VIF_ASSIGN; | |
1654 | __entry->rssi_event = rssi_event; | |
1655 | ), | |
1656 | ||
1657 | TP_printk( | |
1658 | VIF_PR_FMT " event:%d", | |
1659 | VIF_PR_ARG, __entry->rssi_event | |
1660 | ) | |
1661 | ); | |
1662 | ||
1663 | TRACE_EVENT(api_scan_completed, | |
1664 | TP_PROTO(struct ieee80211_local *local, bool aborted), | |
1665 | ||
1666 | TP_ARGS(local, aborted), | |
1667 | ||
1668 | TP_STRUCT__entry( | |
1669 | LOCAL_ENTRY | |
1670 | __field(bool, aborted) | |
1671 | ), | |
1672 | ||
1673 | TP_fast_assign( | |
1674 | LOCAL_ASSIGN; | |
1675 | __entry->aborted = aborted; | |
1676 | ), | |
1677 | ||
1678 | TP_printk( | |
1679 | LOCAL_PR_FMT " aborted:%d", | |
1680 | LOCAL_PR_ARG, __entry->aborted | |
1681 | ) | |
1682 | ); | |
1683 | ||
79f460ca LC |
1684 | TRACE_EVENT(api_sched_scan_results, |
1685 | TP_PROTO(struct ieee80211_local *local), | |
1686 | ||
1687 | TP_ARGS(local), | |
1688 | ||
1689 | TP_STRUCT__entry( | |
1690 | LOCAL_ENTRY | |
1691 | ), | |
1692 | ||
1693 | TP_fast_assign( | |
1694 | LOCAL_ASSIGN; | |
1695 | ), | |
1696 | ||
1697 | TP_printk( | |
1698 | LOCAL_PR_FMT, LOCAL_PR_ARG | |
1699 | ) | |
1700 | ); | |
1701 | ||
1702 | TRACE_EVENT(api_sched_scan_stopped, | |
1703 | TP_PROTO(struct ieee80211_local *local), | |
1704 | ||
1705 | TP_ARGS(local), | |
1706 | ||
1707 | TP_STRUCT__entry( | |
1708 | LOCAL_ENTRY | |
1709 | ), | |
1710 | ||
1711 | TP_fast_assign( | |
1712 | LOCAL_ASSIGN; | |
1713 | ), | |
1714 | ||
1715 | TP_printk( | |
1716 | LOCAL_PR_FMT, LOCAL_PR_ARG | |
1717 | ) | |
1718 | ); | |
1719 | ||
b5878a2d JB |
1720 | TRACE_EVENT(api_sta_block_awake, |
1721 | TP_PROTO(struct ieee80211_local *local, | |
1722 | struct ieee80211_sta *sta, bool block), | |
1723 | ||
1724 | TP_ARGS(local, sta, block), | |
1725 | ||
1726 | TP_STRUCT__entry( | |
1727 | LOCAL_ENTRY | |
1728 | STA_ENTRY | |
1729 | __field(bool, block) | |
1730 | ), | |
1731 | ||
1732 | TP_fast_assign( | |
1733 | LOCAL_ASSIGN; | |
1734 | STA_ASSIGN; | |
1735 | __entry->block = block; | |
1736 | ), | |
1737 | ||
1738 | TP_printk( | |
1739 | LOCAL_PR_FMT STA_PR_FMT " block:%d", | |
15ac7c47 | 1740 | LOCAL_PR_ARG, STA_PR_ARG, __entry->block |
b5878a2d JB |
1741 | ) |
1742 | ); | |
1743 | ||
5ce6e438 JB |
1744 | TRACE_EVENT(api_chswitch_done, |
1745 | TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success), | |
1746 | ||
1747 | TP_ARGS(sdata, success), | |
1748 | ||
1749 | TP_STRUCT__entry( | |
1750 | VIF_ENTRY | |
1751 | __field(bool, success) | |
1752 | ), | |
1753 | ||
1754 | TP_fast_assign( | |
1755 | VIF_ASSIGN; | |
1756 | __entry->success = success; | |
1757 | ), | |
1758 | ||
1759 | TP_printk( | |
1760 | VIF_PR_FMT " success=%d", | |
1761 | VIF_PR_ARG, __entry->success | |
1762 | ) | |
1763 | ); | |
1764 | ||
ba99d93b | 1765 | DEFINE_EVENT(local_only_evt, api_ready_on_channel, |
21f83589 | 1766 | TP_PROTO(struct ieee80211_local *local), |
ba99d93b | 1767 | TP_ARGS(local) |
21f83589 JB |
1768 | ); |
1769 | ||
ba99d93b | 1770 | DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired, |
21f83589 | 1771 | TP_PROTO(struct ieee80211_local *local), |
ba99d93b | 1772 | TP_ARGS(local) |
21f83589 JB |
1773 | ); |
1774 | ||
c68f4b89 JB |
1775 | TRACE_EVENT(api_gtk_rekey_notify, |
1776 | TP_PROTO(struct ieee80211_sub_if_data *sdata, | |
1777 | const u8 *bssid, const u8 *replay_ctr), | |
1778 | ||
1779 | TP_ARGS(sdata, bssid, replay_ctr), | |
1780 | ||
1781 | TP_STRUCT__entry( | |
1782 | VIF_ENTRY | |
1783 | __array(u8, bssid, ETH_ALEN) | |
1784 | __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN) | |
1785 | ), | |
1786 | ||
1787 | TP_fast_assign( | |
1788 | VIF_ASSIGN; | |
1789 | memcpy(__entry->bssid, bssid, ETH_ALEN); | |
1790 | memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN); | |
1791 | ), | |
1792 | ||
1793 | TP_printk(VIF_PR_FMT, VIF_PR_ARG) | |
1794 | ); | |
1795 | ||
615f7b9b MV |
1796 | TRACE_EVENT(api_enable_rssi_reports, |
1797 | TP_PROTO(struct ieee80211_sub_if_data *sdata, | |
1798 | int rssi_min_thold, int rssi_max_thold), | |
1799 | ||
1800 | TP_ARGS(sdata, rssi_min_thold, rssi_max_thold), | |
1801 | ||
1802 | TP_STRUCT__entry( | |
1803 | VIF_ENTRY | |
1804 | __field(int, rssi_min_thold) | |
1805 | __field(int, rssi_max_thold) | |
1806 | ), | |
1807 | ||
1808 | TP_fast_assign( | |
1809 | VIF_ASSIGN; | |
1810 | __entry->rssi_min_thold = rssi_min_thold; | |
1811 | __entry->rssi_max_thold = rssi_max_thold; | |
1812 | ), | |
1813 | ||
1814 | TP_printk( | |
1815 | VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d", | |
1816 | VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold | |
1817 | ) | |
1818 | ); | |
1819 | ||
37fbd908 JB |
1820 | TRACE_EVENT(api_eosp, |
1821 | TP_PROTO(struct ieee80211_local *local, | |
1822 | struct ieee80211_sta *sta), | |
1823 | ||
1824 | TP_ARGS(local, sta), | |
1825 | ||
1826 | TP_STRUCT__entry( | |
1827 | LOCAL_ENTRY | |
1828 | STA_ENTRY | |
1829 | ), | |
1830 | ||
1831 | TP_fast_assign( | |
1832 | LOCAL_ASSIGN; | |
1833 | STA_ASSIGN; | |
1834 | ), | |
1835 | ||
1836 | TP_printk( | |
1837 | LOCAL_PR_FMT STA_PR_FMT, | |
15ac7c47 | 1838 | LOCAL_PR_ARG, STA_PR_ARG |
37fbd908 JB |
1839 | ) |
1840 | ); | |
1841 | ||
b5878a2d JB |
1842 | /* |
1843 | * Tracing for internal functions | |
1844 | * (which may also be called in response to driver calls) | |
1845 | */ | |
1846 | ||
1847 | TRACE_EVENT(wake_queue, | |
1848 | TP_PROTO(struct ieee80211_local *local, u16 queue, | |
1849 | enum queue_stop_reason reason), | |
1850 | ||
1851 | TP_ARGS(local, queue, reason), | |
1852 | ||
1853 | TP_STRUCT__entry( | |
1854 | LOCAL_ENTRY | |
1855 | __field(u16, queue) | |
1856 | __field(u32, reason) | |
1857 | ), | |
1858 | ||
1859 | TP_fast_assign( | |
1860 | LOCAL_ASSIGN; | |
1861 | __entry->queue = queue; | |
1862 | __entry->reason = reason; | |
1863 | ), | |
1864 | ||
1865 | TP_printk( | |
1866 | LOCAL_PR_FMT " queue:%d, reason:%d", | |
1867 | LOCAL_PR_ARG, __entry->queue, __entry->reason | |
1868 | ) | |
1869 | ); | |
1870 | ||
1871 | TRACE_EVENT(stop_queue, | |
1872 | TP_PROTO(struct ieee80211_local *local, u16 queue, | |
1873 | enum queue_stop_reason reason), | |
1874 | ||
1875 | TP_ARGS(local, queue, reason), | |
1876 | ||
1877 | TP_STRUCT__entry( | |
1878 | LOCAL_ENTRY | |
1879 | __field(u16, queue) | |
1880 | __field(u32, reason) | |
1881 | ), | |
1882 | ||
1883 | TP_fast_assign( | |
1884 | LOCAL_ASSIGN; | |
1885 | __entry->queue = queue; | |
1886 | __entry->reason = reason; | |
1887 | ), | |
1888 | ||
1889 | TP_printk( | |
1890 | LOCAL_PR_FMT " queue:%d, reason:%d", | |
1891 | LOCAL_PR_ARG, __entry->queue, __entry->reason | |
1892 | ) | |
1893 | ); | |
3fae0273 | 1894 | |
de5fad81 YD |
1895 | TRACE_EVENT(drv_set_default_unicast_key, |
1896 | TP_PROTO(struct ieee80211_local *local, | |
1897 | struct ieee80211_sub_if_data *sdata, | |
1898 | int key_idx), | |
1899 | ||
1900 | TP_ARGS(local, sdata, key_idx), | |
1901 | ||
1902 | TP_STRUCT__entry( | |
1903 | LOCAL_ENTRY | |
1904 | VIF_ENTRY | |
1905 | __field(int, key_idx) | |
1906 | ), | |
1907 | ||
1908 | TP_fast_assign( | |
1909 | LOCAL_ASSIGN; | |
1910 | VIF_ASSIGN; | |
1911 | __entry->key_idx = key_idx; | |
1912 | ), | |
1913 | ||
1914 | TP_printk(LOCAL_PR_FMT VIF_PR_FMT " key_idx:%d", | |
1915 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->key_idx) | |
1916 | ); | |
1917 | ||
164eb02d SW |
1918 | TRACE_EVENT(api_radar_detected, |
1919 | TP_PROTO(struct ieee80211_local *local), | |
1920 | ||
1921 | TP_ARGS(local), | |
1922 | ||
1923 | TP_STRUCT__entry( | |
1924 | LOCAL_ENTRY | |
1925 | ), | |
1926 | ||
1927 | TP_fast_assign( | |
1928 | LOCAL_ASSIGN; | |
1929 | ), | |
1930 | ||
1931 | TP_printk( | |
1932 | LOCAL_PR_FMT " radar detected", | |
1933 | LOCAL_PR_ARG | |
1934 | ) | |
1935 | ); | |
1936 | ||
73da7d5b SW |
1937 | TRACE_EVENT(drv_channel_switch_beacon, |
1938 | TP_PROTO(struct ieee80211_local *local, | |
1939 | struct ieee80211_sub_if_data *sdata, | |
1940 | struct cfg80211_chan_def *chandef), | |
1941 | ||
1942 | TP_ARGS(local, sdata, chandef), | |
1943 | ||
1944 | TP_STRUCT__entry( | |
1945 | LOCAL_ENTRY | |
1946 | VIF_ENTRY | |
1947 | CHANDEF_ENTRY | |
1948 | ), | |
1949 | ||
1950 | TP_fast_assign( | |
1951 | LOCAL_ASSIGN; | |
1952 | VIF_ASSIGN; | |
1953 | CHANDEF_ASSIGN(chandef); | |
1954 | ), | |
1955 | ||
1956 | TP_printk( | |
1957 | LOCAL_PR_FMT VIF_PR_FMT " channel switch to " CHANDEF_PR_FMT, | |
1958 | LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG | |
1959 | ) | |
1960 | ); | |
1961 | ||
1962 | ||
3fae0273 JB |
1963 | #ifdef CONFIG_MAC80211_MESSAGE_TRACING |
1964 | #undef TRACE_SYSTEM | |
1965 | #define TRACE_SYSTEM mac80211_msg | |
1966 | ||
1967 | #define MAX_MSG_LEN 100 | |
1968 | ||
1969 | DECLARE_EVENT_CLASS(mac80211_msg_event, | |
1970 | TP_PROTO(struct va_format *vaf), | |
1971 | ||
1972 | TP_ARGS(vaf), | |
1973 | ||
1974 | TP_STRUCT__entry( | |
1975 | __dynamic_array(char, msg, MAX_MSG_LEN) | |
1976 | ), | |
1977 | ||
1978 | TP_fast_assign( | |
1979 | WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg), | |
1980 | MAX_MSG_LEN, vaf->fmt, | |
1981 | *vaf->va) >= MAX_MSG_LEN); | |
1982 | ), | |
1983 | ||
1984 | TP_printk("%s", __get_str(msg)) | |
1985 | ); | |
1986 | ||
1987 | DEFINE_EVENT(mac80211_msg_event, mac80211_info, | |
1988 | TP_PROTO(struct va_format *vaf), | |
1989 | TP_ARGS(vaf) | |
1990 | ); | |
1991 | DEFINE_EVENT(mac80211_msg_event, mac80211_dbg, | |
1992 | TP_PROTO(struct va_format *vaf), | |
1993 | TP_ARGS(vaf) | |
1994 | ); | |
1995 | DEFINE_EVENT(mac80211_msg_event, mac80211_err, | |
1996 | TP_PROTO(struct va_format *vaf), | |
1997 | TP_ARGS(vaf) | |
1998 | ); | |
1999 | #endif | |
2000 | ||
f742880c | 2001 | #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ |
0a2b8bb2 JB |
2002 | |
2003 | #undef TRACE_INCLUDE_PATH | |
2004 | #define TRACE_INCLUDE_PATH . | |
2005 | #undef TRACE_INCLUDE_FILE | |
011ad0e9 | 2006 | #define TRACE_INCLUDE_FILE trace |
0a2b8bb2 | 2007 | #include <trace/define_trace.h> |