blob: 42cfc516c603897af749cb7db372e378f2a012a6 [file] [log] [blame]
Beni Lev14e8a3c2012-07-31 18:48:27 +03001#undef TRACE_SYSTEM
2#define TRACE_SYSTEM cfg80211
3
4#if !defined(__RDEV_OPS_TRACE) || defined(TRACE_HEADER_MULTI_READ)
5#define __RDEV_OPS_TRACE
6
7#include <linux/tracepoint.h>
8
9#include <linux/rtnetlink.h>
Joe Perchesd2beae12015-03-02 19:54:58 -080010#include <linux/etherdevice.h>
Beni Lev14e8a3c2012-07-31 18:48:27 +030011#include <net/cfg80211.h>
12#include "core.h"
13
14#define MAC_ENTRY(entry_mac) __array(u8, entry_mac, ETH_ALEN)
15#define MAC_ASSIGN(entry_mac, given_mac) do { \
16 if (given_mac) \
17 memcpy(__entry->entry_mac, given_mac, ETH_ALEN); \
18 else \
Joe Perchesd2beae12015-03-02 19:54:58 -080019 eth_zero_addr(__entry->entry_mac); \
Beni Lev14e8a3c2012-07-31 18:48:27 +030020 } while (0)
21#define MAC_PR_FMT "%pM"
22#define MAC_PR_ARG(entry_mac) (__entry->entry_mac)
23
Johannes Bergec816082012-11-16 17:22:28 +010024#define MAXNAME 32
25#define WIPHY_ENTRY __array(char, wiphy_name, 32)
26#define WIPHY_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(wiphy), MAXNAME)
27#define WIPHY_PR_FMT "%s"
28#define WIPHY_PR_ARG __entry->wiphy_name
Beni Lev14e8a3c2012-07-31 18:48:27 +030029
Johannes Bergec816082012-11-16 17:22:28 +010030#define WDEV_ENTRY __field(u32, id)
Johannes Bergce1eadd2013-03-19 20:26:57 +010031#define WDEV_ASSIGN (__entry->id) = (!IS_ERR_OR_NULL(wdev) \
32 ? wdev->identifier : 0)
Johannes Bergec816082012-11-16 17:22:28 +010033#define WDEV_PR_FMT "wdev(%u)"
34#define WDEV_PR_ARG (__entry->id)
Beni Lev14e8a3c2012-07-31 18:48:27 +030035
Johannes Bergec816082012-11-16 17:22:28 +010036#define NETDEV_ENTRY __array(char, name, IFNAMSIZ) \
37 __field(int, ifindex)
Beni Lev14e8a3c2012-07-31 18:48:27 +030038#define NETDEV_ASSIGN \
39 do { \
40 memcpy(__entry->name, netdev->name, IFNAMSIZ); \
Beni Lev14e8a3c2012-07-31 18:48:27 +030041 (__entry->ifindex) = (netdev->ifindex); \
42 } while (0)
Johannes Bergec816082012-11-16 17:22:28 +010043#define NETDEV_PR_FMT "netdev:%s(%d)"
44#define NETDEV_PR_ARG __entry->name, __entry->ifindex
Beni Lev14e8a3c2012-07-31 18:48:27 +030045
46#define MESH_CFG_ENTRY __field(u16, dot11MeshRetryTimeout) \
47 __field(u16, dot11MeshConfirmTimeout) \
48 __field(u16, dot11MeshHoldingTimeout) \
49 __field(u16, dot11MeshMaxPeerLinks) \
50 __field(u8, dot11MeshMaxRetries) \
51 __field(u8, dot11MeshTTL) \
52 __field(u8, element_ttl) \
53 __field(bool, auto_open_plinks) \
54 __field(u32, dot11MeshNbrOffsetMaxNeighbor) \
55 __field(u8, dot11MeshHWMPmaxPREQretries) \
56 __field(u32, path_refresh_time) \
57 __field(u32, dot11MeshHWMPactivePathTimeout) \
58 __field(u16, min_discovery_timeout) \
59 __field(u16, dot11MeshHWMPpreqMinInterval) \
60 __field(u16, dot11MeshHWMPperrMinInterval) \
61 __field(u16, dot11MeshHWMPnetDiameterTraversalTime) \
62 __field(u8, dot11MeshHWMPRootMode) \
63 __field(u16, dot11MeshHWMPRannInterval) \
64 __field(bool, dot11MeshGateAnnouncementProtocol) \
65 __field(bool, dot11MeshForwarding) \
66 __field(s32, rssi_threshold) \
67 __field(u16, ht_opmode) \
68 __field(u32, dot11MeshHWMPactivePathToRootTimeout) \
69 __field(u16, dot11MeshHWMProotInterval) \
70 __field(u16, dot11MeshHWMPconfirmationInterval)
71#define MESH_CFG_ASSIGN \
72 do { \
73 __entry->dot11MeshRetryTimeout = conf->dot11MeshRetryTimeout; \
74 __entry->dot11MeshConfirmTimeout = \
75 conf->dot11MeshConfirmTimeout; \
76 __entry->dot11MeshHoldingTimeout = \
77 conf->dot11MeshHoldingTimeout; \
78 __entry->dot11MeshMaxPeerLinks = conf->dot11MeshMaxPeerLinks; \
79 __entry->dot11MeshMaxRetries = conf->dot11MeshMaxRetries; \
80 __entry->dot11MeshTTL = conf->dot11MeshTTL; \
81 __entry->element_ttl = conf->element_ttl; \
82 __entry->auto_open_plinks = conf->auto_open_plinks; \
83 __entry->dot11MeshNbrOffsetMaxNeighbor = \
84 conf->dot11MeshNbrOffsetMaxNeighbor; \
85 __entry->dot11MeshHWMPmaxPREQretries = \
86 conf->dot11MeshHWMPmaxPREQretries; \
87 __entry->path_refresh_time = conf->path_refresh_time; \
88 __entry->dot11MeshHWMPactivePathTimeout = \
89 conf->dot11MeshHWMPactivePathTimeout; \
90 __entry->min_discovery_timeout = conf->min_discovery_timeout; \
91 __entry->dot11MeshHWMPpreqMinInterval = \
92 conf->dot11MeshHWMPpreqMinInterval; \
93 __entry->dot11MeshHWMPperrMinInterval = \
94 conf->dot11MeshHWMPperrMinInterval; \
95 __entry->dot11MeshHWMPnetDiameterTraversalTime = \
96 conf->dot11MeshHWMPnetDiameterTraversalTime; \
97 __entry->dot11MeshHWMPRootMode = conf->dot11MeshHWMPRootMode; \
98 __entry->dot11MeshHWMPRannInterval = \
99 conf->dot11MeshHWMPRannInterval; \
100 __entry->dot11MeshGateAnnouncementProtocol = \
101 conf->dot11MeshGateAnnouncementProtocol; \
102 __entry->dot11MeshForwarding = conf->dot11MeshForwarding; \
103 __entry->rssi_threshold = conf->rssi_threshold; \
104 __entry->ht_opmode = conf->ht_opmode; \
105 __entry->dot11MeshHWMPactivePathToRootTimeout = \
106 conf->dot11MeshHWMPactivePathToRootTimeout; \
107 __entry->dot11MeshHWMProotInterval = \
108 conf->dot11MeshHWMProotInterval; \
109 __entry->dot11MeshHWMPconfirmationInterval = \
110 conf->dot11MeshHWMPconfirmationInterval; \
111 } while (0)
112
Johannes Berg57fbcce2016-04-12 15:56:15 +0200113#define CHAN_ENTRY __field(enum nl80211_band, band) \
Beni Lev14e8a3c2012-07-31 18:48:27 +0300114 __field(u16, center_freq)
115#define CHAN_ASSIGN(chan) \
116 do { \
117 if (chan) { \
118 __entry->band = chan->band; \
119 __entry->center_freq = chan->center_freq; \
120 } else { \
121 __entry->band = 0; \
122 __entry->center_freq = 0; \
123 } \
124 } while (0)
Johannes Bergec816082012-11-16 17:22:28 +0100125#define CHAN_PR_FMT "band: %d, freq: %u"
Beni Lev14e8a3c2012-07-31 18:48:27 +0300126#define CHAN_PR_ARG __entry->band, __entry->center_freq
127
Johannes Berg57fbcce2016-04-12 15:56:15 +0200128#define CHAN_DEF_ENTRY __field(enum nl80211_band, band) \
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100129 __field(u32, control_freq) \
130 __field(u32, width) \
131 __field(u32, center_freq1) \
132 __field(u32, center_freq2)
Johannes Berg683b6d32012-11-08 21:25:48 +0100133#define CHAN_DEF_ASSIGN(chandef) \
134 do { \
135 if ((chandef) && (chandef)->chan) { \
136 __entry->band = (chandef)->chan->band; \
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100137 __entry->control_freq = \
Johannes Berg683b6d32012-11-08 21:25:48 +0100138 (chandef)->chan->center_freq; \
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100139 __entry->width = (chandef)->width; \
140 __entry->center_freq1 = (chandef)->center_freq1;\
141 __entry->center_freq2 = (chandef)->center_freq2;\
Johannes Berg683b6d32012-11-08 21:25:48 +0100142 } else { \
143 __entry->band = 0; \
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100144 __entry->control_freq = 0; \
145 __entry->width = 0; \
146 __entry->center_freq1 = 0; \
147 __entry->center_freq2 = 0; \
Johannes Berg683b6d32012-11-08 21:25:48 +0100148 } \
149 } while (0)
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100150#define CHAN_DEF_PR_FMT \
Johannes Bergec816082012-11-16 17:22:28 +0100151 "band: %d, control freq: %u, width: %d, cf1: %u, cf2: %u"
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100152#define CHAN_DEF_PR_ARG __entry->band, __entry->control_freq, \
153 __entry->width, __entry->center_freq1, \
154 __entry->center_freq2
Johannes Berg683b6d32012-11-08 21:25:48 +0100155
Beni Lev14e8a3c2012-07-31 18:48:27 +0300156#define SINFO_ENTRY __field(int, generation) \
157 __field(u32, connected_time) \
158 __field(u32, inactive_time) \
159 __field(u32, rx_bytes) \
160 __field(u32, tx_bytes) \
161 __field(u32, rx_packets) \
162 __field(u32, tx_packets) \
163 __field(u32, tx_retries) \
164 __field(u32, tx_failed) \
165 __field(u32, rx_dropped_misc) \
166 __field(u32, beacon_loss_count) \
167 __field(u16, llid) \
168 __field(u16, plid) \
169 __field(u8, plink_state)
170#define SINFO_ASSIGN \
171 do { \
172 __entry->generation = sinfo->generation; \
173 __entry->connected_time = sinfo->connected_time; \
174 __entry->inactive_time = sinfo->inactive_time; \
175 __entry->rx_bytes = sinfo->rx_bytes; \
176 __entry->tx_bytes = sinfo->tx_bytes; \
177 __entry->rx_packets = sinfo->rx_packets; \
178 __entry->tx_packets = sinfo->tx_packets; \
179 __entry->tx_retries = sinfo->tx_retries; \
180 __entry->tx_failed = sinfo->tx_failed; \
181 __entry->rx_dropped_misc = sinfo->rx_dropped_misc; \
182 __entry->beacon_loss_count = sinfo->beacon_loss_count; \
183 __entry->llid = sinfo->llid; \
184 __entry->plid = sinfo->plid; \
185 __entry->plink_state = sinfo->plink_state; \
186 } while (0)
187
188#define BOOL_TO_STR(bo) (bo) ? "true" : "false"
189
Kyeyoon Parkfa9ffc72013-12-16 23:01:30 -0800190#define QOS_MAP_ENTRY __field(u8, num_des) \
191 __array(u8, dscp_exception, \
192 2 * IEEE80211_QOS_MAP_MAX_EX) \
193 __array(u8, up, IEEE80211_QOS_MAP_LEN_MIN)
194#define QOS_MAP_ASSIGN(qos_map) \
195 do { \
196 if ((qos_map)) { \
197 __entry->num_des = (qos_map)->num_des; \
198 memcpy(__entry->dscp_exception, \
199 &(qos_map)->dscp_exception, \
200 2 * IEEE80211_QOS_MAP_MAX_EX); \
201 memcpy(__entry->up, &(qos_map)->up, \
202 IEEE80211_QOS_MAP_LEN_MIN); \
203 } else { \
204 __entry->num_des = 0; \
205 memset(__entry->dscp_exception, 0, \
206 2 * IEEE80211_QOS_MAP_MAX_EX); \
207 memset(__entry->up, 0, \
208 IEEE80211_QOS_MAP_LEN_MIN); \
209 } \
210 } while (0)
211
Beni Lev14e8a3c2012-07-31 18:48:27 +0300212/*************************************************************
213 * rdev->ops traces *
214 *************************************************************/
215
216TRACE_EVENT(rdev_suspend,
217 TP_PROTO(struct wiphy *wiphy, struct cfg80211_wowlan *wow),
218 TP_ARGS(wiphy, wow),
219 TP_STRUCT__entry(
220 WIPHY_ENTRY
221 __field(bool, any)
222 __field(bool, disconnect)
223 __field(bool, magic_pkt)
224 __field(bool, gtk_rekey_failure)
225 __field(bool, eap_identity_req)
226 __field(bool, four_way_handshake)
227 __field(bool, rfkill_release)
228 __field(bool, valid_wow)
229 ),
230 TP_fast_assign(
231 WIPHY_ASSIGN;
232 if (wow) {
233 __entry->any = wow->any;
234 __entry->disconnect = wow->disconnect;
235 __entry->magic_pkt = wow->magic_pkt;
236 __entry->gtk_rekey_failure = wow->gtk_rekey_failure;
237 __entry->eap_identity_req = wow->eap_identity_req;
238 __entry->four_way_handshake = wow->four_way_handshake;
239 __entry->rfkill_release = wow->rfkill_release;
240 __entry->valid_wow = true;
241 } else {
242 __entry->valid_wow = false;
243 }
244 ),
245 TP_printk(WIPHY_PR_FMT ", wow%s - any: %d, disconnect: %d, "
246 "magic pkt: %d, gtk rekey failure: %d, eap identify req: %d, "
247 "four way handshake: %d, rfkill release: %d.",
248 WIPHY_PR_ARG, __entry->valid_wow ? "" : "(Not configured!)",
249 __entry->any, __entry->disconnect, __entry->magic_pkt,
250 __entry->gtk_rekey_failure, __entry->eap_identity_req,
251 __entry->four_way_handshake, __entry->rfkill_release)
252);
253
254TRACE_EVENT(rdev_return_int,
255 TP_PROTO(struct wiphy *wiphy, int ret),
256 TP_ARGS(wiphy, ret),
257 TP_STRUCT__entry(
258 WIPHY_ENTRY
259 __field(int, ret)
260 ),
261 TP_fast_assign(
262 WIPHY_ASSIGN;
263 __entry->ret = ret;
264 ),
265 TP_printk(WIPHY_PR_FMT ", returned: %d", WIPHY_PR_ARG, __entry->ret)
266);
267
268TRACE_EVENT(rdev_scan,
269 TP_PROTO(struct wiphy *wiphy, struct cfg80211_scan_request *request),
270 TP_ARGS(wiphy, request),
271 TP_STRUCT__entry(
272 WIPHY_ENTRY
273 ),
274 TP_fast_assign(
275 WIPHY_ASSIGN;
276 ),
277 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
278);
279
280DECLARE_EVENT_CLASS(wiphy_only_evt,
281 TP_PROTO(struct wiphy *wiphy),
282 TP_ARGS(wiphy),
283 TP_STRUCT__entry(
284 WIPHY_ENTRY
285 ),
286 TP_fast_assign(
287 WIPHY_ASSIGN;
288 ),
289 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
290);
291
292DEFINE_EVENT(wiphy_only_evt, rdev_resume,
293 TP_PROTO(struct wiphy *wiphy),
294 TP_ARGS(wiphy)
295);
296
297DEFINE_EVENT(wiphy_only_evt, rdev_return_void,
298 TP_PROTO(struct wiphy *wiphy),
299 TP_ARGS(wiphy)
300);
301
Beni Lev14e8a3c2012-07-31 18:48:27 +0300302DEFINE_EVENT(wiphy_only_evt, rdev_get_antenna,
303 TP_PROTO(struct wiphy *wiphy),
304 TP_ARGS(wiphy)
305);
306
Beni Lev14e8a3c2012-07-31 18:48:27 +0300307DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll,
308 TP_PROTO(struct wiphy *wiphy),
309 TP_ARGS(wiphy)
310);
311
312DECLARE_EVENT_CLASS(wiphy_enabled_evt,
313 TP_PROTO(struct wiphy *wiphy, bool enabled),
314 TP_ARGS(wiphy, enabled),
315 TP_STRUCT__entry(
316 WIPHY_ENTRY
317 __field(bool, enabled)
318 ),
319 TP_fast_assign(
320 WIPHY_ASSIGN;
321 __entry->enabled = enabled;
322 ),
323 TP_printk(WIPHY_PR_FMT ", %senabled ",
324 WIPHY_PR_ARG, __entry->enabled ? "" : "not ")
325);
326
327DEFINE_EVENT(wiphy_enabled_evt, rdev_set_wakeup,
328 TP_PROTO(struct wiphy *wiphy, bool enabled),
329 TP_ARGS(wiphy, enabled)
330);
331
332TRACE_EVENT(rdev_add_virtual_intf,
333 TP_PROTO(struct wiphy *wiphy, char *name, enum nl80211_iftype type),
334 TP_ARGS(wiphy, name, type),
335 TP_STRUCT__entry(
336 WIPHY_ENTRY
337 __string(vir_intf_name, name ? name : "<noname>")
338 __field(enum nl80211_iftype, type)
339 ),
340 TP_fast_assign(
341 WIPHY_ASSIGN;
342 __assign_str(vir_intf_name, name ? name : "<noname>");
343 __entry->type = type;
344 ),
345 TP_printk(WIPHY_PR_FMT ", virtual intf name: %s, type: %d",
346 WIPHY_PR_ARG, __get_str(vir_intf_name), __entry->type)
347);
348
349DECLARE_EVENT_CLASS(wiphy_wdev_evt,
350 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
351 TP_ARGS(wiphy, wdev),
352 TP_STRUCT__entry(
353 WIPHY_ENTRY
354 WDEV_ENTRY
355 ),
356 TP_fast_assign(
357 WIPHY_ASSIGN;
358 WDEV_ASSIGN;
359 ),
Johannes Bergec816082012-11-16 17:22:28 +0100360 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300361);
362
363DEFINE_EVENT(wiphy_wdev_evt, rdev_return_wdev,
364 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
365 TP_ARGS(wiphy, wdev)
366);
367
368DEFINE_EVENT(wiphy_wdev_evt, rdev_del_virtual_intf,
369 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
370 TP_ARGS(wiphy, wdev)
371);
372
373TRACE_EVENT(rdev_change_virtual_intf,
374 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
375 enum nl80211_iftype type),
376 TP_ARGS(wiphy, netdev, type),
377 TP_STRUCT__entry(
378 WIPHY_ENTRY
379 NETDEV_ENTRY
380 __field(enum nl80211_iftype, type)
381 ),
382 TP_fast_assign(
383 WIPHY_ASSIGN;
384 NETDEV_ASSIGN;
385 __entry->type = type;
386 ),
Johannes Bergec816082012-11-16 17:22:28 +0100387 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", type: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300388 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->type)
389);
390
391DECLARE_EVENT_CLASS(key_handle,
392 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
393 bool pairwise, const u8 *mac_addr),
394 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr),
395 TP_STRUCT__entry(
396 WIPHY_ENTRY
397 NETDEV_ENTRY
398 MAC_ENTRY(mac_addr)
399 __field(u8, key_index)
400 __field(bool, pairwise)
401 ),
402 TP_fast_assign(
403 WIPHY_ASSIGN;
404 NETDEV_ASSIGN;
405 MAC_ASSIGN(mac_addr, mac_addr);
406 __entry->key_index = key_index;
407 __entry->pairwise = pairwise;
408 ),
Johannes Bergec816082012-11-16 17:22:28 +0100409 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key_index: %u, pairwise: %s, mac addr: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300410 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
411 BOOL_TO_STR(__entry->pairwise), MAC_PR_ARG(mac_addr))
412);
413
414DEFINE_EVENT(key_handle, rdev_add_key,
415 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
416 bool pairwise, const u8 *mac_addr),
417 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
418);
419
420DEFINE_EVENT(key_handle, rdev_get_key,
421 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
422 bool pairwise, const u8 *mac_addr),
423 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
424);
425
426DEFINE_EVENT(key_handle, rdev_del_key,
427 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
428 bool pairwise, const u8 *mac_addr),
429 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
430);
431
432TRACE_EVENT(rdev_set_default_key,
433 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
434 bool unicast, bool multicast),
435 TP_ARGS(wiphy, netdev, key_index, unicast, multicast),
436 TP_STRUCT__entry(
437 WIPHY_ENTRY
438 NETDEV_ENTRY
439 __field(u8, key_index)
440 __field(bool, unicast)
441 __field(bool, multicast)
442 ),
443 TP_fast_assign(
444 WIPHY_ASSIGN;
445 NETDEV_ASSIGN;
446 __entry->key_index = key_index;
447 __entry->unicast = unicast;
448 __entry->multicast = multicast;
449 ),
Johannes Bergec816082012-11-16 17:22:28 +0100450 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u, unicast: %s, multicast: %s",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300451 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
452 BOOL_TO_STR(__entry->unicast),
453 BOOL_TO_STR(__entry->multicast))
454);
455
456TRACE_EVENT(rdev_set_default_mgmt_key,
457 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index),
458 TP_ARGS(wiphy, netdev, key_index),
459 TP_STRUCT__entry(
460 WIPHY_ENTRY
461 NETDEV_ENTRY
462 __field(u8, key_index)
463 ),
464 TP_fast_assign(
465 WIPHY_ASSIGN;
466 NETDEV_ASSIGN;
467 __entry->key_index = key_index;
468 ),
Johannes Bergec816082012-11-16 17:22:28 +0100469 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300470 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index)
471);
472
Jouni Malinena2be0702020-03-27 18:20:31 +0530473TRACE_EVENT(rdev_set_default_beacon_key,
474 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index),
475 TP_ARGS(wiphy, netdev, key_index),
476 TP_STRUCT__entry(
477 WIPHY_ENTRY
478 NETDEV_ENTRY
479 __field(u8, key_index)
480 ),
481 TP_fast_assign(
482 WIPHY_ASSIGN;
483 NETDEV_ASSIGN;
484 __entry->key_index = key_index;
485 ),
486 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u",
487 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index)
488);
489
Beni Lev14e8a3c2012-07-31 18:48:27 +0300490TRACE_EVENT(rdev_start_ap,
491 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
492 struct cfg80211_ap_settings *settings),
493 TP_ARGS(wiphy, netdev, settings),
494 TP_STRUCT__entry(
495 WIPHY_ENTRY
496 NETDEV_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +0100497 CHAN_DEF_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +0300498 __field(int, beacon_interval)
499 __field(int, dtim_period)
500 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
501 __field(enum nl80211_hidden_ssid, hidden_ssid)
502 __field(u32, wpa_ver)
503 __field(bool, privacy)
504 __field(enum nl80211_auth_type, auth_type)
505 __field(int, inactivity_timeout)
506 ),
507 TP_fast_assign(
508 WIPHY_ASSIGN;
509 NETDEV_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +0100510 CHAN_DEF_ASSIGN(&settings->chandef);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300511 __entry->beacon_interval = settings->beacon_interval;
512 __entry->dtim_period = settings->dtim_period;
513 __entry->hidden_ssid = settings->hidden_ssid;
514 __entry->wpa_ver = settings->crypto.wpa_versions;
515 __entry->privacy = settings->privacy;
516 __entry->auth_type = settings->auth_type;
517 __entry->inactivity_timeout = settings->inactivity_timeout;
518 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
519 memcpy(__entry->ssid, settings->ssid, settings->ssid_len);
520 ),
Johannes Bergec816082012-11-16 17:22:28 +0100521 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", AP settings - ssid: %s, "
Johannes Berg683b6d32012-11-08 21:25:48 +0100522 CHAN_DEF_PR_FMT ", beacon interval: %d, dtim period: %d, "
Beni Lev14e8a3c2012-07-31 18:48:27 +0300523 "hidden ssid: %d, wpa versions: %u, privacy: %s, "
524 "auth type: %d, inactivity timeout: %d",
Johannes Berg683b6d32012-11-08 21:25:48 +0100525 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ssid, CHAN_DEF_PR_ARG,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300526 __entry->beacon_interval, __entry->dtim_period,
527 __entry->hidden_ssid, __entry->wpa_ver,
528 BOOL_TO_STR(__entry->privacy), __entry->auth_type,
529 __entry->inactivity_timeout)
530);
531
532TRACE_EVENT(rdev_change_beacon,
533 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
534 struct cfg80211_beacon_data *info),
535 TP_ARGS(wiphy, netdev, info),
536 TP_STRUCT__entry(
537 WIPHY_ENTRY
538 NETDEV_ENTRY
539 __dynamic_array(u8, head, info ? info->head_len : 0)
540 __dynamic_array(u8, tail, info ? info->tail_len : 0)
541 __dynamic_array(u8, beacon_ies, info ? info->beacon_ies_len : 0)
542 __dynamic_array(u8, proberesp_ies,
543 info ? info->proberesp_ies_len : 0)
544 __dynamic_array(u8, assocresp_ies,
545 info ? info->assocresp_ies_len : 0)
546 __dynamic_array(u8, probe_resp, info ? info->probe_resp_len : 0)
547 ),
548 TP_fast_assign(
549 WIPHY_ASSIGN;
550 NETDEV_ASSIGN;
551 if (info) {
552 if (info->head)
553 memcpy(__get_dynamic_array(head), info->head,
554 info->head_len);
555 if (info->tail)
556 memcpy(__get_dynamic_array(tail), info->tail,
557 info->tail_len);
558 if (info->beacon_ies)
559 memcpy(__get_dynamic_array(beacon_ies),
560 info->beacon_ies, info->beacon_ies_len);
561 if (info->proberesp_ies)
562 memcpy(__get_dynamic_array(proberesp_ies),
563 info->proberesp_ies,
564 info->proberesp_ies_len);
565 if (info->assocresp_ies)
566 memcpy(__get_dynamic_array(assocresp_ies),
567 info->assocresp_ies,
568 info->assocresp_ies_len);
569 if (info->probe_resp)
570 memcpy(__get_dynamic_array(probe_resp),
571 info->probe_resp, info->probe_resp_len);
572 }
573 ),
Johannes Bergec816082012-11-16 17:22:28 +0100574 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300575);
576
577DECLARE_EVENT_CLASS(wiphy_netdev_evt,
578 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
579 TP_ARGS(wiphy, netdev),
580 TP_STRUCT__entry(
581 WIPHY_ENTRY
582 NETDEV_ENTRY
583 ),
584 TP_fast_assign(
585 WIPHY_ASSIGN;
586 NETDEV_ASSIGN;
587 ),
Johannes Bergec816082012-11-16 17:22:28 +0100588 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300589);
590
591DEFINE_EVENT(wiphy_netdev_evt, rdev_stop_ap,
592 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
593 TP_ARGS(wiphy, netdev)
594);
595
Beni Lev14e8a3c2012-07-31 18:48:27 +0300596DEFINE_EVENT(wiphy_netdev_evt, rdev_sched_scan_stop,
597 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
598 TP_ARGS(wiphy, netdev)
599);
600
601DEFINE_EVENT(wiphy_netdev_evt, rdev_set_rekey_data,
602 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
603 TP_ARGS(wiphy, netdev)
604);
605
606DEFINE_EVENT(wiphy_netdev_evt, rdev_get_mesh_config,
607 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
608 TP_ARGS(wiphy, netdev)
609);
610
611DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_mesh,
612 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
613 TP_ARGS(wiphy, netdev)
614);
615
616DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ibss,
617 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
618 TP_ARGS(wiphy, netdev)
619);
620
Rostislav Lisovy6e0bd6c2014-11-03 10:33:18 +0100621DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ocb,
622 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
623 TP_ARGS(wiphy, netdev)
624);
625
Beni Lev14e8a3c2012-07-31 18:48:27 +0300626DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa,
627 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
628 TP_ARGS(wiphy, netdev)
629);
630
631DECLARE_EVENT_CLASS(station_add_change,
632 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
633 struct station_parameters *params),
634 TP_ARGS(wiphy, netdev, mac, params),
635 TP_STRUCT__entry(
636 WIPHY_ENTRY
637 NETDEV_ENTRY
638 MAC_ENTRY(sta_mac)
639 __field(u32, sta_flags_mask)
640 __field(u32, sta_flags_set)
641 __field(u32, sta_modify_mask)
642 __field(int, listen_interval)
Johannes Berg6e045902015-10-22 22:27:47 +0300643 __field(u16, capability)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300644 __field(u16, aid)
645 __field(u8, plink_action)
646 __field(u8, plink_state)
647 __field(u8, uapsd_queues)
Johannes Berg6e045902015-10-22 22:27:47 +0300648 __field(u8, max_sp)
649 __field(u8, opmode_notif)
650 __field(bool, opmode_notif_used)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300651 __array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap))
Johannes Berg6e045902015-10-22 22:27:47 +0300652 __array(u8, vht_capa, (int)sizeof(struct ieee80211_vht_cap))
Johannes Berg5d8325e2015-03-20 19:56:41 +0100653 __array(char, vlan, IFNAMSIZ)
Johannes Berg6e045902015-10-22 22:27:47 +0300654 __dynamic_array(u8, supported_rates,
655 params->supported_rates_len)
656 __dynamic_array(u8, ext_capab, params->ext_capab_len)
657 __dynamic_array(u8, supported_channels,
658 params->supported_channels_len)
659 __dynamic_array(u8, supported_oper_classes,
660 params->supported_oper_classes_len)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300661 ),
662 TP_fast_assign(
663 WIPHY_ASSIGN;
664 NETDEV_ASSIGN;
665 MAC_ASSIGN(sta_mac, mac);
666 __entry->sta_flags_mask = params->sta_flags_mask;
667 __entry->sta_flags_set = params->sta_flags_set;
668 __entry->sta_modify_mask = params->sta_modify_mask;
669 __entry->listen_interval = params->listen_interval;
670 __entry->aid = params->aid;
671 __entry->plink_action = params->plink_action;
672 __entry->plink_state = params->plink_state;
673 __entry->uapsd_queues = params->uapsd_queues;
674 memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap));
675 if (params->ht_capa)
676 memcpy(__entry->ht_capa, params->ht_capa,
677 sizeof(struct ieee80211_ht_cap));
Johannes Berg6e045902015-10-22 22:27:47 +0300678 memset(__entry->vht_capa, 0, sizeof(struct ieee80211_vht_cap));
679 if (params->vht_capa)
680 memcpy(__entry->vht_capa, params->vht_capa,
681 sizeof(struct ieee80211_vht_cap));
Johannes Berg5d8325e2015-03-20 19:56:41 +0100682 memset(__entry->vlan, 0, sizeof(__entry->vlan));
683 if (params->vlan)
684 memcpy(__entry->vlan, params->vlan->name, IFNAMSIZ);
Johannes Berg6e045902015-10-22 22:27:47 +0300685 if (params->supported_rates && params->supported_rates_len)
686 memcpy(__get_dynamic_array(supported_rates),
687 params->supported_rates,
688 params->supported_rates_len);
689 if (params->ext_capab && params->ext_capab_len)
690 memcpy(__get_dynamic_array(ext_capab),
691 params->ext_capab,
692 params->ext_capab_len);
693 if (params->supported_channels &&
694 params->supported_channels_len)
695 memcpy(__get_dynamic_array(supported_channels),
696 params->supported_channels,
697 params->supported_channels_len);
698 if (params->supported_oper_classes &&
699 params->supported_oper_classes_len)
700 memcpy(__get_dynamic_array(supported_oper_classes),
701 params->supported_oper_classes,
702 params->supported_oper_classes_len);
703 __entry->max_sp = params->max_sp;
704 __entry->capability = params->capability;
705 __entry->opmode_notif = params->opmode_notif;
706 __entry->opmode_notif_used = params->opmode_notif_used;
Beni Lev14e8a3c2012-07-31 18:48:27 +0300707 ),
Johannes Bergec816082012-11-16 17:22:28 +0100708 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +0300709 ", station flags mask: %u, station flags set: %u, "
710 "station modify mask: %u, listen interval: %d, aid: %u, "
Johannes Berg5d8325e2015-03-20 19:56:41 +0100711 "plink action: %u, plink state: %u, uapsd queues: %u, vlan:%s",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300712 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
713 __entry->sta_flags_mask, __entry->sta_flags_set,
714 __entry->sta_modify_mask, __entry->listen_interval,
715 __entry->aid, __entry->plink_action, __entry->plink_state,
Johannes Berg5d8325e2015-03-20 19:56:41 +0100716 __entry->uapsd_queues, __entry->vlan)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300717);
718
719DEFINE_EVENT(station_add_change, rdev_add_station,
720 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
721 struct station_parameters *params),
722 TP_ARGS(wiphy, netdev, mac, params)
723);
724
725DEFINE_EVENT(station_add_change, rdev_change_station,
726 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
727 struct station_parameters *params),
728 TP_ARGS(wiphy, netdev, mac, params)
729);
730
731DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt,
732 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
733 TP_ARGS(wiphy, netdev, mac),
734 TP_STRUCT__entry(
735 WIPHY_ENTRY
736 NETDEV_ENTRY
737 MAC_ENTRY(sta_mac)
738 ),
739 TP_fast_assign(
740 WIPHY_ASSIGN;
741 NETDEV_ASSIGN;
742 MAC_ASSIGN(sta_mac, mac);
743 ),
Johannes Bergec816082012-11-16 17:22:28 +0100744 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300745 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac))
746);
747
Jouni Malinen89c771e2014-10-10 20:52:40 +0300748DECLARE_EVENT_CLASS(station_del,
749 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
750 struct station_del_parameters *params),
751 TP_ARGS(wiphy, netdev, params),
752 TP_STRUCT__entry(
753 WIPHY_ENTRY
754 NETDEV_ENTRY
755 MAC_ENTRY(sta_mac)
Jouni Malinen98856862014-10-20 13:20:45 +0300756 __field(u8, subtype)
757 __field(u16, reason_code)
Jouni Malinen89c771e2014-10-10 20:52:40 +0300758 ),
759 TP_fast_assign(
760 WIPHY_ASSIGN;
761 NETDEV_ASSIGN;
762 MAC_ASSIGN(sta_mac, params->mac);
Jouni Malinen98856862014-10-20 13:20:45 +0300763 __entry->subtype = params->subtype;
764 __entry->reason_code = params->reason_code;
Jouni Malinen89c771e2014-10-10 20:52:40 +0300765 ),
Jouni Malinen98856862014-10-20 13:20:45 +0300766 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
767 ", subtype: %u, reason_code: %u",
768 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
769 __entry->subtype, __entry->reason_code)
Jouni Malinen89c771e2014-10-10 20:52:40 +0300770);
771
772DEFINE_EVENT(station_del, rdev_del_station,
773 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
774 struct station_del_parameters *params),
775 TP_ARGS(wiphy, netdev, params)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300776);
777
778DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_station,
779 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
780 TP_ARGS(wiphy, netdev, mac)
781);
782
783DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath,
784 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
785 TP_ARGS(wiphy, netdev, mac)
786);
787
788DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_set_wds_peer,
789 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
790 TP_ARGS(wiphy, netdev, mac)
791);
792
793TRACE_EVENT(rdev_dump_station,
794 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
795 u8 *mac),
796 TP_ARGS(wiphy, netdev, idx, mac),
797 TP_STRUCT__entry(
798 WIPHY_ENTRY
799 NETDEV_ENTRY
800 MAC_ENTRY(sta_mac)
801 __field(int, idx)
802 ),
803 TP_fast_assign(
804 WIPHY_ASSIGN;
805 NETDEV_ASSIGN;
806 MAC_ASSIGN(sta_mac, mac);
807 __entry->idx = idx;
808 ),
Johannes Bergec816082012-11-16 17:22:28 +0100809 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT ", idx: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300810 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
811 __entry->idx)
812);
813
814TRACE_EVENT(rdev_return_int_station_info,
815 TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo),
816 TP_ARGS(wiphy, ret, sinfo),
817 TP_STRUCT__entry(
818 WIPHY_ENTRY
819 __field(int, ret)
820 SINFO_ENTRY
821 ),
822 TP_fast_assign(
823 WIPHY_ASSIGN;
824 __entry->ret = ret;
825 SINFO_ASSIGN;
826 ),
827 TP_printk(WIPHY_PR_FMT ", returned %d" ,
828 WIPHY_PR_ARG, __entry->ret)
829);
830
831DECLARE_EVENT_CLASS(mpath_evt,
832 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
833 u8 *next_hop),
834 TP_ARGS(wiphy, netdev, dst, next_hop),
835 TP_STRUCT__entry(
836 WIPHY_ENTRY
837 NETDEV_ENTRY
838 MAC_ENTRY(dst)
839 MAC_ENTRY(next_hop)
840 ),
841 TP_fast_assign(
842 WIPHY_ASSIGN;
843 NETDEV_ASSIGN;
844 MAC_ASSIGN(dst, dst);
845 MAC_ASSIGN(next_hop, next_hop);
846 ),
Johannes Bergec816082012-11-16 17:22:28 +0100847 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT ", next hop: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300848 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dst),
849 MAC_PR_ARG(next_hop))
850);
851
852DEFINE_EVENT(mpath_evt, rdev_add_mpath,
853 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
854 u8 *next_hop),
855 TP_ARGS(wiphy, netdev, dst, next_hop)
856);
857
858DEFINE_EVENT(mpath_evt, rdev_change_mpath,
859 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
860 u8 *next_hop),
861 TP_ARGS(wiphy, netdev, dst, next_hop)
862);
863
864DEFINE_EVENT(mpath_evt, rdev_get_mpath,
865 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
866 u8 *next_hop),
867 TP_ARGS(wiphy, netdev, dst, next_hop)
868);
869
870TRACE_EVENT(rdev_dump_mpath,
871 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
872 u8 *dst, u8 *next_hop),
873 TP_ARGS(wiphy, netdev, idx, dst, next_hop),
874 TP_STRUCT__entry(
875 WIPHY_ENTRY
876 NETDEV_ENTRY
877 MAC_ENTRY(dst)
878 MAC_ENTRY(next_hop)
879 __field(int, idx)
880 ),
881 TP_fast_assign(
882 WIPHY_ASSIGN;
883 NETDEV_ASSIGN;
884 MAC_ASSIGN(dst, dst);
885 MAC_ASSIGN(next_hop, next_hop);
886 __entry->idx = idx;
887 ),
Johannes Bergec816082012-11-16 17:22:28 +0100888 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
Beni Lev14e8a3c2012-07-31 18:48:27 +0300889 MAC_PR_FMT ", next hop: " MAC_PR_FMT,
890 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
891 MAC_PR_ARG(next_hop))
892);
893
Henning Rogge66be7d22014-09-12 08:58:49 +0200894TRACE_EVENT(rdev_get_mpp,
895 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
896 u8 *dst, u8 *mpp),
897 TP_ARGS(wiphy, netdev, dst, mpp),
898 TP_STRUCT__entry(
899 WIPHY_ENTRY
900 NETDEV_ENTRY
901 MAC_ENTRY(dst)
902 MAC_ENTRY(mpp)
903 ),
904 TP_fast_assign(
905 WIPHY_ASSIGN;
906 NETDEV_ASSIGN;
907 MAC_ASSIGN(dst, dst);
908 MAC_ASSIGN(mpp, mpp);
909 ),
910 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT
911 ", mpp: " MAC_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG,
912 MAC_PR_ARG(dst), MAC_PR_ARG(mpp))
913);
914
915TRACE_EVENT(rdev_dump_mpp,
916 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
917 u8 *dst, u8 *mpp),
918 TP_ARGS(wiphy, netdev, idx, mpp, dst),
919 TP_STRUCT__entry(
920 WIPHY_ENTRY
921 NETDEV_ENTRY
922 MAC_ENTRY(dst)
923 MAC_ENTRY(mpp)
924 __field(int, idx)
925 ),
926 TP_fast_assign(
927 WIPHY_ASSIGN;
928 NETDEV_ASSIGN;
929 MAC_ASSIGN(dst, dst);
930 MAC_ASSIGN(mpp, mpp);
931 __entry->idx = idx;
932 ),
933 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
934 MAC_PR_FMT ", mpp: " MAC_PR_FMT,
935 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
936 MAC_PR_ARG(mpp))
937);
938
Beni Lev14e8a3c2012-07-31 18:48:27 +0300939TRACE_EVENT(rdev_return_int_mpath_info,
940 TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo),
941 TP_ARGS(wiphy, ret, pinfo),
942 TP_STRUCT__entry(
943 WIPHY_ENTRY
944 __field(int, ret)
945 __field(int, generation)
946 __field(u32, filled)
947 __field(u32, frame_qlen)
948 __field(u32, sn)
949 __field(u32, metric)
950 __field(u32, exptime)
951 __field(u32, discovery_timeout)
952 __field(u8, discovery_retries)
953 __field(u8, flags)
954 ),
955 TP_fast_assign(
956 WIPHY_ASSIGN;
957 __entry->ret = ret;
958 __entry->generation = pinfo->generation;
959 __entry->filled = pinfo->filled;
960 __entry->frame_qlen = pinfo->frame_qlen;
961 __entry->sn = pinfo->sn;
962 __entry->metric = pinfo->metric;
963 __entry->exptime = pinfo->exptime;
964 __entry->discovery_timeout = pinfo->discovery_timeout;
965 __entry->discovery_retries = pinfo->discovery_retries;
966 __entry->flags = pinfo->flags;
967 ),
968 TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, "
969 "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u,"
970 " discovery timeout: %u, discovery retries: %u, flags: %u",
971 WIPHY_PR_ARG, __entry->ret, __entry->generation,
972 __entry->filled, __entry->frame_qlen, __entry->sn,
973 __entry->metric, __entry->exptime, __entry->discovery_timeout,
974 __entry->discovery_retries, __entry->flags)
975);
976
977TRACE_EVENT(rdev_return_int_mesh_config,
978 TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf),
979 TP_ARGS(wiphy, ret, conf),
980 TP_STRUCT__entry(
981 WIPHY_ENTRY
982 MESH_CFG_ENTRY
983 __field(int, ret)
984 ),
985 TP_fast_assign(
986 WIPHY_ASSIGN;
987 MESH_CFG_ASSIGN;
988 __entry->ret = ret;
989 ),
990 TP_printk(WIPHY_PR_FMT ", returned: %d",
991 WIPHY_PR_ARG, __entry->ret)
992);
993
994TRACE_EVENT(rdev_update_mesh_config,
995 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask,
996 const struct mesh_config *conf),
997 TP_ARGS(wiphy, netdev, mask, conf),
998 TP_STRUCT__entry(
999 WIPHY_ENTRY
1000 NETDEV_ENTRY
1001 MESH_CFG_ENTRY
1002 __field(u32, mask)
1003 ),
1004 TP_fast_assign(
1005 WIPHY_ASSIGN;
1006 NETDEV_ASSIGN;
1007 MESH_CFG_ASSIGN;
1008 __entry->mask = mask;
1009 ),
Johannes Bergec816082012-11-16 17:22:28 +01001010 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mask: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001011 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask)
1012);
1013
1014TRACE_EVENT(rdev_join_mesh,
1015 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1016 const struct mesh_config *conf,
1017 const struct mesh_setup *setup),
1018 TP_ARGS(wiphy, netdev, conf, setup),
1019 TP_STRUCT__entry(
1020 WIPHY_ENTRY
1021 NETDEV_ENTRY
1022 MESH_CFG_ENTRY
1023 ),
1024 TP_fast_assign(
1025 WIPHY_ASSIGN;
1026 NETDEV_ASSIGN;
1027 MESH_CFG_ASSIGN;
1028 ),
Johannes Bergec816082012-11-16 17:22:28 +01001029 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001030 WIPHY_PR_ARG, NETDEV_PR_ARG)
1031);
1032
1033TRACE_EVENT(rdev_change_bss,
1034 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1035 struct bss_parameters *params),
1036 TP_ARGS(wiphy, netdev, params),
1037 TP_STRUCT__entry(
1038 WIPHY_ENTRY
1039 NETDEV_ENTRY
1040 __field(int, use_cts_prot)
1041 __field(int, use_short_preamble)
1042 __field(int, use_short_slot_time)
1043 __field(int, ap_isolate)
1044 __field(int, ht_opmode)
1045 ),
1046 TP_fast_assign(
1047 WIPHY_ASSIGN;
1048 NETDEV_ASSIGN;
1049 __entry->use_cts_prot = params->use_cts_prot;
1050 __entry->use_short_preamble = params->use_short_preamble;
1051 __entry->use_short_slot_time = params->use_short_slot_time;
1052 __entry->ap_isolate = params->ap_isolate;
1053 __entry->ht_opmode = params->ht_opmode;
1054 ),
Johannes Bergec816082012-11-16 17:22:28 +01001055 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", use cts prot: %d, "
Beni Lev14e8a3c2012-07-31 18:48:27 +03001056 "use short preamble: %d, use short slot time: %d, "
1057 "ap isolate: %d, ht opmode: %d",
1058 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot,
1059 __entry->use_short_preamble, __entry->use_short_slot_time,
1060 __entry->ap_isolate, __entry->ht_opmode)
1061);
1062
1063TRACE_EVENT(rdev_set_txq_params,
1064 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1065 struct ieee80211_txq_params *params),
1066 TP_ARGS(wiphy, netdev, params),
1067 TP_STRUCT__entry(
1068 WIPHY_ENTRY
1069 NETDEV_ENTRY
1070 __field(enum nl80211_ac, ac)
1071 __field(u16, txop)
1072 __field(u16, cwmin)
1073 __field(u16, cwmax)
1074 __field(u8, aifs)
1075 ),
1076 TP_fast_assign(
1077 WIPHY_ASSIGN;
1078 NETDEV_ASSIGN;
1079 __entry->ac = params->ac;
1080 __entry->txop = params->txop;
1081 __entry->cwmin = params->cwmin;
1082 __entry->cwmax = params->cwmax;
1083 __entry->aifs = params->aifs;
1084 ),
Johannes Bergec816082012-11-16 17:22:28 +01001085 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", ac: %d, txop: %u, cwmin: %u, cwmax: %u, aifs: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001086 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop,
1087 __entry->cwmin, __entry->cwmax, __entry->aifs)
1088);
1089
1090TRACE_EVENT(rdev_libertas_set_mesh_channel,
1091 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1092 struct ieee80211_channel *chan),
1093 TP_ARGS(wiphy, netdev, chan),
1094 TP_STRUCT__entry(
1095 WIPHY_ENTRY
1096 NETDEV_ENTRY
1097 CHAN_ENTRY
1098 ),
1099 TP_fast_assign(
1100 WIPHY_ASSIGN;
1101 NETDEV_ASSIGN;
1102 CHAN_ASSIGN(chan);
1103 ),
Johannes Bergec816082012-11-16 17:22:28 +01001104 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_PR_FMT, WIPHY_PR_ARG,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001105 NETDEV_PR_ARG, CHAN_PR_ARG)
1106);
1107
1108TRACE_EVENT(rdev_set_monitor_channel,
Johannes Berg683b6d32012-11-08 21:25:48 +01001109 TP_PROTO(struct wiphy *wiphy,
1110 struct cfg80211_chan_def *chandef),
1111 TP_ARGS(wiphy, chandef),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001112 TP_STRUCT__entry(
1113 WIPHY_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01001114 CHAN_DEF_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001115 ),
1116 TP_fast_assign(
1117 WIPHY_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01001118 CHAN_DEF_ASSIGN(chandef);
Beni Lev14e8a3c2012-07-31 18:48:27 +03001119 ),
Johannes Bergec816082012-11-16 17:22:28 +01001120 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
Johannes Berg683b6d32012-11-08 21:25:48 +01001121 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001122);
1123
1124TRACE_EVENT(rdev_auth,
1125 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1126 struct cfg80211_auth_request *req),
1127 TP_ARGS(wiphy, netdev, req),
1128 TP_STRUCT__entry(
1129 WIPHY_ENTRY
1130 NETDEV_ENTRY
1131 MAC_ENTRY(bssid)
1132 __field(enum nl80211_auth_type, auth_type)
1133 ),
1134 TP_fast_assign(
1135 WIPHY_ASSIGN;
1136 NETDEV_ASSIGN;
1137 if (req->bss)
1138 MAC_ASSIGN(bssid, req->bss->bssid);
1139 else
Joe Perchesd2beae12015-03-02 19:54:58 -08001140 eth_zero_addr(__entry->bssid);
Beni Lev14e8a3c2012-07-31 18:48:27 +03001141 __entry->auth_type = req->auth_type;
1142 ),
Johannes Bergec816082012-11-16 17:22:28 +01001143 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", auth type: %d, bssid: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001144 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type,
1145 MAC_PR_ARG(bssid))
1146);
1147
1148TRACE_EVENT(rdev_assoc,
1149 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1150 struct cfg80211_assoc_request *req),
1151 TP_ARGS(wiphy, netdev, req),
1152 TP_STRUCT__entry(
1153 WIPHY_ENTRY
1154 NETDEV_ENTRY
1155 MAC_ENTRY(bssid)
1156 MAC_ENTRY(prev_bssid)
1157 __field(bool, use_mfp)
1158 __field(u32, flags)
1159 ),
1160 TP_fast_assign(
1161 WIPHY_ASSIGN;
1162 NETDEV_ASSIGN;
1163 if (req->bss)
1164 MAC_ASSIGN(bssid, req->bss->bssid);
1165 else
Joe Perchesd2beae12015-03-02 19:54:58 -08001166 eth_zero_addr(__entry->bssid);
Beni Lev14e8a3c2012-07-31 18:48:27 +03001167 MAC_ASSIGN(prev_bssid, req->prev_bssid);
1168 __entry->use_mfp = req->use_mfp;
1169 __entry->flags = req->flags;
1170 ),
Johannes Bergec816082012-11-16 17:22:28 +01001171 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001172 ", previous bssid: " MAC_PR_FMT ", use mfp: %s, flags: %u",
1173 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1174 MAC_PR_ARG(prev_bssid), BOOL_TO_STR(__entry->use_mfp),
1175 __entry->flags)
1176);
1177
1178TRACE_EVENT(rdev_deauth,
1179 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1180 struct cfg80211_deauth_request *req),
1181 TP_ARGS(wiphy, netdev, req),
1182 TP_STRUCT__entry(
1183 WIPHY_ENTRY
1184 NETDEV_ENTRY
1185 MAC_ENTRY(bssid)
1186 __field(u16, reason_code)
1187 ),
1188 TP_fast_assign(
1189 WIPHY_ASSIGN;
1190 NETDEV_ASSIGN;
1191 MAC_ASSIGN(bssid, req->bssid);
1192 __entry->reason_code = req->reason_code;
1193 ),
Johannes Bergec816082012-11-16 17:22:28 +01001194 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", reason: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001195 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1196 __entry->reason_code)
1197);
1198
1199TRACE_EVENT(rdev_disassoc,
1200 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1201 struct cfg80211_disassoc_request *req),
1202 TP_ARGS(wiphy, netdev, req),
1203 TP_STRUCT__entry(
1204 WIPHY_ENTRY
1205 NETDEV_ENTRY
1206 MAC_ENTRY(bssid)
1207 __field(u16, reason_code)
1208 __field(bool, local_state_change)
1209 ),
1210 TP_fast_assign(
1211 WIPHY_ASSIGN;
1212 NETDEV_ASSIGN;
1213 if (req->bss)
1214 MAC_ASSIGN(bssid, req->bss->bssid);
1215 else
Joe Perchesd2beae12015-03-02 19:54:58 -08001216 eth_zero_addr(__entry->bssid);
Beni Lev14e8a3c2012-07-31 18:48:27 +03001217 __entry->reason_code = req->reason_code;
1218 __entry->local_state_change = req->local_state_change;
1219 ),
Johannes Bergec816082012-11-16 17:22:28 +01001220 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001221 ", reason: %u, local state change: %s",
1222 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1223 __entry->reason_code,
1224 BOOL_TO_STR(__entry->local_state_change))
1225);
1226
1227TRACE_EVENT(rdev_mgmt_tx_cancel_wait,
1228 TP_PROTO(struct wiphy *wiphy,
1229 struct wireless_dev *wdev, u64 cookie),
1230 TP_ARGS(wiphy, wdev, cookie),
1231 TP_STRUCT__entry(
1232 WIPHY_ENTRY
1233 WDEV_ENTRY
1234 __field(u64, cookie)
1235 ),
1236 TP_fast_assign(
1237 WIPHY_ASSIGN;
1238 WDEV_ASSIGN;
1239 __entry->cookie = cookie;
1240 ),
Johannes Bergec816082012-11-16 17:22:28 +01001241 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001242 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1243);
1244
1245TRACE_EVENT(rdev_set_power_mgmt,
1246 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1247 bool enabled, int timeout),
1248 TP_ARGS(wiphy, netdev, enabled, timeout),
1249 TP_STRUCT__entry(
1250 WIPHY_ENTRY
1251 NETDEV_ENTRY
1252 __field(bool, enabled)
1253 __field(int, timeout)
1254 ),
1255 TP_fast_assign(
1256 WIPHY_ASSIGN;
1257 NETDEV_ASSIGN;
1258 __entry->enabled = enabled;
1259 __entry->timeout = timeout;
1260 ),
Johannes Bergec816082012-11-16 17:22:28 +01001261 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %senabled, timeout: %d ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001262 WIPHY_PR_ARG, NETDEV_PR_ARG,
1263 __entry->enabled ? "" : "not ", __entry->timeout)
1264);
1265
1266TRACE_EVENT(rdev_connect,
1267 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1268 struct cfg80211_connect_params *sme),
1269 TP_ARGS(wiphy, netdev, sme),
1270 TP_STRUCT__entry(
1271 WIPHY_ENTRY
1272 NETDEV_ENTRY
1273 MAC_ENTRY(bssid)
1274 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1275 __field(enum nl80211_auth_type, auth_type)
1276 __field(bool, privacy)
1277 __field(u32, wpa_versions)
1278 __field(u32, flags)
Jouni Malinenba6fbac2016-03-29 13:53:27 +03001279 MAC_ENTRY(prev_bssid)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001280 ),
1281 TP_fast_assign(
1282 WIPHY_ASSIGN;
1283 NETDEV_ASSIGN;
1284 MAC_ASSIGN(bssid, sme->bssid);
1285 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1286 memcpy(__entry->ssid, sme->ssid, sme->ssid_len);
1287 __entry->auth_type = sme->auth_type;
1288 __entry->privacy = sme->privacy;
1289 __entry->wpa_versions = sme->crypto.wpa_versions;
1290 __entry->flags = sme->flags;
Jouni Malinenba6fbac2016-03-29 13:53:27 +03001291 MAC_ASSIGN(prev_bssid, sme->prev_bssid);
Beni Lev14e8a3c2012-07-31 18:48:27 +03001292 ),
Johannes Bergec816082012-11-16 17:22:28 +01001293 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001294 ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, "
Jouni Malinenba6fbac2016-03-29 13:53:27 +03001295 "flags: %u, previous bssid: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001296 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid,
1297 __entry->auth_type, BOOL_TO_STR(__entry->privacy),
Jouni Malinenba6fbac2016-03-29 13:53:27 +03001298 __entry->wpa_versions, __entry->flags, MAC_PR_ARG(prev_bssid))
Beni Lev14e8a3c2012-07-31 18:48:27 +03001299);
1300
vamsi krishna30da4e82016-10-27 16:51:11 +03001301TRACE_EVENT(rdev_update_connect_params,
1302 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1303 struct cfg80211_connect_params *sme, u32 changed),
1304 TP_ARGS(wiphy, netdev, sme, changed),
1305 TP_STRUCT__entry(
1306 WIPHY_ENTRY
1307 NETDEV_ENTRY
1308 __field(u32, changed)
1309 ),
1310 TP_fast_assign(
1311 WIPHY_ASSIGN;
1312 NETDEV_ASSIGN;
1313 __entry->changed = changed;
1314 ),
1315 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", parameters changed: %u",
1316 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->changed)
1317);
1318
Beni Lev14e8a3c2012-07-31 18:48:27 +03001319TRACE_EVENT(rdev_set_cqm_rssi_config,
1320 TP_PROTO(struct wiphy *wiphy,
1321 struct net_device *netdev, s32 rssi_thold,
1322 u32 rssi_hyst),
1323 TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst),
1324 TP_STRUCT__entry(
1325 WIPHY_ENTRY
1326 NETDEV_ENTRY
1327 __field(s32, rssi_thold)
1328 __field(u32, rssi_hyst)
1329 ),
1330 TP_fast_assign(
1331 WIPHY_ASSIGN;
1332 NETDEV_ASSIGN;
1333 __entry->rssi_thold = rssi_thold;
1334 __entry->rssi_hyst = rssi_hyst;
1335 ),
Johannes Bergec816082012-11-16 17:22:28 +01001336 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001337 ", rssi_thold: %d, rssi_hyst: %u ",
1338 WIPHY_PR_ARG, NETDEV_PR_ARG,
1339 __entry->rssi_thold, __entry->rssi_hyst)
1340);
1341
1342TRACE_EVENT(rdev_set_cqm_txe_config,
1343 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate,
1344 u32 pkts, u32 intvl),
1345 TP_ARGS(wiphy, netdev, rate, pkts, intvl),
1346 TP_STRUCT__entry(
1347 WIPHY_ENTRY
1348 NETDEV_ENTRY
1349 __field(u32, rate)
1350 __field(u32, pkts)
1351 __field(u32, intvl)
1352 ),
1353 TP_fast_assign(
1354 WIPHY_ASSIGN;
1355 NETDEV_ASSIGN;
1356 __entry->rate = rate;
1357 __entry->pkts = pkts;
1358 __entry->intvl = intvl;
1359 ),
Johannes Bergec816082012-11-16 17:22:28 +01001360 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001361 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts,
1362 __entry->intvl)
1363);
1364
1365TRACE_EVENT(rdev_disconnect,
1366 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1367 u16 reason_code),
1368 TP_ARGS(wiphy, netdev, reason_code),
1369 TP_STRUCT__entry(
1370 WIPHY_ENTRY
1371 NETDEV_ENTRY
1372 __field(u16, reason_code)
1373 ),
1374 TP_fast_assign(
1375 WIPHY_ASSIGN;
1376 NETDEV_ASSIGN;
1377 __entry->reason_code = reason_code;
1378 ),
Johannes Bergec816082012-11-16 17:22:28 +01001379 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001380 NETDEV_PR_ARG, __entry->reason_code)
1381);
1382
1383TRACE_EVENT(rdev_join_ibss,
1384 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1385 struct cfg80211_ibss_params *params),
1386 TP_ARGS(wiphy, netdev, params),
1387 TP_STRUCT__entry(
1388 WIPHY_ENTRY
1389 NETDEV_ENTRY
1390 MAC_ENTRY(bssid)
1391 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1392 ),
1393 TP_fast_assign(
1394 WIPHY_ASSIGN;
1395 NETDEV_ASSIGN;
1396 MAC_ASSIGN(bssid, params->bssid);
1397 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1398 memcpy(__entry->ssid, params->ssid, params->ssid_len);
1399 ),
Johannes Bergec816082012-11-16 17:22:28 +01001400 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001401 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid)
1402);
1403
Rostislav Lisovy6e0bd6c2014-11-03 10:33:18 +01001404TRACE_EVENT(rdev_join_ocb,
1405 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1406 const struct ocb_setup *setup),
1407 TP_ARGS(wiphy, netdev, setup),
1408 TP_STRUCT__entry(
1409 WIPHY_ENTRY
1410 NETDEV_ENTRY
1411 ),
1412 TP_fast_assign(
1413 WIPHY_ASSIGN;
1414 NETDEV_ASSIGN;
1415 ),
1416 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
1417 WIPHY_PR_ARG, NETDEV_PR_ARG)
1418);
1419
Beni Lev14e8a3c2012-07-31 18:48:27 +03001420TRACE_EVENT(rdev_set_wiphy_params,
1421 TP_PROTO(struct wiphy *wiphy, u32 changed),
1422 TP_ARGS(wiphy, changed),
1423 TP_STRUCT__entry(
1424 WIPHY_ENTRY
1425 __field(u32, changed)
1426 ),
1427 TP_fast_assign(
1428 WIPHY_ASSIGN;
1429 __entry->changed = changed;
1430 ),
1431 TP_printk(WIPHY_PR_FMT ", changed: %u",
1432 WIPHY_PR_ARG, __entry->changed)
1433);
1434
Johannes Bergc8442112012-10-24 10:17:18 +02001435DEFINE_EVENT(wiphy_wdev_evt, rdev_get_tx_power,
1436 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1437 TP_ARGS(wiphy, wdev)
1438);
1439
Beni Lev14e8a3c2012-07-31 18:48:27 +03001440TRACE_EVENT(rdev_set_tx_power,
Johannes Bergc8442112012-10-24 10:17:18 +02001441 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1442 enum nl80211_tx_power_setting type, int mbm),
1443 TP_ARGS(wiphy, wdev, type, mbm),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001444 TP_STRUCT__entry(
1445 WIPHY_ENTRY
Johannes Bergc8442112012-10-24 10:17:18 +02001446 WDEV_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001447 __field(enum nl80211_tx_power_setting, type)
1448 __field(int, mbm)
1449 ),
1450 TP_fast_assign(
1451 WIPHY_ASSIGN;
Johannes Bergc8442112012-10-24 10:17:18 +02001452 WDEV_ASSIGN;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001453 __entry->type = type;
1454 __entry->mbm = mbm;
1455 ),
Johannes Bergec816082012-11-16 17:22:28 +01001456 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d",
Johannes Bergc8442112012-10-24 10:17:18 +02001457 WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001458);
1459
1460TRACE_EVENT(rdev_return_int_int,
1461 TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill),
1462 TP_ARGS(wiphy, func_ret, func_fill),
1463 TP_STRUCT__entry(
1464 WIPHY_ENTRY
1465 __field(int, func_ret)
1466 __field(int, func_fill)
1467 ),
1468 TP_fast_assign(
1469 WIPHY_ASSIGN;
1470 __entry->func_ret = func_ret;
1471 __entry->func_fill = func_fill;
1472 ),
1473 TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d",
1474 WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill)
1475);
1476
1477#ifdef CONFIG_NL80211_TESTMODE
1478TRACE_EVENT(rdev_testmode_cmd,
David Spinadelfc73f112013-07-31 18:04:15 +03001479 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1480 TP_ARGS(wiphy, wdev),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001481 TP_STRUCT__entry(
1482 WIPHY_ENTRY
David Spinadelfc73f112013-07-31 18:04:15 +03001483 WDEV_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001484 ),
1485 TP_fast_assign(
1486 WIPHY_ASSIGN;
David Spinadelfc73f112013-07-31 18:04:15 +03001487 WDEV_ASSIGN;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001488 ),
David Spinadelfc73f112013-07-31 18:04:15 +03001489 TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001490);
1491
1492TRACE_EVENT(rdev_testmode_dump,
1493 TP_PROTO(struct wiphy *wiphy),
1494 TP_ARGS(wiphy),
1495 TP_STRUCT__entry(
1496 WIPHY_ENTRY
1497 ),
1498 TP_fast_assign(
1499 WIPHY_ASSIGN;
1500 ),
1501 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
1502);
1503#endif /* CONFIG_NL80211_TESTMODE */
1504
1505TRACE_EVENT(rdev_set_bitrate_mask,
1506 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1507 const u8 *peer, const struct cfg80211_bitrate_mask *mask),
1508 TP_ARGS(wiphy, netdev, peer, mask),
1509 TP_STRUCT__entry(
1510 WIPHY_ENTRY
1511 NETDEV_ENTRY
1512 MAC_ENTRY(peer)
1513 ),
1514 TP_fast_assign(
1515 WIPHY_ASSIGN;
1516 NETDEV_ASSIGN;
1517 MAC_ASSIGN(peer, peer);
1518 ),
Johannes Bergec816082012-11-16 17:22:28 +01001519 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001520 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1521);
1522
1523TRACE_EVENT(rdev_mgmt_frame_register,
1524 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1525 u16 frame_type, bool reg),
1526 TP_ARGS(wiphy, wdev, frame_type, reg),
1527 TP_STRUCT__entry(
1528 WIPHY_ENTRY
1529 WDEV_ENTRY
1530 __field(u16, frame_type)
1531 __field(bool, reg)
1532 ),
1533 TP_fast_assign(
1534 WIPHY_ASSIGN;
1535 WDEV_ASSIGN;
1536 __entry->frame_type = frame_type;
1537 __entry->reg = reg;
1538 ),
Johannes Bergec816082012-11-16 17:22:28 +01001539 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", frame_type: 0x%.2x, reg: %s ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001540 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->frame_type,
1541 __entry->reg ? "true" : "false")
1542);
1543
1544TRACE_EVENT(rdev_return_int_tx_rx,
1545 TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx),
1546 TP_ARGS(wiphy, ret, tx, rx),
1547 TP_STRUCT__entry(
1548 WIPHY_ENTRY
1549 __field(int, ret)
1550 __field(u32, tx)
1551 __field(u32, rx)
1552 ),
1553 TP_fast_assign(
1554 WIPHY_ASSIGN;
1555 __entry->ret = ret;
1556 __entry->tx = tx;
1557 __entry->rx = rx;
1558 ),
1559 TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u",
1560 WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx)
1561);
1562
1563TRACE_EVENT(rdev_return_void_tx_rx,
1564 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max,
1565 u32 rx, u32 rx_max),
1566 TP_ARGS(wiphy, tx, tx_max, rx, rx_max),
1567 TP_STRUCT__entry(
1568 WIPHY_ENTRY
1569 __field(u32, tx)
1570 __field(u32, tx_max)
1571 __field(u32, rx)
1572 __field(u32, rx_max)
1573 ),
1574 TP_fast_assign(
1575 WIPHY_ASSIGN;
1576 __entry->tx = tx;
1577 __entry->tx_max = tx_max;
1578 __entry->rx = rx;
1579 __entry->rx_max = rx_max;
1580 ),
1581 TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ",
1582 WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx,
1583 __entry->rx_max)
1584);
1585
1586DECLARE_EVENT_CLASS(tx_rx_evt,
1587 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1588 TP_ARGS(wiphy, rx, tx),
1589 TP_STRUCT__entry(
1590 WIPHY_ENTRY
1591 __field(u32, tx)
1592 __field(u32, rx)
1593 ),
1594 TP_fast_assign(
1595 WIPHY_ASSIGN;
1596 __entry->tx = tx;
1597 __entry->rx = rx;
1598 ),
1599 TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ",
1600 WIPHY_PR_ARG, __entry->tx, __entry->rx)
1601);
1602
Beni Lev14e8a3c2012-07-31 18:48:27 +03001603DEFINE_EVENT(tx_rx_evt, rdev_set_antenna,
1604 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1605 TP_ARGS(wiphy, rx, tx)
1606);
1607
1608TRACE_EVENT(rdev_sched_scan_start,
1609 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1610 struct cfg80211_sched_scan_request *request),
1611 TP_ARGS(wiphy, netdev, request),
1612 TP_STRUCT__entry(
1613 WIPHY_ENTRY
1614 NETDEV_ENTRY
1615 ),
1616 TP_fast_assign(
1617 WIPHY_ASSIGN;
1618 NETDEV_ASSIGN;
1619 ),
Johannes Bergec816082012-11-16 17:22:28 +01001620 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001621 WIPHY_PR_ARG, NETDEV_PR_ARG)
1622);
1623
1624TRACE_EVENT(rdev_tdls_mgmt,
1625 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1626 u8 *peer, u8 action_code, u8 dialog_token,
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301627 u16 status_code, u32 peer_capability,
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001628 bool initiator, const u8 *buf, size_t len),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001629 TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code,
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001630 peer_capability, initiator, buf, len),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001631 TP_STRUCT__entry(
1632 WIPHY_ENTRY
1633 NETDEV_ENTRY
1634 MAC_ENTRY(peer)
1635 __field(u8, action_code)
1636 __field(u8, dialog_token)
1637 __field(u16, status_code)
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301638 __field(u32, peer_capability)
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001639 __field(bool, initiator)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001640 __dynamic_array(u8, buf, len)
1641 ),
1642 TP_fast_assign(
1643 WIPHY_ASSIGN;
1644 NETDEV_ASSIGN;
1645 MAC_ASSIGN(peer, peer);
1646 __entry->action_code = action_code;
1647 __entry->dialog_token = dialog_token;
1648 __entry->status_code = status_code;
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301649 __entry->peer_capability = peer_capability;
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001650 __entry->initiator = initiator;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001651 memcpy(__get_dynamic_array(buf), buf, len);
1652 ),
Johannes Bergec816082012-11-16 17:22:28 +01001653 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", action_code: %u, "
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001654 "dialog_token: %u, status_code: %u, peer_capability: %u "
1655 "initiator: %s buf: %#.2x ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001656 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
1657 __entry->action_code, __entry->dialog_token,
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301658 __entry->status_code, __entry->peer_capability,
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001659 BOOL_TO_STR(__entry->initiator),
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301660 ((u8 *)__get_dynamic_array(buf))[0])
Beni Lev14e8a3c2012-07-31 18:48:27 +03001661);
1662
1663TRACE_EVENT(rdev_dump_survey,
1664 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx),
1665 TP_ARGS(wiphy, netdev, idx),
1666 TP_STRUCT__entry(
1667 WIPHY_ENTRY
1668 NETDEV_ENTRY
1669 __field(int, idx)
1670 ),
1671 TP_fast_assign(
1672 WIPHY_ASSIGN;
1673 NETDEV_ASSIGN;
1674 __entry->idx = idx;
1675 ),
Johannes Bergec816082012-11-16 17:22:28 +01001676 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001677 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx)
1678);
1679
1680TRACE_EVENT(rdev_return_int_survey_info,
1681 TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info),
1682 TP_ARGS(wiphy, ret, info),
1683 TP_STRUCT__entry(
1684 WIPHY_ENTRY
1685 CHAN_ENTRY
1686 __field(int, ret)
Johannes Berg4ed20be2014-11-14 16:35:34 +01001687 __field(u64, time)
1688 __field(u64, time_busy)
1689 __field(u64, time_ext_busy)
1690 __field(u64, time_rx)
1691 __field(u64, time_tx)
Johannes Berg052536a2014-11-14 16:44:11 +01001692 __field(u64, time_scan)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001693 __field(u32, filled)
1694 __field(s8, noise)
1695 ),
1696 TP_fast_assign(
1697 WIPHY_ASSIGN;
1698 CHAN_ASSIGN(info->channel);
1699 __entry->ret = ret;
Johannes Berg4ed20be2014-11-14 16:35:34 +01001700 __entry->time = info->time;
1701 __entry->time_busy = info->time_busy;
1702 __entry->time_ext_busy = info->time_ext_busy;
1703 __entry->time_rx = info->time_rx;
1704 __entry->time_tx = info->time_tx;
Johannes Berg052536a2014-11-14 16:44:11 +01001705 __entry->time_scan = info->time_scan;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001706 __entry->filled = info->filled;
1707 __entry->noise = info->noise;
1708 ),
1709 TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT
1710 ", channel time: %llu, channel time busy: %llu, "
1711 "channel time extension busy: %llu, channel time rx: %llu, "
Johannes Berg052536a2014-11-14 16:44:11 +01001712 "channel time tx: %llu, scan time: %llu, filled: %u, noise: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001713 WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG,
Johannes Berg4ed20be2014-11-14 16:35:34 +01001714 __entry->time, __entry->time_busy,
1715 __entry->time_ext_busy, __entry->time_rx,
Johannes Berg052536a2014-11-14 16:44:11 +01001716 __entry->time_tx, __entry->time_scan,
1717 __entry->filled, __entry->noise)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001718);
1719
1720TRACE_EVENT(rdev_tdls_oper,
1721 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1722 u8 *peer, enum nl80211_tdls_operation oper),
1723 TP_ARGS(wiphy, netdev, peer, oper),
1724 TP_STRUCT__entry(
1725 WIPHY_ENTRY
1726 NETDEV_ENTRY
1727 MAC_ENTRY(peer)
1728 __field(enum nl80211_tdls_operation, oper)
1729 ),
1730 TP_fast_assign(
1731 WIPHY_ASSIGN;
1732 NETDEV_ASSIGN;
1733 MAC_ASSIGN(peer, peer);
1734 __entry->oper = oper;
1735 ),
Johannes Bergec816082012-11-16 17:22:28 +01001736 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", oper: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001737 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper)
1738);
1739
1740DECLARE_EVENT_CLASS(rdev_pmksa,
1741 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1742 struct cfg80211_pmksa *pmksa),
1743 TP_ARGS(wiphy, netdev, pmksa),
1744 TP_STRUCT__entry(
1745 WIPHY_ENTRY
1746 NETDEV_ENTRY
1747 MAC_ENTRY(bssid)
1748 ),
1749 TP_fast_assign(
1750 WIPHY_ASSIGN;
1751 NETDEV_ASSIGN;
1752 MAC_ASSIGN(bssid, pmksa->bssid);
1753 ),
Johannes Bergec816082012-11-16 17:22:28 +01001754 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001755 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid))
1756);
1757
1758TRACE_EVENT(rdev_probe_client,
1759 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1760 const u8 *peer),
1761 TP_ARGS(wiphy, netdev, peer),
1762 TP_STRUCT__entry(
1763 WIPHY_ENTRY
1764 NETDEV_ENTRY
1765 MAC_ENTRY(peer)
1766 ),
1767 TP_fast_assign(
1768 WIPHY_ASSIGN;
1769 NETDEV_ASSIGN;
1770 MAC_ASSIGN(peer, peer);
1771 ),
Johannes Bergec816082012-11-16 17:22:28 +01001772 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001773 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1774);
1775
1776DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa,
1777 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1778 struct cfg80211_pmksa *pmksa),
1779 TP_ARGS(wiphy, netdev, pmksa)
1780);
1781
1782DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa,
1783 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1784 struct cfg80211_pmksa *pmksa),
1785 TP_ARGS(wiphy, netdev, pmksa)
1786);
1787
1788TRACE_EVENT(rdev_remain_on_channel,
1789 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1790 struct ieee80211_channel *chan,
Johannes Berg42d97a52012-11-08 18:31:02 +01001791 unsigned int duration),
1792 TP_ARGS(wiphy, wdev, chan, duration),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001793 TP_STRUCT__entry(
1794 WIPHY_ENTRY
1795 WDEV_ENTRY
1796 CHAN_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001797 __field(unsigned int, duration)
1798 ),
1799 TP_fast_assign(
1800 WIPHY_ASSIGN;
1801 WDEV_ASSIGN;
1802 CHAN_ASSIGN(chan);
Beni Lev14e8a3c2012-07-31 18:48:27 +03001803 __entry->duration = duration;
1804 ),
Johannes Bergec816082012-11-16 17:22:28 +01001805 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", duration: %u",
Johannes Berg42d97a52012-11-08 18:31:02 +01001806 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001807);
1808
1809TRACE_EVENT(rdev_return_int_cookie,
1810 TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie),
1811 TP_ARGS(wiphy, ret, cookie),
1812 TP_STRUCT__entry(
1813 WIPHY_ENTRY
1814 __field(int, ret)
1815 __field(u64, cookie)
1816 ),
1817 TP_fast_assign(
1818 WIPHY_ASSIGN;
1819 __entry->ret = ret;
1820 __entry->cookie = cookie;
1821 ),
1822 TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu",
1823 WIPHY_PR_ARG, __entry->ret, __entry->cookie)
1824);
1825
1826TRACE_EVENT(rdev_cancel_remain_on_channel,
1827 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
1828 TP_ARGS(wiphy, wdev, cookie),
1829 TP_STRUCT__entry(
1830 WIPHY_ENTRY
1831 WDEV_ENTRY
1832 __field(u64, cookie)
1833 ),
1834 TP_fast_assign(
1835 WIPHY_ASSIGN;
1836 WDEV_ASSIGN;
1837 __entry->cookie = cookie;
1838 ),
Johannes Bergec816082012-11-16 17:22:28 +01001839 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001840 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1841);
1842
1843TRACE_EVENT(rdev_mgmt_tx,
1844 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
Andrei Otcheretianskib176e622013-11-18 19:06:49 +02001845 struct cfg80211_mgmt_tx_params *params),
1846 TP_ARGS(wiphy, wdev, params),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001847 TP_STRUCT__entry(
1848 WIPHY_ENTRY
1849 WDEV_ENTRY
1850 CHAN_ENTRY
1851 __field(bool, offchan)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001852 __field(unsigned int, wait)
1853 __field(bool, no_cck)
1854 __field(bool, dont_wait_for_ack)
1855 ),
1856 TP_fast_assign(
1857 WIPHY_ASSIGN;
1858 WDEV_ASSIGN;
Andrei Otcheretianskib176e622013-11-18 19:06:49 +02001859 CHAN_ASSIGN(params->chan);
1860 __entry->offchan = params->offchan;
1861 __entry->wait = params->wait;
1862 __entry->no_cck = params->no_cck;
1863 __entry->dont_wait_for_ack = params->dont_wait_for_ack;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001864 ),
Johannes Bergec816082012-11-16 17:22:28 +01001865 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s,"
Johannes Berg42d97a52012-11-08 18:31:02 +01001866 " wait: %u, no cck: %s, dont wait for ack: %s",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001867 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG,
Johannes Berg42d97a52012-11-08 18:31:02 +01001868 BOOL_TO_STR(__entry->offchan), __entry->wait,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001869 BOOL_TO_STR(__entry->no_cck),
1870 BOOL_TO_STR(__entry->dont_wait_for_ack))
1871);
1872
1873TRACE_EVENT(rdev_set_noack_map,
1874 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1875 u16 noack_map),
1876 TP_ARGS(wiphy, netdev, noack_map),
1877 TP_STRUCT__entry(
1878 WIPHY_ENTRY
1879 NETDEV_ENTRY
1880 __field(u16, noack_map)
1881 ),
1882 TP_fast_assign(
1883 WIPHY_ASSIGN;
1884 NETDEV_ASSIGN;
1885 __entry->noack_map = noack_map;
1886 ),
Johannes Bergec816082012-11-16 17:22:28 +01001887 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", noack_map: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001888 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map)
1889);
1890
Beni Lev14e8a3c2012-07-31 18:48:27 +03001891DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel,
1892 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1893 TP_ARGS(wiphy, wdev)
1894);
1895
Johannes Berg683b6d32012-11-08 21:25:48 +01001896TRACE_EVENT(rdev_return_chandef,
1897 TP_PROTO(struct wiphy *wiphy, int ret,
1898 struct cfg80211_chan_def *chandef),
1899 TP_ARGS(wiphy, ret, chandef),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001900 TP_STRUCT__entry(
1901 WIPHY_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01001902 __field(int, ret)
1903 CHAN_DEF_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001904 ),
1905 TP_fast_assign(
1906 WIPHY_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01001907 if (ret == 0)
1908 CHAN_DEF_ASSIGN(chandef);
1909 else
1910 CHAN_DEF_ASSIGN((struct cfg80211_chan_def *)NULL);
1911 __entry->ret = ret;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001912 ),
Johannes Bergec816082012-11-16 17:22:28 +01001913 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", ret: %d",
Johannes Berg683b6d32012-11-08 21:25:48 +01001914 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->ret)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001915);
1916
Johannes Bergeeb126e2012-10-23 15:16:50 +02001917DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device,
1918 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1919 TP_ARGS(wiphy, wdev)
1920);
1921
1922DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device,
1923 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1924 TP_ARGS(wiphy, wdev)
1925);
1926
Ayala Bekercb3b7d82016-09-20 17:31:13 +03001927TRACE_EVENT(rdev_start_nan,
1928 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1929 struct cfg80211_nan_conf *conf),
1930 TP_ARGS(wiphy, wdev, conf),
1931 TP_STRUCT__entry(
1932 WIPHY_ENTRY
1933 WDEV_ENTRY
1934 __field(u8, master_pref)
1935 __field(u8, dual);
1936 ),
1937 TP_fast_assign(
1938 WIPHY_ASSIGN;
1939 WDEV_ASSIGN;
1940 __entry->master_pref = conf->master_pref;
1941 __entry->dual = conf->dual;
1942 ),
1943 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
1944 ", master preference: %u, dual: %d",
1945 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->master_pref,
1946 __entry->dual)
1947);
1948
Ayala Bekera5a9dcf2016-09-20 17:31:16 +03001949TRACE_EVENT(rdev_nan_change_conf,
1950 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1951 struct cfg80211_nan_conf *conf, u32 changes),
1952 TP_ARGS(wiphy, wdev, conf, changes),
1953 TP_STRUCT__entry(
1954 WIPHY_ENTRY
1955 WDEV_ENTRY
1956 __field(u8, master_pref)
1957 __field(u8, dual);
1958 __field(u32, changes);
1959 ),
1960 TP_fast_assign(
1961 WIPHY_ASSIGN;
1962 WDEV_ASSIGN;
1963 __entry->master_pref = conf->master_pref;
1964 __entry->dual = conf->dual;
1965 __entry->changes = changes;
1966 ),
1967 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
1968 ", master preference: %u, dual: %d, changes: %x",
1969 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->master_pref,
1970 __entry->dual, __entry->changes)
1971);
1972
Ayala Bekercb3b7d82016-09-20 17:31:13 +03001973DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_nan,
1974 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1975 TP_ARGS(wiphy, wdev)
1976);
1977
Ayala Bekera442b762016-09-20 17:31:15 +03001978TRACE_EVENT(rdev_add_nan_func,
1979 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1980 const struct cfg80211_nan_func *func),
1981 TP_ARGS(wiphy, wdev, func),
1982 TP_STRUCT__entry(
1983 WIPHY_ENTRY
1984 WDEV_ENTRY
1985 __field(u8, func_type)
1986 __field(u64, cookie)
1987 ),
1988 TP_fast_assign(
1989 WIPHY_ASSIGN;
1990 WDEV_ASSIGN;
1991 __entry->func_type = func->type;
1992 __entry->cookie = func->cookie
1993 ),
1994 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type=%u, cookie=%llu",
1995 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->func_type,
1996 __entry->cookie)
1997);
1998
1999TRACE_EVENT(rdev_del_nan_func,
2000 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2001 u64 cookie),
2002 TP_ARGS(wiphy, wdev, cookie),
2003 TP_STRUCT__entry(
2004 WIPHY_ENTRY
2005 WDEV_ENTRY
2006 __field(u64, cookie)
2007 ),
2008 TP_fast_assign(
2009 WIPHY_ASSIGN;
2010 WDEV_ASSIGN;
2011 __entry->cookie = cookie;
2012 ),
2013 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie=%llu",
2014 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
2015);
2016
Vasanthakumar Thiagarajan77765ea2013-01-18 11:18:45 +05302017TRACE_EVENT(rdev_set_mac_acl,
2018 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2019 struct cfg80211_acl_data *params),
2020 TP_ARGS(wiphy, netdev, params),
2021 TP_STRUCT__entry(
2022 WIPHY_ENTRY
2023 NETDEV_ENTRY
2024 __field(u32, acl_policy)
2025 ),
2026 TP_fast_assign(
2027 WIPHY_ASSIGN;
Vladimir Kondratiev021fcdc2013-03-07 11:08:29 +02002028 NETDEV_ASSIGN;
Vasanthakumar Thiagarajan77765ea2013-01-18 11:18:45 +05302029 __entry->acl_policy = params->acl_policy;
2030 ),
2031 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", acl policy: %d",
2032 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->acl_policy)
2033);
2034
Jouni Malinen355199e2013-02-27 17:14:27 +02002035TRACE_EVENT(rdev_update_ft_ies,
2036 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2037 struct cfg80211_update_ft_ies_params *ftie),
2038 TP_ARGS(wiphy, netdev, ftie),
2039 TP_STRUCT__entry(
2040 WIPHY_ENTRY
2041 NETDEV_ENTRY
2042 __field(u16, md)
2043 __dynamic_array(u8, ie, ftie->ie_len)
2044 ),
2045 TP_fast_assign(
2046 WIPHY_ASSIGN;
2047 NETDEV_ASSIGN;
2048 __entry->md = ftie->md;
2049 memcpy(__get_dynamic_array(ie), ftie->ie, ftie->ie_len);
2050 ),
2051 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", md: 0x%x",
2052 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->md)
2053);
2054
Arend van Spriel5de17982013-04-18 15:49:00 +02002055TRACE_EVENT(rdev_crit_proto_start,
2056 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2057 enum nl80211_crit_proto_id protocol, u16 duration),
2058 TP_ARGS(wiphy, wdev, protocol, duration),
2059 TP_STRUCT__entry(
2060 WIPHY_ENTRY
2061 WDEV_ENTRY
2062 __field(u16, proto)
2063 __field(u16, duration)
2064 ),
2065 TP_fast_assign(
2066 WIPHY_ASSIGN;
2067 WDEV_ASSIGN;
2068 __entry->proto = protocol;
2069 __entry->duration = duration;
2070 ),
2071 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", proto=%x, duration=%u",
2072 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->proto, __entry->duration)
2073);
2074
2075TRACE_EVENT(rdev_crit_proto_stop,
2076 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2077 TP_ARGS(wiphy, wdev),
2078 TP_STRUCT__entry(
2079 WIPHY_ENTRY
2080 WDEV_ENTRY
2081 ),
2082 TP_fast_assign(
2083 WIPHY_ASSIGN;
2084 WDEV_ASSIGN;
2085 ),
2086 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
2087 WIPHY_PR_ARG, WDEV_PR_ARG)
2088);
2089
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02002090TRACE_EVENT(rdev_channel_switch,
2091 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2092 struct cfg80211_csa_settings *params),
2093 TP_ARGS(wiphy, netdev, params),
2094 TP_STRUCT__entry(
2095 WIPHY_ENTRY
2096 NETDEV_ENTRY
2097 CHAN_DEF_ENTRY
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02002098 __field(bool, radar_required)
2099 __field(bool, block_tx)
2100 __field(u8, count)
Andrei Otcheretianski9a774c72014-05-09 14:11:46 +03002101 __dynamic_array(u16, bcn_ofs, params->n_counter_offsets_beacon)
2102 __dynamic_array(u16, pres_ofs, params->n_counter_offsets_presp)
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02002103 ),
2104 TP_fast_assign(
2105 WIPHY_ASSIGN;
2106 NETDEV_ASSIGN;
2107 CHAN_DEF_ASSIGN(&params->chandef);
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02002108 __entry->radar_required = params->radar_required;
2109 __entry->block_tx = params->block_tx;
2110 __entry->count = params->count;
Andrei Otcheretianski9a774c72014-05-09 14:11:46 +03002111 memcpy(__get_dynamic_array(bcn_ofs),
2112 params->counter_offsets_beacon,
2113 params->n_counter_offsets_beacon * sizeof(u16));
2114
2115 /* probe response offsets are optional */
2116 if (params->n_counter_offsets_presp)
2117 memcpy(__get_dynamic_array(pres_ofs),
2118 params->counter_offsets_presp,
2119 params->n_counter_offsets_presp * sizeof(u16));
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02002120 ),
2121 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
Andrei Otcheretianski9a774c72014-05-09 14:11:46 +03002122 ", block_tx: %d, count: %u, radar_required: %d",
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02002123 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
Andrei Otcheretianski9a774c72014-05-09 14:11:46 +03002124 __entry->block_tx, __entry->count, __entry->radar_required)
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02002125);
2126
Kyeyoon Parkfa9ffc72013-12-16 23:01:30 -08002127TRACE_EVENT(rdev_set_qos_map,
2128 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2129 struct cfg80211_qos_map *qos_map),
2130 TP_ARGS(wiphy, netdev, qos_map),
2131 TP_STRUCT__entry(
2132 WIPHY_ENTRY
2133 NETDEV_ENTRY
2134 QOS_MAP_ENTRY
2135 ),
2136 TP_fast_assign(
2137 WIPHY_ASSIGN;
2138 NETDEV_ASSIGN;
2139 QOS_MAP_ASSIGN(qos_map);
2140 ),
2141 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", num_des: %u",
2142 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->num_des)
2143);
2144
Jouni Malinene16821b2014-04-28 11:22:08 +03002145TRACE_EVENT(rdev_set_ap_chanwidth,
2146 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2147 struct cfg80211_chan_def *chandef),
2148 TP_ARGS(wiphy, netdev, chandef),
2149 TP_STRUCT__entry(
2150 WIPHY_ENTRY
2151 NETDEV_ENTRY
2152 CHAN_DEF_ENTRY
2153 ),
2154 TP_fast_assign(
2155 WIPHY_ASSIGN;
2156 NETDEV_ASSIGN;
2157 CHAN_DEF_ASSIGN(chandef);
2158 ),
2159 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2160 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
2161);
2162
Johannes Berg960d01a2014-09-09 22:55:35 +03002163TRACE_EVENT(rdev_add_tx_ts,
2164 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2165 u8 tsid, const u8 *peer, u8 user_prio, u16 admitted_time),
2166 TP_ARGS(wiphy, netdev, tsid, peer, user_prio, admitted_time),
2167 TP_STRUCT__entry(
2168 WIPHY_ENTRY
2169 NETDEV_ENTRY
2170 MAC_ENTRY(peer)
2171 __field(u8, tsid)
2172 __field(u8, user_prio)
2173 __field(u16, admitted_time)
2174 ),
2175 TP_fast_assign(
2176 WIPHY_ASSIGN;
2177 NETDEV_ASSIGN;
2178 MAC_ASSIGN(peer, peer);
2179 __entry->tsid = tsid;
2180 __entry->user_prio = user_prio;
2181 __entry->admitted_time = admitted_time;
2182 ),
2183 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d, UP %d, time %d",
2184 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
2185 __entry->tsid, __entry->user_prio, __entry->admitted_time)
2186);
2187
2188TRACE_EVENT(rdev_del_tx_ts,
2189 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2190 u8 tsid, const u8 *peer),
2191 TP_ARGS(wiphy, netdev, tsid, peer),
2192 TP_STRUCT__entry(
2193 WIPHY_ENTRY
2194 NETDEV_ENTRY
2195 MAC_ENTRY(peer)
2196 __field(u8, tsid)
2197 ),
2198 TP_fast_assign(
2199 WIPHY_ASSIGN;
2200 NETDEV_ASSIGN;
2201 MAC_ASSIGN(peer, peer);
2202 __entry->tsid = tsid;
2203 ),
2204 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d",
2205 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->tsid)
2206);
2207
Arik Nemtsov1057d352014-11-19 12:54:26 +02002208TRACE_EVENT(rdev_tdls_channel_switch,
2209 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2210 const u8 *addr, u8 oper_class,
2211 struct cfg80211_chan_def *chandef),
2212 TP_ARGS(wiphy, netdev, addr, oper_class, chandef),
2213 TP_STRUCT__entry(
2214 WIPHY_ENTRY
2215 NETDEV_ENTRY
2216 MAC_ENTRY(addr)
2217 __field(u8, oper_class)
2218 CHAN_DEF_ENTRY
2219 ),
2220 TP_fast_assign(
2221 WIPHY_ASSIGN;
2222 NETDEV_ASSIGN;
2223 MAC_ASSIGN(addr, addr);
2224 CHAN_DEF_ASSIGN(chandef);
2225 ),
2226 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT
2227 " oper class %d, " CHAN_DEF_PR_FMT,
2228 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr),
2229 __entry->oper_class, CHAN_DEF_PR_ARG)
2230);
2231
2232TRACE_EVENT(rdev_tdls_cancel_channel_switch,
2233 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2234 const u8 *addr),
2235 TP_ARGS(wiphy, netdev, addr),
2236 TP_STRUCT__entry(
2237 WIPHY_ENTRY
2238 NETDEV_ENTRY
2239 MAC_ENTRY(addr)
2240 ),
2241 TP_fast_assign(
2242 WIPHY_ASSIGN;
2243 NETDEV_ASSIGN;
2244 MAC_ASSIGN(addr, addr);
2245 ),
2246 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
2247 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr))
2248);
2249
Srinivas Dasarid041a1a2018-02-07 18:32:17 +05302250TRACE_EVENT(rdev_external_auth,
2251 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2252 struct cfg80211_external_auth_params *params),
2253 TP_ARGS(wiphy, netdev, params),
2254 TP_STRUCT__entry(WIPHY_ENTRY
2255 NETDEV_ENTRY
2256 MAC_ENTRY(bssid)
2257 __array(u8, ssid, IEEE80211_MAX_SSID_LEN + 1)
2258 __field(u16, status)
2259 ),
2260 TP_fast_assign(WIPHY_ASSIGN;
2261 NETDEV_ASSIGN;
2262 MAC_ASSIGN(bssid, params->bssid);
2263 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
2264 memcpy(__entry->ssid, params->ssid.ssid,
2265 params->ssid.ssid_len);
2266 __entry->status = params->status;
2267 ),
2268 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
2269 ", ssid: %s, status: %u", WIPHY_PR_ARG, NETDEV_PR_ARG,
2270 __entry->bssid, __entry->ssid, __entry->status)
2271);
2272
Beni Lev4ee3e062012-08-27 12:49:39 +03002273/*************************************************************
2274 * cfg80211 exported functions traces *
2275 *************************************************************/
2276
2277TRACE_EVENT(cfg80211_return_bool,
2278 TP_PROTO(bool ret),
2279 TP_ARGS(ret),
2280 TP_STRUCT__entry(
2281 __field(bool, ret)
2282 ),
2283 TP_fast_assign(
2284 __entry->ret = ret;
2285 ),
2286 TP_printk("returned %s", BOOL_TO_STR(__entry->ret))
2287);
2288
2289DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt,
2290 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2291 TP_ARGS(netdev, macaddr),
2292 TP_STRUCT__entry(
2293 NETDEV_ENTRY
2294 MAC_ENTRY(macaddr)
2295 ),
2296 TP_fast_assign(
2297 NETDEV_ASSIGN;
2298 MAC_ASSIGN(macaddr, macaddr);
2299 ),
2300 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
2301 NETDEV_PR_ARG, MAC_PR_ARG(macaddr))
2302);
2303
2304DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate,
2305 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2306 TP_ARGS(netdev, macaddr)
2307);
2308
2309DECLARE_EVENT_CLASS(netdev_evt_only,
2310 TP_PROTO(struct net_device *netdev),
2311 TP_ARGS(netdev),
2312 TP_STRUCT__entry(
2313 NETDEV_ENTRY
2314 ),
2315 TP_fast_assign(
2316 NETDEV_ASSIGN;
2317 ),
2318 TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG)
2319);
2320
2321DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth,
2322 TP_PROTO(struct net_device *netdev),
2323 TP_ARGS(netdev)
2324);
2325
2326TRACE_EVENT(cfg80211_send_rx_assoc,
2327 TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss),
2328 TP_ARGS(netdev, bss),
2329 TP_STRUCT__entry(
2330 NETDEV_ENTRY
2331 MAC_ENTRY(bssid)
2332 CHAN_ENTRY
2333 ),
2334 TP_fast_assign(
2335 NETDEV_ASSIGN;
2336 MAC_ASSIGN(bssid, bss->bssid);
2337 CHAN_ASSIGN(bss->channel);
2338 ),
Johannes Bergec816082012-11-16 17:22:28 +01002339 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", " CHAN_PR_FMT,
Beni Lev4ee3e062012-08-27 12:49:39 +03002340 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
2341);
2342
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002343DECLARE_EVENT_CLASS(netdev_frame_event,
2344 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2345 TP_ARGS(netdev, buf, len),
2346 TP_STRUCT__entry(
2347 NETDEV_ENTRY
2348 __dynamic_array(u8, frame, len)
2349 ),
2350 TP_fast_assign(
2351 NETDEV_ASSIGN;
2352 memcpy(__get_dynamic_array(frame), buf, len);
2353 ),
2354 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2355 NETDEV_PR_ARG,
2356 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
Beni Lev4ee3e062012-08-27 12:49:39 +03002357);
2358
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002359DEFINE_EVENT(netdev_frame_event, cfg80211_rx_unprot_mlme_mgmt,
2360 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2361 TP_ARGS(netdev, buf, len)
Beni Lev4ee3e062012-08-27 12:49:39 +03002362);
2363
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002364DEFINE_EVENT(netdev_frame_event, cfg80211_rx_mlme_mgmt,
2365 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2366 TP_ARGS(netdev, buf, len)
Beni Lev4ee3e062012-08-27 12:49:39 +03002367);
2368
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002369TRACE_EVENT(cfg80211_tx_mlme_mgmt,
2370 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2371 TP_ARGS(netdev, buf, len),
2372 TP_STRUCT__entry(
2373 NETDEV_ENTRY
2374 __dynamic_array(u8, frame, len)
2375 ),
2376 TP_fast_assign(
2377 NETDEV_ASSIGN;
2378 memcpy(__get_dynamic_array(frame), buf, len);
2379 ),
2380 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2381 NETDEV_PR_ARG,
2382 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
Beni Lev4ee3e062012-08-27 12:49:39 +03002383);
2384
2385DECLARE_EVENT_CLASS(netdev_mac_evt,
2386 TP_PROTO(struct net_device *netdev, const u8 *mac),
2387 TP_ARGS(netdev, mac),
2388 TP_STRUCT__entry(
2389 NETDEV_ENTRY
2390 MAC_ENTRY(mac)
2391 ),
2392 TP_fast_assign(
2393 NETDEV_ASSIGN;
2394 MAC_ASSIGN(mac, mac)
2395 ),
2396 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
2397 NETDEV_PR_ARG, MAC_PR_ARG(mac))
2398);
2399
2400DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout,
2401 TP_PROTO(struct net_device *netdev, const u8 *mac),
2402 TP_ARGS(netdev, mac)
2403);
2404
2405DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout,
2406 TP_PROTO(struct net_device *netdev, const u8 *mac),
2407 TP_ARGS(netdev, mac)
2408);
2409
2410TRACE_EVENT(cfg80211_michael_mic_failure,
2411 TP_PROTO(struct net_device *netdev, const u8 *addr,
2412 enum nl80211_key_type key_type, int key_id, const u8 *tsc),
2413 TP_ARGS(netdev, addr, key_type, key_id, tsc),
2414 TP_STRUCT__entry(
2415 NETDEV_ENTRY
2416 MAC_ENTRY(addr)
2417 __field(enum nl80211_key_type, key_type)
2418 __field(int, key_id)
2419 __array(u8, tsc, 6)
2420 ),
2421 TP_fast_assign(
2422 NETDEV_ASSIGN;
2423 MAC_ASSIGN(addr, addr);
2424 __entry->key_type = key_type;
2425 __entry->key_id = key_id;
Eliad Peller8c26d452014-07-17 15:00:56 +03002426 if (tsc)
2427 memcpy(__entry->tsc, tsc, 6);
Beni Lev4ee3e062012-08-27 12:49:39 +03002428 ),
Johannes Bergec816082012-11-16 17:22:28 +01002429 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm",
Beni Lev4ee3e062012-08-27 12:49:39 +03002430 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type,
2431 __entry->key_id, __entry->tsc)
2432);
2433
2434TRACE_EVENT(cfg80211_ready_on_channel,
2435 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2436 struct ieee80211_channel *chan,
Johannes Berg42d97a52012-11-08 18:31:02 +01002437 unsigned int duration),
2438 TP_ARGS(wdev, cookie, chan, duration),
Beni Lev4ee3e062012-08-27 12:49:39 +03002439 TP_STRUCT__entry(
2440 WDEV_ENTRY
2441 __field(u64, cookie)
2442 CHAN_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002443 __field(unsigned int, duration)
2444 ),
2445 TP_fast_assign(
2446 WDEV_ASSIGN;
2447 __entry->cookie = cookie;
2448 CHAN_ASSIGN(chan);
Beni Lev4ee3e062012-08-27 12:49:39 +03002449 __entry->duration = duration;
2450 ),
Johannes Berg42d97a52012-11-08 18:31:02 +01002451 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u",
Beni Lev4ee3e062012-08-27 12:49:39 +03002452 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG,
Johannes Berg42d97a52012-11-08 18:31:02 +01002453 __entry->duration)
Beni Lev4ee3e062012-08-27 12:49:39 +03002454);
2455
2456TRACE_EVENT(cfg80211_ready_on_channel_expired,
2457 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
Johannes Berg42d97a52012-11-08 18:31:02 +01002458 struct ieee80211_channel *chan),
2459 TP_ARGS(wdev, cookie, chan),
Beni Lev4ee3e062012-08-27 12:49:39 +03002460 TP_STRUCT__entry(
2461 WDEV_ENTRY
2462 __field(u64, cookie)
2463 CHAN_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002464 ),
2465 TP_fast_assign(
2466 WDEV_ASSIGN;
2467 __entry->cookie = cookie;
2468 CHAN_ASSIGN(chan);
Beni Lev4ee3e062012-08-27 12:49:39 +03002469 ),
Johannes Berg42d97a52012-11-08 18:31:02 +01002470 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
2471 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002472);
2473
2474TRACE_EVENT(cfg80211_new_sta,
2475 TP_PROTO(struct net_device *netdev, const u8 *mac_addr,
2476 struct station_info *sinfo),
2477 TP_ARGS(netdev, mac_addr, sinfo),
2478 TP_STRUCT__entry(
2479 NETDEV_ENTRY
2480 MAC_ENTRY(mac_addr)
2481 SINFO_ENTRY
2482 ),
2483 TP_fast_assign(
2484 NETDEV_ASSIGN;
2485 MAC_ASSIGN(mac_addr, mac_addr);
2486 SINFO_ASSIGN;
2487 ),
Johannes Bergec816082012-11-16 17:22:28 +01002488 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT,
Beni Lev4ee3e062012-08-27 12:49:39 +03002489 NETDEV_PR_ARG, MAC_PR_ARG(mac_addr))
2490);
2491
2492DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta,
2493 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2494 TP_ARGS(netdev, macaddr)
2495);
2496
2497TRACE_EVENT(cfg80211_rx_mgmt,
2498 TP_PROTO(struct wireless_dev *wdev, int freq, int sig_mbm),
2499 TP_ARGS(wdev, freq, sig_mbm),
2500 TP_STRUCT__entry(
2501 WDEV_ENTRY
2502 __field(int, freq)
2503 __field(int, sig_mbm)
2504 ),
2505 TP_fast_assign(
2506 WDEV_ASSIGN;
2507 __entry->freq = freq;
2508 __entry->sig_mbm = sig_mbm;
2509 ),
2510 TP_printk(WDEV_PR_FMT ", freq: %d, sig mbm: %d",
2511 WDEV_PR_ARG, __entry->freq, __entry->sig_mbm)
2512);
2513
2514TRACE_EVENT(cfg80211_mgmt_tx_status,
2515 TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
2516 TP_ARGS(wdev, cookie, ack),
2517 TP_STRUCT__entry(
2518 WDEV_ENTRY
2519 __field(u64, cookie)
2520 __field(bool, ack)
2521 ),
2522 TP_fast_assign(
2523 WDEV_ASSIGN;
2524 __entry->cookie = cookie;
2525 __entry->ack = ack;
2526 ),
2527 TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
2528 WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
2529);
2530
2531TRACE_EVENT(cfg80211_cqm_rssi_notify,
2532 TP_PROTO(struct net_device *netdev,
2533 enum nl80211_cqm_rssi_threshold_event rssi_event),
2534 TP_ARGS(netdev, rssi_event),
2535 TP_STRUCT__entry(
2536 NETDEV_ENTRY
2537 __field(enum nl80211_cqm_rssi_threshold_event, rssi_event)
2538 ),
2539 TP_fast_assign(
2540 NETDEV_ASSIGN;
2541 __entry->rssi_event = rssi_event;
2542 ),
2543 TP_printk(NETDEV_PR_FMT ", rssi event: %d",
2544 NETDEV_PR_ARG, __entry->rssi_event)
2545);
2546
Johannes Berg683b6d32012-11-08 21:25:48 +01002547TRACE_EVENT(cfg80211_reg_can_beacon,
Ilan Peer174e0cd2014-02-23 09:13:01 +02002548 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef,
Arik Nemtsov923b3522015-07-08 15:41:44 +03002549 enum nl80211_iftype iftype, bool check_no_ir),
2550 TP_ARGS(wiphy, chandef, iftype, check_no_ir),
Beni Lev4ee3e062012-08-27 12:49:39 +03002551 TP_STRUCT__entry(
2552 WIPHY_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01002553 CHAN_DEF_ENTRY
Ilan Peer174e0cd2014-02-23 09:13:01 +02002554 __field(enum nl80211_iftype, iftype)
Arik Nemtsov923b3522015-07-08 15:41:44 +03002555 __field(bool, check_no_ir)
Beni Lev4ee3e062012-08-27 12:49:39 +03002556 ),
2557 TP_fast_assign(
2558 WIPHY_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01002559 CHAN_DEF_ASSIGN(chandef);
Ilan Peer174e0cd2014-02-23 09:13:01 +02002560 __entry->iftype = iftype;
Arik Nemtsov923b3522015-07-08 15:41:44 +03002561 __entry->check_no_ir = check_no_ir;
Beni Lev4ee3e062012-08-27 12:49:39 +03002562 ),
Arik Nemtsov923b3522015-07-08 15:41:44 +03002563 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", iftype=%d check_no_ir=%s",
2564 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->iftype,
2565 BOOL_TO_STR(__entry->check_no_ir))
Beni Lev4ee3e062012-08-27 12:49:39 +03002566);
2567
Simon Wunderlich04f39042013-02-08 18:16:19 +01002568TRACE_EVENT(cfg80211_chandef_dfs_required,
2569 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2570 TP_ARGS(wiphy, chandef),
2571 TP_STRUCT__entry(
2572 WIPHY_ENTRY
2573 CHAN_DEF_ENTRY
2574 ),
2575 TP_fast_assign(
2576 WIPHY_ASSIGN;
2577 CHAN_DEF_ASSIGN(chandef);
2578 ),
2579 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2580 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2581);
2582
Beni Lev4ee3e062012-08-27 12:49:39 +03002583TRACE_EVENT(cfg80211_ch_switch_notify,
Johannes Berg683b6d32012-11-08 21:25:48 +01002584 TP_PROTO(struct net_device *netdev,
2585 struct cfg80211_chan_def *chandef),
2586 TP_ARGS(netdev, chandef),
Beni Lev4ee3e062012-08-27 12:49:39 +03002587 TP_STRUCT__entry(
2588 NETDEV_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01002589 CHAN_DEF_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002590 ),
2591 TP_fast_assign(
2592 NETDEV_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01002593 CHAN_DEF_ASSIGN(chandef);
Beni Lev4ee3e062012-08-27 12:49:39 +03002594 ),
Johannes Bergec816082012-11-16 17:22:28 +01002595 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
Johannes Berg683b6d32012-11-08 21:25:48 +01002596 NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002597);
2598
Luciano Coelhof8d75522014-11-07 14:31:35 +02002599TRACE_EVENT(cfg80211_ch_switch_started_notify,
2600 TP_PROTO(struct net_device *netdev,
2601 struct cfg80211_chan_def *chandef),
2602 TP_ARGS(netdev, chandef),
2603 TP_STRUCT__entry(
2604 NETDEV_ENTRY
2605 CHAN_DEF_ENTRY
2606 ),
2607 TP_fast_assign(
2608 NETDEV_ASSIGN;
2609 CHAN_DEF_ASSIGN(chandef);
2610 ),
2611 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2612 NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
2613);
2614
Simon Wunderlich04f39042013-02-08 18:16:19 +01002615TRACE_EVENT(cfg80211_radar_event,
2616 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2617 TP_ARGS(wiphy, chandef),
2618 TP_STRUCT__entry(
2619 WIPHY_ENTRY
2620 CHAN_DEF_ENTRY
2621 ),
2622 TP_fast_assign(
2623 WIPHY_ASSIGN;
2624 CHAN_DEF_ASSIGN(chandef);
2625 ),
2626 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2627 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2628);
2629
2630TRACE_EVENT(cfg80211_cac_event,
2631 TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt),
2632 TP_ARGS(netdev, evt),
2633 TP_STRUCT__entry(
2634 NETDEV_ENTRY
2635 __field(enum nl80211_radar_event, evt)
2636 ),
2637 TP_fast_assign(
2638 NETDEV_ASSIGN;
2639 __entry->evt = evt;
2640 ),
2641 TP_printk(NETDEV_PR_FMT ", event: %d",
2642 NETDEV_PR_ARG, __entry->evt)
2643);
2644
Beni Lev4ee3e062012-08-27 12:49:39 +03002645DECLARE_EVENT_CLASS(cfg80211_rx_evt,
2646 TP_PROTO(struct net_device *netdev, const u8 *addr),
2647 TP_ARGS(netdev, addr),
2648 TP_STRUCT__entry(
2649 NETDEV_ENTRY
2650 MAC_ENTRY(addr)
2651 ),
2652 TP_fast_assign(
2653 NETDEV_ASSIGN;
2654 MAC_ASSIGN(addr, addr);
2655 ),
Johannes Bergec816082012-11-16 17:22:28 +01002656 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr))
Beni Lev4ee3e062012-08-27 12:49:39 +03002657);
2658
Beni Lev4ee3e062012-08-27 12:49:39 +03002659DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame,
2660 TP_PROTO(struct net_device *netdev, const u8 *addr),
2661 TP_ARGS(netdev, addr)
2662);
2663
2664DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame,
2665 TP_PROTO(struct net_device *netdev, const u8 *addr),
2666 TP_ARGS(netdev, addr)
2667);
2668
Antonio Quartullife94f3a2014-01-29 17:53:43 +01002669TRACE_EVENT(cfg80211_ibss_joined,
2670 TP_PROTO(struct net_device *netdev, const u8 *bssid,
2671 struct ieee80211_channel *channel),
2672 TP_ARGS(netdev, bssid, channel),
2673 TP_STRUCT__entry(
2674 NETDEV_ENTRY
2675 MAC_ENTRY(bssid)
2676 CHAN_ENTRY
2677 ),
2678 TP_fast_assign(
2679 NETDEV_ASSIGN;
2680 MAC_ASSIGN(bssid, bssid);
2681 CHAN_ASSIGN(channel);
2682 ),
2683 TP_printk(NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", " CHAN_PR_FMT,
2684 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
2685);
2686
Beni Lev4ee3e062012-08-27 12:49:39 +03002687TRACE_EVENT(cfg80211_probe_status,
2688 TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie,
2689 bool acked),
2690 TP_ARGS(netdev, addr, cookie, acked),
2691 TP_STRUCT__entry(
2692 NETDEV_ENTRY
2693 MAC_ENTRY(addr)
2694 __field(u64, cookie)
2695 __field(bool, acked)
2696 ),
2697 TP_fast_assign(
2698 NETDEV_ASSIGN;
2699 MAC_ASSIGN(addr, addr);
2700 __entry->cookie = cookie;
2701 __entry->acked = acked;
2702 ),
Johannes Bergec816082012-11-16 17:22:28 +01002703 TP_printk(NETDEV_PR_FMT " addr:" MAC_PR_FMT ", cookie: %llu, acked: %s",
Beni Lev4ee3e062012-08-27 12:49:39 +03002704 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie,
2705 BOOL_TO_STR(__entry->acked))
2706);
2707
2708TRACE_EVENT(cfg80211_cqm_pktloss_notify,
2709 TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets),
2710 TP_ARGS(netdev, peer, num_packets),
2711 TP_STRUCT__entry(
2712 NETDEV_ENTRY
2713 MAC_ENTRY(peer)
2714 __field(u32, num_packets)
2715 ),
2716 TP_fast_assign(
2717 NETDEV_ASSIGN;
2718 MAC_ASSIGN(peer, peer);
2719 __entry->num_packets = num_packets;
2720 ),
2721 TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u",
2722 NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets)
2723);
2724
2725DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify,
2726 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2727 TP_ARGS(netdev, macaddr)
2728);
2729
2730TRACE_EVENT(cfg80211_pmksa_candidate_notify,
2731 TP_PROTO(struct net_device *netdev, int index, const u8 *bssid,
2732 bool preauth),
2733 TP_ARGS(netdev, index, bssid, preauth),
2734 TP_STRUCT__entry(
2735 NETDEV_ENTRY
2736 __field(int, index)
2737 MAC_ENTRY(bssid)
2738 __field(bool, preauth)
2739 ),
2740 TP_fast_assign(
2741 NETDEV_ASSIGN;
2742 __entry->index = index;
2743 MAC_ASSIGN(bssid, bssid);
2744 __entry->preauth = preauth;
2745 ),
2746 TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s",
2747 NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid),
2748 BOOL_TO_STR(__entry->preauth))
2749);
2750
2751TRACE_EVENT(cfg80211_report_obss_beacon,
2752 TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len,
2753 int freq, int sig_dbm),
2754 TP_ARGS(wiphy, frame, len, freq, sig_dbm),
2755 TP_STRUCT__entry(
2756 WIPHY_ENTRY
2757 __field(int, freq)
2758 __field(int, sig_dbm)
2759 ),
2760 TP_fast_assign(
2761 WIPHY_ASSIGN;
2762 __entry->freq = freq;
2763 __entry->sig_dbm = sig_dbm;
2764 ),
2765 TP_printk(WIPHY_PR_FMT ", freq: %d, sig_dbm: %d",
2766 WIPHY_PR_ARG, __entry->freq, __entry->sig_dbm)
2767);
2768
Jouni Malinen3475b092012-11-16 22:49:57 +02002769TRACE_EVENT(cfg80211_tdls_oper_request,
2770 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer,
2771 enum nl80211_tdls_operation oper, u16 reason_code),
2772 TP_ARGS(wiphy, netdev, peer, oper, reason_code),
2773 TP_STRUCT__entry(
2774 WIPHY_ENTRY
2775 NETDEV_ENTRY
2776 MAC_ENTRY(peer)
2777 __field(enum nl80211_tdls_operation, oper)
2778 __field(u16, reason_code)
2779 ),
2780 TP_fast_assign(
2781 WIPHY_ASSIGN;
2782 NETDEV_ASSIGN;
2783 MAC_ASSIGN(peer, peer);
2784 __entry->oper = oper;
2785 __entry->reason_code = reason_code;
2786 ),
2787 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", oper: %d, reason_code %u",
2788 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper,
2789 __entry->reason_code)
2790 );
2791
Beni Lev4ee3e062012-08-27 12:49:39 +03002792TRACE_EVENT(cfg80211_scan_done,
Avraham Stern1d762502016-07-05 17:10:13 +03002793 TP_PROTO(struct cfg80211_scan_request *request,
2794 struct cfg80211_scan_info *info),
2795 TP_ARGS(request, info),
Beni Lev4ee3e062012-08-27 12:49:39 +03002796 TP_STRUCT__entry(
2797 __field(u32, n_channels)
2798 __dynamic_array(u8, ie, request ? request->ie_len : 0)
Johannes Berg57fbcce2016-04-12 15:56:15 +02002799 __array(u32, rates, NUM_NL80211_BANDS)
Beni Lev4ee3e062012-08-27 12:49:39 +03002800 __field(u32, wdev_id)
2801 MAC_ENTRY(wiphy_mac)
2802 __field(bool, no_cck)
2803 __field(bool, aborted)
Avraham Stern1d762502016-07-05 17:10:13 +03002804 __field(u64, scan_start_tsf)
2805 MAC_ENTRY(tsf_bssid)
Beni Lev4ee3e062012-08-27 12:49:39 +03002806 ),
2807 TP_fast_assign(
2808 if (request) {
2809 memcpy(__get_dynamic_array(ie), request->ie,
2810 request->ie_len);
2811 memcpy(__entry->rates, request->rates,
Johannes Berg57fbcce2016-04-12 15:56:15 +02002812 NUM_NL80211_BANDS);
Beni Lev4ee3e062012-08-27 12:49:39 +03002813 __entry->wdev_id = request->wdev ?
2814 request->wdev->identifier : 0;
2815 if (request->wiphy)
2816 MAC_ASSIGN(wiphy_mac,
2817 request->wiphy->perm_addr);
2818 __entry->no_cck = request->no_cck;
2819 }
Avraham Stern1d762502016-07-05 17:10:13 +03002820 if (info) {
2821 __entry->aborted = info->aborted;
2822 __entry->scan_start_tsf = info->scan_start_tsf;
2823 MAC_ASSIGN(tsf_bssid, info->tsf_bssid);
2824 }
Beni Lev4ee3e062012-08-27 12:49:39 +03002825 ),
Avraham Stern1d762502016-07-05 17:10:13 +03002826 TP_printk("aborted: %s, scan start (TSF): %llu, tsf_bssid: " MAC_PR_FMT,
2827 BOOL_TO_STR(__entry->aborted),
2828 (unsigned long long)__entry->scan_start_tsf,
2829 MAC_PR_ARG(tsf_bssid))
Beni Lev4ee3e062012-08-27 12:49:39 +03002830);
2831
2832DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_results,
2833 TP_PROTO(struct wiphy *wiphy),
2834 TP_ARGS(wiphy)
2835);
2836
2837DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_stopped,
2838 TP_PROTO(struct wiphy *wiphy),
2839 TP_ARGS(wiphy)
2840);
2841
2842TRACE_EVENT(cfg80211_get_bss,
2843 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
2844 const u8 *bssid, const u8 *ssid, size_t ssid_len,
Dedy Lansky6eb18132015-02-08 15:52:03 +02002845 enum ieee80211_bss_type bss_type,
2846 enum ieee80211_privacy privacy),
2847 TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, bss_type, privacy),
Beni Lev4ee3e062012-08-27 12:49:39 +03002848 TP_STRUCT__entry(
2849 WIPHY_ENTRY
2850 CHAN_ENTRY
2851 MAC_ENTRY(bssid)
2852 __dynamic_array(u8, ssid, ssid_len)
Dedy Lansky6eb18132015-02-08 15:52:03 +02002853 __field(enum ieee80211_bss_type, bss_type)
2854 __field(enum ieee80211_privacy, privacy)
Beni Lev4ee3e062012-08-27 12:49:39 +03002855 ),
2856 TP_fast_assign(
2857 WIPHY_ASSIGN;
2858 CHAN_ASSIGN(channel);
2859 MAC_ASSIGN(bssid, bssid);
2860 memcpy(__get_dynamic_array(ssid), ssid, ssid_len);
Dedy Lansky6eb18132015-02-08 15:52:03 +02002861 __entry->bss_type = bss_type;
2862 __entry->privacy = privacy;
Beni Lev4ee3e062012-08-27 12:49:39 +03002863 ),
Dedy Lansky6eb18132015-02-08 15:52:03 +02002864 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT
2865 ", buf: %#.2x, bss_type: %d, privacy: %d",
2866 WIPHY_PR_ARG, CHAN_PR_ARG, MAC_PR_ARG(bssid),
2867 ((u8 *)__get_dynamic_array(ssid))[0], __entry->bss_type,
2868 __entry->privacy)
Beni Lev4ee3e062012-08-27 12:49:39 +03002869);
2870
Dmitry Shmidt6e19bc42015-10-07 11:32:53 +02002871TRACE_EVENT(cfg80211_inform_bss_frame,
2872 TP_PROTO(struct wiphy *wiphy, struct cfg80211_inform_bss *data,
2873 struct ieee80211_mgmt *mgmt, size_t len),
2874 TP_ARGS(wiphy, data, mgmt, len),
Beni Lev4ee3e062012-08-27 12:49:39 +03002875 TP_STRUCT__entry(
2876 WIPHY_ENTRY
2877 CHAN_ENTRY
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002878 __field(enum nl80211_bss_scan_width, scan_width)
Beni Lev4ee3e062012-08-27 12:49:39 +03002879 __dynamic_array(u8, mgmt, len)
2880 __field(s32, signal)
Dmitry Shmidt6e19bc42015-10-07 11:32:53 +02002881 __field(u64, ts_boottime)
Avraham Stern1d762502016-07-05 17:10:13 +03002882 __field(u64, parent_tsf)
2883 MAC_ENTRY(parent_bssid)
Beni Lev4ee3e062012-08-27 12:49:39 +03002884 ),
2885 TP_fast_assign(
2886 WIPHY_ASSIGN;
Dmitry Shmidt6e19bc42015-10-07 11:32:53 +02002887 CHAN_ASSIGN(data->chan);
2888 __entry->scan_width = data->scan_width;
Beni Lev4ee3e062012-08-27 12:49:39 +03002889 if (mgmt)
2890 memcpy(__get_dynamic_array(mgmt), mgmt, len);
Dmitry Shmidt6e19bc42015-10-07 11:32:53 +02002891 __entry->signal = data->signal;
2892 __entry->ts_boottime = data->boottime_ns;
Avraham Stern1d762502016-07-05 17:10:13 +03002893 __entry->parent_tsf = data->parent_tsf;
2894 MAC_ASSIGN(parent_bssid, data->parent_bssid);
Beni Lev4ee3e062012-08-27 12:49:39 +03002895 ),
Avraham Stern1d762502016-07-05 17:10:13 +03002896 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT
2897 "(scan_width: %d) signal: %d, tsb:%llu, detect_tsf:%llu, tsf_bssid: "
2898 MAC_PR_FMT, WIPHY_PR_ARG, CHAN_PR_ARG, __entry->scan_width,
2899 __entry->signal, (unsigned long long)__entry->ts_boottime,
2900 (unsigned long long)__entry->parent_tsf,
2901 MAC_PR_ARG(parent_bssid))
Beni Lev4ee3e062012-08-27 12:49:39 +03002902);
2903
2904DECLARE_EVENT_CLASS(cfg80211_bss_evt,
2905 TP_PROTO(struct cfg80211_bss *pub),
2906 TP_ARGS(pub),
2907 TP_STRUCT__entry(
2908 MAC_ENTRY(bssid)
2909 CHAN_ENTRY
2910 ),
2911 TP_fast_assign(
2912 MAC_ASSIGN(bssid, pub->bssid);
2913 CHAN_ASSIGN(pub->channel);
2914 ),
Johannes Bergec816082012-11-16 17:22:28 +01002915 TP_printk(MAC_PR_FMT ", " CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002916);
2917
2918DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss,
2919 TP_PROTO(struct cfg80211_bss *pub),
2920 TP_ARGS(pub)
2921);
2922
2923TRACE_EVENT(cfg80211_return_uint,
2924 TP_PROTO(unsigned int ret),
2925 TP_ARGS(ret),
2926 TP_STRUCT__entry(
2927 __field(unsigned int, ret)
2928 ),
2929 TP_fast_assign(
2930 __entry->ret = ret;
2931 ),
2932 TP_printk("ret: %d", __entry->ret)
2933);
2934
2935TRACE_EVENT(cfg80211_return_u32,
2936 TP_PROTO(u32 ret),
2937 TP_ARGS(ret),
2938 TP_STRUCT__entry(
2939 __field(u32, ret)
2940 ),
2941 TP_fast_assign(
2942 __entry->ret = ret;
2943 ),
2944 TP_printk("ret: %u", __entry->ret)
2945);
2946
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002947TRACE_EVENT(cfg80211_report_wowlan_wakeup,
2948 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2949 struct cfg80211_wowlan_wakeup *wakeup),
2950 TP_ARGS(wiphy, wdev, wakeup),
2951 TP_STRUCT__entry(
2952 WIPHY_ENTRY
2953 WDEV_ENTRY
Johannes Berga92eecb2013-04-29 12:09:14 +02002954 __field(bool, non_wireless)
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002955 __field(bool, disconnect)
2956 __field(bool, magic_pkt)
2957 __field(bool, gtk_rekey_failure)
2958 __field(bool, eap_identity_req)
2959 __field(bool, four_way_handshake)
2960 __field(bool, rfkill_release)
2961 __field(s32, pattern_idx)
2962 __field(u32, packet_len)
Johannes Berga92eecb2013-04-29 12:09:14 +02002963 __dynamic_array(u8, packet,
2964 wakeup ? wakeup->packet_present_len : 0)
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002965 ),
2966 TP_fast_assign(
2967 WIPHY_ASSIGN;
2968 WDEV_ASSIGN;
Johannes Berga92eecb2013-04-29 12:09:14 +02002969 __entry->non_wireless = !wakeup;
2970 __entry->disconnect = wakeup ? wakeup->disconnect : false;
2971 __entry->magic_pkt = wakeup ? wakeup->magic_pkt : false;
2972 __entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false;
2973 __entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false;
2974 __entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false;
2975 __entry->rfkill_release = wakeup ? wakeup->rfkill_release : false;
2976 __entry->pattern_idx = wakeup ? wakeup->pattern_idx : false;
2977 __entry->packet_len = wakeup ? wakeup->packet_len : false;
2978 if (wakeup && wakeup->packet && wakeup->packet_present_len)
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002979 memcpy(__get_dynamic_array(packet), wakeup->packet,
2980 wakeup->packet_present_len);
2981 ),
2982 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
2983);
2984
Jouni Malinen355199e2013-02-27 17:14:27 +02002985TRACE_EVENT(cfg80211_ft_event,
2986 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2987 struct cfg80211_ft_event_params *ft_event),
2988 TP_ARGS(wiphy, netdev, ft_event),
2989 TP_STRUCT__entry(
2990 WIPHY_ENTRY
2991 NETDEV_ENTRY
2992 __dynamic_array(u8, ies, ft_event->ies_len)
2993 MAC_ENTRY(target_ap)
2994 __dynamic_array(u8, ric_ies, ft_event->ric_ies_len)
2995 ),
2996 TP_fast_assign(
2997 WIPHY_ASSIGN;
2998 NETDEV_ASSIGN;
2999 if (ft_event->ies)
3000 memcpy(__get_dynamic_array(ies), ft_event->ies,
3001 ft_event->ies_len);
3002 MAC_ASSIGN(target_ap, ft_event->target_ap);
3003 if (ft_event->ric_ies)
3004 memcpy(__get_dynamic_array(ric_ies), ft_event->ric_ies,
3005 ft_event->ric_ies_len);
3006 ),
3007 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", target_ap: " MAC_PR_FMT,
3008 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(target_ap))
3009);
3010
Michal Kaziorf04c2202014-04-09 15:11:01 +02003011TRACE_EVENT(cfg80211_stop_iface,
3012 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
3013 TP_ARGS(wiphy, wdev),
3014 TP_STRUCT__entry(
3015 WIPHY_ENTRY
3016 WDEV_ENTRY
3017 ),
3018 TP_fast_assign(
3019 WIPHY_ASSIGN;
3020 WDEV_ASSIGN;
3021 ),
3022 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
3023 WIPHY_PR_ARG, WDEV_PR_ARG)
3024);
3025
Ilan Peera1056b12015-10-22 22:27:46 +03003026TRACE_EVENT(rdev_start_radar_detection,
3027 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3028 struct cfg80211_chan_def *chandef,
3029 u32 cac_time_ms),
3030 TP_ARGS(wiphy, netdev, chandef, cac_time_ms),
3031 TP_STRUCT__entry(
3032 WIPHY_ENTRY
3033 NETDEV_ENTRY
3034 CHAN_DEF_ENTRY
3035 __field(u32, cac_time_ms)
3036 ),
3037 TP_fast_assign(
3038 WIPHY_ASSIGN;
3039 NETDEV_ASSIGN;
3040 CHAN_DEF_ASSIGN(chandef);
3041 __entry->cac_time_ms = cac_time_ms;
3042 ),
3043 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
3044 ", cac_time_ms=%u",
3045 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
3046 __entry->cac_time_ms)
3047);
3048
3049TRACE_EVENT(rdev_set_mcast_rate,
3050 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
Johannes Berg57fbcce2016-04-12 15:56:15 +02003051 int mcast_rate[NUM_NL80211_BANDS]),
Ilan Peera1056b12015-10-22 22:27:46 +03003052 TP_ARGS(wiphy, netdev, mcast_rate),
3053 TP_STRUCT__entry(
3054 WIPHY_ENTRY
3055 NETDEV_ENTRY
Johannes Berg57fbcce2016-04-12 15:56:15 +02003056 __array(int, mcast_rate, NUM_NL80211_BANDS)
Ilan Peera1056b12015-10-22 22:27:46 +03003057 ),
3058 TP_fast_assign(
3059 WIPHY_ASSIGN;
3060 NETDEV_ASSIGN;
3061 memcpy(__entry->mcast_rate, mcast_rate,
Johannes Berg57fbcce2016-04-12 15:56:15 +02003062 sizeof(int) * NUM_NL80211_BANDS);
Ilan Peera1056b12015-10-22 22:27:46 +03003063 ),
3064 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", "
3065 "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 60GHz=0x%x]",
3066 WIPHY_PR_ARG, NETDEV_PR_ARG,
Johannes Berg57fbcce2016-04-12 15:56:15 +02003067 __entry->mcast_rate[NL80211_BAND_2GHZ],
3068 __entry->mcast_rate[NL80211_BAND_5GHZ],
3069 __entry->mcast_rate[NL80211_BAND_60GHZ])
Ilan Peera1056b12015-10-22 22:27:46 +03003070);
3071
3072TRACE_EVENT(rdev_set_coalesce,
3073 TP_PROTO(struct wiphy *wiphy, struct cfg80211_coalesce *coalesce),
3074 TP_ARGS(wiphy, coalesce),
3075 TP_STRUCT__entry(
3076 WIPHY_ENTRY
3077 __field(int, n_rules)
3078 ),
3079 TP_fast_assign(
3080 WIPHY_ASSIGN;
3081 __entry->n_rules = coalesce ? coalesce->n_rules : 0;
3082 ),
3083 TP_printk(WIPHY_PR_FMT ", n_rules=%d",
3084 WIPHY_PR_ARG, __entry->n_rules)
3085);
3086
Vidyullatha Kanchanapally91d3ab42015-10-30 19:14:49 +05303087DEFINE_EVENT(wiphy_wdev_evt, rdev_abort_scan,
3088 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
3089 TP_ARGS(wiphy, wdev)
3090);
Michael Braund757efc2016-10-10 19:12:22 +02003091
3092TRACE_EVENT(rdev_set_multicast_to_unicast,
3093 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3094 const bool enabled),
3095 TP_ARGS(wiphy, netdev, enabled),
3096 TP_STRUCT__entry(
3097 WIPHY_ENTRY
3098 NETDEV_ENTRY
3099 __field(bool, enabled)
3100 ),
3101 TP_fast_assign(
3102 WIPHY_ASSIGN;
3103 NETDEV_ASSIGN;
3104 __entry->enabled = enabled;
3105 ),
3106 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", unicast: %s",
3107 WIPHY_PR_ARG, NETDEV_PR_ARG,
3108 BOOL_TO_STR(__entry->enabled))
3109);
Sunil Dutt6e200822019-04-09 13:09:28 +05303110
3111TRACE_EVENT(rdev_update_owe_info,
3112 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3113 struct cfg80211_update_owe_info *owe_info),
3114 TP_ARGS(wiphy, netdev, owe_info),
3115 TP_STRUCT__entry(WIPHY_ENTRY
3116 NETDEV_ENTRY
3117 MAC_ENTRY(peer)
3118 __field(u16, status)
3119 __dynamic_array(u8, ie, owe_info->ie_len)),
3120 TP_fast_assign(WIPHY_ASSIGN;
3121 NETDEV_ASSIGN;
3122 MAC_ASSIGN(peer, owe_info->peer);
3123 __entry->status = owe_info->status;
3124 memcpy(__get_dynamic_array(ie),
3125 owe_info->ie, owe_info->ie_len);),
3126 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT
3127 " status %d", WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
3128 __entry->status)
3129);
3130
3131TRACE_EVENT(cfg80211_update_owe_info_event,
3132 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3133 struct cfg80211_update_owe_info *owe_info),
3134 TP_ARGS(wiphy, netdev, owe_info),
3135 TP_STRUCT__entry(WIPHY_ENTRY
3136 NETDEV_ENTRY
3137 MAC_ENTRY(peer)
3138 __dynamic_array(u8, ie, owe_info->ie_len)),
3139 TP_fast_assign(WIPHY_ASSIGN;
3140 NETDEV_ASSIGN;
3141 MAC_ASSIGN(peer, owe_info->peer);
3142 memcpy(__get_dynamic_array(ie), owe_info->ie,
3143 owe_info->ie_len);),
3144 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
3145 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
3146);
3147
Beni Lev14e8a3c2012-07-31 18:48:27 +03003148#endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
3149
3150#undef TRACE_INCLUDE_PATH
3151#define TRACE_INCLUDE_PATH .
3152#undef TRACE_INCLUDE_FILE
3153#define TRACE_INCLUDE_FILE trace
3154#include <trace/define_trace.h>