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