blob: 625a6e6d1168376e7d5b3f55d09729ebc786f1f6 [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
603DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa,
604 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
605 TP_ARGS(wiphy, netdev)
606);
607
608DECLARE_EVENT_CLASS(station_add_change,
609 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
610 struct station_parameters *params),
611 TP_ARGS(wiphy, netdev, mac, params),
612 TP_STRUCT__entry(
613 WIPHY_ENTRY
614 NETDEV_ENTRY
615 MAC_ENTRY(sta_mac)
616 __field(u32, sta_flags_mask)
617 __field(u32, sta_flags_set)
618 __field(u32, sta_modify_mask)
619 __field(int, listen_interval)
620 __field(u16, aid)
621 __field(u8, plink_action)
622 __field(u8, plink_state)
623 __field(u8, uapsd_queues)
624 __array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap))
625 ),
626 TP_fast_assign(
627 WIPHY_ASSIGN;
628 NETDEV_ASSIGN;
629 MAC_ASSIGN(sta_mac, mac);
630 __entry->sta_flags_mask = params->sta_flags_mask;
631 __entry->sta_flags_set = params->sta_flags_set;
632 __entry->sta_modify_mask = params->sta_modify_mask;
633 __entry->listen_interval = params->listen_interval;
634 __entry->aid = params->aid;
635 __entry->plink_action = params->plink_action;
636 __entry->plink_state = params->plink_state;
637 __entry->uapsd_queues = params->uapsd_queues;
638 memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap));
639 if (params->ht_capa)
640 memcpy(__entry->ht_capa, params->ht_capa,
641 sizeof(struct ieee80211_ht_cap));
642 ),
Johannes Bergec816082012-11-16 17:22:28 +0100643 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +0300644 ", station flags mask: %u, station flags set: %u, "
645 "station modify mask: %u, listen interval: %d, aid: %u, "
646 "plink action: %u, plink state: %u, uapsd queues: %u",
647 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
648 __entry->sta_flags_mask, __entry->sta_flags_set,
649 __entry->sta_modify_mask, __entry->listen_interval,
650 __entry->aid, __entry->plink_action, __entry->plink_state,
651 __entry->uapsd_queues)
652);
653
654DEFINE_EVENT(station_add_change, rdev_add_station,
655 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
656 struct station_parameters *params),
657 TP_ARGS(wiphy, netdev, mac, params)
658);
659
660DEFINE_EVENT(station_add_change, rdev_change_station,
661 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
662 struct station_parameters *params),
663 TP_ARGS(wiphy, netdev, mac, params)
664);
665
666DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt,
667 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
668 TP_ARGS(wiphy, netdev, mac),
669 TP_STRUCT__entry(
670 WIPHY_ENTRY
671 NETDEV_ENTRY
672 MAC_ENTRY(sta_mac)
673 ),
674 TP_fast_assign(
675 WIPHY_ASSIGN;
676 NETDEV_ASSIGN;
677 MAC_ASSIGN(sta_mac, mac);
678 ),
Johannes Bergec816082012-11-16 17:22:28 +0100679 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300680 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac))
681);
682
683DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_station,
684 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
685 TP_ARGS(wiphy, netdev, mac)
686);
687
688DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_station,
689 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
690 TP_ARGS(wiphy, netdev, mac)
691);
692
693DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath,
694 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
695 TP_ARGS(wiphy, netdev, mac)
696);
697
698DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_set_wds_peer,
699 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
700 TP_ARGS(wiphy, netdev, mac)
701);
702
703TRACE_EVENT(rdev_dump_station,
704 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
705 u8 *mac),
706 TP_ARGS(wiphy, netdev, idx, mac),
707 TP_STRUCT__entry(
708 WIPHY_ENTRY
709 NETDEV_ENTRY
710 MAC_ENTRY(sta_mac)
711 __field(int, idx)
712 ),
713 TP_fast_assign(
714 WIPHY_ASSIGN;
715 NETDEV_ASSIGN;
716 MAC_ASSIGN(sta_mac, mac);
717 __entry->idx = idx;
718 ),
Johannes Bergec816082012-11-16 17:22:28 +0100719 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT ", idx: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300720 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
721 __entry->idx)
722);
723
724TRACE_EVENT(rdev_return_int_station_info,
725 TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo),
726 TP_ARGS(wiphy, ret, sinfo),
727 TP_STRUCT__entry(
728 WIPHY_ENTRY
729 __field(int, ret)
730 SINFO_ENTRY
731 ),
732 TP_fast_assign(
733 WIPHY_ASSIGN;
734 __entry->ret = ret;
735 SINFO_ASSIGN;
736 ),
737 TP_printk(WIPHY_PR_FMT ", returned %d" ,
738 WIPHY_PR_ARG, __entry->ret)
739);
740
741DECLARE_EVENT_CLASS(mpath_evt,
742 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
743 u8 *next_hop),
744 TP_ARGS(wiphy, netdev, dst, next_hop),
745 TP_STRUCT__entry(
746 WIPHY_ENTRY
747 NETDEV_ENTRY
748 MAC_ENTRY(dst)
749 MAC_ENTRY(next_hop)
750 ),
751 TP_fast_assign(
752 WIPHY_ASSIGN;
753 NETDEV_ASSIGN;
754 MAC_ASSIGN(dst, dst);
755 MAC_ASSIGN(next_hop, next_hop);
756 ),
Johannes Bergec816082012-11-16 17:22:28 +0100757 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT ", next hop: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300758 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dst),
759 MAC_PR_ARG(next_hop))
760);
761
762DEFINE_EVENT(mpath_evt, rdev_add_mpath,
763 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
764 u8 *next_hop),
765 TP_ARGS(wiphy, netdev, dst, next_hop)
766);
767
768DEFINE_EVENT(mpath_evt, rdev_change_mpath,
769 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
770 u8 *next_hop),
771 TP_ARGS(wiphy, netdev, dst, next_hop)
772);
773
774DEFINE_EVENT(mpath_evt, rdev_get_mpath,
775 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
776 u8 *next_hop),
777 TP_ARGS(wiphy, netdev, dst, next_hop)
778);
779
780TRACE_EVENT(rdev_dump_mpath,
781 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
782 u8 *dst, u8 *next_hop),
783 TP_ARGS(wiphy, netdev, idx, dst, next_hop),
784 TP_STRUCT__entry(
785 WIPHY_ENTRY
786 NETDEV_ENTRY
787 MAC_ENTRY(dst)
788 MAC_ENTRY(next_hop)
789 __field(int, idx)
790 ),
791 TP_fast_assign(
792 WIPHY_ASSIGN;
793 NETDEV_ASSIGN;
794 MAC_ASSIGN(dst, dst);
795 MAC_ASSIGN(next_hop, next_hop);
796 __entry->idx = idx;
797 ),
Johannes Bergec816082012-11-16 17:22:28 +0100798 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
Beni Lev14e8a3c2012-07-31 18:48:27 +0300799 MAC_PR_FMT ", next hop: " MAC_PR_FMT,
800 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
801 MAC_PR_ARG(next_hop))
802);
803
804TRACE_EVENT(rdev_return_int_mpath_info,
805 TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo),
806 TP_ARGS(wiphy, ret, pinfo),
807 TP_STRUCT__entry(
808 WIPHY_ENTRY
809 __field(int, ret)
810 __field(int, generation)
811 __field(u32, filled)
812 __field(u32, frame_qlen)
813 __field(u32, sn)
814 __field(u32, metric)
815 __field(u32, exptime)
816 __field(u32, discovery_timeout)
817 __field(u8, discovery_retries)
818 __field(u8, flags)
819 ),
820 TP_fast_assign(
821 WIPHY_ASSIGN;
822 __entry->ret = ret;
823 __entry->generation = pinfo->generation;
824 __entry->filled = pinfo->filled;
825 __entry->frame_qlen = pinfo->frame_qlen;
826 __entry->sn = pinfo->sn;
827 __entry->metric = pinfo->metric;
828 __entry->exptime = pinfo->exptime;
829 __entry->discovery_timeout = pinfo->discovery_timeout;
830 __entry->discovery_retries = pinfo->discovery_retries;
831 __entry->flags = pinfo->flags;
832 ),
833 TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, "
834 "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u,"
835 " discovery timeout: %u, discovery retries: %u, flags: %u",
836 WIPHY_PR_ARG, __entry->ret, __entry->generation,
837 __entry->filled, __entry->frame_qlen, __entry->sn,
838 __entry->metric, __entry->exptime, __entry->discovery_timeout,
839 __entry->discovery_retries, __entry->flags)
840);
841
842TRACE_EVENT(rdev_return_int_mesh_config,
843 TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf),
844 TP_ARGS(wiphy, ret, conf),
845 TP_STRUCT__entry(
846 WIPHY_ENTRY
847 MESH_CFG_ENTRY
848 __field(int, ret)
849 ),
850 TP_fast_assign(
851 WIPHY_ASSIGN;
852 MESH_CFG_ASSIGN;
853 __entry->ret = ret;
854 ),
855 TP_printk(WIPHY_PR_FMT ", returned: %d",
856 WIPHY_PR_ARG, __entry->ret)
857);
858
859TRACE_EVENT(rdev_update_mesh_config,
860 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask,
861 const struct mesh_config *conf),
862 TP_ARGS(wiphy, netdev, mask, conf),
863 TP_STRUCT__entry(
864 WIPHY_ENTRY
865 NETDEV_ENTRY
866 MESH_CFG_ENTRY
867 __field(u32, mask)
868 ),
869 TP_fast_assign(
870 WIPHY_ASSIGN;
871 NETDEV_ASSIGN;
872 MESH_CFG_ASSIGN;
873 __entry->mask = mask;
874 ),
Johannes Bergec816082012-11-16 17:22:28 +0100875 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mask: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300876 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask)
877);
878
879TRACE_EVENT(rdev_join_mesh,
880 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
881 const struct mesh_config *conf,
882 const struct mesh_setup *setup),
883 TP_ARGS(wiphy, netdev, conf, setup),
884 TP_STRUCT__entry(
885 WIPHY_ENTRY
886 NETDEV_ENTRY
887 MESH_CFG_ENTRY
888 ),
889 TP_fast_assign(
890 WIPHY_ASSIGN;
891 NETDEV_ASSIGN;
892 MESH_CFG_ASSIGN;
893 ),
Johannes Bergec816082012-11-16 17:22:28 +0100894 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300895 WIPHY_PR_ARG, NETDEV_PR_ARG)
896);
897
898TRACE_EVENT(rdev_change_bss,
899 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
900 struct bss_parameters *params),
901 TP_ARGS(wiphy, netdev, params),
902 TP_STRUCT__entry(
903 WIPHY_ENTRY
904 NETDEV_ENTRY
905 __field(int, use_cts_prot)
906 __field(int, use_short_preamble)
907 __field(int, use_short_slot_time)
908 __field(int, ap_isolate)
909 __field(int, ht_opmode)
910 ),
911 TP_fast_assign(
912 WIPHY_ASSIGN;
913 NETDEV_ASSIGN;
914 __entry->use_cts_prot = params->use_cts_prot;
915 __entry->use_short_preamble = params->use_short_preamble;
916 __entry->use_short_slot_time = params->use_short_slot_time;
917 __entry->ap_isolate = params->ap_isolate;
918 __entry->ht_opmode = params->ht_opmode;
919 ),
Johannes Bergec816082012-11-16 17:22:28 +0100920 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", use cts prot: %d, "
Beni Lev14e8a3c2012-07-31 18:48:27 +0300921 "use short preamble: %d, use short slot time: %d, "
922 "ap isolate: %d, ht opmode: %d",
923 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot,
924 __entry->use_short_preamble, __entry->use_short_slot_time,
925 __entry->ap_isolate, __entry->ht_opmode)
926);
927
928TRACE_EVENT(rdev_set_txq_params,
929 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
930 struct ieee80211_txq_params *params),
931 TP_ARGS(wiphy, netdev, params),
932 TP_STRUCT__entry(
933 WIPHY_ENTRY
934 NETDEV_ENTRY
935 __field(enum nl80211_ac, ac)
936 __field(u16, txop)
937 __field(u16, cwmin)
938 __field(u16, cwmax)
939 __field(u8, aifs)
940 ),
941 TP_fast_assign(
942 WIPHY_ASSIGN;
943 NETDEV_ASSIGN;
944 __entry->ac = params->ac;
945 __entry->txop = params->txop;
946 __entry->cwmin = params->cwmin;
947 __entry->cwmax = params->cwmax;
948 __entry->aifs = params->aifs;
949 ),
Johannes Bergec816082012-11-16 17:22:28 +0100950 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 +0300951 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop,
952 __entry->cwmin, __entry->cwmax, __entry->aifs)
953);
954
955TRACE_EVENT(rdev_libertas_set_mesh_channel,
956 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
957 struct ieee80211_channel *chan),
958 TP_ARGS(wiphy, netdev, chan),
959 TP_STRUCT__entry(
960 WIPHY_ENTRY
961 NETDEV_ENTRY
962 CHAN_ENTRY
963 ),
964 TP_fast_assign(
965 WIPHY_ASSIGN;
966 NETDEV_ASSIGN;
967 CHAN_ASSIGN(chan);
968 ),
Johannes Bergec816082012-11-16 17:22:28 +0100969 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_PR_FMT, WIPHY_PR_ARG,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300970 NETDEV_PR_ARG, CHAN_PR_ARG)
971);
972
973TRACE_EVENT(rdev_set_monitor_channel,
Johannes Berg683b6d32012-11-08 21:25:48 +0100974 TP_PROTO(struct wiphy *wiphy,
975 struct cfg80211_chan_def *chandef),
976 TP_ARGS(wiphy, chandef),
Beni Lev14e8a3c2012-07-31 18:48:27 +0300977 TP_STRUCT__entry(
978 WIPHY_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +0100979 CHAN_DEF_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +0300980 ),
981 TP_fast_assign(
982 WIPHY_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +0100983 CHAN_DEF_ASSIGN(chandef);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300984 ),
Johannes Bergec816082012-11-16 17:22:28 +0100985 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
Johannes Berg683b6d32012-11-08 21:25:48 +0100986 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300987);
988
989TRACE_EVENT(rdev_auth,
990 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
991 struct cfg80211_auth_request *req),
992 TP_ARGS(wiphy, netdev, req),
993 TP_STRUCT__entry(
994 WIPHY_ENTRY
995 NETDEV_ENTRY
996 MAC_ENTRY(bssid)
997 __field(enum nl80211_auth_type, auth_type)
998 ),
999 TP_fast_assign(
1000 WIPHY_ASSIGN;
1001 NETDEV_ASSIGN;
1002 if (req->bss)
1003 MAC_ASSIGN(bssid, req->bss->bssid);
1004 else
1005 memset(__entry->bssid, 0, ETH_ALEN);
1006 __entry->auth_type = req->auth_type;
1007 ),
Johannes Bergec816082012-11-16 17:22:28 +01001008 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", auth type: %d, bssid: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001009 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type,
1010 MAC_PR_ARG(bssid))
1011);
1012
1013TRACE_EVENT(rdev_assoc,
1014 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1015 struct cfg80211_assoc_request *req),
1016 TP_ARGS(wiphy, netdev, req),
1017 TP_STRUCT__entry(
1018 WIPHY_ENTRY
1019 NETDEV_ENTRY
1020 MAC_ENTRY(bssid)
1021 MAC_ENTRY(prev_bssid)
1022 __field(bool, use_mfp)
1023 __field(u32, flags)
1024 ),
1025 TP_fast_assign(
1026 WIPHY_ASSIGN;
1027 NETDEV_ASSIGN;
1028 if (req->bss)
1029 MAC_ASSIGN(bssid, req->bss->bssid);
1030 else
1031 memset(__entry->bssid, 0, ETH_ALEN);
1032 MAC_ASSIGN(prev_bssid, req->prev_bssid);
1033 __entry->use_mfp = req->use_mfp;
1034 __entry->flags = req->flags;
1035 ),
Johannes Bergec816082012-11-16 17:22:28 +01001036 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001037 ", previous bssid: " MAC_PR_FMT ", use mfp: %s, flags: %u",
1038 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1039 MAC_PR_ARG(prev_bssid), BOOL_TO_STR(__entry->use_mfp),
1040 __entry->flags)
1041);
1042
1043TRACE_EVENT(rdev_deauth,
1044 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1045 struct cfg80211_deauth_request *req),
1046 TP_ARGS(wiphy, netdev, req),
1047 TP_STRUCT__entry(
1048 WIPHY_ENTRY
1049 NETDEV_ENTRY
1050 MAC_ENTRY(bssid)
1051 __field(u16, reason_code)
1052 ),
1053 TP_fast_assign(
1054 WIPHY_ASSIGN;
1055 NETDEV_ASSIGN;
1056 MAC_ASSIGN(bssid, req->bssid);
1057 __entry->reason_code = req->reason_code;
1058 ),
Johannes Bergec816082012-11-16 17:22:28 +01001059 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", reason: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001060 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1061 __entry->reason_code)
1062);
1063
1064TRACE_EVENT(rdev_disassoc,
1065 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1066 struct cfg80211_disassoc_request *req),
1067 TP_ARGS(wiphy, netdev, req),
1068 TP_STRUCT__entry(
1069 WIPHY_ENTRY
1070 NETDEV_ENTRY
1071 MAC_ENTRY(bssid)
1072 __field(u16, reason_code)
1073 __field(bool, local_state_change)
1074 ),
1075 TP_fast_assign(
1076 WIPHY_ASSIGN;
1077 NETDEV_ASSIGN;
1078 if (req->bss)
1079 MAC_ASSIGN(bssid, req->bss->bssid);
1080 else
1081 memset(__entry->bssid, 0, ETH_ALEN);
1082 __entry->reason_code = req->reason_code;
1083 __entry->local_state_change = req->local_state_change;
1084 ),
Johannes Bergec816082012-11-16 17:22:28 +01001085 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001086 ", reason: %u, local state change: %s",
1087 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1088 __entry->reason_code,
1089 BOOL_TO_STR(__entry->local_state_change))
1090);
1091
1092TRACE_EVENT(rdev_mgmt_tx_cancel_wait,
1093 TP_PROTO(struct wiphy *wiphy,
1094 struct wireless_dev *wdev, u64 cookie),
1095 TP_ARGS(wiphy, wdev, cookie),
1096 TP_STRUCT__entry(
1097 WIPHY_ENTRY
1098 WDEV_ENTRY
1099 __field(u64, cookie)
1100 ),
1101 TP_fast_assign(
1102 WIPHY_ASSIGN;
1103 WDEV_ASSIGN;
1104 __entry->cookie = cookie;
1105 ),
Johannes Bergec816082012-11-16 17:22:28 +01001106 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001107 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1108);
1109
1110TRACE_EVENT(rdev_set_power_mgmt,
1111 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1112 bool enabled, int timeout),
1113 TP_ARGS(wiphy, netdev, enabled, timeout),
1114 TP_STRUCT__entry(
1115 WIPHY_ENTRY
1116 NETDEV_ENTRY
1117 __field(bool, enabled)
1118 __field(int, timeout)
1119 ),
1120 TP_fast_assign(
1121 WIPHY_ASSIGN;
1122 NETDEV_ASSIGN;
1123 __entry->enabled = enabled;
1124 __entry->timeout = timeout;
1125 ),
Johannes Bergec816082012-11-16 17:22:28 +01001126 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %senabled, timeout: %d ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001127 WIPHY_PR_ARG, NETDEV_PR_ARG,
1128 __entry->enabled ? "" : "not ", __entry->timeout)
1129);
1130
1131TRACE_EVENT(rdev_connect,
1132 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1133 struct cfg80211_connect_params *sme),
1134 TP_ARGS(wiphy, netdev, sme),
1135 TP_STRUCT__entry(
1136 WIPHY_ENTRY
1137 NETDEV_ENTRY
1138 MAC_ENTRY(bssid)
1139 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1140 __field(enum nl80211_auth_type, auth_type)
1141 __field(bool, privacy)
1142 __field(u32, wpa_versions)
1143 __field(u32, flags)
1144 ),
1145 TP_fast_assign(
1146 WIPHY_ASSIGN;
1147 NETDEV_ASSIGN;
1148 MAC_ASSIGN(bssid, sme->bssid);
1149 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1150 memcpy(__entry->ssid, sme->ssid, sme->ssid_len);
1151 __entry->auth_type = sme->auth_type;
1152 __entry->privacy = sme->privacy;
1153 __entry->wpa_versions = sme->crypto.wpa_versions;
1154 __entry->flags = sme->flags;
1155 ),
Johannes Bergec816082012-11-16 17:22:28 +01001156 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001157 ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, "
1158 "flags: %u",
1159 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid,
1160 __entry->auth_type, BOOL_TO_STR(__entry->privacy),
1161 __entry->wpa_versions, __entry->flags)
1162);
1163
1164TRACE_EVENT(rdev_set_cqm_rssi_config,
1165 TP_PROTO(struct wiphy *wiphy,
1166 struct net_device *netdev, s32 rssi_thold,
1167 u32 rssi_hyst),
1168 TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst),
1169 TP_STRUCT__entry(
1170 WIPHY_ENTRY
1171 NETDEV_ENTRY
1172 __field(s32, rssi_thold)
1173 __field(u32, rssi_hyst)
1174 ),
1175 TP_fast_assign(
1176 WIPHY_ASSIGN;
1177 NETDEV_ASSIGN;
1178 __entry->rssi_thold = rssi_thold;
1179 __entry->rssi_hyst = rssi_hyst;
1180 ),
Johannes Bergec816082012-11-16 17:22:28 +01001181 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001182 ", rssi_thold: %d, rssi_hyst: %u ",
1183 WIPHY_PR_ARG, NETDEV_PR_ARG,
1184 __entry->rssi_thold, __entry->rssi_hyst)
1185);
1186
1187TRACE_EVENT(rdev_set_cqm_txe_config,
1188 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate,
1189 u32 pkts, u32 intvl),
1190 TP_ARGS(wiphy, netdev, rate, pkts, intvl),
1191 TP_STRUCT__entry(
1192 WIPHY_ENTRY
1193 NETDEV_ENTRY
1194 __field(u32, rate)
1195 __field(u32, pkts)
1196 __field(u32, intvl)
1197 ),
1198 TP_fast_assign(
1199 WIPHY_ASSIGN;
1200 NETDEV_ASSIGN;
1201 __entry->rate = rate;
1202 __entry->pkts = pkts;
1203 __entry->intvl = intvl;
1204 ),
Johannes Bergec816082012-11-16 17:22:28 +01001205 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001206 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts,
1207 __entry->intvl)
1208);
1209
1210TRACE_EVENT(rdev_disconnect,
1211 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1212 u16 reason_code),
1213 TP_ARGS(wiphy, netdev, reason_code),
1214 TP_STRUCT__entry(
1215 WIPHY_ENTRY
1216 NETDEV_ENTRY
1217 __field(u16, reason_code)
1218 ),
1219 TP_fast_assign(
1220 WIPHY_ASSIGN;
1221 NETDEV_ASSIGN;
1222 __entry->reason_code = reason_code;
1223 ),
Johannes Bergec816082012-11-16 17:22:28 +01001224 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001225 NETDEV_PR_ARG, __entry->reason_code)
1226);
1227
1228TRACE_EVENT(rdev_join_ibss,
1229 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1230 struct cfg80211_ibss_params *params),
1231 TP_ARGS(wiphy, netdev, params),
1232 TP_STRUCT__entry(
1233 WIPHY_ENTRY
1234 NETDEV_ENTRY
1235 MAC_ENTRY(bssid)
1236 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1237 ),
1238 TP_fast_assign(
1239 WIPHY_ASSIGN;
1240 NETDEV_ASSIGN;
1241 MAC_ASSIGN(bssid, params->bssid);
1242 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1243 memcpy(__entry->ssid, params->ssid, params->ssid_len);
1244 ),
Johannes Bergec816082012-11-16 17:22:28 +01001245 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001246 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid)
1247);
1248
1249TRACE_EVENT(rdev_set_wiphy_params,
1250 TP_PROTO(struct wiphy *wiphy, u32 changed),
1251 TP_ARGS(wiphy, changed),
1252 TP_STRUCT__entry(
1253 WIPHY_ENTRY
1254 __field(u32, changed)
1255 ),
1256 TP_fast_assign(
1257 WIPHY_ASSIGN;
1258 __entry->changed = changed;
1259 ),
1260 TP_printk(WIPHY_PR_FMT ", changed: %u",
1261 WIPHY_PR_ARG, __entry->changed)
1262);
1263
Johannes Bergc8442112012-10-24 10:17:18 +02001264DEFINE_EVENT(wiphy_wdev_evt, rdev_get_tx_power,
1265 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1266 TP_ARGS(wiphy, wdev)
1267);
1268
Beni Lev14e8a3c2012-07-31 18:48:27 +03001269TRACE_EVENT(rdev_set_tx_power,
Johannes Bergc8442112012-10-24 10:17:18 +02001270 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1271 enum nl80211_tx_power_setting type, int mbm),
1272 TP_ARGS(wiphy, wdev, type, mbm),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001273 TP_STRUCT__entry(
1274 WIPHY_ENTRY
Johannes Bergc8442112012-10-24 10:17:18 +02001275 WDEV_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001276 __field(enum nl80211_tx_power_setting, type)
1277 __field(int, mbm)
1278 ),
1279 TP_fast_assign(
1280 WIPHY_ASSIGN;
Johannes Bergc8442112012-10-24 10:17:18 +02001281 WDEV_ASSIGN;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001282 __entry->type = type;
1283 __entry->mbm = mbm;
1284 ),
Johannes Bergec816082012-11-16 17:22:28 +01001285 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d",
Johannes Bergc8442112012-10-24 10:17:18 +02001286 WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001287);
1288
1289TRACE_EVENT(rdev_return_int_int,
1290 TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill),
1291 TP_ARGS(wiphy, func_ret, func_fill),
1292 TP_STRUCT__entry(
1293 WIPHY_ENTRY
1294 __field(int, func_ret)
1295 __field(int, func_fill)
1296 ),
1297 TP_fast_assign(
1298 WIPHY_ASSIGN;
1299 __entry->func_ret = func_ret;
1300 __entry->func_fill = func_fill;
1301 ),
1302 TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d",
1303 WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill)
1304);
1305
1306#ifdef CONFIG_NL80211_TESTMODE
1307TRACE_EVENT(rdev_testmode_cmd,
David Spinadelfc73f112013-07-31 18:04:15 +03001308 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1309 TP_ARGS(wiphy, wdev),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001310 TP_STRUCT__entry(
1311 WIPHY_ENTRY
David Spinadelfc73f112013-07-31 18:04:15 +03001312 WDEV_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001313 ),
1314 TP_fast_assign(
1315 WIPHY_ASSIGN;
David Spinadelfc73f112013-07-31 18:04:15 +03001316 WDEV_ASSIGN;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001317 ),
David Spinadelfc73f112013-07-31 18:04:15 +03001318 TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001319);
1320
1321TRACE_EVENT(rdev_testmode_dump,
1322 TP_PROTO(struct wiphy *wiphy),
1323 TP_ARGS(wiphy),
1324 TP_STRUCT__entry(
1325 WIPHY_ENTRY
1326 ),
1327 TP_fast_assign(
1328 WIPHY_ASSIGN;
1329 ),
1330 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
1331);
1332#endif /* CONFIG_NL80211_TESTMODE */
1333
1334TRACE_EVENT(rdev_set_bitrate_mask,
1335 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1336 const u8 *peer, const struct cfg80211_bitrate_mask *mask),
1337 TP_ARGS(wiphy, netdev, peer, mask),
1338 TP_STRUCT__entry(
1339 WIPHY_ENTRY
1340 NETDEV_ENTRY
1341 MAC_ENTRY(peer)
1342 ),
1343 TP_fast_assign(
1344 WIPHY_ASSIGN;
1345 NETDEV_ASSIGN;
1346 MAC_ASSIGN(peer, peer);
1347 ),
Johannes Bergec816082012-11-16 17:22:28 +01001348 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001349 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1350);
1351
1352TRACE_EVENT(rdev_mgmt_frame_register,
1353 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1354 u16 frame_type, bool reg),
1355 TP_ARGS(wiphy, wdev, frame_type, reg),
1356 TP_STRUCT__entry(
1357 WIPHY_ENTRY
1358 WDEV_ENTRY
1359 __field(u16, frame_type)
1360 __field(bool, reg)
1361 ),
1362 TP_fast_assign(
1363 WIPHY_ASSIGN;
1364 WDEV_ASSIGN;
1365 __entry->frame_type = frame_type;
1366 __entry->reg = reg;
1367 ),
Johannes Bergec816082012-11-16 17:22:28 +01001368 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", frame_type: 0x%.2x, reg: %s ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001369 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->frame_type,
1370 __entry->reg ? "true" : "false")
1371);
1372
1373TRACE_EVENT(rdev_return_int_tx_rx,
1374 TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx),
1375 TP_ARGS(wiphy, ret, tx, rx),
1376 TP_STRUCT__entry(
1377 WIPHY_ENTRY
1378 __field(int, ret)
1379 __field(u32, tx)
1380 __field(u32, rx)
1381 ),
1382 TP_fast_assign(
1383 WIPHY_ASSIGN;
1384 __entry->ret = ret;
1385 __entry->tx = tx;
1386 __entry->rx = rx;
1387 ),
1388 TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u",
1389 WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx)
1390);
1391
1392TRACE_EVENT(rdev_return_void_tx_rx,
1393 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max,
1394 u32 rx, u32 rx_max),
1395 TP_ARGS(wiphy, tx, tx_max, rx, rx_max),
1396 TP_STRUCT__entry(
1397 WIPHY_ENTRY
1398 __field(u32, tx)
1399 __field(u32, tx_max)
1400 __field(u32, rx)
1401 __field(u32, rx_max)
1402 ),
1403 TP_fast_assign(
1404 WIPHY_ASSIGN;
1405 __entry->tx = tx;
1406 __entry->tx_max = tx_max;
1407 __entry->rx = rx;
1408 __entry->rx_max = rx_max;
1409 ),
1410 TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ",
1411 WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx,
1412 __entry->rx_max)
1413);
1414
1415DECLARE_EVENT_CLASS(tx_rx_evt,
1416 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1417 TP_ARGS(wiphy, rx, tx),
1418 TP_STRUCT__entry(
1419 WIPHY_ENTRY
1420 __field(u32, tx)
1421 __field(u32, rx)
1422 ),
1423 TP_fast_assign(
1424 WIPHY_ASSIGN;
1425 __entry->tx = tx;
1426 __entry->rx = rx;
1427 ),
1428 TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ",
1429 WIPHY_PR_ARG, __entry->tx, __entry->rx)
1430);
1431
Beni Lev14e8a3c2012-07-31 18:48:27 +03001432DEFINE_EVENT(tx_rx_evt, rdev_set_antenna,
1433 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1434 TP_ARGS(wiphy, rx, tx)
1435);
1436
1437TRACE_EVENT(rdev_sched_scan_start,
1438 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1439 struct cfg80211_sched_scan_request *request),
1440 TP_ARGS(wiphy, netdev, request),
1441 TP_STRUCT__entry(
1442 WIPHY_ENTRY
1443 NETDEV_ENTRY
1444 ),
1445 TP_fast_assign(
1446 WIPHY_ASSIGN;
1447 NETDEV_ASSIGN;
1448 ),
Johannes Bergec816082012-11-16 17:22:28 +01001449 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001450 WIPHY_PR_ARG, NETDEV_PR_ARG)
1451);
1452
1453TRACE_EVENT(rdev_tdls_mgmt,
1454 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1455 u8 *peer, u8 action_code, u8 dialog_token,
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301456 u16 status_code, u32 peer_capability,
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001457 bool initiator, const u8 *buf, size_t len),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001458 TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code,
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001459 peer_capability, initiator, buf, len),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001460 TP_STRUCT__entry(
1461 WIPHY_ENTRY
1462 NETDEV_ENTRY
1463 MAC_ENTRY(peer)
1464 __field(u8, action_code)
1465 __field(u8, dialog_token)
1466 __field(u16, status_code)
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301467 __field(u32, peer_capability)
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001468 __field(bool, initiator)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001469 __dynamic_array(u8, buf, len)
1470 ),
1471 TP_fast_assign(
1472 WIPHY_ASSIGN;
1473 NETDEV_ASSIGN;
1474 MAC_ASSIGN(peer, peer);
1475 __entry->action_code = action_code;
1476 __entry->dialog_token = dialog_token;
1477 __entry->status_code = status_code;
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301478 __entry->peer_capability = peer_capability;
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001479 __entry->initiator = initiator;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001480 memcpy(__get_dynamic_array(buf), buf, len);
1481 ),
Johannes Bergec816082012-11-16 17:22:28 +01001482 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", action_code: %u, "
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001483 "dialog_token: %u, status_code: %u, peer_capability: %u "
1484 "initiator: %s buf: %#.2x ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001485 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
1486 __entry->action_code, __entry->dialog_token,
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301487 __entry->status_code, __entry->peer_capability,
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001488 BOOL_TO_STR(__entry->initiator),
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301489 ((u8 *)__get_dynamic_array(buf))[0])
Beni Lev14e8a3c2012-07-31 18:48:27 +03001490);
1491
1492TRACE_EVENT(rdev_dump_survey,
1493 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx),
1494 TP_ARGS(wiphy, netdev, idx),
1495 TP_STRUCT__entry(
1496 WIPHY_ENTRY
1497 NETDEV_ENTRY
1498 __field(int, idx)
1499 ),
1500 TP_fast_assign(
1501 WIPHY_ASSIGN;
1502 NETDEV_ASSIGN;
1503 __entry->idx = idx;
1504 ),
Johannes Bergec816082012-11-16 17:22:28 +01001505 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001506 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx)
1507);
1508
1509TRACE_EVENT(rdev_return_int_survey_info,
1510 TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info),
1511 TP_ARGS(wiphy, ret, info),
1512 TP_STRUCT__entry(
1513 WIPHY_ENTRY
1514 CHAN_ENTRY
1515 __field(int, ret)
1516 __field(u64, channel_time)
1517 __field(u64, channel_time_busy)
1518 __field(u64, channel_time_ext_busy)
1519 __field(u64, channel_time_rx)
1520 __field(u64, channel_time_tx)
1521 __field(u32, filled)
1522 __field(s8, noise)
1523 ),
1524 TP_fast_assign(
1525 WIPHY_ASSIGN;
1526 CHAN_ASSIGN(info->channel);
1527 __entry->ret = ret;
1528 __entry->channel_time = info->channel_time;
1529 __entry->channel_time_busy = info->channel_time_busy;
1530 __entry->channel_time_ext_busy = info->channel_time_ext_busy;
1531 __entry->channel_time_rx = info->channel_time_rx;
1532 __entry->channel_time_tx = info->channel_time_tx;
1533 __entry->filled = info->filled;
1534 __entry->noise = info->noise;
1535 ),
1536 TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT
1537 ", channel time: %llu, channel time busy: %llu, "
1538 "channel time extension busy: %llu, channel time rx: %llu, "
1539 "channel time tx: %llu, filled: %u, noise: %d",
1540 WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG,
1541 __entry->channel_time, __entry->channel_time_busy,
1542 __entry->channel_time_ext_busy, __entry->channel_time_rx,
1543 __entry->channel_time_tx, __entry->filled, __entry->noise)
1544);
1545
1546TRACE_EVENT(rdev_tdls_oper,
1547 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1548 u8 *peer, enum nl80211_tdls_operation oper),
1549 TP_ARGS(wiphy, netdev, peer, oper),
1550 TP_STRUCT__entry(
1551 WIPHY_ENTRY
1552 NETDEV_ENTRY
1553 MAC_ENTRY(peer)
1554 __field(enum nl80211_tdls_operation, oper)
1555 ),
1556 TP_fast_assign(
1557 WIPHY_ASSIGN;
1558 NETDEV_ASSIGN;
1559 MAC_ASSIGN(peer, peer);
1560 __entry->oper = oper;
1561 ),
Johannes Bergec816082012-11-16 17:22:28 +01001562 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", oper: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001563 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper)
1564);
1565
1566DECLARE_EVENT_CLASS(rdev_pmksa,
1567 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1568 struct cfg80211_pmksa *pmksa),
1569 TP_ARGS(wiphy, netdev, pmksa),
1570 TP_STRUCT__entry(
1571 WIPHY_ENTRY
1572 NETDEV_ENTRY
1573 MAC_ENTRY(bssid)
1574 ),
1575 TP_fast_assign(
1576 WIPHY_ASSIGN;
1577 NETDEV_ASSIGN;
1578 MAC_ASSIGN(bssid, pmksa->bssid);
1579 ),
Johannes Bergec816082012-11-16 17:22:28 +01001580 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001581 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid))
1582);
1583
1584TRACE_EVENT(rdev_probe_client,
1585 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1586 const u8 *peer),
1587 TP_ARGS(wiphy, netdev, peer),
1588 TP_STRUCT__entry(
1589 WIPHY_ENTRY
1590 NETDEV_ENTRY
1591 MAC_ENTRY(peer)
1592 ),
1593 TP_fast_assign(
1594 WIPHY_ASSIGN;
1595 NETDEV_ASSIGN;
1596 MAC_ASSIGN(peer, peer);
1597 ),
Johannes Bergec816082012-11-16 17:22:28 +01001598 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001599 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1600);
1601
1602DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa,
1603 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1604 struct cfg80211_pmksa *pmksa),
1605 TP_ARGS(wiphy, netdev, pmksa)
1606);
1607
1608DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa,
1609 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1610 struct cfg80211_pmksa *pmksa),
1611 TP_ARGS(wiphy, netdev, pmksa)
1612);
1613
1614TRACE_EVENT(rdev_remain_on_channel,
1615 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1616 struct ieee80211_channel *chan,
Johannes Berg42d97a52012-11-08 18:31:02 +01001617 unsigned int duration),
1618 TP_ARGS(wiphy, wdev, chan, duration),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001619 TP_STRUCT__entry(
1620 WIPHY_ENTRY
1621 WDEV_ENTRY
1622 CHAN_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001623 __field(unsigned int, duration)
1624 ),
1625 TP_fast_assign(
1626 WIPHY_ASSIGN;
1627 WDEV_ASSIGN;
1628 CHAN_ASSIGN(chan);
Beni Lev14e8a3c2012-07-31 18:48:27 +03001629 __entry->duration = duration;
1630 ),
Johannes Bergec816082012-11-16 17:22:28 +01001631 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", duration: %u",
Johannes Berg42d97a52012-11-08 18:31:02 +01001632 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001633);
1634
1635TRACE_EVENT(rdev_return_int_cookie,
1636 TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie),
1637 TP_ARGS(wiphy, ret, cookie),
1638 TP_STRUCT__entry(
1639 WIPHY_ENTRY
1640 __field(int, ret)
1641 __field(u64, cookie)
1642 ),
1643 TP_fast_assign(
1644 WIPHY_ASSIGN;
1645 __entry->ret = ret;
1646 __entry->cookie = cookie;
1647 ),
1648 TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu",
1649 WIPHY_PR_ARG, __entry->ret, __entry->cookie)
1650);
1651
1652TRACE_EVENT(rdev_cancel_remain_on_channel,
1653 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
1654 TP_ARGS(wiphy, wdev, cookie),
1655 TP_STRUCT__entry(
1656 WIPHY_ENTRY
1657 WDEV_ENTRY
1658 __field(u64, cookie)
1659 ),
1660 TP_fast_assign(
1661 WIPHY_ASSIGN;
1662 WDEV_ASSIGN;
1663 __entry->cookie = cookie;
1664 ),
Johannes Bergec816082012-11-16 17:22:28 +01001665 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001666 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1667);
1668
1669TRACE_EVENT(rdev_mgmt_tx,
1670 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
Andrei Otcheretianskib176e622013-11-18 19:06:49 +02001671 struct cfg80211_mgmt_tx_params *params),
1672 TP_ARGS(wiphy, wdev, params),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001673 TP_STRUCT__entry(
1674 WIPHY_ENTRY
1675 WDEV_ENTRY
1676 CHAN_ENTRY
1677 __field(bool, offchan)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001678 __field(unsigned int, wait)
1679 __field(bool, no_cck)
1680 __field(bool, dont_wait_for_ack)
1681 ),
1682 TP_fast_assign(
1683 WIPHY_ASSIGN;
1684 WDEV_ASSIGN;
Andrei Otcheretianskib176e622013-11-18 19:06:49 +02001685 CHAN_ASSIGN(params->chan);
1686 __entry->offchan = params->offchan;
1687 __entry->wait = params->wait;
1688 __entry->no_cck = params->no_cck;
1689 __entry->dont_wait_for_ack = params->dont_wait_for_ack;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001690 ),
Johannes Bergec816082012-11-16 17:22:28 +01001691 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s,"
Johannes Berg42d97a52012-11-08 18:31:02 +01001692 " wait: %u, no cck: %s, dont wait for ack: %s",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001693 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG,
Johannes Berg42d97a52012-11-08 18:31:02 +01001694 BOOL_TO_STR(__entry->offchan), __entry->wait,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001695 BOOL_TO_STR(__entry->no_cck),
1696 BOOL_TO_STR(__entry->dont_wait_for_ack))
1697);
1698
1699TRACE_EVENT(rdev_set_noack_map,
1700 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1701 u16 noack_map),
1702 TP_ARGS(wiphy, netdev, noack_map),
1703 TP_STRUCT__entry(
1704 WIPHY_ENTRY
1705 NETDEV_ENTRY
1706 __field(u16, noack_map)
1707 ),
1708 TP_fast_assign(
1709 WIPHY_ASSIGN;
1710 NETDEV_ASSIGN;
1711 __entry->noack_map = noack_map;
1712 ),
Johannes Bergec816082012-11-16 17:22:28 +01001713 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", noack_map: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001714 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map)
1715);
1716
Beni Lev14e8a3c2012-07-31 18:48:27 +03001717DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel,
1718 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1719 TP_ARGS(wiphy, wdev)
1720);
1721
Johannes Berg683b6d32012-11-08 21:25:48 +01001722TRACE_EVENT(rdev_return_chandef,
1723 TP_PROTO(struct wiphy *wiphy, int ret,
1724 struct cfg80211_chan_def *chandef),
1725 TP_ARGS(wiphy, ret, chandef),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001726 TP_STRUCT__entry(
1727 WIPHY_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01001728 __field(int, ret)
1729 CHAN_DEF_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001730 ),
1731 TP_fast_assign(
1732 WIPHY_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01001733 if (ret == 0)
1734 CHAN_DEF_ASSIGN(chandef);
1735 else
1736 CHAN_DEF_ASSIGN((struct cfg80211_chan_def *)NULL);
1737 __entry->ret = ret;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001738 ),
Johannes Bergec816082012-11-16 17:22:28 +01001739 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", ret: %d",
Johannes Berg683b6d32012-11-08 21:25:48 +01001740 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->ret)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001741);
1742
Johannes Bergeeb126e2012-10-23 15:16:50 +02001743DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device,
1744 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1745 TP_ARGS(wiphy, wdev)
1746);
1747
1748DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device,
1749 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1750 TP_ARGS(wiphy, wdev)
1751);
1752
Vasanthakumar Thiagarajan77765ea2013-01-18 11:18:45 +05301753TRACE_EVENT(rdev_set_mac_acl,
1754 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1755 struct cfg80211_acl_data *params),
1756 TP_ARGS(wiphy, netdev, params),
1757 TP_STRUCT__entry(
1758 WIPHY_ENTRY
1759 NETDEV_ENTRY
1760 __field(u32, acl_policy)
1761 ),
1762 TP_fast_assign(
1763 WIPHY_ASSIGN;
Vladimir Kondratiev021fcdc2013-03-07 11:08:29 +02001764 NETDEV_ASSIGN;
Vasanthakumar Thiagarajan77765ea2013-01-18 11:18:45 +05301765 __entry->acl_policy = params->acl_policy;
1766 ),
1767 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", acl policy: %d",
1768 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->acl_policy)
1769);
1770
Jouni Malinen355199e2013-02-27 17:14:27 +02001771TRACE_EVENT(rdev_update_ft_ies,
1772 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1773 struct cfg80211_update_ft_ies_params *ftie),
1774 TP_ARGS(wiphy, netdev, ftie),
1775 TP_STRUCT__entry(
1776 WIPHY_ENTRY
1777 NETDEV_ENTRY
1778 __field(u16, md)
1779 __dynamic_array(u8, ie, ftie->ie_len)
1780 ),
1781 TP_fast_assign(
1782 WIPHY_ASSIGN;
1783 NETDEV_ASSIGN;
1784 __entry->md = ftie->md;
1785 memcpy(__get_dynamic_array(ie), ftie->ie, ftie->ie_len);
1786 ),
1787 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", md: 0x%x",
1788 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->md)
1789);
1790
Arend van Spriel5de17982013-04-18 15:49:00 +02001791TRACE_EVENT(rdev_crit_proto_start,
1792 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1793 enum nl80211_crit_proto_id protocol, u16 duration),
1794 TP_ARGS(wiphy, wdev, protocol, duration),
1795 TP_STRUCT__entry(
1796 WIPHY_ENTRY
1797 WDEV_ENTRY
1798 __field(u16, proto)
1799 __field(u16, duration)
1800 ),
1801 TP_fast_assign(
1802 WIPHY_ASSIGN;
1803 WDEV_ASSIGN;
1804 __entry->proto = protocol;
1805 __entry->duration = duration;
1806 ),
1807 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", proto=%x, duration=%u",
1808 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->proto, __entry->duration)
1809);
1810
1811TRACE_EVENT(rdev_crit_proto_stop,
1812 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1813 TP_ARGS(wiphy, wdev),
1814 TP_STRUCT__entry(
1815 WIPHY_ENTRY
1816 WDEV_ENTRY
1817 ),
1818 TP_fast_assign(
1819 WIPHY_ASSIGN;
1820 WDEV_ASSIGN;
1821 ),
1822 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
1823 WIPHY_PR_ARG, WDEV_PR_ARG)
1824);
1825
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001826TRACE_EVENT(rdev_channel_switch,
1827 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1828 struct cfg80211_csa_settings *params),
1829 TP_ARGS(wiphy, netdev, params),
1830 TP_STRUCT__entry(
1831 WIPHY_ENTRY
1832 NETDEV_ENTRY
1833 CHAN_DEF_ENTRY
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001834 __field(bool, radar_required)
1835 __field(bool, block_tx)
1836 __field(u8, count)
Andrei Otcheretianski9a774c72014-05-09 14:11:46 +03001837 __dynamic_array(u16, bcn_ofs, params->n_counter_offsets_beacon)
1838 __dynamic_array(u16, pres_ofs, params->n_counter_offsets_presp)
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001839 ),
1840 TP_fast_assign(
1841 WIPHY_ASSIGN;
1842 NETDEV_ASSIGN;
1843 CHAN_DEF_ASSIGN(&params->chandef);
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001844 __entry->radar_required = params->radar_required;
1845 __entry->block_tx = params->block_tx;
1846 __entry->count = params->count;
Andrei Otcheretianski9a774c72014-05-09 14:11:46 +03001847 memcpy(__get_dynamic_array(bcn_ofs),
1848 params->counter_offsets_beacon,
1849 params->n_counter_offsets_beacon * sizeof(u16));
1850
1851 /* probe response offsets are optional */
1852 if (params->n_counter_offsets_presp)
1853 memcpy(__get_dynamic_array(pres_ofs),
1854 params->counter_offsets_presp,
1855 params->n_counter_offsets_presp * sizeof(u16));
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001856 ),
1857 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
Andrei Otcheretianski9a774c72014-05-09 14:11:46 +03001858 ", block_tx: %d, count: %u, radar_required: %d",
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001859 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
Andrei Otcheretianski9a774c72014-05-09 14:11:46 +03001860 __entry->block_tx, __entry->count, __entry->radar_required)
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001861);
1862
Kyeyoon Parkfa9ffc72013-12-16 23:01:30 -08001863TRACE_EVENT(rdev_set_qos_map,
1864 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1865 struct cfg80211_qos_map *qos_map),
1866 TP_ARGS(wiphy, netdev, qos_map),
1867 TP_STRUCT__entry(
1868 WIPHY_ENTRY
1869 NETDEV_ENTRY
1870 QOS_MAP_ENTRY
1871 ),
1872 TP_fast_assign(
1873 WIPHY_ASSIGN;
1874 NETDEV_ASSIGN;
1875 QOS_MAP_ASSIGN(qos_map);
1876 ),
1877 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", num_des: %u",
1878 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->num_des)
1879);
1880
Jouni Malinene16821b2014-04-28 11:22:08 +03001881TRACE_EVENT(rdev_set_ap_chanwidth,
1882 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1883 struct cfg80211_chan_def *chandef),
1884 TP_ARGS(wiphy, netdev, chandef),
1885 TP_STRUCT__entry(
1886 WIPHY_ENTRY
1887 NETDEV_ENTRY
1888 CHAN_DEF_ENTRY
1889 ),
1890 TP_fast_assign(
1891 WIPHY_ASSIGN;
1892 NETDEV_ASSIGN;
1893 CHAN_DEF_ASSIGN(chandef);
1894 ),
1895 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
1896 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
1897);
1898
Johannes Berg960d01a2014-09-09 22:55:35 +03001899TRACE_EVENT(rdev_add_tx_ts,
1900 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1901 u8 tsid, const u8 *peer, u8 user_prio, u16 admitted_time),
1902 TP_ARGS(wiphy, netdev, tsid, peer, user_prio, admitted_time),
1903 TP_STRUCT__entry(
1904 WIPHY_ENTRY
1905 NETDEV_ENTRY
1906 MAC_ENTRY(peer)
1907 __field(u8, tsid)
1908 __field(u8, user_prio)
1909 __field(u16, admitted_time)
1910 ),
1911 TP_fast_assign(
1912 WIPHY_ASSIGN;
1913 NETDEV_ASSIGN;
1914 MAC_ASSIGN(peer, peer);
1915 __entry->tsid = tsid;
1916 __entry->user_prio = user_prio;
1917 __entry->admitted_time = admitted_time;
1918 ),
1919 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d, UP %d, time %d",
1920 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
1921 __entry->tsid, __entry->user_prio, __entry->admitted_time)
1922);
1923
1924TRACE_EVENT(rdev_del_tx_ts,
1925 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1926 u8 tsid, const u8 *peer),
1927 TP_ARGS(wiphy, netdev, tsid, peer),
1928 TP_STRUCT__entry(
1929 WIPHY_ENTRY
1930 NETDEV_ENTRY
1931 MAC_ENTRY(peer)
1932 __field(u8, tsid)
1933 ),
1934 TP_fast_assign(
1935 WIPHY_ASSIGN;
1936 NETDEV_ASSIGN;
1937 MAC_ASSIGN(peer, peer);
1938 __entry->tsid = tsid;
1939 ),
1940 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d",
1941 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->tsid)
1942);
1943
Beni Lev4ee3e062012-08-27 12:49:39 +03001944/*************************************************************
1945 * cfg80211 exported functions traces *
1946 *************************************************************/
1947
1948TRACE_EVENT(cfg80211_return_bool,
1949 TP_PROTO(bool ret),
1950 TP_ARGS(ret),
1951 TP_STRUCT__entry(
1952 __field(bool, ret)
1953 ),
1954 TP_fast_assign(
1955 __entry->ret = ret;
1956 ),
1957 TP_printk("returned %s", BOOL_TO_STR(__entry->ret))
1958);
1959
1960DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt,
1961 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
1962 TP_ARGS(netdev, macaddr),
1963 TP_STRUCT__entry(
1964 NETDEV_ENTRY
1965 MAC_ENTRY(macaddr)
1966 ),
1967 TP_fast_assign(
1968 NETDEV_ASSIGN;
1969 MAC_ASSIGN(macaddr, macaddr);
1970 ),
1971 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
1972 NETDEV_PR_ARG, MAC_PR_ARG(macaddr))
1973);
1974
1975DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate,
1976 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
1977 TP_ARGS(netdev, macaddr)
1978);
1979
1980DECLARE_EVENT_CLASS(netdev_evt_only,
1981 TP_PROTO(struct net_device *netdev),
1982 TP_ARGS(netdev),
1983 TP_STRUCT__entry(
1984 NETDEV_ENTRY
1985 ),
1986 TP_fast_assign(
1987 NETDEV_ASSIGN;
1988 ),
1989 TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG)
1990);
1991
1992DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth,
1993 TP_PROTO(struct net_device *netdev),
1994 TP_ARGS(netdev)
1995);
1996
1997TRACE_EVENT(cfg80211_send_rx_assoc,
1998 TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss),
1999 TP_ARGS(netdev, bss),
2000 TP_STRUCT__entry(
2001 NETDEV_ENTRY
2002 MAC_ENTRY(bssid)
2003 CHAN_ENTRY
2004 ),
2005 TP_fast_assign(
2006 NETDEV_ASSIGN;
2007 MAC_ASSIGN(bssid, bss->bssid);
2008 CHAN_ASSIGN(bss->channel);
2009 ),
Johannes Bergec816082012-11-16 17:22:28 +01002010 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", " CHAN_PR_FMT,
Beni Lev4ee3e062012-08-27 12:49:39 +03002011 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
2012);
2013
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002014DECLARE_EVENT_CLASS(netdev_frame_event,
2015 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2016 TP_ARGS(netdev, buf, len),
2017 TP_STRUCT__entry(
2018 NETDEV_ENTRY
2019 __dynamic_array(u8, frame, len)
2020 ),
2021 TP_fast_assign(
2022 NETDEV_ASSIGN;
2023 memcpy(__get_dynamic_array(frame), buf, len);
2024 ),
2025 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2026 NETDEV_PR_ARG,
2027 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
Beni Lev4ee3e062012-08-27 12:49:39 +03002028);
2029
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002030DEFINE_EVENT(netdev_frame_event, cfg80211_rx_unprot_mlme_mgmt,
2031 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2032 TP_ARGS(netdev, buf, len)
Beni Lev4ee3e062012-08-27 12:49:39 +03002033);
2034
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002035DEFINE_EVENT(netdev_frame_event, cfg80211_rx_mlme_mgmt,
2036 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2037 TP_ARGS(netdev, buf, len)
Beni Lev4ee3e062012-08-27 12:49:39 +03002038);
2039
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002040TRACE_EVENT(cfg80211_tx_mlme_mgmt,
2041 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2042 TP_ARGS(netdev, buf, len),
2043 TP_STRUCT__entry(
2044 NETDEV_ENTRY
2045 __dynamic_array(u8, frame, len)
2046 ),
2047 TP_fast_assign(
2048 NETDEV_ASSIGN;
2049 memcpy(__get_dynamic_array(frame), buf, len);
2050 ),
2051 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2052 NETDEV_PR_ARG,
2053 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
Beni Lev4ee3e062012-08-27 12:49:39 +03002054);
2055
2056DECLARE_EVENT_CLASS(netdev_mac_evt,
2057 TP_PROTO(struct net_device *netdev, const u8 *mac),
2058 TP_ARGS(netdev, mac),
2059 TP_STRUCT__entry(
2060 NETDEV_ENTRY
2061 MAC_ENTRY(mac)
2062 ),
2063 TP_fast_assign(
2064 NETDEV_ASSIGN;
2065 MAC_ASSIGN(mac, mac)
2066 ),
2067 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
2068 NETDEV_PR_ARG, MAC_PR_ARG(mac))
2069);
2070
2071DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout,
2072 TP_PROTO(struct net_device *netdev, const u8 *mac),
2073 TP_ARGS(netdev, mac)
2074);
2075
2076DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout,
2077 TP_PROTO(struct net_device *netdev, const u8 *mac),
2078 TP_ARGS(netdev, mac)
2079);
2080
2081TRACE_EVENT(cfg80211_michael_mic_failure,
2082 TP_PROTO(struct net_device *netdev, const u8 *addr,
2083 enum nl80211_key_type key_type, int key_id, const u8 *tsc),
2084 TP_ARGS(netdev, addr, key_type, key_id, tsc),
2085 TP_STRUCT__entry(
2086 NETDEV_ENTRY
2087 MAC_ENTRY(addr)
2088 __field(enum nl80211_key_type, key_type)
2089 __field(int, key_id)
2090 __array(u8, tsc, 6)
2091 ),
2092 TP_fast_assign(
2093 NETDEV_ASSIGN;
2094 MAC_ASSIGN(addr, addr);
2095 __entry->key_type = key_type;
2096 __entry->key_id = key_id;
Eliad Peller8c26d452014-07-17 15:00:56 +03002097 if (tsc)
2098 memcpy(__entry->tsc, tsc, 6);
Beni Lev4ee3e062012-08-27 12:49:39 +03002099 ),
Johannes Bergec816082012-11-16 17:22:28 +01002100 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm",
Beni Lev4ee3e062012-08-27 12:49:39 +03002101 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type,
2102 __entry->key_id, __entry->tsc)
2103);
2104
2105TRACE_EVENT(cfg80211_ready_on_channel,
2106 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2107 struct ieee80211_channel *chan,
Johannes Berg42d97a52012-11-08 18:31:02 +01002108 unsigned int duration),
2109 TP_ARGS(wdev, cookie, chan, duration),
Beni Lev4ee3e062012-08-27 12:49:39 +03002110 TP_STRUCT__entry(
2111 WDEV_ENTRY
2112 __field(u64, cookie)
2113 CHAN_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002114 __field(unsigned int, duration)
2115 ),
2116 TP_fast_assign(
2117 WDEV_ASSIGN;
2118 __entry->cookie = cookie;
2119 CHAN_ASSIGN(chan);
Beni Lev4ee3e062012-08-27 12:49:39 +03002120 __entry->duration = duration;
2121 ),
Johannes Berg42d97a52012-11-08 18:31:02 +01002122 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u",
Beni Lev4ee3e062012-08-27 12:49:39 +03002123 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG,
Johannes Berg42d97a52012-11-08 18:31:02 +01002124 __entry->duration)
Beni Lev4ee3e062012-08-27 12:49:39 +03002125);
2126
2127TRACE_EVENT(cfg80211_ready_on_channel_expired,
2128 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
Johannes Berg42d97a52012-11-08 18:31:02 +01002129 struct ieee80211_channel *chan),
2130 TP_ARGS(wdev, cookie, chan),
Beni Lev4ee3e062012-08-27 12:49:39 +03002131 TP_STRUCT__entry(
2132 WDEV_ENTRY
2133 __field(u64, cookie)
2134 CHAN_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002135 ),
2136 TP_fast_assign(
2137 WDEV_ASSIGN;
2138 __entry->cookie = cookie;
2139 CHAN_ASSIGN(chan);
Beni Lev4ee3e062012-08-27 12:49:39 +03002140 ),
Johannes Berg42d97a52012-11-08 18:31:02 +01002141 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
2142 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002143);
2144
2145TRACE_EVENT(cfg80211_new_sta,
2146 TP_PROTO(struct net_device *netdev, const u8 *mac_addr,
2147 struct station_info *sinfo),
2148 TP_ARGS(netdev, mac_addr, sinfo),
2149 TP_STRUCT__entry(
2150 NETDEV_ENTRY
2151 MAC_ENTRY(mac_addr)
2152 SINFO_ENTRY
2153 ),
2154 TP_fast_assign(
2155 NETDEV_ASSIGN;
2156 MAC_ASSIGN(mac_addr, mac_addr);
2157 SINFO_ASSIGN;
2158 ),
Johannes Bergec816082012-11-16 17:22:28 +01002159 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT,
Beni Lev4ee3e062012-08-27 12:49:39 +03002160 NETDEV_PR_ARG, MAC_PR_ARG(mac_addr))
2161);
2162
2163DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta,
2164 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2165 TP_ARGS(netdev, macaddr)
2166);
2167
2168TRACE_EVENT(cfg80211_rx_mgmt,
2169 TP_PROTO(struct wireless_dev *wdev, int freq, int sig_mbm),
2170 TP_ARGS(wdev, freq, sig_mbm),
2171 TP_STRUCT__entry(
2172 WDEV_ENTRY
2173 __field(int, freq)
2174 __field(int, sig_mbm)
2175 ),
2176 TP_fast_assign(
2177 WDEV_ASSIGN;
2178 __entry->freq = freq;
2179 __entry->sig_mbm = sig_mbm;
2180 ),
2181 TP_printk(WDEV_PR_FMT ", freq: %d, sig mbm: %d",
2182 WDEV_PR_ARG, __entry->freq, __entry->sig_mbm)
2183);
2184
2185TRACE_EVENT(cfg80211_mgmt_tx_status,
2186 TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
2187 TP_ARGS(wdev, cookie, ack),
2188 TP_STRUCT__entry(
2189 WDEV_ENTRY
2190 __field(u64, cookie)
2191 __field(bool, ack)
2192 ),
2193 TP_fast_assign(
2194 WDEV_ASSIGN;
2195 __entry->cookie = cookie;
2196 __entry->ack = ack;
2197 ),
2198 TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
2199 WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
2200);
2201
2202TRACE_EVENT(cfg80211_cqm_rssi_notify,
2203 TP_PROTO(struct net_device *netdev,
2204 enum nl80211_cqm_rssi_threshold_event rssi_event),
2205 TP_ARGS(netdev, rssi_event),
2206 TP_STRUCT__entry(
2207 NETDEV_ENTRY
2208 __field(enum nl80211_cqm_rssi_threshold_event, rssi_event)
2209 ),
2210 TP_fast_assign(
2211 NETDEV_ASSIGN;
2212 __entry->rssi_event = rssi_event;
2213 ),
2214 TP_printk(NETDEV_PR_FMT ", rssi event: %d",
2215 NETDEV_PR_ARG, __entry->rssi_event)
2216);
2217
Johannes Berg683b6d32012-11-08 21:25:48 +01002218TRACE_EVENT(cfg80211_reg_can_beacon,
Ilan Peer174e0cd2014-02-23 09:13:01 +02002219 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef,
2220 enum nl80211_iftype iftype),
2221 TP_ARGS(wiphy, chandef, iftype),
Beni Lev4ee3e062012-08-27 12:49:39 +03002222 TP_STRUCT__entry(
2223 WIPHY_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01002224 CHAN_DEF_ENTRY
Ilan Peer174e0cd2014-02-23 09:13:01 +02002225 __field(enum nl80211_iftype, iftype)
Beni Lev4ee3e062012-08-27 12:49:39 +03002226 ),
2227 TP_fast_assign(
2228 WIPHY_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01002229 CHAN_DEF_ASSIGN(chandef);
Ilan Peer174e0cd2014-02-23 09:13:01 +02002230 __entry->iftype = iftype;
Beni Lev4ee3e062012-08-27 12:49:39 +03002231 ),
Ilan Peer174e0cd2014-02-23 09:13:01 +02002232 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", iftype=%d",
2233 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->iftype)
Beni Lev4ee3e062012-08-27 12:49:39 +03002234);
2235
Simon Wunderlich04f39042013-02-08 18:16:19 +01002236TRACE_EVENT(cfg80211_chandef_dfs_required,
2237 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2238 TP_ARGS(wiphy, chandef),
2239 TP_STRUCT__entry(
2240 WIPHY_ENTRY
2241 CHAN_DEF_ENTRY
2242 ),
2243 TP_fast_assign(
2244 WIPHY_ASSIGN;
2245 CHAN_DEF_ASSIGN(chandef);
2246 ),
2247 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2248 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2249);
2250
Beni Lev4ee3e062012-08-27 12:49:39 +03002251TRACE_EVENT(cfg80211_ch_switch_notify,
Johannes Berg683b6d32012-11-08 21:25:48 +01002252 TP_PROTO(struct net_device *netdev,
2253 struct cfg80211_chan_def *chandef),
2254 TP_ARGS(netdev, chandef),
Beni Lev4ee3e062012-08-27 12:49:39 +03002255 TP_STRUCT__entry(
2256 NETDEV_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01002257 CHAN_DEF_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002258 ),
2259 TP_fast_assign(
2260 NETDEV_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01002261 CHAN_DEF_ASSIGN(chandef);
Beni Lev4ee3e062012-08-27 12:49:39 +03002262 ),
Johannes Bergec816082012-11-16 17:22:28 +01002263 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
Johannes Berg683b6d32012-11-08 21:25:48 +01002264 NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002265);
2266
Simon Wunderlich04f39042013-02-08 18:16:19 +01002267TRACE_EVENT(cfg80211_radar_event,
2268 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2269 TP_ARGS(wiphy, chandef),
2270 TP_STRUCT__entry(
2271 WIPHY_ENTRY
2272 CHAN_DEF_ENTRY
2273 ),
2274 TP_fast_assign(
2275 WIPHY_ASSIGN;
2276 CHAN_DEF_ASSIGN(chandef);
2277 ),
2278 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2279 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2280);
2281
2282TRACE_EVENT(cfg80211_cac_event,
2283 TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt),
2284 TP_ARGS(netdev, evt),
2285 TP_STRUCT__entry(
2286 NETDEV_ENTRY
2287 __field(enum nl80211_radar_event, evt)
2288 ),
2289 TP_fast_assign(
2290 NETDEV_ASSIGN;
2291 __entry->evt = evt;
2292 ),
2293 TP_printk(NETDEV_PR_FMT ", event: %d",
2294 NETDEV_PR_ARG, __entry->evt)
2295);
2296
Beni Lev4ee3e062012-08-27 12:49:39 +03002297DECLARE_EVENT_CLASS(cfg80211_rx_evt,
2298 TP_PROTO(struct net_device *netdev, const u8 *addr),
2299 TP_ARGS(netdev, addr),
2300 TP_STRUCT__entry(
2301 NETDEV_ENTRY
2302 MAC_ENTRY(addr)
2303 ),
2304 TP_fast_assign(
2305 NETDEV_ASSIGN;
2306 MAC_ASSIGN(addr, addr);
2307 ),
Johannes Bergec816082012-11-16 17:22:28 +01002308 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr))
Beni Lev4ee3e062012-08-27 12:49:39 +03002309);
2310
Beni Lev4ee3e062012-08-27 12:49:39 +03002311DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame,
2312 TP_PROTO(struct net_device *netdev, const u8 *addr),
2313 TP_ARGS(netdev, addr)
2314);
2315
2316DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame,
2317 TP_PROTO(struct net_device *netdev, const u8 *addr),
2318 TP_ARGS(netdev, addr)
2319);
2320
Antonio Quartullife94f3a2014-01-29 17:53:43 +01002321TRACE_EVENT(cfg80211_ibss_joined,
2322 TP_PROTO(struct net_device *netdev, const u8 *bssid,
2323 struct ieee80211_channel *channel),
2324 TP_ARGS(netdev, bssid, channel),
2325 TP_STRUCT__entry(
2326 NETDEV_ENTRY
2327 MAC_ENTRY(bssid)
2328 CHAN_ENTRY
2329 ),
2330 TP_fast_assign(
2331 NETDEV_ASSIGN;
2332 MAC_ASSIGN(bssid, bssid);
2333 CHAN_ASSIGN(channel);
2334 ),
2335 TP_printk(NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", " CHAN_PR_FMT,
2336 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
2337);
2338
Beni Lev4ee3e062012-08-27 12:49:39 +03002339TRACE_EVENT(cfg80211_probe_status,
2340 TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie,
2341 bool acked),
2342 TP_ARGS(netdev, addr, cookie, acked),
2343 TP_STRUCT__entry(
2344 NETDEV_ENTRY
2345 MAC_ENTRY(addr)
2346 __field(u64, cookie)
2347 __field(bool, acked)
2348 ),
2349 TP_fast_assign(
2350 NETDEV_ASSIGN;
2351 MAC_ASSIGN(addr, addr);
2352 __entry->cookie = cookie;
2353 __entry->acked = acked;
2354 ),
Johannes Bergec816082012-11-16 17:22:28 +01002355 TP_printk(NETDEV_PR_FMT " addr:" MAC_PR_FMT ", cookie: %llu, acked: %s",
Beni Lev4ee3e062012-08-27 12:49:39 +03002356 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie,
2357 BOOL_TO_STR(__entry->acked))
2358);
2359
2360TRACE_EVENT(cfg80211_cqm_pktloss_notify,
2361 TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets),
2362 TP_ARGS(netdev, peer, num_packets),
2363 TP_STRUCT__entry(
2364 NETDEV_ENTRY
2365 MAC_ENTRY(peer)
2366 __field(u32, num_packets)
2367 ),
2368 TP_fast_assign(
2369 NETDEV_ASSIGN;
2370 MAC_ASSIGN(peer, peer);
2371 __entry->num_packets = num_packets;
2372 ),
2373 TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u",
2374 NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets)
2375);
2376
2377DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify,
2378 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2379 TP_ARGS(netdev, macaddr)
2380);
2381
2382TRACE_EVENT(cfg80211_pmksa_candidate_notify,
2383 TP_PROTO(struct net_device *netdev, int index, const u8 *bssid,
2384 bool preauth),
2385 TP_ARGS(netdev, index, bssid, preauth),
2386 TP_STRUCT__entry(
2387 NETDEV_ENTRY
2388 __field(int, index)
2389 MAC_ENTRY(bssid)
2390 __field(bool, preauth)
2391 ),
2392 TP_fast_assign(
2393 NETDEV_ASSIGN;
2394 __entry->index = index;
2395 MAC_ASSIGN(bssid, bssid);
2396 __entry->preauth = preauth;
2397 ),
2398 TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s",
2399 NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid),
2400 BOOL_TO_STR(__entry->preauth))
2401);
2402
2403TRACE_EVENT(cfg80211_report_obss_beacon,
2404 TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len,
2405 int freq, int sig_dbm),
2406 TP_ARGS(wiphy, frame, len, freq, sig_dbm),
2407 TP_STRUCT__entry(
2408 WIPHY_ENTRY
2409 __field(int, freq)
2410 __field(int, sig_dbm)
2411 ),
2412 TP_fast_assign(
2413 WIPHY_ASSIGN;
2414 __entry->freq = freq;
2415 __entry->sig_dbm = sig_dbm;
2416 ),
2417 TP_printk(WIPHY_PR_FMT ", freq: %d, sig_dbm: %d",
2418 WIPHY_PR_ARG, __entry->freq, __entry->sig_dbm)
2419);
2420
Jouni Malinen3475b092012-11-16 22:49:57 +02002421TRACE_EVENT(cfg80211_tdls_oper_request,
2422 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer,
2423 enum nl80211_tdls_operation oper, u16 reason_code),
2424 TP_ARGS(wiphy, netdev, peer, oper, reason_code),
2425 TP_STRUCT__entry(
2426 WIPHY_ENTRY
2427 NETDEV_ENTRY
2428 MAC_ENTRY(peer)
2429 __field(enum nl80211_tdls_operation, oper)
2430 __field(u16, reason_code)
2431 ),
2432 TP_fast_assign(
2433 WIPHY_ASSIGN;
2434 NETDEV_ASSIGN;
2435 MAC_ASSIGN(peer, peer);
2436 __entry->oper = oper;
2437 __entry->reason_code = reason_code;
2438 ),
2439 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", oper: %d, reason_code %u",
2440 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper,
2441 __entry->reason_code)
2442 );
2443
Beni Lev4ee3e062012-08-27 12:49:39 +03002444TRACE_EVENT(cfg80211_scan_done,
2445 TP_PROTO(struct cfg80211_scan_request *request, bool aborted),
2446 TP_ARGS(request, aborted),
2447 TP_STRUCT__entry(
2448 __field(u32, n_channels)
2449 __dynamic_array(u8, ie, request ? request->ie_len : 0)
2450 __array(u32, rates, IEEE80211_NUM_BANDS)
2451 __field(u32, wdev_id)
2452 MAC_ENTRY(wiphy_mac)
2453 __field(bool, no_cck)
2454 __field(bool, aborted)
2455 ),
2456 TP_fast_assign(
2457 if (request) {
2458 memcpy(__get_dynamic_array(ie), request->ie,
2459 request->ie_len);
2460 memcpy(__entry->rates, request->rates,
2461 IEEE80211_NUM_BANDS);
2462 __entry->wdev_id = request->wdev ?
2463 request->wdev->identifier : 0;
2464 if (request->wiphy)
2465 MAC_ASSIGN(wiphy_mac,
2466 request->wiphy->perm_addr);
2467 __entry->no_cck = request->no_cck;
2468 }
2469 __entry->aborted = aborted;
2470 ),
2471 TP_printk("aborted: %s", BOOL_TO_STR(__entry->aborted))
2472);
2473
2474DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_results,
2475 TP_PROTO(struct wiphy *wiphy),
2476 TP_ARGS(wiphy)
2477);
2478
2479DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_stopped,
2480 TP_PROTO(struct wiphy *wiphy),
2481 TP_ARGS(wiphy)
2482);
2483
2484TRACE_EVENT(cfg80211_get_bss,
2485 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
2486 const u8 *bssid, const u8 *ssid, size_t ssid_len,
2487 u16 capa_mask, u16 capa_val),
2488 TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, capa_mask, capa_val),
2489 TP_STRUCT__entry(
2490 WIPHY_ENTRY
2491 CHAN_ENTRY
2492 MAC_ENTRY(bssid)
2493 __dynamic_array(u8, ssid, ssid_len)
2494 __field(u16, capa_mask)
2495 __field(u16, capa_val)
2496 ),
2497 TP_fast_assign(
2498 WIPHY_ASSIGN;
2499 CHAN_ASSIGN(channel);
2500 MAC_ASSIGN(bssid, bssid);
2501 memcpy(__get_dynamic_array(ssid), ssid, ssid_len);
2502 __entry->capa_mask = capa_mask;
2503 __entry->capa_val = capa_val;
2504 ),
Johannes Bergec816082012-11-16 17:22:28 +01002505 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT ", buf: %#.2x, "
Beni Lev4ee3e062012-08-27 12:49:39 +03002506 "capa_mask: %d, capa_val: %u", WIPHY_PR_ARG, CHAN_PR_ARG,
2507 MAC_PR_ARG(bssid), ((u8 *)__get_dynamic_array(ssid))[0],
2508 __entry->capa_mask, __entry->capa_val)
2509);
2510
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002511TRACE_EVENT(cfg80211_inform_bss_width_frame,
Beni Lev4ee3e062012-08-27 12:49:39 +03002512 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002513 enum nl80211_bss_scan_width scan_width,
Beni Lev4ee3e062012-08-27 12:49:39 +03002514 struct ieee80211_mgmt *mgmt, size_t len,
2515 s32 signal),
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002516 TP_ARGS(wiphy, channel, scan_width, mgmt, len, signal),
Beni Lev4ee3e062012-08-27 12:49:39 +03002517 TP_STRUCT__entry(
2518 WIPHY_ENTRY
2519 CHAN_ENTRY
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002520 __field(enum nl80211_bss_scan_width, scan_width)
Beni Lev4ee3e062012-08-27 12:49:39 +03002521 __dynamic_array(u8, mgmt, len)
2522 __field(s32, signal)
2523 ),
2524 TP_fast_assign(
2525 WIPHY_ASSIGN;
2526 CHAN_ASSIGN(channel);
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002527 __entry->scan_width = scan_width;
Beni Lev4ee3e062012-08-27 12:49:39 +03002528 if (mgmt)
2529 memcpy(__get_dynamic_array(mgmt), mgmt, len);
2530 __entry->signal = signal;
2531 ),
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002532 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT "(scan_width: %d) signal: %d",
2533 WIPHY_PR_ARG, CHAN_PR_ARG, __entry->scan_width,
2534 __entry->signal)
Beni Lev4ee3e062012-08-27 12:49:39 +03002535);
2536
2537DECLARE_EVENT_CLASS(cfg80211_bss_evt,
2538 TP_PROTO(struct cfg80211_bss *pub),
2539 TP_ARGS(pub),
2540 TP_STRUCT__entry(
2541 MAC_ENTRY(bssid)
2542 CHAN_ENTRY
2543 ),
2544 TP_fast_assign(
2545 MAC_ASSIGN(bssid, pub->bssid);
2546 CHAN_ASSIGN(pub->channel);
2547 ),
Johannes Bergec816082012-11-16 17:22:28 +01002548 TP_printk(MAC_PR_FMT ", " CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002549);
2550
2551DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss,
2552 TP_PROTO(struct cfg80211_bss *pub),
2553 TP_ARGS(pub)
2554);
2555
2556TRACE_EVENT(cfg80211_return_uint,
2557 TP_PROTO(unsigned int ret),
2558 TP_ARGS(ret),
2559 TP_STRUCT__entry(
2560 __field(unsigned int, ret)
2561 ),
2562 TP_fast_assign(
2563 __entry->ret = ret;
2564 ),
2565 TP_printk("ret: %d", __entry->ret)
2566);
2567
2568TRACE_EVENT(cfg80211_return_u32,
2569 TP_PROTO(u32 ret),
2570 TP_ARGS(ret),
2571 TP_STRUCT__entry(
2572 __field(u32, ret)
2573 ),
2574 TP_fast_assign(
2575 __entry->ret = ret;
2576 ),
2577 TP_printk("ret: %u", __entry->ret)
2578);
2579
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002580TRACE_EVENT(cfg80211_report_wowlan_wakeup,
2581 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2582 struct cfg80211_wowlan_wakeup *wakeup),
2583 TP_ARGS(wiphy, wdev, wakeup),
2584 TP_STRUCT__entry(
2585 WIPHY_ENTRY
2586 WDEV_ENTRY
Johannes Berga92eecb2013-04-29 12:09:14 +02002587 __field(bool, non_wireless)
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002588 __field(bool, disconnect)
2589 __field(bool, magic_pkt)
2590 __field(bool, gtk_rekey_failure)
2591 __field(bool, eap_identity_req)
2592 __field(bool, four_way_handshake)
2593 __field(bool, rfkill_release)
2594 __field(s32, pattern_idx)
2595 __field(u32, packet_len)
Johannes Berga92eecb2013-04-29 12:09:14 +02002596 __dynamic_array(u8, packet,
2597 wakeup ? wakeup->packet_present_len : 0)
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002598 ),
2599 TP_fast_assign(
2600 WIPHY_ASSIGN;
2601 WDEV_ASSIGN;
Johannes Berga92eecb2013-04-29 12:09:14 +02002602 __entry->non_wireless = !wakeup;
2603 __entry->disconnect = wakeup ? wakeup->disconnect : false;
2604 __entry->magic_pkt = wakeup ? wakeup->magic_pkt : false;
2605 __entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false;
2606 __entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false;
2607 __entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false;
2608 __entry->rfkill_release = wakeup ? wakeup->rfkill_release : false;
2609 __entry->pattern_idx = wakeup ? wakeup->pattern_idx : false;
2610 __entry->packet_len = wakeup ? wakeup->packet_len : false;
2611 if (wakeup && wakeup->packet && wakeup->packet_present_len)
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002612 memcpy(__get_dynamic_array(packet), wakeup->packet,
2613 wakeup->packet_present_len);
2614 ),
2615 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
2616);
2617
Jouni Malinen355199e2013-02-27 17:14:27 +02002618TRACE_EVENT(cfg80211_ft_event,
2619 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2620 struct cfg80211_ft_event_params *ft_event),
2621 TP_ARGS(wiphy, netdev, ft_event),
2622 TP_STRUCT__entry(
2623 WIPHY_ENTRY
2624 NETDEV_ENTRY
2625 __dynamic_array(u8, ies, ft_event->ies_len)
2626 MAC_ENTRY(target_ap)
2627 __dynamic_array(u8, ric_ies, ft_event->ric_ies_len)
2628 ),
2629 TP_fast_assign(
2630 WIPHY_ASSIGN;
2631 NETDEV_ASSIGN;
2632 if (ft_event->ies)
2633 memcpy(__get_dynamic_array(ies), ft_event->ies,
2634 ft_event->ies_len);
2635 MAC_ASSIGN(target_ap, ft_event->target_ap);
2636 if (ft_event->ric_ies)
2637 memcpy(__get_dynamic_array(ric_ies), ft_event->ric_ies,
2638 ft_event->ric_ies_len);
2639 ),
2640 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", target_ap: " MAC_PR_FMT,
2641 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(target_ap))
2642);
2643
Michal Kaziorf04c2202014-04-09 15:11:01 +02002644TRACE_EVENT(cfg80211_stop_iface,
2645 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2646 TP_ARGS(wiphy, wdev),
2647 TP_STRUCT__entry(
2648 WIPHY_ENTRY
2649 WDEV_ENTRY
2650 ),
2651 TP_fast_assign(
2652 WIPHY_ASSIGN;
2653 WDEV_ASSIGN;
2654 ),
2655 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
2656 WIPHY_PR_ARG, WDEV_PR_ARG)
2657);
2658
Beni Lev14e8a3c2012-07-31 18:48:27 +03002659#endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
2660
2661#undef TRACE_INCLUDE_PATH
2662#define TRACE_INCLUDE_PATH .
2663#undef TRACE_INCLUDE_FILE
2664#define TRACE_INCLUDE_FILE trace
2665#include <trace/define_trace.h>