blob: e4e39143728c2c50654d20795149220b8907c1d4 [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>
10#include <net/cfg80211.h>
11#include "core.h"
12
13#define MAC_ENTRY(entry_mac) __array(u8, entry_mac, ETH_ALEN)
14#define MAC_ASSIGN(entry_mac, given_mac) do { \
15 if (given_mac) \
16 memcpy(__entry->entry_mac, given_mac, ETH_ALEN); \
17 else \
18 memset(__entry->entry_mac, 0, ETH_ALEN); \
19 } while (0)
20#define MAC_PR_FMT "%pM"
21#define MAC_PR_ARG(entry_mac) (__entry->entry_mac)
22
Johannes Bergec816082012-11-16 17:22:28 +010023#define MAXNAME 32
24#define WIPHY_ENTRY __array(char, wiphy_name, 32)
25#define WIPHY_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(wiphy), MAXNAME)
26#define WIPHY_PR_FMT "%s"
27#define WIPHY_PR_ARG __entry->wiphy_name
Beni Lev14e8a3c2012-07-31 18:48:27 +030028
Johannes Bergec816082012-11-16 17:22:28 +010029#define WDEV_ENTRY __field(u32, id)
Johannes Bergce1eadd2013-03-19 20:26:57 +010030#define WDEV_ASSIGN (__entry->id) = (!IS_ERR_OR_NULL(wdev) \
31 ? wdev->identifier : 0)
Johannes Bergec816082012-11-16 17:22:28 +010032#define WDEV_PR_FMT "wdev(%u)"
33#define WDEV_PR_ARG (__entry->id)
Beni Lev14e8a3c2012-07-31 18:48:27 +030034
Johannes Bergec816082012-11-16 17:22:28 +010035#define NETDEV_ENTRY __array(char, name, IFNAMSIZ) \
36 __field(int, ifindex)
Beni Lev14e8a3c2012-07-31 18:48:27 +030037#define NETDEV_ASSIGN \
38 do { \
39 memcpy(__entry->name, netdev->name, IFNAMSIZ); \
Beni Lev14e8a3c2012-07-31 18:48:27 +030040 (__entry->ifindex) = (netdev->ifindex); \
41 } while (0)
Johannes Bergec816082012-11-16 17:22:28 +010042#define NETDEV_PR_FMT "netdev:%s(%d)"
43#define NETDEV_PR_ARG __entry->name, __entry->ifindex
Beni Lev14e8a3c2012-07-31 18:48:27 +030044
45#define MESH_CFG_ENTRY __field(u16, dot11MeshRetryTimeout) \
46 __field(u16, dot11MeshConfirmTimeout) \
47 __field(u16, dot11MeshHoldingTimeout) \
48 __field(u16, dot11MeshMaxPeerLinks) \
49 __field(u8, dot11MeshMaxRetries) \
50 __field(u8, dot11MeshTTL) \
51 __field(u8, element_ttl) \
52 __field(bool, auto_open_plinks) \
53 __field(u32, dot11MeshNbrOffsetMaxNeighbor) \
54 __field(u8, dot11MeshHWMPmaxPREQretries) \
55 __field(u32, path_refresh_time) \
56 __field(u32, dot11MeshHWMPactivePathTimeout) \
57 __field(u16, min_discovery_timeout) \
58 __field(u16, dot11MeshHWMPpreqMinInterval) \
59 __field(u16, dot11MeshHWMPperrMinInterval) \
60 __field(u16, dot11MeshHWMPnetDiameterTraversalTime) \
61 __field(u8, dot11MeshHWMPRootMode) \
62 __field(u16, dot11MeshHWMPRannInterval) \
63 __field(bool, dot11MeshGateAnnouncementProtocol) \
64 __field(bool, dot11MeshForwarding) \
65 __field(s32, rssi_threshold) \
66 __field(u16, ht_opmode) \
67 __field(u32, dot11MeshHWMPactivePathToRootTimeout) \
68 __field(u16, dot11MeshHWMProotInterval) \
69 __field(u16, dot11MeshHWMPconfirmationInterval)
70#define MESH_CFG_ASSIGN \
71 do { \
72 __entry->dot11MeshRetryTimeout = conf->dot11MeshRetryTimeout; \
73 __entry->dot11MeshConfirmTimeout = \
74 conf->dot11MeshConfirmTimeout; \
75 __entry->dot11MeshHoldingTimeout = \
76 conf->dot11MeshHoldingTimeout; \
77 __entry->dot11MeshMaxPeerLinks = conf->dot11MeshMaxPeerLinks; \
78 __entry->dot11MeshMaxRetries = conf->dot11MeshMaxRetries; \
79 __entry->dot11MeshTTL = conf->dot11MeshTTL; \
80 __entry->element_ttl = conf->element_ttl; \
81 __entry->auto_open_plinks = conf->auto_open_plinks; \
82 __entry->dot11MeshNbrOffsetMaxNeighbor = \
83 conf->dot11MeshNbrOffsetMaxNeighbor; \
84 __entry->dot11MeshHWMPmaxPREQretries = \
85 conf->dot11MeshHWMPmaxPREQretries; \
86 __entry->path_refresh_time = conf->path_refresh_time; \
87 __entry->dot11MeshHWMPactivePathTimeout = \
88 conf->dot11MeshHWMPactivePathTimeout; \
89 __entry->min_discovery_timeout = conf->min_discovery_timeout; \
90 __entry->dot11MeshHWMPpreqMinInterval = \
91 conf->dot11MeshHWMPpreqMinInterval; \
92 __entry->dot11MeshHWMPperrMinInterval = \
93 conf->dot11MeshHWMPperrMinInterval; \
94 __entry->dot11MeshHWMPnetDiameterTraversalTime = \
95 conf->dot11MeshHWMPnetDiameterTraversalTime; \
96 __entry->dot11MeshHWMPRootMode = conf->dot11MeshHWMPRootMode; \
97 __entry->dot11MeshHWMPRannInterval = \
98 conf->dot11MeshHWMPRannInterval; \
99 __entry->dot11MeshGateAnnouncementProtocol = \
100 conf->dot11MeshGateAnnouncementProtocol; \
101 __entry->dot11MeshForwarding = conf->dot11MeshForwarding; \
102 __entry->rssi_threshold = conf->rssi_threshold; \
103 __entry->ht_opmode = conf->ht_opmode; \
104 __entry->dot11MeshHWMPactivePathToRootTimeout = \
105 conf->dot11MeshHWMPactivePathToRootTimeout; \
106 __entry->dot11MeshHWMProotInterval = \
107 conf->dot11MeshHWMProotInterval; \
108 __entry->dot11MeshHWMPconfirmationInterval = \
109 conf->dot11MeshHWMPconfirmationInterval; \
110 } while (0)
111
112#define CHAN_ENTRY __field(enum ieee80211_band, band) \
113 __field(u16, center_freq)
114#define CHAN_ASSIGN(chan) \
115 do { \
116 if (chan) { \
117 __entry->band = chan->band; \
118 __entry->center_freq = chan->center_freq; \
119 } else { \
120 __entry->band = 0; \
121 __entry->center_freq = 0; \
122 } \
123 } while (0)
Johannes Bergec816082012-11-16 17:22:28 +0100124#define CHAN_PR_FMT "band: %d, freq: %u"
Beni Lev14e8a3c2012-07-31 18:48:27 +0300125#define CHAN_PR_ARG __entry->band, __entry->center_freq
126
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100127#define CHAN_DEF_ENTRY __field(enum ieee80211_band, band) \
128 __field(u32, control_freq) \
129 __field(u32, width) \
130 __field(u32, center_freq1) \
131 __field(u32, center_freq2)
Johannes Berg683b6d32012-11-08 21:25:48 +0100132#define CHAN_DEF_ASSIGN(chandef) \
133 do { \
134 if ((chandef) && (chandef)->chan) { \
135 __entry->band = (chandef)->chan->band; \
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100136 __entry->control_freq = \
Johannes Berg683b6d32012-11-08 21:25:48 +0100137 (chandef)->chan->center_freq; \
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100138 __entry->width = (chandef)->width; \
139 __entry->center_freq1 = (chandef)->center_freq1;\
140 __entry->center_freq2 = (chandef)->center_freq2;\
Johannes Berg683b6d32012-11-08 21:25:48 +0100141 } else { \
142 __entry->band = 0; \
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100143 __entry->control_freq = 0; \
144 __entry->width = 0; \
145 __entry->center_freq1 = 0; \
146 __entry->center_freq2 = 0; \
Johannes Berg683b6d32012-11-08 21:25:48 +0100147 } \
148 } while (0)
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100149#define CHAN_DEF_PR_FMT \
Johannes Bergec816082012-11-16 17:22:28 +0100150 "band: %d, control freq: %u, width: %d, cf1: %u, cf2: %u"
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100151#define CHAN_DEF_PR_ARG __entry->band, __entry->control_freq, \
152 __entry->width, __entry->center_freq1, \
153 __entry->center_freq2
Johannes Berg683b6d32012-11-08 21:25:48 +0100154
Beni Lev14e8a3c2012-07-31 18:48:27 +0300155#define SINFO_ENTRY __field(int, generation) \
156 __field(u32, connected_time) \
157 __field(u32, inactive_time) \
158 __field(u32, rx_bytes) \
159 __field(u32, tx_bytes) \
160 __field(u32, rx_packets) \
161 __field(u32, tx_packets) \
162 __field(u32, tx_retries) \
163 __field(u32, tx_failed) \
164 __field(u32, rx_dropped_misc) \
165 __field(u32, beacon_loss_count) \
166 __field(u16, llid) \
167 __field(u16, plid) \
168 __field(u8, plink_state)
169#define SINFO_ASSIGN \
170 do { \
171 __entry->generation = sinfo->generation; \
172 __entry->connected_time = sinfo->connected_time; \
173 __entry->inactive_time = sinfo->inactive_time; \
174 __entry->rx_bytes = sinfo->rx_bytes; \
175 __entry->tx_bytes = sinfo->tx_bytes; \
176 __entry->rx_packets = sinfo->rx_packets; \
177 __entry->tx_packets = sinfo->tx_packets; \
178 __entry->tx_retries = sinfo->tx_retries; \
179 __entry->tx_failed = sinfo->tx_failed; \
180 __entry->rx_dropped_misc = sinfo->rx_dropped_misc; \
181 __entry->beacon_loss_count = sinfo->beacon_loss_count; \
182 __entry->llid = sinfo->llid; \
183 __entry->plid = sinfo->plid; \
184 __entry->plink_state = sinfo->plink_state; \
185 } while (0)
186
187#define BOOL_TO_STR(bo) (bo) ? "true" : "false"
188
Kyeyoon Parkfa9ffc72013-12-16 23:01:30 -0800189#define QOS_MAP_ENTRY __field(u8, num_des) \
190 __array(u8, dscp_exception, \
191 2 * IEEE80211_QOS_MAP_MAX_EX) \
192 __array(u8, up, IEEE80211_QOS_MAP_LEN_MIN)
193#define QOS_MAP_ASSIGN(qos_map) \
194 do { \
195 if ((qos_map)) { \
196 __entry->num_des = (qos_map)->num_des; \
197 memcpy(__entry->dscp_exception, \
198 &(qos_map)->dscp_exception, \
199 2 * IEEE80211_QOS_MAP_MAX_EX); \
200 memcpy(__entry->up, &(qos_map)->up, \
201 IEEE80211_QOS_MAP_LEN_MIN); \
202 } else { \
203 __entry->num_des = 0; \
204 memset(__entry->dscp_exception, 0, \
205 2 * IEEE80211_QOS_MAP_MAX_EX); \
206 memset(__entry->up, 0, \
207 IEEE80211_QOS_MAP_LEN_MIN); \
208 } \
209 } while (0)
210
Beni Lev14e8a3c2012-07-31 18:48:27 +0300211/*************************************************************
212 * rdev->ops traces *
213 *************************************************************/
214
215TRACE_EVENT(rdev_suspend,
216 TP_PROTO(struct wiphy *wiphy, struct cfg80211_wowlan *wow),
217 TP_ARGS(wiphy, wow),
218 TP_STRUCT__entry(
219 WIPHY_ENTRY
220 __field(bool, any)
221 __field(bool, disconnect)
222 __field(bool, magic_pkt)
223 __field(bool, gtk_rekey_failure)
224 __field(bool, eap_identity_req)
225 __field(bool, four_way_handshake)
226 __field(bool, rfkill_release)
227 __field(bool, valid_wow)
228 ),
229 TP_fast_assign(
230 WIPHY_ASSIGN;
231 if (wow) {
232 __entry->any = wow->any;
233 __entry->disconnect = wow->disconnect;
234 __entry->magic_pkt = wow->magic_pkt;
235 __entry->gtk_rekey_failure = wow->gtk_rekey_failure;
236 __entry->eap_identity_req = wow->eap_identity_req;
237 __entry->four_way_handshake = wow->four_way_handshake;
238 __entry->rfkill_release = wow->rfkill_release;
239 __entry->valid_wow = true;
240 } else {
241 __entry->valid_wow = false;
242 }
243 ),
244 TP_printk(WIPHY_PR_FMT ", wow%s - any: %d, disconnect: %d, "
245 "magic pkt: %d, gtk rekey failure: %d, eap identify req: %d, "
246 "four way handshake: %d, rfkill release: %d.",
247 WIPHY_PR_ARG, __entry->valid_wow ? "" : "(Not configured!)",
248 __entry->any, __entry->disconnect, __entry->magic_pkt,
249 __entry->gtk_rekey_failure, __entry->eap_identity_req,
250 __entry->four_way_handshake, __entry->rfkill_release)
251);
252
253TRACE_EVENT(rdev_return_int,
254 TP_PROTO(struct wiphy *wiphy, int ret),
255 TP_ARGS(wiphy, ret),
256 TP_STRUCT__entry(
257 WIPHY_ENTRY
258 __field(int, ret)
259 ),
260 TP_fast_assign(
261 WIPHY_ASSIGN;
262 __entry->ret = ret;
263 ),
264 TP_printk(WIPHY_PR_FMT ", returned: %d", WIPHY_PR_ARG, __entry->ret)
265);
266
267TRACE_EVENT(rdev_scan,
268 TP_PROTO(struct wiphy *wiphy, struct cfg80211_scan_request *request),
269 TP_ARGS(wiphy, request),
270 TP_STRUCT__entry(
271 WIPHY_ENTRY
272 ),
273 TP_fast_assign(
274 WIPHY_ASSIGN;
275 ),
276 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
277);
278
279DECLARE_EVENT_CLASS(wiphy_only_evt,
280 TP_PROTO(struct wiphy *wiphy),
281 TP_ARGS(wiphy),
282 TP_STRUCT__entry(
283 WIPHY_ENTRY
284 ),
285 TP_fast_assign(
286 WIPHY_ASSIGN;
287 ),
288 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
289);
290
291DEFINE_EVENT(wiphy_only_evt, rdev_resume,
292 TP_PROTO(struct wiphy *wiphy),
293 TP_ARGS(wiphy)
294);
295
296DEFINE_EVENT(wiphy_only_evt, rdev_return_void,
297 TP_PROTO(struct wiphy *wiphy),
298 TP_ARGS(wiphy)
299);
300
Beni Lev14e8a3c2012-07-31 18:48:27 +0300301DEFINE_EVENT(wiphy_only_evt, rdev_get_antenna,
302 TP_PROTO(struct wiphy *wiphy),
303 TP_ARGS(wiphy)
304);
305
Beni Lev14e8a3c2012-07-31 18:48:27 +0300306DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll,
307 TP_PROTO(struct wiphy *wiphy),
308 TP_ARGS(wiphy)
309);
310
311DECLARE_EVENT_CLASS(wiphy_enabled_evt,
312 TP_PROTO(struct wiphy *wiphy, bool enabled),
313 TP_ARGS(wiphy, enabled),
314 TP_STRUCT__entry(
315 WIPHY_ENTRY
316 __field(bool, enabled)
317 ),
318 TP_fast_assign(
319 WIPHY_ASSIGN;
320 __entry->enabled = enabled;
321 ),
322 TP_printk(WIPHY_PR_FMT ", %senabled ",
323 WIPHY_PR_ARG, __entry->enabled ? "" : "not ")
324);
325
326DEFINE_EVENT(wiphy_enabled_evt, rdev_set_wakeup,
327 TP_PROTO(struct wiphy *wiphy, bool enabled),
328 TP_ARGS(wiphy, enabled)
329);
330
331TRACE_EVENT(rdev_add_virtual_intf,
332 TP_PROTO(struct wiphy *wiphy, char *name, enum nl80211_iftype type),
333 TP_ARGS(wiphy, name, type),
334 TP_STRUCT__entry(
335 WIPHY_ENTRY
336 __string(vir_intf_name, name ? name : "<noname>")
337 __field(enum nl80211_iftype, type)
338 ),
339 TP_fast_assign(
340 WIPHY_ASSIGN;
341 __assign_str(vir_intf_name, name ? name : "<noname>");
342 __entry->type = type;
343 ),
344 TP_printk(WIPHY_PR_FMT ", virtual intf name: %s, type: %d",
345 WIPHY_PR_ARG, __get_str(vir_intf_name), __entry->type)
346);
347
348DECLARE_EVENT_CLASS(wiphy_wdev_evt,
349 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
350 TP_ARGS(wiphy, wdev),
351 TP_STRUCT__entry(
352 WIPHY_ENTRY
353 WDEV_ENTRY
354 ),
355 TP_fast_assign(
356 WIPHY_ASSIGN;
357 WDEV_ASSIGN;
358 ),
Johannes Bergec816082012-11-16 17:22:28 +0100359 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300360);
361
362DEFINE_EVENT(wiphy_wdev_evt, rdev_return_wdev,
363 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
364 TP_ARGS(wiphy, wdev)
365);
366
367DEFINE_EVENT(wiphy_wdev_evt, rdev_del_virtual_intf,
368 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
369 TP_ARGS(wiphy, wdev)
370);
371
372TRACE_EVENT(rdev_change_virtual_intf,
373 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
374 enum nl80211_iftype type),
375 TP_ARGS(wiphy, netdev, type),
376 TP_STRUCT__entry(
377 WIPHY_ENTRY
378 NETDEV_ENTRY
379 __field(enum nl80211_iftype, type)
380 ),
381 TP_fast_assign(
382 WIPHY_ASSIGN;
383 NETDEV_ASSIGN;
384 __entry->type = type;
385 ),
Johannes Bergec816082012-11-16 17:22:28 +0100386 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", type: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300387 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->type)
388);
389
390DECLARE_EVENT_CLASS(key_handle,
391 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
392 bool pairwise, const u8 *mac_addr),
393 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr),
394 TP_STRUCT__entry(
395 WIPHY_ENTRY
396 NETDEV_ENTRY
397 MAC_ENTRY(mac_addr)
398 __field(u8, key_index)
399 __field(bool, pairwise)
400 ),
401 TP_fast_assign(
402 WIPHY_ASSIGN;
403 NETDEV_ASSIGN;
404 MAC_ASSIGN(mac_addr, mac_addr);
405 __entry->key_index = key_index;
406 __entry->pairwise = pairwise;
407 ),
Johannes Bergec816082012-11-16 17:22:28 +0100408 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 +0300409 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
410 BOOL_TO_STR(__entry->pairwise), MAC_PR_ARG(mac_addr))
411);
412
413DEFINE_EVENT(key_handle, rdev_add_key,
414 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
415 bool pairwise, const u8 *mac_addr),
416 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
417);
418
419DEFINE_EVENT(key_handle, rdev_get_key,
420 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
421 bool pairwise, const u8 *mac_addr),
422 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
423);
424
425DEFINE_EVENT(key_handle, rdev_del_key,
426 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
427 bool pairwise, const u8 *mac_addr),
428 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
429);
430
431TRACE_EVENT(rdev_set_default_key,
432 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
433 bool unicast, bool multicast),
434 TP_ARGS(wiphy, netdev, key_index, unicast, multicast),
435 TP_STRUCT__entry(
436 WIPHY_ENTRY
437 NETDEV_ENTRY
438 __field(u8, key_index)
439 __field(bool, unicast)
440 __field(bool, multicast)
441 ),
442 TP_fast_assign(
443 WIPHY_ASSIGN;
444 NETDEV_ASSIGN;
445 __entry->key_index = key_index;
446 __entry->unicast = unicast;
447 __entry->multicast = multicast;
448 ),
Johannes Bergec816082012-11-16 17:22:28 +0100449 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u, unicast: %s, multicast: %s",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300450 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
451 BOOL_TO_STR(__entry->unicast),
452 BOOL_TO_STR(__entry->multicast))
453);
454
455TRACE_EVENT(rdev_set_default_mgmt_key,
456 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index),
457 TP_ARGS(wiphy, netdev, key_index),
458 TP_STRUCT__entry(
459 WIPHY_ENTRY
460 NETDEV_ENTRY
461 __field(u8, key_index)
462 ),
463 TP_fast_assign(
464 WIPHY_ASSIGN;
465 NETDEV_ASSIGN;
466 __entry->key_index = key_index;
467 ),
Johannes Bergec816082012-11-16 17:22:28 +0100468 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300469 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index)
470);
471
472TRACE_EVENT(rdev_start_ap,
473 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
474 struct cfg80211_ap_settings *settings),
475 TP_ARGS(wiphy, netdev, settings),
476 TP_STRUCT__entry(
477 WIPHY_ENTRY
478 NETDEV_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +0100479 CHAN_DEF_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +0300480 __field(int, beacon_interval)
481 __field(int, dtim_period)
482 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
483 __field(enum nl80211_hidden_ssid, hidden_ssid)
484 __field(u32, wpa_ver)
485 __field(bool, privacy)
486 __field(enum nl80211_auth_type, auth_type)
487 __field(int, inactivity_timeout)
488 ),
489 TP_fast_assign(
490 WIPHY_ASSIGN;
491 NETDEV_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +0100492 CHAN_DEF_ASSIGN(&settings->chandef);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300493 __entry->beacon_interval = settings->beacon_interval;
494 __entry->dtim_period = settings->dtim_period;
495 __entry->hidden_ssid = settings->hidden_ssid;
496 __entry->wpa_ver = settings->crypto.wpa_versions;
497 __entry->privacy = settings->privacy;
498 __entry->auth_type = settings->auth_type;
499 __entry->inactivity_timeout = settings->inactivity_timeout;
500 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
501 memcpy(__entry->ssid, settings->ssid, settings->ssid_len);
502 ),
Johannes Bergec816082012-11-16 17:22:28 +0100503 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", AP settings - ssid: %s, "
Johannes Berg683b6d32012-11-08 21:25:48 +0100504 CHAN_DEF_PR_FMT ", beacon interval: %d, dtim period: %d, "
Beni Lev14e8a3c2012-07-31 18:48:27 +0300505 "hidden ssid: %d, wpa versions: %u, privacy: %s, "
506 "auth type: %d, inactivity timeout: %d",
Johannes Berg683b6d32012-11-08 21:25:48 +0100507 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ssid, CHAN_DEF_PR_ARG,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300508 __entry->beacon_interval, __entry->dtim_period,
509 __entry->hidden_ssid, __entry->wpa_ver,
510 BOOL_TO_STR(__entry->privacy), __entry->auth_type,
511 __entry->inactivity_timeout)
512);
513
514TRACE_EVENT(rdev_change_beacon,
515 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
516 struct cfg80211_beacon_data *info),
517 TP_ARGS(wiphy, netdev, info),
518 TP_STRUCT__entry(
519 WIPHY_ENTRY
520 NETDEV_ENTRY
521 __dynamic_array(u8, head, info ? info->head_len : 0)
522 __dynamic_array(u8, tail, info ? info->tail_len : 0)
523 __dynamic_array(u8, beacon_ies, info ? info->beacon_ies_len : 0)
524 __dynamic_array(u8, proberesp_ies,
525 info ? info->proberesp_ies_len : 0)
526 __dynamic_array(u8, assocresp_ies,
527 info ? info->assocresp_ies_len : 0)
528 __dynamic_array(u8, probe_resp, info ? info->probe_resp_len : 0)
529 ),
530 TP_fast_assign(
531 WIPHY_ASSIGN;
532 NETDEV_ASSIGN;
533 if (info) {
534 if (info->head)
535 memcpy(__get_dynamic_array(head), info->head,
536 info->head_len);
537 if (info->tail)
538 memcpy(__get_dynamic_array(tail), info->tail,
539 info->tail_len);
540 if (info->beacon_ies)
541 memcpy(__get_dynamic_array(beacon_ies),
542 info->beacon_ies, info->beacon_ies_len);
543 if (info->proberesp_ies)
544 memcpy(__get_dynamic_array(proberesp_ies),
545 info->proberesp_ies,
546 info->proberesp_ies_len);
547 if (info->assocresp_ies)
548 memcpy(__get_dynamic_array(assocresp_ies),
549 info->assocresp_ies,
550 info->assocresp_ies_len);
551 if (info->probe_resp)
552 memcpy(__get_dynamic_array(probe_resp),
553 info->probe_resp, info->probe_resp_len);
554 }
555 ),
Johannes Bergec816082012-11-16 17:22:28 +0100556 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300557);
558
559DECLARE_EVENT_CLASS(wiphy_netdev_evt,
560 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
561 TP_ARGS(wiphy, netdev),
562 TP_STRUCT__entry(
563 WIPHY_ENTRY
564 NETDEV_ENTRY
565 ),
566 TP_fast_assign(
567 WIPHY_ASSIGN;
568 NETDEV_ASSIGN;
569 ),
Johannes Bergec816082012-11-16 17:22:28 +0100570 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300571);
572
573DEFINE_EVENT(wiphy_netdev_evt, rdev_stop_ap,
574 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
575 TP_ARGS(wiphy, netdev)
576);
577
Beni Lev14e8a3c2012-07-31 18:48:27 +0300578DEFINE_EVENT(wiphy_netdev_evt, rdev_sched_scan_stop,
579 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
580 TP_ARGS(wiphy, netdev)
581);
582
583DEFINE_EVENT(wiphy_netdev_evt, rdev_set_rekey_data,
584 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
585 TP_ARGS(wiphy, netdev)
586);
587
588DEFINE_EVENT(wiphy_netdev_evt, rdev_get_mesh_config,
589 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
590 TP_ARGS(wiphy, netdev)
591);
592
593DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_mesh,
594 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
595 TP_ARGS(wiphy, netdev)
596);
597
598DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ibss,
599 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
600 TP_ARGS(wiphy, netdev)
601);
602
Rostislav Lisovy6e0bd6c2014-11-03 10:33:18 +0100603DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ocb,
604 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
605 TP_ARGS(wiphy, netdev)
606);
607
Beni Lev14e8a3c2012-07-31 18:48:27 +0300608DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa,
609 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
610 TP_ARGS(wiphy, netdev)
611);
612
613DECLARE_EVENT_CLASS(station_add_change,
614 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
615 struct station_parameters *params),
616 TP_ARGS(wiphy, netdev, mac, params),
617 TP_STRUCT__entry(
618 WIPHY_ENTRY
619 NETDEV_ENTRY
620 MAC_ENTRY(sta_mac)
621 __field(u32, sta_flags_mask)
622 __field(u32, sta_flags_set)
623 __field(u32, sta_modify_mask)
624 __field(int, listen_interval)
625 __field(u16, aid)
626 __field(u8, plink_action)
627 __field(u8, plink_state)
628 __field(u8, uapsd_queues)
629 __array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap))
Johannes Berg5d8325ec2015-03-20 19:56:41 +0100630 __array(char, vlan, IFNAMSIZ)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300631 ),
632 TP_fast_assign(
633 WIPHY_ASSIGN;
634 NETDEV_ASSIGN;
635 MAC_ASSIGN(sta_mac, mac);
636 __entry->sta_flags_mask = params->sta_flags_mask;
637 __entry->sta_flags_set = params->sta_flags_set;
638 __entry->sta_modify_mask = params->sta_modify_mask;
639 __entry->listen_interval = params->listen_interval;
640 __entry->aid = params->aid;
641 __entry->plink_action = params->plink_action;
642 __entry->plink_state = params->plink_state;
643 __entry->uapsd_queues = params->uapsd_queues;
644 memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap));
645 if (params->ht_capa)
646 memcpy(__entry->ht_capa, params->ht_capa,
647 sizeof(struct ieee80211_ht_cap));
Johannes Berg5d8325ec2015-03-20 19:56:41 +0100648 memset(__entry->vlan, 0, sizeof(__entry->vlan));
649 if (params->vlan)
650 memcpy(__entry->vlan, params->vlan->name, IFNAMSIZ);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300651 ),
Johannes Bergec816082012-11-16 17:22:28 +0100652 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +0300653 ", station flags mask: %u, station flags set: %u, "
654 "station modify mask: %u, listen interval: %d, aid: %u, "
Johannes Berg5d8325ec2015-03-20 19:56:41 +0100655 "plink action: %u, plink state: %u, uapsd queues: %u, vlan:%s",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300656 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
657 __entry->sta_flags_mask, __entry->sta_flags_set,
658 __entry->sta_modify_mask, __entry->listen_interval,
659 __entry->aid, __entry->plink_action, __entry->plink_state,
Johannes Berg5d8325ec2015-03-20 19:56:41 +0100660 __entry->uapsd_queues, __entry->vlan)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300661);
662
663DEFINE_EVENT(station_add_change, rdev_add_station,
664 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
665 struct station_parameters *params),
666 TP_ARGS(wiphy, netdev, mac, params)
667);
668
669DEFINE_EVENT(station_add_change, rdev_change_station,
670 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
671 struct station_parameters *params),
672 TP_ARGS(wiphy, netdev, mac, params)
673);
674
675DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt,
676 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
677 TP_ARGS(wiphy, netdev, mac),
678 TP_STRUCT__entry(
679 WIPHY_ENTRY
680 NETDEV_ENTRY
681 MAC_ENTRY(sta_mac)
682 ),
683 TP_fast_assign(
684 WIPHY_ASSIGN;
685 NETDEV_ASSIGN;
686 MAC_ASSIGN(sta_mac, mac);
687 ),
Johannes Bergec816082012-11-16 17:22:28 +0100688 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300689 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac))
690);
691
Jouni Malinen89c771e2014-10-10 20:52:40 +0300692DECLARE_EVENT_CLASS(station_del,
693 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
694 struct station_del_parameters *params),
695 TP_ARGS(wiphy, netdev, params),
696 TP_STRUCT__entry(
697 WIPHY_ENTRY
698 NETDEV_ENTRY
699 MAC_ENTRY(sta_mac)
Jouni Malinen98856862014-10-20 13:20:45 +0300700 __field(u8, subtype)
701 __field(u16, reason_code)
Jouni Malinen89c771e2014-10-10 20:52:40 +0300702 ),
703 TP_fast_assign(
704 WIPHY_ASSIGN;
705 NETDEV_ASSIGN;
706 MAC_ASSIGN(sta_mac, params->mac);
Jouni Malinen98856862014-10-20 13:20:45 +0300707 __entry->subtype = params->subtype;
708 __entry->reason_code = params->reason_code;
Jouni Malinen89c771e2014-10-10 20:52:40 +0300709 ),
Jouni Malinen98856862014-10-20 13:20:45 +0300710 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
711 ", subtype: %u, reason_code: %u",
712 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
713 __entry->subtype, __entry->reason_code)
Jouni Malinen89c771e2014-10-10 20:52:40 +0300714);
715
716DEFINE_EVENT(station_del, rdev_del_station,
717 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
718 struct station_del_parameters *params),
719 TP_ARGS(wiphy, netdev, params)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300720);
721
722DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_station,
723 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
724 TP_ARGS(wiphy, netdev, mac)
725);
726
727DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath,
728 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
729 TP_ARGS(wiphy, netdev, mac)
730);
731
732DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_set_wds_peer,
733 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
734 TP_ARGS(wiphy, netdev, mac)
735);
736
737TRACE_EVENT(rdev_dump_station,
738 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
739 u8 *mac),
740 TP_ARGS(wiphy, netdev, idx, mac),
741 TP_STRUCT__entry(
742 WIPHY_ENTRY
743 NETDEV_ENTRY
744 MAC_ENTRY(sta_mac)
745 __field(int, idx)
746 ),
747 TP_fast_assign(
748 WIPHY_ASSIGN;
749 NETDEV_ASSIGN;
750 MAC_ASSIGN(sta_mac, mac);
751 __entry->idx = idx;
752 ),
Johannes Bergec816082012-11-16 17:22:28 +0100753 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT ", idx: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300754 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
755 __entry->idx)
756);
757
758TRACE_EVENT(rdev_return_int_station_info,
759 TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo),
760 TP_ARGS(wiphy, ret, sinfo),
761 TP_STRUCT__entry(
762 WIPHY_ENTRY
763 __field(int, ret)
764 SINFO_ENTRY
765 ),
766 TP_fast_assign(
767 WIPHY_ASSIGN;
768 __entry->ret = ret;
769 SINFO_ASSIGN;
770 ),
771 TP_printk(WIPHY_PR_FMT ", returned %d" ,
772 WIPHY_PR_ARG, __entry->ret)
773);
774
775DECLARE_EVENT_CLASS(mpath_evt,
776 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
777 u8 *next_hop),
778 TP_ARGS(wiphy, netdev, dst, next_hop),
779 TP_STRUCT__entry(
780 WIPHY_ENTRY
781 NETDEV_ENTRY
782 MAC_ENTRY(dst)
783 MAC_ENTRY(next_hop)
784 ),
785 TP_fast_assign(
786 WIPHY_ASSIGN;
787 NETDEV_ASSIGN;
788 MAC_ASSIGN(dst, dst);
789 MAC_ASSIGN(next_hop, next_hop);
790 ),
Johannes Bergec816082012-11-16 17:22:28 +0100791 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT ", next hop: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300792 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dst),
793 MAC_PR_ARG(next_hop))
794);
795
796DEFINE_EVENT(mpath_evt, rdev_add_mpath,
797 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
798 u8 *next_hop),
799 TP_ARGS(wiphy, netdev, dst, next_hop)
800);
801
802DEFINE_EVENT(mpath_evt, rdev_change_mpath,
803 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
804 u8 *next_hop),
805 TP_ARGS(wiphy, netdev, dst, next_hop)
806);
807
808DEFINE_EVENT(mpath_evt, rdev_get_mpath,
809 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
810 u8 *next_hop),
811 TP_ARGS(wiphy, netdev, dst, next_hop)
812);
813
814TRACE_EVENT(rdev_dump_mpath,
815 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
816 u8 *dst, u8 *next_hop),
817 TP_ARGS(wiphy, netdev, idx, dst, next_hop),
818 TP_STRUCT__entry(
819 WIPHY_ENTRY
820 NETDEV_ENTRY
821 MAC_ENTRY(dst)
822 MAC_ENTRY(next_hop)
823 __field(int, idx)
824 ),
825 TP_fast_assign(
826 WIPHY_ASSIGN;
827 NETDEV_ASSIGN;
828 MAC_ASSIGN(dst, dst);
829 MAC_ASSIGN(next_hop, next_hop);
830 __entry->idx = idx;
831 ),
Johannes Bergec816082012-11-16 17:22:28 +0100832 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
Beni Lev14e8a3c2012-07-31 18:48:27 +0300833 MAC_PR_FMT ", next hop: " MAC_PR_FMT,
834 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
835 MAC_PR_ARG(next_hop))
836);
837
Henning Rogge66be7d22014-09-12 08:58:49 +0200838TRACE_EVENT(rdev_get_mpp,
839 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
840 u8 *dst, u8 *mpp),
841 TP_ARGS(wiphy, netdev, dst, mpp),
842 TP_STRUCT__entry(
843 WIPHY_ENTRY
844 NETDEV_ENTRY
845 MAC_ENTRY(dst)
846 MAC_ENTRY(mpp)
847 ),
848 TP_fast_assign(
849 WIPHY_ASSIGN;
850 NETDEV_ASSIGN;
851 MAC_ASSIGN(dst, dst);
852 MAC_ASSIGN(mpp, mpp);
853 ),
854 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT
855 ", mpp: " MAC_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG,
856 MAC_PR_ARG(dst), MAC_PR_ARG(mpp))
857);
858
859TRACE_EVENT(rdev_dump_mpp,
860 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
861 u8 *dst, u8 *mpp),
862 TP_ARGS(wiphy, netdev, idx, mpp, dst),
863 TP_STRUCT__entry(
864 WIPHY_ENTRY
865 NETDEV_ENTRY
866 MAC_ENTRY(dst)
867 MAC_ENTRY(mpp)
868 __field(int, idx)
869 ),
870 TP_fast_assign(
871 WIPHY_ASSIGN;
872 NETDEV_ASSIGN;
873 MAC_ASSIGN(dst, dst);
874 MAC_ASSIGN(mpp, mpp);
875 __entry->idx = idx;
876 ),
877 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
878 MAC_PR_FMT ", mpp: " MAC_PR_FMT,
879 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
880 MAC_PR_ARG(mpp))
881);
882
Beni Lev14e8a3c2012-07-31 18:48:27 +0300883TRACE_EVENT(rdev_return_int_mpath_info,
884 TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo),
885 TP_ARGS(wiphy, ret, pinfo),
886 TP_STRUCT__entry(
887 WIPHY_ENTRY
888 __field(int, ret)
889 __field(int, generation)
890 __field(u32, filled)
891 __field(u32, frame_qlen)
892 __field(u32, sn)
893 __field(u32, metric)
894 __field(u32, exptime)
895 __field(u32, discovery_timeout)
896 __field(u8, discovery_retries)
897 __field(u8, flags)
898 ),
899 TP_fast_assign(
900 WIPHY_ASSIGN;
901 __entry->ret = ret;
902 __entry->generation = pinfo->generation;
903 __entry->filled = pinfo->filled;
904 __entry->frame_qlen = pinfo->frame_qlen;
905 __entry->sn = pinfo->sn;
906 __entry->metric = pinfo->metric;
907 __entry->exptime = pinfo->exptime;
908 __entry->discovery_timeout = pinfo->discovery_timeout;
909 __entry->discovery_retries = pinfo->discovery_retries;
910 __entry->flags = pinfo->flags;
911 ),
912 TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, "
913 "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u,"
914 " discovery timeout: %u, discovery retries: %u, flags: %u",
915 WIPHY_PR_ARG, __entry->ret, __entry->generation,
916 __entry->filled, __entry->frame_qlen, __entry->sn,
917 __entry->metric, __entry->exptime, __entry->discovery_timeout,
918 __entry->discovery_retries, __entry->flags)
919);
920
921TRACE_EVENT(rdev_return_int_mesh_config,
922 TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf),
923 TP_ARGS(wiphy, ret, conf),
924 TP_STRUCT__entry(
925 WIPHY_ENTRY
926 MESH_CFG_ENTRY
927 __field(int, ret)
928 ),
929 TP_fast_assign(
930 WIPHY_ASSIGN;
931 MESH_CFG_ASSIGN;
932 __entry->ret = ret;
933 ),
934 TP_printk(WIPHY_PR_FMT ", returned: %d",
935 WIPHY_PR_ARG, __entry->ret)
936);
937
938TRACE_EVENT(rdev_update_mesh_config,
939 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask,
940 const struct mesh_config *conf),
941 TP_ARGS(wiphy, netdev, mask, conf),
942 TP_STRUCT__entry(
943 WIPHY_ENTRY
944 NETDEV_ENTRY
945 MESH_CFG_ENTRY
946 __field(u32, mask)
947 ),
948 TP_fast_assign(
949 WIPHY_ASSIGN;
950 NETDEV_ASSIGN;
951 MESH_CFG_ASSIGN;
952 __entry->mask = mask;
953 ),
Johannes Bergec816082012-11-16 17:22:28 +0100954 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mask: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300955 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask)
956);
957
958TRACE_EVENT(rdev_join_mesh,
959 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
960 const struct mesh_config *conf,
961 const struct mesh_setup *setup),
962 TP_ARGS(wiphy, netdev, conf, setup),
963 TP_STRUCT__entry(
964 WIPHY_ENTRY
965 NETDEV_ENTRY
966 MESH_CFG_ENTRY
967 ),
968 TP_fast_assign(
969 WIPHY_ASSIGN;
970 NETDEV_ASSIGN;
971 MESH_CFG_ASSIGN;
972 ),
Johannes Bergec816082012-11-16 17:22:28 +0100973 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300974 WIPHY_PR_ARG, NETDEV_PR_ARG)
975);
976
977TRACE_EVENT(rdev_change_bss,
978 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
979 struct bss_parameters *params),
980 TP_ARGS(wiphy, netdev, params),
981 TP_STRUCT__entry(
982 WIPHY_ENTRY
983 NETDEV_ENTRY
984 __field(int, use_cts_prot)
985 __field(int, use_short_preamble)
986 __field(int, use_short_slot_time)
987 __field(int, ap_isolate)
988 __field(int, ht_opmode)
989 ),
990 TP_fast_assign(
991 WIPHY_ASSIGN;
992 NETDEV_ASSIGN;
993 __entry->use_cts_prot = params->use_cts_prot;
994 __entry->use_short_preamble = params->use_short_preamble;
995 __entry->use_short_slot_time = params->use_short_slot_time;
996 __entry->ap_isolate = params->ap_isolate;
997 __entry->ht_opmode = params->ht_opmode;
998 ),
Johannes Bergec816082012-11-16 17:22:28 +0100999 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", use cts prot: %d, "
Beni Lev14e8a3c2012-07-31 18:48:27 +03001000 "use short preamble: %d, use short slot time: %d, "
1001 "ap isolate: %d, ht opmode: %d",
1002 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot,
1003 __entry->use_short_preamble, __entry->use_short_slot_time,
1004 __entry->ap_isolate, __entry->ht_opmode)
1005);
1006
1007TRACE_EVENT(rdev_set_txq_params,
1008 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1009 struct ieee80211_txq_params *params),
1010 TP_ARGS(wiphy, netdev, params),
1011 TP_STRUCT__entry(
1012 WIPHY_ENTRY
1013 NETDEV_ENTRY
1014 __field(enum nl80211_ac, ac)
1015 __field(u16, txop)
1016 __field(u16, cwmin)
1017 __field(u16, cwmax)
1018 __field(u8, aifs)
1019 ),
1020 TP_fast_assign(
1021 WIPHY_ASSIGN;
1022 NETDEV_ASSIGN;
1023 __entry->ac = params->ac;
1024 __entry->txop = params->txop;
1025 __entry->cwmin = params->cwmin;
1026 __entry->cwmax = params->cwmax;
1027 __entry->aifs = params->aifs;
1028 ),
Johannes Bergec816082012-11-16 17:22:28 +01001029 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 +03001030 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop,
1031 __entry->cwmin, __entry->cwmax, __entry->aifs)
1032);
1033
1034TRACE_EVENT(rdev_libertas_set_mesh_channel,
1035 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1036 struct ieee80211_channel *chan),
1037 TP_ARGS(wiphy, netdev, chan),
1038 TP_STRUCT__entry(
1039 WIPHY_ENTRY
1040 NETDEV_ENTRY
1041 CHAN_ENTRY
1042 ),
1043 TP_fast_assign(
1044 WIPHY_ASSIGN;
1045 NETDEV_ASSIGN;
1046 CHAN_ASSIGN(chan);
1047 ),
Johannes Bergec816082012-11-16 17:22:28 +01001048 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_PR_FMT, WIPHY_PR_ARG,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001049 NETDEV_PR_ARG, CHAN_PR_ARG)
1050);
1051
1052TRACE_EVENT(rdev_set_monitor_channel,
Johannes Berg683b6d32012-11-08 21:25:48 +01001053 TP_PROTO(struct wiphy *wiphy,
1054 struct cfg80211_chan_def *chandef),
1055 TP_ARGS(wiphy, chandef),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001056 TP_STRUCT__entry(
1057 WIPHY_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01001058 CHAN_DEF_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001059 ),
1060 TP_fast_assign(
1061 WIPHY_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01001062 CHAN_DEF_ASSIGN(chandef);
Beni Lev14e8a3c2012-07-31 18:48:27 +03001063 ),
Johannes Bergec816082012-11-16 17:22:28 +01001064 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
Johannes Berg683b6d32012-11-08 21:25:48 +01001065 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001066);
1067
1068TRACE_EVENT(rdev_auth,
1069 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1070 struct cfg80211_auth_request *req),
1071 TP_ARGS(wiphy, netdev, req),
1072 TP_STRUCT__entry(
1073 WIPHY_ENTRY
1074 NETDEV_ENTRY
1075 MAC_ENTRY(bssid)
1076 __field(enum nl80211_auth_type, auth_type)
1077 ),
1078 TP_fast_assign(
1079 WIPHY_ASSIGN;
1080 NETDEV_ASSIGN;
1081 if (req->bss)
1082 MAC_ASSIGN(bssid, req->bss->bssid);
1083 else
1084 memset(__entry->bssid, 0, ETH_ALEN);
1085 __entry->auth_type = req->auth_type;
1086 ),
Johannes Bergec816082012-11-16 17:22:28 +01001087 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", auth type: %d, bssid: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001088 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type,
1089 MAC_PR_ARG(bssid))
1090);
1091
1092TRACE_EVENT(rdev_assoc,
1093 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1094 struct cfg80211_assoc_request *req),
1095 TP_ARGS(wiphy, netdev, req),
1096 TP_STRUCT__entry(
1097 WIPHY_ENTRY
1098 NETDEV_ENTRY
1099 MAC_ENTRY(bssid)
1100 MAC_ENTRY(prev_bssid)
1101 __field(bool, use_mfp)
1102 __field(u32, flags)
1103 ),
1104 TP_fast_assign(
1105 WIPHY_ASSIGN;
1106 NETDEV_ASSIGN;
1107 if (req->bss)
1108 MAC_ASSIGN(bssid, req->bss->bssid);
1109 else
1110 memset(__entry->bssid, 0, ETH_ALEN);
1111 MAC_ASSIGN(prev_bssid, req->prev_bssid);
1112 __entry->use_mfp = req->use_mfp;
1113 __entry->flags = req->flags;
1114 ),
Johannes Bergec816082012-11-16 17:22:28 +01001115 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001116 ", previous bssid: " MAC_PR_FMT ", use mfp: %s, flags: %u",
1117 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1118 MAC_PR_ARG(prev_bssid), BOOL_TO_STR(__entry->use_mfp),
1119 __entry->flags)
1120);
1121
1122TRACE_EVENT(rdev_deauth,
1123 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1124 struct cfg80211_deauth_request *req),
1125 TP_ARGS(wiphy, netdev, req),
1126 TP_STRUCT__entry(
1127 WIPHY_ENTRY
1128 NETDEV_ENTRY
1129 MAC_ENTRY(bssid)
1130 __field(u16, reason_code)
1131 ),
1132 TP_fast_assign(
1133 WIPHY_ASSIGN;
1134 NETDEV_ASSIGN;
1135 MAC_ASSIGN(bssid, req->bssid);
1136 __entry->reason_code = req->reason_code;
1137 ),
Johannes Bergec816082012-11-16 17:22:28 +01001138 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", reason: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001139 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1140 __entry->reason_code)
1141);
1142
1143TRACE_EVENT(rdev_disassoc,
1144 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1145 struct cfg80211_disassoc_request *req),
1146 TP_ARGS(wiphy, netdev, req),
1147 TP_STRUCT__entry(
1148 WIPHY_ENTRY
1149 NETDEV_ENTRY
1150 MAC_ENTRY(bssid)
1151 __field(u16, reason_code)
1152 __field(bool, local_state_change)
1153 ),
1154 TP_fast_assign(
1155 WIPHY_ASSIGN;
1156 NETDEV_ASSIGN;
1157 if (req->bss)
1158 MAC_ASSIGN(bssid, req->bss->bssid);
1159 else
1160 memset(__entry->bssid, 0, ETH_ALEN);
1161 __entry->reason_code = req->reason_code;
1162 __entry->local_state_change = req->local_state_change;
1163 ),
Johannes Bergec816082012-11-16 17:22:28 +01001164 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001165 ", reason: %u, local state change: %s",
1166 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1167 __entry->reason_code,
1168 BOOL_TO_STR(__entry->local_state_change))
1169);
1170
1171TRACE_EVENT(rdev_mgmt_tx_cancel_wait,
1172 TP_PROTO(struct wiphy *wiphy,
1173 struct wireless_dev *wdev, u64 cookie),
1174 TP_ARGS(wiphy, wdev, cookie),
1175 TP_STRUCT__entry(
1176 WIPHY_ENTRY
1177 WDEV_ENTRY
1178 __field(u64, cookie)
1179 ),
1180 TP_fast_assign(
1181 WIPHY_ASSIGN;
1182 WDEV_ASSIGN;
1183 __entry->cookie = cookie;
1184 ),
Johannes Bergec816082012-11-16 17:22:28 +01001185 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001186 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1187);
1188
1189TRACE_EVENT(rdev_set_power_mgmt,
1190 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1191 bool enabled, int timeout),
1192 TP_ARGS(wiphy, netdev, enabled, timeout),
1193 TP_STRUCT__entry(
1194 WIPHY_ENTRY
1195 NETDEV_ENTRY
1196 __field(bool, enabled)
1197 __field(int, timeout)
1198 ),
1199 TP_fast_assign(
1200 WIPHY_ASSIGN;
1201 NETDEV_ASSIGN;
1202 __entry->enabled = enabled;
1203 __entry->timeout = timeout;
1204 ),
Johannes Bergec816082012-11-16 17:22:28 +01001205 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %senabled, timeout: %d ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001206 WIPHY_PR_ARG, NETDEV_PR_ARG,
1207 __entry->enabled ? "" : "not ", __entry->timeout)
1208);
1209
1210TRACE_EVENT(rdev_connect,
1211 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1212 struct cfg80211_connect_params *sme),
1213 TP_ARGS(wiphy, netdev, sme),
1214 TP_STRUCT__entry(
1215 WIPHY_ENTRY
1216 NETDEV_ENTRY
1217 MAC_ENTRY(bssid)
1218 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1219 __field(enum nl80211_auth_type, auth_type)
1220 __field(bool, privacy)
1221 __field(u32, wpa_versions)
1222 __field(u32, flags)
1223 ),
1224 TP_fast_assign(
1225 WIPHY_ASSIGN;
1226 NETDEV_ASSIGN;
1227 MAC_ASSIGN(bssid, sme->bssid);
1228 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1229 memcpy(__entry->ssid, sme->ssid, sme->ssid_len);
1230 __entry->auth_type = sme->auth_type;
1231 __entry->privacy = sme->privacy;
1232 __entry->wpa_versions = sme->crypto.wpa_versions;
1233 __entry->flags = sme->flags;
1234 ),
Johannes Bergec816082012-11-16 17:22:28 +01001235 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001236 ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, "
1237 "flags: %u",
1238 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid,
1239 __entry->auth_type, BOOL_TO_STR(__entry->privacy),
1240 __entry->wpa_versions, __entry->flags)
1241);
1242
1243TRACE_EVENT(rdev_set_cqm_rssi_config,
1244 TP_PROTO(struct wiphy *wiphy,
1245 struct net_device *netdev, s32 rssi_thold,
1246 u32 rssi_hyst),
1247 TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst),
1248 TP_STRUCT__entry(
1249 WIPHY_ENTRY
1250 NETDEV_ENTRY
1251 __field(s32, rssi_thold)
1252 __field(u32, rssi_hyst)
1253 ),
1254 TP_fast_assign(
1255 WIPHY_ASSIGN;
1256 NETDEV_ASSIGN;
1257 __entry->rssi_thold = rssi_thold;
1258 __entry->rssi_hyst = rssi_hyst;
1259 ),
Johannes Bergec816082012-11-16 17:22:28 +01001260 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001261 ", rssi_thold: %d, rssi_hyst: %u ",
1262 WIPHY_PR_ARG, NETDEV_PR_ARG,
1263 __entry->rssi_thold, __entry->rssi_hyst)
1264);
1265
1266TRACE_EVENT(rdev_set_cqm_txe_config,
1267 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate,
1268 u32 pkts, u32 intvl),
1269 TP_ARGS(wiphy, netdev, rate, pkts, intvl),
1270 TP_STRUCT__entry(
1271 WIPHY_ENTRY
1272 NETDEV_ENTRY
1273 __field(u32, rate)
1274 __field(u32, pkts)
1275 __field(u32, intvl)
1276 ),
1277 TP_fast_assign(
1278 WIPHY_ASSIGN;
1279 NETDEV_ASSIGN;
1280 __entry->rate = rate;
1281 __entry->pkts = pkts;
1282 __entry->intvl = intvl;
1283 ),
Johannes Bergec816082012-11-16 17:22:28 +01001284 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001285 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts,
1286 __entry->intvl)
1287);
1288
1289TRACE_EVENT(rdev_disconnect,
1290 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1291 u16 reason_code),
1292 TP_ARGS(wiphy, netdev, reason_code),
1293 TP_STRUCT__entry(
1294 WIPHY_ENTRY
1295 NETDEV_ENTRY
1296 __field(u16, reason_code)
1297 ),
1298 TP_fast_assign(
1299 WIPHY_ASSIGN;
1300 NETDEV_ASSIGN;
1301 __entry->reason_code = reason_code;
1302 ),
Johannes Bergec816082012-11-16 17:22:28 +01001303 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001304 NETDEV_PR_ARG, __entry->reason_code)
1305);
1306
1307TRACE_EVENT(rdev_join_ibss,
1308 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1309 struct cfg80211_ibss_params *params),
1310 TP_ARGS(wiphy, netdev, params),
1311 TP_STRUCT__entry(
1312 WIPHY_ENTRY
1313 NETDEV_ENTRY
1314 MAC_ENTRY(bssid)
1315 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1316 ),
1317 TP_fast_assign(
1318 WIPHY_ASSIGN;
1319 NETDEV_ASSIGN;
1320 MAC_ASSIGN(bssid, params->bssid);
1321 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1322 memcpy(__entry->ssid, params->ssid, params->ssid_len);
1323 ),
Johannes Bergec816082012-11-16 17:22:28 +01001324 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001325 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid)
1326);
1327
Rostislav Lisovy6e0bd6c2014-11-03 10:33:18 +01001328TRACE_EVENT(rdev_join_ocb,
1329 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1330 const struct ocb_setup *setup),
1331 TP_ARGS(wiphy, netdev, setup),
1332 TP_STRUCT__entry(
1333 WIPHY_ENTRY
1334 NETDEV_ENTRY
1335 ),
1336 TP_fast_assign(
1337 WIPHY_ASSIGN;
1338 NETDEV_ASSIGN;
1339 ),
1340 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
1341 WIPHY_PR_ARG, NETDEV_PR_ARG)
1342);
1343
Beni Lev14e8a3c2012-07-31 18:48:27 +03001344TRACE_EVENT(rdev_set_wiphy_params,
1345 TP_PROTO(struct wiphy *wiphy, u32 changed),
1346 TP_ARGS(wiphy, changed),
1347 TP_STRUCT__entry(
1348 WIPHY_ENTRY
1349 __field(u32, changed)
1350 ),
1351 TP_fast_assign(
1352 WIPHY_ASSIGN;
1353 __entry->changed = changed;
1354 ),
1355 TP_printk(WIPHY_PR_FMT ", changed: %u",
1356 WIPHY_PR_ARG, __entry->changed)
1357);
1358
Johannes Bergc8442112012-10-24 10:17:18 +02001359DEFINE_EVENT(wiphy_wdev_evt, rdev_get_tx_power,
1360 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1361 TP_ARGS(wiphy, wdev)
1362);
1363
Beni Lev14e8a3c2012-07-31 18:48:27 +03001364TRACE_EVENT(rdev_set_tx_power,
Johannes Bergc8442112012-10-24 10:17:18 +02001365 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1366 enum nl80211_tx_power_setting type, int mbm),
1367 TP_ARGS(wiphy, wdev, type, mbm),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001368 TP_STRUCT__entry(
1369 WIPHY_ENTRY
Johannes Bergc8442112012-10-24 10:17:18 +02001370 WDEV_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001371 __field(enum nl80211_tx_power_setting, type)
1372 __field(int, mbm)
1373 ),
1374 TP_fast_assign(
1375 WIPHY_ASSIGN;
Johannes Bergc8442112012-10-24 10:17:18 +02001376 WDEV_ASSIGN;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001377 __entry->type = type;
1378 __entry->mbm = mbm;
1379 ),
Johannes Bergec816082012-11-16 17:22:28 +01001380 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d",
Johannes Bergc8442112012-10-24 10:17:18 +02001381 WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001382);
1383
1384TRACE_EVENT(rdev_return_int_int,
1385 TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill),
1386 TP_ARGS(wiphy, func_ret, func_fill),
1387 TP_STRUCT__entry(
1388 WIPHY_ENTRY
1389 __field(int, func_ret)
1390 __field(int, func_fill)
1391 ),
1392 TP_fast_assign(
1393 WIPHY_ASSIGN;
1394 __entry->func_ret = func_ret;
1395 __entry->func_fill = func_fill;
1396 ),
1397 TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d",
1398 WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill)
1399);
1400
1401#ifdef CONFIG_NL80211_TESTMODE
1402TRACE_EVENT(rdev_testmode_cmd,
David Spinadelfc73f112013-07-31 18:04:15 +03001403 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1404 TP_ARGS(wiphy, wdev),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001405 TP_STRUCT__entry(
1406 WIPHY_ENTRY
David Spinadelfc73f112013-07-31 18:04:15 +03001407 WDEV_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001408 ),
1409 TP_fast_assign(
1410 WIPHY_ASSIGN;
David Spinadelfc73f112013-07-31 18:04:15 +03001411 WDEV_ASSIGN;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001412 ),
David Spinadelfc73f112013-07-31 18:04:15 +03001413 TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001414);
1415
1416TRACE_EVENT(rdev_testmode_dump,
1417 TP_PROTO(struct wiphy *wiphy),
1418 TP_ARGS(wiphy),
1419 TP_STRUCT__entry(
1420 WIPHY_ENTRY
1421 ),
1422 TP_fast_assign(
1423 WIPHY_ASSIGN;
1424 ),
1425 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
1426);
1427#endif /* CONFIG_NL80211_TESTMODE */
1428
1429TRACE_EVENT(rdev_set_bitrate_mask,
1430 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1431 const u8 *peer, const struct cfg80211_bitrate_mask *mask),
1432 TP_ARGS(wiphy, netdev, peer, mask),
1433 TP_STRUCT__entry(
1434 WIPHY_ENTRY
1435 NETDEV_ENTRY
1436 MAC_ENTRY(peer)
1437 ),
1438 TP_fast_assign(
1439 WIPHY_ASSIGN;
1440 NETDEV_ASSIGN;
1441 MAC_ASSIGN(peer, peer);
1442 ),
Johannes Bergec816082012-11-16 17:22:28 +01001443 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001444 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1445);
1446
1447TRACE_EVENT(rdev_mgmt_frame_register,
1448 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1449 u16 frame_type, bool reg),
1450 TP_ARGS(wiphy, wdev, frame_type, reg),
1451 TP_STRUCT__entry(
1452 WIPHY_ENTRY
1453 WDEV_ENTRY
1454 __field(u16, frame_type)
1455 __field(bool, reg)
1456 ),
1457 TP_fast_assign(
1458 WIPHY_ASSIGN;
1459 WDEV_ASSIGN;
1460 __entry->frame_type = frame_type;
1461 __entry->reg = reg;
1462 ),
Johannes Bergec816082012-11-16 17:22:28 +01001463 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", frame_type: 0x%.2x, reg: %s ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001464 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->frame_type,
1465 __entry->reg ? "true" : "false")
1466);
1467
1468TRACE_EVENT(rdev_return_int_tx_rx,
1469 TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx),
1470 TP_ARGS(wiphy, ret, tx, rx),
1471 TP_STRUCT__entry(
1472 WIPHY_ENTRY
1473 __field(int, ret)
1474 __field(u32, tx)
1475 __field(u32, rx)
1476 ),
1477 TP_fast_assign(
1478 WIPHY_ASSIGN;
1479 __entry->ret = ret;
1480 __entry->tx = tx;
1481 __entry->rx = rx;
1482 ),
1483 TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u",
1484 WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx)
1485);
1486
1487TRACE_EVENT(rdev_return_void_tx_rx,
1488 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max,
1489 u32 rx, u32 rx_max),
1490 TP_ARGS(wiphy, tx, tx_max, rx, rx_max),
1491 TP_STRUCT__entry(
1492 WIPHY_ENTRY
1493 __field(u32, tx)
1494 __field(u32, tx_max)
1495 __field(u32, rx)
1496 __field(u32, rx_max)
1497 ),
1498 TP_fast_assign(
1499 WIPHY_ASSIGN;
1500 __entry->tx = tx;
1501 __entry->tx_max = tx_max;
1502 __entry->rx = rx;
1503 __entry->rx_max = rx_max;
1504 ),
1505 TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ",
1506 WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx,
1507 __entry->rx_max)
1508);
1509
1510DECLARE_EVENT_CLASS(tx_rx_evt,
1511 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1512 TP_ARGS(wiphy, rx, tx),
1513 TP_STRUCT__entry(
1514 WIPHY_ENTRY
1515 __field(u32, tx)
1516 __field(u32, rx)
1517 ),
1518 TP_fast_assign(
1519 WIPHY_ASSIGN;
1520 __entry->tx = tx;
1521 __entry->rx = rx;
1522 ),
1523 TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ",
1524 WIPHY_PR_ARG, __entry->tx, __entry->rx)
1525);
1526
Beni Lev14e8a3c2012-07-31 18:48:27 +03001527DEFINE_EVENT(tx_rx_evt, rdev_set_antenna,
1528 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1529 TP_ARGS(wiphy, rx, tx)
1530);
1531
1532TRACE_EVENT(rdev_sched_scan_start,
1533 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1534 struct cfg80211_sched_scan_request *request),
1535 TP_ARGS(wiphy, netdev, request),
1536 TP_STRUCT__entry(
1537 WIPHY_ENTRY
1538 NETDEV_ENTRY
1539 ),
1540 TP_fast_assign(
1541 WIPHY_ASSIGN;
1542 NETDEV_ASSIGN;
1543 ),
Johannes Bergec816082012-11-16 17:22:28 +01001544 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001545 WIPHY_PR_ARG, NETDEV_PR_ARG)
1546);
1547
1548TRACE_EVENT(rdev_tdls_mgmt,
1549 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1550 u8 *peer, u8 action_code, u8 dialog_token,
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301551 u16 status_code, u32 peer_capability,
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001552 bool initiator, const u8 *buf, size_t len),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001553 TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code,
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001554 peer_capability, initiator, buf, len),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001555 TP_STRUCT__entry(
1556 WIPHY_ENTRY
1557 NETDEV_ENTRY
1558 MAC_ENTRY(peer)
1559 __field(u8, action_code)
1560 __field(u8, dialog_token)
1561 __field(u16, status_code)
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301562 __field(u32, peer_capability)
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001563 __field(bool, initiator)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001564 __dynamic_array(u8, buf, len)
1565 ),
1566 TP_fast_assign(
1567 WIPHY_ASSIGN;
1568 NETDEV_ASSIGN;
1569 MAC_ASSIGN(peer, peer);
1570 __entry->action_code = action_code;
1571 __entry->dialog_token = dialog_token;
1572 __entry->status_code = status_code;
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301573 __entry->peer_capability = peer_capability;
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001574 __entry->initiator = initiator;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001575 memcpy(__get_dynamic_array(buf), buf, len);
1576 ),
Johannes Bergec816082012-11-16 17:22:28 +01001577 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", action_code: %u, "
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001578 "dialog_token: %u, status_code: %u, peer_capability: %u "
1579 "initiator: %s buf: %#.2x ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001580 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
1581 __entry->action_code, __entry->dialog_token,
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301582 __entry->status_code, __entry->peer_capability,
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001583 BOOL_TO_STR(__entry->initiator),
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301584 ((u8 *)__get_dynamic_array(buf))[0])
Beni Lev14e8a3c2012-07-31 18:48:27 +03001585);
1586
1587TRACE_EVENT(rdev_dump_survey,
1588 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx),
1589 TP_ARGS(wiphy, netdev, idx),
1590 TP_STRUCT__entry(
1591 WIPHY_ENTRY
1592 NETDEV_ENTRY
1593 __field(int, idx)
1594 ),
1595 TP_fast_assign(
1596 WIPHY_ASSIGN;
1597 NETDEV_ASSIGN;
1598 __entry->idx = idx;
1599 ),
Johannes Bergec816082012-11-16 17:22:28 +01001600 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001601 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx)
1602);
1603
1604TRACE_EVENT(rdev_return_int_survey_info,
1605 TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info),
1606 TP_ARGS(wiphy, ret, info),
1607 TP_STRUCT__entry(
1608 WIPHY_ENTRY
1609 CHAN_ENTRY
1610 __field(int, ret)
Johannes Berg4ed20be2014-11-14 16:35:34 +01001611 __field(u64, time)
1612 __field(u64, time_busy)
1613 __field(u64, time_ext_busy)
1614 __field(u64, time_rx)
1615 __field(u64, time_tx)
Johannes Berg052536a2014-11-14 16:44:11 +01001616 __field(u64, time_scan)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001617 __field(u32, filled)
1618 __field(s8, noise)
1619 ),
1620 TP_fast_assign(
1621 WIPHY_ASSIGN;
1622 CHAN_ASSIGN(info->channel);
1623 __entry->ret = ret;
Johannes Berg4ed20be2014-11-14 16:35:34 +01001624 __entry->time = info->time;
1625 __entry->time_busy = info->time_busy;
1626 __entry->time_ext_busy = info->time_ext_busy;
1627 __entry->time_rx = info->time_rx;
1628 __entry->time_tx = info->time_tx;
Johannes Berg052536a2014-11-14 16:44:11 +01001629 __entry->time_scan = info->time_scan;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001630 __entry->filled = info->filled;
1631 __entry->noise = info->noise;
1632 ),
1633 TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT
1634 ", channel time: %llu, channel time busy: %llu, "
1635 "channel time extension busy: %llu, channel time rx: %llu, "
Johannes Berg052536a2014-11-14 16:44:11 +01001636 "channel time tx: %llu, scan time: %llu, filled: %u, noise: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001637 WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG,
Johannes Berg4ed20be2014-11-14 16:35:34 +01001638 __entry->time, __entry->time_busy,
1639 __entry->time_ext_busy, __entry->time_rx,
Johannes Berg052536a2014-11-14 16:44:11 +01001640 __entry->time_tx, __entry->time_scan,
1641 __entry->filled, __entry->noise)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001642);
1643
1644TRACE_EVENT(rdev_tdls_oper,
1645 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1646 u8 *peer, enum nl80211_tdls_operation oper),
1647 TP_ARGS(wiphy, netdev, peer, oper),
1648 TP_STRUCT__entry(
1649 WIPHY_ENTRY
1650 NETDEV_ENTRY
1651 MAC_ENTRY(peer)
1652 __field(enum nl80211_tdls_operation, oper)
1653 ),
1654 TP_fast_assign(
1655 WIPHY_ASSIGN;
1656 NETDEV_ASSIGN;
1657 MAC_ASSIGN(peer, peer);
1658 __entry->oper = oper;
1659 ),
Johannes Bergec816082012-11-16 17:22:28 +01001660 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", oper: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001661 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper)
1662);
1663
1664DECLARE_EVENT_CLASS(rdev_pmksa,
1665 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1666 struct cfg80211_pmksa *pmksa),
1667 TP_ARGS(wiphy, netdev, pmksa),
1668 TP_STRUCT__entry(
1669 WIPHY_ENTRY
1670 NETDEV_ENTRY
1671 MAC_ENTRY(bssid)
1672 ),
1673 TP_fast_assign(
1674 WIPHY_ASSIGN;
1675 NETDEV_ASSIGN;
1676 MAC_ASSIGN(bssid, pmksa->bssid);
1677 ),
Johannes Bergec816082012-11-16 17:22:28 +01001678 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001679 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid))
1680);
1681
1682TRACE_EVENT(rdev_probe_client,
1683 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1684 const u8 *peer),
1685 TP_ARGS(wiphy, netdev, peer),
1686 TP_STRUCT__entry(
1687 WIPHY_ENTRY
1688 NETDEV_ENTRY
1689 MAC_ENTRY(peer)
1690 ),
1691 TP_fast_assign(
1692 WIPHY_ASSIGN;
1693 NETDEV_ASSIGN;
1694 MAC_ASSIGN(peer, peer);
1695 ),
Johannes Bergec816082012-11-16 17:22:28 +01001696 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001697 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1698);
1699
1700DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa,
1701 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1702 struct cfg80211_pmksa *pmksa),
1703 TP_ARGS(wiphy, netdev, pmksa)
1704);
1705
1706DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa,
1707 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1708 struct cfg80211_pmksa *pmksa),
1709 TP_ARGS(wiphy, netdev, pmksa)
1710);
1711
1712TRACE_EVENT(rdev_remain_on_channel,
1713 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1714 struct ieee80211_channel *chan,
Johannes Berg42d97a52012-11-08 18:31:02 +01001715 unsigned int duration),
1716 TP_ARGS(wiphy, wdev, chan, duration),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001717 TP_STRUCT__entry(
1718 WIPHY_ENTRY
1719 WDEV_ENTRY
1720 CHAN_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001721 __field(unsigned int, duration)
1722 ),
1723 TP_fast_assign(
1724 WIPHY_ASSIGN;
1725 WDEV_ASSIGN;
1726 CHAN_ASSIGN(chan);
Beni Lev14e8a3c2012-07-31 18:48:27 +03001727 __entry->duration = duration;
1728 ),
Johannes Bergec816082012-11-16 17:22:28 +01001729 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", duration: %u",
Johannes Berg42d97a52012-11-08 18:31:02 +01001730 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001731);
1732
1733TRACE_EVENT(rdev_return_int_cookie,
1734 TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie),
1735 TP_ARGS(wiphy, ret, cookie),
1736 TP_STRUCT__entry(
1737 WIPHY_ENTRY
1738 __field(int, ret)
1739 __field(u64, cookie)
1740 ),
1741 TP_fast_assign(
1742 WIPHY_ASSIGN;
1743 __entry->ret = ret;
1744 __entry->cookie = cookie;
1745 ),
1746 TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu",
1747 WIPHY_PR_ARG, __entry->ret, __entry->cookie)
1748);
1749
1750TRACE_EVENT(rdev_cancel_remain_on_channel,
1751 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
1752 TP_ARGS(wiphy, wdev, cookie),
1753 TP_STRUCT__entry(
1754 WIPHY_ENTRY
1755 WDEV_ENTRY
1756 __field(u64, cookie)
1757 ),
1758 TP_fast_assign(
1759 WIPHY_ASSIGN;
1760 WDEV_ASSIGN;
1761 __entry->cookie = cookie;
1762 ),
Johannes Bergec816082012-11-16 17:22:28 +01001763 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001764 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1765);
1766
1767TRACE_EVENT(rdev_mgmt_tx,
1768 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
Andrei Otcheretianskib176e622013-11-18 19:06:49 +02001769 struct cfg80211_mgmt_tx_params *params),
1770 TP_ARGS(wiphy, wdev, params),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001771 TP_STRUCT__entry(
1772 WIPHY_ENTRY
1773 WDEV_ENTRY
1774 CHAN_ENTRY
1775 __field(bool, offchan)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001776 __field(unsigned int, wait)
1777 __field(bool, no_cck)
1778 __field(bool, dont_wait_for_ack)
1779 ),
1780 TP_fast_assign(
1781 WIPHY_ASSIGN;
1782 WDEV_ASSIGN;
Andrei Otcheretianskib176e622013-11-18 19:06:49 +02001783 CHAN_ASSIGN(params->chan);
1784 __entry->offchan = params->offchan;
1785 __entry->wait = params->wait;
1786 __entry->no_cck = params->no_cck;
1787 __entry->dont_wait_for_ack = params->dont_wait_for_ack;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001788 ),
Johannes Bergec816082012-11-16 17:22:28 +01001789 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s,"
Johannes Berg42d97a52012-11-08 18:31:02 +01001790 " wait: %u, no cck: %s, dont wait for ack: %s",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001791 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG,
Johannes Berg42d97a52012-11-08 18:31:02 +01001792 BOOL_TO_STR(__entry->offchan), __entry->wait,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001793 BOOL_TO_STR(__entry->no_cck),
1794 BOOL_TO_STR(__entry->dont_wait_for_ack))
1795);
1796
1797TRACE_EVENT(rdev_set_noack_map,
1798 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1799 u16 noack_map),
1800 TP_ARGS(wiphy, netdev, noack_map),
1801 TP_STRUCT__entry(
1802 WIPHY_ENTRY
1803 NETDEV_ENTRY
1804 __field(u16, noack_map)
1805 ),
1806 TP_fast_assign(
1807 WIPHY_ASSIGN;
1808 NETDEV_ASSIGN;
1809 __entry->noack_map = noack_map;
1810 ),
Johannes Bergec816082012-11-16 17:22:28 +01001811 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", noack_map: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001812 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map)
1813);
1814
Beni Lev14e8a3c2012-07-31 18:48:27 +03001815DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel,
1816 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1817 TP_ARGS(wiphy, wdev)
1818);
1819
Johannes Berg683b6d32012-11-08 21:25:48 +01001820TRACE_EVENT(rdev_return_chandef,
1821 TP_PROTO(struct wiphy *wiphy, int ret,
1822 struct cfg80211_chan_def *chandef),
1823 TP_ARGS(wiphy, ret, chandef),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001824 TP_STRUCT__entry(
1825 WIPHY_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01001826 __field(int, ret)
1827 CHAN_DEF_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001828 ),
1829 TP_fast_assign(
1830 WIPHY_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01001831 if (ret == 0)
1832 CHAN_DEF_ASSIGN(chandef);
1833 else
1834 CHAN_DEF_ASSIGN((struct cfg80211_chan_def *)NULL);
1835 __entry->ret = ret;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001836 ),
Johannes Bergec816082012-11-16 17:22:28 +01001837 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", ret: %d",
Johannes Berg683b6d32012-11-08 21:25:48 +01001838 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->ret)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001839);
1840
Johannes Bergeeb126e2012-10-23 15:16:50 +02001841DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device,
1842 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1843 TP_ARGS(wiphy, wdev)
1844);
1845
1846DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device,
1847 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1848 TP_ARGS(wiphy, wdev)
1849);
1850
Vasanthakumar Thiagarajan77765ea2013-01-18 11:18:45 +05301851TRACE_EVENT(rdev_set_mac_acl,
1852 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1853 struct cfg80211_acl_data *params),
1854 TP_ARGS(wiphy, netdev, params),
1855 TP_STRUCT__entry(
1856 WIPHY_ENTRY
1857 NETDEV_ENTRY
1858 __field(u32, acl_policy)
1859 ),
1860 TP_fast_assign(
1861 WIPHY_ASSIGN;
Vladimir Kondratiev021fcdc2013-03-07 11:08:29 +02001862 NETDEV_ASSIGN;
Vasanthakumar Thiagarajan77765ea2013-01-18 11:18:45 +05301863 __entry->acl_policy = params->acl_policy;
1864 ),
1865 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", acl policy: %d",
1866 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->acl_policy)
1867);
1868
Jouni Malinen355199e2013-02-27 17:14:27 +02001869TRACE_EVENT(rdev_update_ft_ies,
1870 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1871 struct cfg80211_update_ft_ies_params *ftie),
1872 TP_ARGS(wiphy, netdev, ftie),
1873 TP_STRUCT__entry(
1874 WIPHY_ENTRY
1875 NETDEV_ENTRY
1876 __field(u16, md)
1877 __dynamic_array(u8, ie, ftie->ie_len)
1878 ),
1879 TP_fast_assign(
1880 WIPHY_ASSIGN;
1881 NETDEV_ASSIGN;
1882 __entry->md = ftie->md;
1883 memcpy(__get_dynamic_array(ie), ftie->ie, ftie->ie_len);
1884 ),
1885 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", md: 0x%x",
1886 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->md)
1887);
1888
Arend van Spriel5de17982013-04-18 15:49:00 +02001889TRACE_EVENT(rdev_crit_proto_start,
1890 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1891 enum nl80211_crit_proto_id protocol, u16 duration),
1892 TP_ARGS(wiphy, wdev, protocol, duration),
1893 TP_STRUCT__entry(
1894 WIPHY_ENTRY
1895 WDEV_ENTRY
1896 __field(u16, proto)
1897 __field(u16, duration)
1898 ),
1899 TP_fast_assign(
1900 WIPHY_ASSIGN;
1901 WDEV_ASSIGN;
1902 __entry->proto = protocol;
1903 __entry->duration = duration;
1904 ),
1905 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", proto=%x, duration=%u",
1906 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->proto, __entry->duration)
1907);
1908
1909TRACE_EVENT(rdev_crit_proto_stop,
1910 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1911 TP_ARGS(wiphy, wdev),
1912 TP_STRUCT__entry(
1913 WIPHY_ENTRY
1914 WDEV_ENTRY
1915 ),
1916 TP_fast_assign(
1917 WIPHY_ASSIGN;
1918 WDEV_ASSIGN;
1919 ),
1920 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
1921 WIPHY_PR_ARG, WDEV_PR_ARG)
1922);
1923
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001924TRACE_EVENT(rdev_channel_switch,
1925 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1926 struct cfg80211_csa_settings *params),
1927 TP_ARGS(wiphy, netdev, params),
1928 TP_STRUCT__entry(
1929 WIPHY_ENTRY
1930 NETDEV_ENTRY
1931 CHAN_DEF_ENTRY
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001932 __field(bool, radar_required)
1933 __field(bool, block_tx)
1934 __field(u8, count)
Andrei Otcheretianski9a774c72014-05-09 14:11:46 +03001935 __dynamic_array(u16, bcn_ofs, params->n_counter_offsets_beacon)
1936 __dynamic_array(u16, pres_ofs, params->n_counter_offsets_presp)
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001937 ),
1938 TP_fast_assign(
1939 WIPHY_ASSIGN;
1940 NETDEV_ASSIGN;
1941 CHAN_DEF_ASSIGN(&params->chandef);
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001942 __entry->radar_required = params->radar_required;
1943 __entry->block_tx = params->block_tx;
1944 __entry->count = params->count;
Andrei Otcheretianski9a774c72014-05-09 14:11:46 +03001945 memcpy(__get_dynamic_array(bcn_ofs),
1946 params->counter_offsets_beacon,
1947 params->n_counter_offsets_beacon * sizeof(u16));
1948
1949 /* probe response offsets are optional */
1950 if (params->n_counter_offsets_presp)
1951 memcpy(__get_dynamic_array(pres_ofs),
1952 params->counter_offsets_presp,
1953 params->n_counter_offsets_presp * sizeof(u16));
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001954 ),
1955 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
Andrei Otcheretianski9a774c72014-05-09 14:11:46 +03001956 ", block_tx: %d, count: %u, radar_required: %d",
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001957 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
Andrei Otcheretianski9a774c72014-05-09 14:11:46 +03001958 __entry->block_tx, __entry->count, __entry->radar_required)
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001959);
1960
Kyeyoon Parkfa9ffc72013-12-16 23:01:30 -08001961TRACE_EVENT(rdev_set_qos_map,
1962 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1963 struct cfg80211_qos_map *qos_map),
1964 TP_ARGS(wiphy, netdev, qos_map),
1965 TP_STRUCT__entry(
1966 WIPHY_ENTRY
1967 NETDEV_ENTRY
1968 QOS_MAP_ENTRY
1969 ),
1970 TP_fast_assign(
1971 WIPHY_ASSIGN;
1972 NETDEV_ASSIGN;
1973 QOS_MAP_ASSIGN(qos_map);
1974 ),
1975 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", num_des: %u",
1976 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->num_des)
1977);
1978
Jouni Malinene16821b2014-04-28 11:22:08 +03001979TRACE_EVENT(rdev_set_ap_chanwidth,
1980 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1981 struct cfg80211_chan_def *chandef),
1982 TP_ARGS(wiphy, netdev, chandef),
1983 TP_STRUCT__entry(
1984 WIPHY_ENTRY
1985 NETDEV_ENTRY
1986 CHAN_DEF_ENTRY
1987 ),
1988 TP_fast_assign(
1989 WIPHY_ASSIGN;
1990 NETDEV_ASSIGN;
1991 CHAN_DEF_ASSIGN(chandef);
1992 ),
1993 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
1994 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
1995);
1996
Johannes Berg960d01a2014-09-09 22:55:35 +03001997TRACE_EVENT(rdev_add_tx_ts,
1998 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1999 u8 tsid, const u8 *peer, u8 user_prio, u16 admitted_time),
2000 TP_ARGS(wiphy, netdev, tsid, peer, user_prio, admitted_time),
2001 TP_STRUCT__entry(
2002 WIPHY_ENTRY
2003 NETDEV_ENTRY
2004 MAC_ENTRY(peer)
2005 __field(u8, tsid)
2006 __field(u8, user_prio)
2007 __field(u16, admitted_time)
2008 ),
2009 TP_fast_assign(
2010 WIPHY_ASSIGN;
2011 NETDEV_ASSIGN;
2012 MAC_ASSIGN(peer, peer);
2013 __entry->tsid = tsid;
2014 __entry->user_prio = user_prio;
2015 __entry->admitted_time = admitted_time;
2016 ),
2017 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d, UP %d, time %d",
2018 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
2019 __entry->tsid, __entry->user_prio, __entry->admitted_time)
2020);
2021
2022TRACE_EVENT(rdev_del_tx_ts,
2023 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2024 u8 tsid, const u8 *peer),
2025 TP_ARGS(wiphy, netdev, tsid, peer),
2026 TP_STRUCT__entry(
2027 WIPHY_ENTRY
2028 NETDEV_ENTRY
2029 MAC_ENTRY(peer)
2030 __field(u8, tsid)
2031 ),
2032 TP_fast_assign(
2033 WIPHY_ASSIGN;
2034 NETDEV_ASSIGN;
2035 MAC_ASSIGN(peer, peer);
2036 __entry->tsid = tsid;
2037 ),
2038 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d",
2039 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->tsid)
2040);
2041
Arik Nemtsov1057d352014-11-19 12:54:26 +02002042TRACE_EVENT(rdev_tdls_channel_switch,
2043 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2044 const u8 *addr, u8 oper_class,
2045 struct cfg80211_chan_def *chandef),
2046 TP_ARGS(wiphy, netdev, addr, oper_class, chandef),
2047 TP_STRUCT__entry(
2048 WIPHY_ENTRY
2049 NETDEV_ENTRY
2050 MAC_ENTRY(addr)
2051 __field(u8, oper_class)
2052 CHAN_DEF_ENTRY
2053 ),
2054 TP_fast_assign(
2055 WIPHY_ASSIGN;
2056 NETDEV_ASSIGN;
2057 MAC_ASSIGN(addr, addr);
2058 CHAN_DEF_ASSIGN(chandef);
2059 ),
2060 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT
2061 " oper class %d, " CHAN_DEF_PR_FMT,
2062 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr),
2063 __entry->oper_class, CHAN_DEF_PR_ARG)
2064);
2065
2066TRACE_EVENT(rdev_tdls_cancel_channel_switch,
2067 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2068 const u8 *addr),
2069 TP_ARGS(wiphy, netdev, addr),
2070 TP_STRUCT__entry(
2071 WIPHY_ENTRY
2072 NETDEV_ENTRY
2073 MAC_ENTRY(addr)
2074 ),
2075 TP_fast_assign(
2076 WIPHY_ASSIGN;
2077 NETDEV_ASSIGN;
2078 MAC_ASSIGN(addr, addr);
2079 ),
2080 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
2081 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr))
2082);
2083
Beni Lev4ee3e062012-08-27 12:49:39 +03002084/*************************************************************
2085 * cfg80211 exported functions traces *
2086 *************************************************************/
2087
2088TRACE_EVENT(cfg80211_return_bool,
2089 TP_PROTO(bool ret),
2090 TP_ARGS(ret),
2091 TP_STRUCT__entry(
2092 __field(bool, ret)
2093 ),
2094 TP_fast_assign(
2095 __entry->ret = ret;
2096 ),
2097 TP_printk("returned %s", BOOL_TO_STR(__entry->ret))
2098);
2099
2100DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt,
2101 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2102 TP_ARGS(netdev, macaddr),
2103 TP_STRUCT__entry(
2104 NETDEV_ENTRY
2105 MAC_ENTRY(macaddr)
2106 ),
2107 TP_fast_assign(
2108 NETDEV_ASSIGN;
2109 MAC_ASSIGN(macaddr, macaddr);
2110 ),
2111 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
2112 NETDEV_PR_ARG, MAC_PR_ARG(macaddr))
2113);
2114
2115DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate,
2116 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2117 TP_ARGS(netdev, macaddr)
2118);
2119
2120DECLARE_EVENT_CLASS(netdev_evt_only,
2121 TP_PROTO(struct net_device *netdev),
2122 TP_ARGS(netdev),
2123 TP_STRUCT__entry(
2124 NETDEV_ENTRY
2125 ),
2126 TP_fast_assign(
2127 NETDEV_ASSIGN;
2128 ),
2129 TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG)
2130);
2131
2132DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth,
2133 TP_PROTO(struct net_device *netdev),
2134 TP_ARGS(netdev)
2135);
2136
2137TRACE_EVENT(cfg80211_send_rx_assoc,
2138 TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss),
2139 TP_ARGS(netdev, bss),
2140 TP_STRUCT__entry(
2141 NETDEV_ENTRY
2142 MAC_ENTRY(bssid)
2143 CHAN_ENTRY
2144 ),
2145 TP_fast_assign(
2146 NETDEV_ASSIGN;
2147 MAC_ASSIGN(bssid, bss->bssid);
2148 CHAN_ASSIGN(bss->channel);
2149 ),
Johannes Bergec816082012-11-16 17:22:28 +01002150 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", " CHAN_PR_FMT,
Beni Lev4ee3e062012-08-27 12:49:39 +03002151 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
2152);
2153
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002154DECLARE_EVENT_CLASS(netdev_frame_event,
2155 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2156 TP_ARGS(netdev, buf, len),
2157 TP_STRUCT__entry(
2158 NETDEV_ENTRY
2159 __dynamic_array(u8, frame, len)
2160 ),
2161 TP_fast_assign(
2162 NETDEV_ASSIGN;
2163 memcpy(__get_dynamic_array(frame), buf, len);
2164 ),
2165 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2166 NETDEV_PR_ARG,
2167 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
Beni Lev4ee3e062012-08-27 12:49:39 +03002168);
2169
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002170DEFINE_EVENT(netdev_frame_event, cfg80211_rx_unprot_mlme_mgmt,
2171 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2172 TP_ARGS(netdev, buf, len)
Beni Lev4ee3e062012-08-27 12:49:39 +03002173);
2174
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002175DEFINE_EVENT(netdev_frame_event, cfg80211_rx_mlme_mgmt,
2176 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2177 TP_ARGS(netdev, buf, len)
Beni Lev4ee3e062012-08-27 12:49:39 +03002178);
2179
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002180TRACE_EVENT(cfg80211_tx_mlme_mgmt,
2181 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2182 TP_ARGS(netdev, buf, len),
2183 TP_STRUCT__entry(
2184 NETDEV_ENTRY
2185 __dynamic_array(u8, frame, len)
2186 ),
2187 TP_fast_assign(
2188 NETDEV_ASSIGN;
2189 memcpy(__get_dynamic_array(frame), buf, len);
2190 ),
2191 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2192 NETDEV_PR_ARG,
2193 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
Beni Lev4ee3e062012-08-27 12:49:39 +03002194);
2195
2196DECLARE_EVENT_CLASS(netdev_mac_evt,
2197 TP_PROTO(struct net_device *netdev, const u8 *mac),
2198 TP_ARGS(netdev, mac),
2199 TP_STRUCT__entry(
2200 NETDEV_ENTRY
2201 MAC_ENTRY(mac)
2202 ),
2203 TP_fast_assign(
2204 NETDEV_ASSIGN;
2205 MAC_ASSIGN(mac, mac)
2206 ),
2207 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
2208 NETDEV_PR_ARG, MAC_PR_ARG(mac))
2209);
2210
2211DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout,
2212 TP_PROTO(struct net_device *netdev, const u8 *mac),
2213 TP_ARGS(netdev, mac)
2214);
2215
2216DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout,
2217 TP_PROTO(struct net_device *netdev, const u8 *mac),
2218 TP_ARGS(netdev, mac)
2219);
2220
2221TRACE_EVENT(cfg80211_michael_mic_failure,
2222 TP_PROTO(struct net_device *netdev, const u8 *addr,
2223 enum nl80211_key_type key_type, int key_id, const u8 *tsc),
2224 TP_ARGS(netdev, addr, key_type, key_id, tsc),
2225 TP_STRUCT__entry(
2226 NETDEV_ENTRY
2227 MAC_ENTRY(addr)
2228 __field(enum nl80211_key_type, key_type)
2229 __field(int, key_id)
2230 __array(u8, tsc, 6)
2231 ),
2232 TP_fast_assign(
2233 NETDEV_ASSIGN;
2234 MAC_ASSIGN(addr, addr);
2235 __entry->key_type = key_type;
2236 __entry->key_id = key_id;
Eliad Peller8c26d452014-07-17 15:00:56 +03002237 if (tsc)
2238 memcpy(__entry->tsc, tsc, 6);
Beni Lev4ee3e062012-08-27 12:49:39 +03002239 ),
Johannes Bergec816082012-11-16 17:22:28 +01002240 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm",
Beni Lev4ee3e062012-08-27 12:49:39 +03002241 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type,
2242 __entry->key_id, __entry->tsc)
2243);
2244
2245TRACE_EVENT(cfg80211_ready_on_channel,
2246 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2247 struct ieee80211_channel *chan,
Johannes Berg42d97a52012-11-08 18:31:02 +01002248 unsigned int duration),
2249 TP_ARGS(wdev, cookie, chan, duration),
Beni Lev4ee3e062012-08-27 12:49:39 +03002250 TP_STRUCT__entry(
2251 WDEV_ENTRY
2252 __field(u64, cookie)
2253 CHAN_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002254 __field(unsigned int, duration)
2255 ),
2256 TP_fast_assign(
2257 WDEV_ASSIGN;
2258 __entry->cookie = cookie;
2259 CHAN_ASSIGN(chan);
Beni Lev4ee3e062012-08-27 12:49:39 +03002260 __entry->duration = duration;
2261 ),
Johannes Berg42d97a52012-11-08 18:31:02 +01002262 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u",
Beni Lev4ee3e062012-08-27 12:49:39 +03002263 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG,
Johannes Berg42d97a52012-11-08 18:31:02 +01002264 __entry->duration)
Beni Lev4ee3e062012-08-27 12:49:39 +03002265);
2266
2267TRACE_EVENT(cfg80211_ready_on_channel_expired,
2268 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
Johannes Berg42d97a52012-11-08 18:31:02 +01002269 struct ieee80211_channel *chan),
2270 TP_ARGS(wdev, cookie, chan),
Beni Lev4ee3e062012-08-27 12:49:39 +03002271 TP_STRUCT__entry(
2272 WDEV_ENTRY
2273 __field(u64, cookie)
2274 CHAN_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002275 ),
2276 TP_fast_assign(
2277 WDEV_ASSIGN;
2278 __entry->cookie = cookie;
2279 CHAN_ASSIGN(chan);
Beni Lev4ee3e062012-08-27 12:49:39 +03002280 ),
Johannes Berg42d97a52012-11-08 18:31:02 +01002281 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
2282 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002283);
2284
2285TRACE_EVENT(cfg80211_new_sta,
2286 TP_PROTO(struct net_device *netdev, const u8 *mac_addr,
2287 struct station_info *sinfo),
2288 TP_ARGS(netdev, mac_addr, sinfo),
2289 TP_STRUCT__entry(
2290 NETDEV_ENTRY
2291 MAC_ENTRY(mac_addr)
2292 SINFO_ENTRY
2293 ),
2294 TP_fast_assign(
2295 NETDEV_ASSIGN;
2296 MAC_ASSIGN(mac_addr, mac_addr);
2297 SINFO_ASSIGN;
2298 ),
Johannes Bergec816082012-11-16 17:22:28 +01002299 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT,
Beni Lev4ee3e062012-08-27 12:49:39 +03002300 NETDEV_PR_ARG, MAC_PR_ARG(mac_addr))
2301);
2302
2303DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta,
2304 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2305 TP_ARGS(netdev, macaddr)
2306);
2307
2308TRACE_EVENT(cfg80211_rx_mgmt,
2309 TP_PROTO(struct wireless_dev *wdev, int freq, int sig_mbm),
2310 TP_ARGS(wdev, freq, sig_mbm),
2311 TP_STRUCT__entry(
2312 WDEV_ENTRY
2313 __field(int, freq)
2314 __field(int, sig_mbm)
2315 ),
2316 TP_fast_assign(
2317 WDEV_ASSIGN;
2318 __entry->freq = freq;
2319 __entry->sig_mbm = sig_mbm;
2320 ),
2321 TP_printk(WDEV_PR_FMT ", freq: %d, sig mbm: %d",
2322 WDEV_PR_ARG, __entry->freq, __entry->sig_mbm)
2323);
2324
2325TRACE_EVENT(cfg80211_mgmt_tx_status,
2326 TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
2327 TP_ARGS(wdev, cookie, ack),
2328 TP_STRUCT__entry(
2329 WDEV_ENTRY
2330 __field(u64, cookie)
2331 __field(bool, ack)
2332 ),
2333 TP_fast_assign(
2334 WDEV_ASSIGN;
2335 __entry->cookie = cookie;
2336 __entry->ack = ack;
2337 ),
2338 TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
2339 WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
2340);
2341
2342TRACE_EVENT(cfg80211_cqm_rssi_notify,
2343 TP_PROTO(struct net_device *netdev,
2344 enum nl80211_cqm_rssi_threshold_event rssi_event),
2345 TP_ARGS(netdev, rssi_event),
2346 TP_STRUCT__entry(
2347 NETDEV_ENTRY
2348 __field(enum nl80211_cqm_rssi_threshold_event, rssi_event)
2349 ),
2350 TP_fast_assign(
2351 NETDEV_ASSIGN;
2352 __entry->rssi_event = rssi_event;
2353 ),
2354 TP_printk(NETDEV_PR_FMT ", rssi event: %d",
2355 NETDEV_PR_ARG, __entry->rssi_event)
2356);
2357
Johannes Berg683b6d32012-11-08 21:25:48 +01002358TRACE_EVENT(cfg80211_reg_can_beacon,
Ilan Peer174e0cd2014-02-23 09:13:01 +02002359 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef,
2360 enum nl80211_iftype iftype),
2361 TP_ARGS(wiphy, chandef, iftype),
Beni Lev4ee3e062012-08-27 12:49:39 +03002362 TP_STRUCT__entry(
2363 WIPHY_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01002364 CHAN_DEF_ENTRY
Ilan Peer174e0cd2014-02-23 09:13:01 +02002365 __field(enum nl80211_iftype, iftype)
Beni Lev4ee3e062012-08-27 12:49:39 +03002366 ),
2367 TP_fast_assign(
2368 WIPHY_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01002369 CHAN_DEF_ASSIGN(chandef);
Ilan Peer174e0cd2014-02-23 09:13:01 +02002370 __entry->iftype = iftype;
Beni Lev4ee3e062012-08-27 12:49:39 +03002371 ),
Ilan Peer174e0cd2014-02-23 09:13:01 +02002372 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", iftype=%d",
2373 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->iftype)
Beni Lev4ee3e062012-08-27 12:49:39 +03002374);
2375
Simon Wunderlich04f39042013-02-08 18:16:19 +01002376TRACE_EVENT(cfg80211_chandef_dfs_required,
2377 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2378 TP_ARGS(wiphy, chandef),
2379 TP_STRUCT__entry(
2380 WIPHY_ENTRY
2381 CHAN_DEF_ENTRY
2382 ),
2383 TP_fast_assign(
2384 WIPHY_ASSIGN;
2385 CHAN_DEF_ASSIGN(chandef);
2386 ),
2387 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2388 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2389);
2390
Beni Lev4ee3e062012-08-27 12:49:39 +03002391TRACE_EVENT(cfg80211_ch_switch_notify,
Johannes Berg683b6d32012-11-08 21:25:48 +01002392 TP_PROTO(struct net_device *netdev,
2393 struct cfg80211_chan_def *chandef),
2394 TP_ARGS(netdev, chandef),
Beni Lev4ee3e062012-08-27 12:49:39 +03002395 TP_STRUCT__entry(
2396 NETDEV_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01002397 CHAN_DEF_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002398 ),
2399 TP_fast_assign(
2400 NETDEV_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01002401 CHAN_DEF_ASSIGN(chandef);
Beni Lev4ee3e062012-08-27 12:49:39 +03002402 ),
Johannes Bergec816082012-11-16 17:22:28 +01002403 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
Johannes Berg683b6d32012-11-08 21:25:48 +01002404 NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002405);
2406
Luciano Coelhof8d75522014-11-07 14:31:35 +02002407TRACE_EVENT(cfg80211_ch_switch_started_notify,
2408 TP_PROTO(struct net_device *netdev,
2409 struct cfg80211_chan_def *chandef),
2410 TP_ARGS(netdev, chandef),
2411 TP_STRUCT__entry(
2412 NETDEV_ENTRY
2413 CHAN_DEF_ENTRY
2414 ),
2415 TP_fast_assign(
2416 NETDEV_ASSIGN;
2417 CHAN_DEF_ASSIGN(chandef);
2418 ),
2419 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2420 NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
2421);
2422
Simon Wunderlich04f39042013-02-08 18:16:19 +01002423TRACE_EVENT(cfg80211_radar_event,
2424 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2425 TP_ARGS(wiphy, chandef),
2426 TP_STRUCT__entry(
2427 WIPHY_ENTRY
2428 CHAN_DEF_ENTRY
2429 ),
2430 TP_fast_assign(
2431 WIPHY_ASSIGN;
2432 CHAN_DEF_ASSIGN(chandef);
2433 ),
2434 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2435 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2436);
2437
2438TRACE_EVENT(cfg80211_cac_event,
2439 TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt),
2440 TP_ARGS(netdev, evt),
2441 TP_STRUCT__entry(
2442 NETDEV_ENTRY
2443 __field(enum nl80211_radar_event, evt)
2444 ),
2445 TP_fast_assign(
2446 NETDEV_ASSIGN;
2447 __entry->evt = evt;
2448 ),
2449 TP_printk(NETDEV_PR_FMT ", event: %d",
2450 NETDEV_PR_ARG, __entry->evt)
2451);
2452
Beni Lev4ee3e062012-08-27 12:49:39 +03002453DECLARE_EVENT_CLASS(cfg80211_rx_evt,
2454 TP_PROTO(struct net_device *netdev, const u8 *addr),
2455 TP_ARGS(netdev, addr),
2456 TP_STRUCT__entry(
2457 NETDEV_ENTRY
2458 MAC_ENTRY(addr)
2459 ),
2460 TP_fast_assign(
2461 NETDEV_ASSIGN;
2462 MAC_ASSIGN(addr, addr);
2463 ),
Johannes Bergec816082012-11-16 17:22:28 +01002464 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr))
Beni Lev4ee3e062012-08-27 12:49:39 +03002465);
2466
Beni Lev4ee3e062012-08-27 12:49:39 +03002467DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame,
2468 TP_PROTO(struct net_device *netdev, const u8 *addr),
2469 TP_ARGS(netdev, addr)
2470);
2471
2472DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame,
2473 TP_PROTO(struct net_device *netdev, const u8 *addr),
2474 TP_ARGS(netdev, addr)
2475);
2476
Antonio Quartullife94f3a2014-01-29 17:53:43 +01002477TRACE_EVENT(cfg80211_ibss_joined,
2478 TP_PROTO(struct net_device *netdev, const u8 *bssid,
2479 struct ieee80211_channel *channel),
2480 TP_ARGS(netdev, bssid, channel),
2481 TP_STRUCT__entry(
2482 NETDEV_ENTRY
2483 MAC_ENTRY(bssid)
2484 CHAN_ENTRY
2485 ),
2486 TP_fast_assign(
2487 NETDEV_ASSIGN;
2488 MAC_ASSIGN(bssid, bssid);
2489 CHAN_ASSIGN(channel);
2490 ),
2491 TP_printk(NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", " CHAN_PR_FMT,
2492 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
2493);
2494
Beni Lev4ee3e062012-08-27 12:49:39 +03002495TRACE_EVENT(cfg80211_probe_status,
2496 TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie,
2497 bool acked),
2498 TP_ARGS(netdev, addr, cookie, acked),
2499 TP_STRUCT__entry(
2500 NETDEV_ENTRY
2501 MAC_ENTRY(addr)
2502 __field(u64, cookie)
2503 __field(bool, acked)
2504 ),
2505 TP_fast_assign(
2506 NETDEV_ASSIGN;
2507 MAC_ASSIGN(addr, addr);
2508 __entry->cookie = cookie;
2509 __entry->acked = acked;
2510 ),
Johannes Bergec816082012-11-16 17:22:28 +01002511 TP_printk(NETDEV_PR_FMT " addr:" MAC_PR_FMT ", cookie: %llu, acked: %s",
Beni Lev4ee3e062012-08-27 12:49:39 +03002512 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie,
2513 BOOL_TO_STR(__entry->acked))
2514);
2515
2516TRACE_EVENT(cfg80211_cqm_pktloss_notify,
2517 TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets),
2518 TP_ARGS(netdev, peer, num_packets),
2519 TP_STRUCT__entry(
2520 NETDEV_ENTRY
2521 MAC_ENTRY(peer)
2522 __field(u32, num_packets)
2523 ),
2524 TP_fast_assign(
2525 NETDEV_ASSIGN;
2526 MAC_ASSIGN(peer, peer);
2527 __entry->num_packets = num_packets;
2528 ),
2529 TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u",
2530 NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets)
2531);
2532
2533DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify,
2534 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2535 TP_ARGS(netdev, macaddr)
2536);
2537
2538TRACE_EVENT(cfg80211_pmksa_candidate_notify,
2539 TP_PROTO(struct net_device *netdev, int index, const u8 *bssid,
2540 bool preauth),
2541 TP_ARGS(netdev, index, bssid, preauth),
2542 TP_STRUCT__entry(
2543 NETDEV_ENTRY
2544 __field(int, index)
2545 MAC_ENTRY(bssid)
2546 __field(bool, preauth)
2547 ),
2548 TP_fast_assign(
2549 NETDEV_ASSIGN;
2550 __entry->index = index;
2551 MAC_ASSIGN(bssid, bssid);
2552 __entry->preauth = preauth;
2553 ),
2554 TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s",
2555 NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid),
2556 BOOL_TO_STR(__entry->preauth))
2557);
2558
2559TRACE_EVENT(cfg80211_report_obss_beacon,
2560 TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len,
2561 int freq, int sig_dbm),
2562 TP_ARGS(wiphy, frame, len, freq, sig_dbm),
2563 TP_STRUCT__entry(
2564 WIPHY_ENTRY
2565 __field(int, freq)
2566 __field(int, sig_dbm)
2567 ),
2568 TP_fast_assign(
2569 WIPHY_ASSIGN;
2570 __entry->freq = freq;
2571 __entry->sig_dbm = sig_dbm;
2572 ),
2573 TP_printk(WIPHY_PR_FMT ", freq: %d, sig_dbm: %d",
2574 WIPHY_PR_ARG, __entry->freq, __entry->sig_dbm)
2575);
2576
Jouni Malinen3475b092012-11-16 22:49:57 +02002577TRACE_EVENT(cfg80211_tdls_oper_request,
2578 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer,
2579 enum nl80211_tdls_operation oper, u16 reason_code),
2580 TP_ARGS(wiphy, netdev, peer, oper, reason_code),
2581 TP_STRUCT__entry(
2582 WIPHY_ENTRY
2583 NETDEV_ENTRY
2584 MAC_ENTRY(peer)
2585 __field(enum nl80211_tdls_operation, oper)
2586 __field(u16, reason_code)
2587 ),
2588 TP_fast_assign(
2589 WIPHY_ASSIGN;
2590 NETDEV_ASSIGN;
2591 MAC_ASSIGN(peer, peer);
2592 __entry->oper = oper;
2593 __entry->reason_code = reason_code;
2594 ),
2595 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", oper: %d, reason_code %u",
2596 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper,
2597 __entry->reason_code)
2598 );
2599
Beni Lev4ee3e062012-08-27 12:49:39 +03002600TRACE_EVENT(cfg80211_scan_done,
2601 TP_PROTO(struct cfg80211_scan_request *request, bool aborted),
2602 TP_ARGS(request, aborted),
2603 TP_STRUCT__entry(
2604 __field(u32, n_channels)
2605 __dynamic_array(u8, ie, request ? request->ie_len : 0)
2606 __array(u32, rates, IEEE80211_NUM_BANDS)
2607 __field(u32, wdev_id)
2608 MAC_ENTRY(wiphy_mac)
2609 __field(bool, no_cck)
2610 __field(bool, aborted)
2611 ),
2612 TP_fast_assign(
2613 if (request) {
2614 memcpy(__get_dynamic_array(ie), request->ie,
2615 request->ie_len);
2616 memcpy(__entry->rates, request->rates,
2617 IEEE80211_NUM_BANDS);
2618 __entry->wdev_id = request->wdev ?
2619 request->wdev->identifier : 0;
2620 if (request->wiphy)
2621 MAC_ASSIGN(wiphy_mac,
2622 request->wiphy->perm_addr);
2623 __entry->no_cck = request->no_cck;
2624 }
2625 __entry->aborted = aborted;
2626 ),
2627 TP_printk("aborted: %s", BOOL_TO_STR(__entry->aborted))
2628);
2629
2630DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_results,
2631 TP_PROTO(struct wiphy *wiphy),
2632 TP_ARGS(wiphy)
2633);
2634
2635DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_stopped,
2636 TP_PROTO(struct wiphy *wiphy),
2637 TP_ARGS(wiphy)
2638);
2639
2640TRACE_EVENT(cfg80211_get_bss,
2641 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
2642 const u8 *bssid, const u8 *ssid, size_t ssid_len,
Dedy Lansky6eb18132015-02-08 15:52:03 +02002643 enum ieee80211_bss_type bss_type,
2644 enum ieee80211_privacy privacy),
2645 TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, bss_type, privacy),
Beni Lev4ee3e062012-08-27 12:49:39 +03002646 TP_STRUCT__entry(
2647 WIPHY_ENTRY
2648 CHAN_ENTRY
2649 MAC_ENTRY(bssid)
2650 __dynamic_array(u8, ssid, ssid_len)
Dedy Lansky6eb18132015-02-08 15:52:03 +02002651 __field(enum ieee80211_bss_type, bss_type)
2652 __field(enum ieee80211_privacy, privacy)
Beni Lev4ee3e062012-08-27 12:49:39 +03002653 ),
2654 TP_fast_assign(
2655 WIPHY_ASSIGN;
2656 CHAN_ASSIGN(channel);
2657 MAC_ASSIGN(bssid, bssid);
2658 memcpy(__get_dynamic_array(ssid), ssid, ssid_len);
Dedy Lansky6eb18132015-02-08 15:52:03 +02002659 __entry->bss_type = bss_type;
2660 __entry->privacy = privacy;
Beni Lev4ee3e062012-08-27 12:49:39 +03002661 ),
Dedy Lansky6eb18132015-02-08 15:52:03 +02002662 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT
2663 ", buf: %#.2x, bss_type: %d, privacy: %d",
2664 WIPHY_PR_ARG, CHAN_PR_ARG, MAC_PR_ARG(bssid),
2665 ((u8 *)__get_dynamic_array(ssid))[0], __entry->bss_type,
2666 __entry->privacy)
Beni Lev4ee3e062012-08-27 12:49:39 +03002667);
2668
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002669TRACE_EVENT(cfg80211_inform_bss_width_frame,
Beni Lev4ee3e062012-08-27 12:49:39 +03002670 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002671 enum nl80211_bss_scan_width scan_width,
Beni Lev4ee3e062012-08-27 12:49:39 +03002672 struct ieee80211_mgmt *mgmt, size_t len,
2673 s32 signal),
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002674 TP_ARGS(wiphy, channel, scan_width, mgmt, len, signal),
Beni Lev4ee3e062012-08-27 12:49:39 +03002675 TP_STRUCT__entry(
2676 WIPHY_ENTRY
2677 CHAN_ENTRY
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002678 __field(enum nl80211_bss_scan_width, scan_width)
Beni Lev4ee3e062012-08-27 12:49:39 +03002679 __dynamic_array(u8, mgmt, len)
2680 __field(s32, signal)
2681 ),
2682 TP_fast_assign(
2683 WIPHY_ASSIGN;
2684 CHAN_ASSIGN(channel);
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002685 __entry->scan_width = scan_width;
Beni Lev4ee3e062012-08-27 12:49:39 +03002686 if (mgmt)
2687 memcpy(__get_dynamic_array(mgmt), mgmt, len);
2688 __entry->signal = signal;
2689 ),
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002690 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT "(scan_width: %d) signal: %d",
2691 WIPHY_PR_ARG, CHAN_PR_ARG, __entry->scan_width,
2692 __entry->signal)
Beni Lev4ee3e062012-08-27 12:49:39 +03002693);
2694
2695DECLARE_EVENT_CLASS(cfg80211_bss_evt,
2696 TP_PROTO(struct cfg80211_bss *pub),
2697 TP_ARGS(pub),
2698 TP_STRUCT__entry(
2699 MAC_ENTRY(bssid)
2700 CHAN_ENTRY
2701 ),
2702 TP_fast_assign(
2703 MAC_ASSIGN(bssid, pub->bssid);
2704 CHAN_ASSIGN(pub->channel);
2705 ),
Johannes Bergec816082012-11-16 17:22:28 +01002706 TP_printk(MAC_PR_FMT ", " CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002707);
2708
2709DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss,
2710 TP_PROTO(struct cfg80211_bss *pub),
2711 TP_ARGS(pub)
2712);
2713
2714TRACE_EVENT(cfg80211_return_uint,
2715 TP_PROTO(unsigned int ret),
2716 TP_ARGS(ret),
2717 TP_STRUCT__entry(
2718 __field(unsigned int, ret)
2719 ),
2720 TP_fast_assign(
2721 __entry->ret = ret;
2722 ),
2723 TP_printk("ret: %d", __entry->ret)
2724);
2725
2726TRACE_EVENT(cfg80211_return_u32,
2727 TP_PROTO(u32 ret),
2728 TP_ARGS(ret),
2729 TP_STRUCT__entry(
2730 __field(u32, ret)
2731 ),
2732 TP_fast_assign(
2733 __entry->ret = ret;
2734 ),
2735 TP_printk("ret: %u", __entry->ret)
2736);
2737
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002738TRACE_EVENT(cfg80211_report_wowlan_wakeup,
2739 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2740 struct cfg80211_wowlan_wakeup *wakeup),
2741 TP_ARGS(wiphy, wdev, wakeup),
2742 TP_STRUCT__entry(
2743 WIPHY_ENTRY
2744 WDEV_ENTRY
Johannes Berga92eecb2013-04-29 12:09:14 +02002745 __field(bool, non_wireless)
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002746 __field(bool, disconnect)
2747 __field(bool, magic_pkt)
2748 __field(bool, gtk_rekey_failure)
2749 __field(bool, eap_identity_req)
2750 __field(bool, four_way_handshake)
2751 __field(bool, rfkill_release)
2752 __field(s32, pattern_idx)
2753 __field(u32, packet_len)
Johannes Berga92eecb2013-04-29 12:09:14 +02002754 __dynamic_array(u8, packet,
2755 wakeup ? wakeup->packet_present_len : 0)
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002756 ),
2757 TP_fast_assign(
2758 WIPHY_ASSIGN;
2759 WDEV_ASSIGN;
Johannes Berga92eecb2013-04-29 12:09:14 +02002760 __entry->non_wireless = !wakeup;
2761 __entry->disconnect = wakeup ? wakeup->disconnect : false;
2762 __entry->magic_pkt = wakeup ? wakeup->magic_pkt : false;
2763 __entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false;
2764 __entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false;
2765 __entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false;
2766 __entry->rfkill_release = wakeup ? wakeup->rfkill_release : false;
2767 __entry->pattern_idx = wakeup ? wakeup->pattern_idx : false;
2768 __entry->packet_len = wakeup ? wakeup->packet_len : false;
2769 if (wakeup && wakeup->packet && wakeup->packet_present_len)
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002770 memcpy(__get_dynamic_array(packet), wakeup->packet,
2771 wakeup->packet_present_len);
2772 ),
2773 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
2774);
2775
Jouni Malinen355199e2013-02-27 17:14:27 +02002776TRACE_EVENT(cfg80211_ft_event,
2777 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2778 struct cfg80211_ft_event_params *ft_event),
2779 TP_ARGS(wiphy, netdev, ft_event),
2780 TP_STRUCT__entry(
2781 WIPHY_ENTRY
2782 NETDEV_ENTRY
2783 __dynamic_array(u8, ies, ft_event->ies_len)
2784 MAC_ENTRY(target_ap)
2785 __dynamic_array(u8, ric_ies, ft_event->ric_ies_len)
2786 ),
2787 TP_fast_assign(
2788 WIPHY_ASSIGN;
2789 NETDEV_ASSIGN;
2790 if (ft_event->ies)
2791 memcpy(__get_dynamic_array(ies), ft_event->ies,
2792 ft_event->ies_len);
2793 MAC_ASSIGN(target_ap, ft_event->target_ap);
2794 if (ft_event->ric_ies)
2795 memcpy(__get_dynamic_array(ric_ies), ft_event->ric_ies,
2796 ft_event->ric_ies_len);
2797 ),
2798 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", target_ap: " MAC_PR_FMT,
2799 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(target_ap))
2800);
2801
Michal Kaziorf04c2202014-04-09 15:11:01 +02002802TRACE_EVENT(cfg80211_stop_iface,
2803 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2804 TP_ARGS(wiphy, wdev),
2805 TP_STRUCT__entry(
2806 WIPHY_ENTRY
2807 WDEV_ENTRY
2808 ),
2809 TP_fast_assign(
2810 WIPHY_ASSIGN;
2811 WDEV_ASSIGN;
2812 ),
2813 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
2814 WIPHY_PR_ARG, WDEV_PR_ARG)
2815);
2816
Beni Lev14e8a3c2012-07-31 18:48:27 +03002817#endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
2818
2819#undef TRACE_INCLUDE_PATH
2820#define TRACE_INCLUDE_PATH .
2821#undef TRACE_INCLUDE_FILE
2822#define TRACE_INCLUDE_FILE trace
2823#include <trace/define_trace.h>