blob: aabccf13e07b6860ef92ddc637a7879a8f961aab [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
301DEFINE_EVENT(wiphy_only_evt, rdev_get_ringparam,
302 TP_PROTO(struct wiphy *wiphy),
303 TP_ARGS(wiphy)
304);
305
306DEFINE_EVENT(wiphy_only_evt, rdev_get_antenna,
307 TP_PROTO(struct wiphy *wiphy),
308 TP_ARGS(wiphy)
309);
310
Beni Lev14e8a3c2012-07-31 18:48:27 +0300311DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll,
312 TP_PROTO(struct wiphy *wiphy),
313 TP_ARGS(wiphy)
314);
315
316DECLARE_EVENT_CLASS(wiphy_enabled_evt,
317 TP_PROTO(struct wiphy *wiphy, bool enabled),
318 TP_ARGS(wiphy, enabled),
319 TP_STRUCT__entry(
320 WIPHY_ENTRY
321 __field(bool, enabled)
322 ),
323 TP_fast_assign(
324 WIPHY_ASSIGN;
325 __entry->enabled = enabled;
326 ),
327 TP_printk(WIPHY_PR_FMT ", %senabled ",
328 WIPHY_PR_ARG, __entry->enabled ? "" : "not ")
329);
330
331DEFINE_EVENT(wiphy_enabled_evt, rdev_set_wakeup,
332 TP_PROTO(struct wiphy *wiphy, bool enabled),
333 TP_ARGS(wiphy, enabled)
334);
335
336TRACE_EVENT(rdev_add_virtual_intf,
337 TP_PROTO(struct wiphy *wiphy, char *name, enum nl80211_iftype type),
338 TP_ARGS(wiphy, name, type),
339 TP_STRUCT__entry(
340 WIPHY_ENTRY
341 __string(vir_intf_name, name ? name : "<noname>")
342 __field(enum nl80211_iftype, type)
343 ),
344 TP_fast_assign(
345 WIPHY_ASSIGN;
346 __assign_str(vir_intf_name, name ? name : "<noname>");
347 __entry->type = type;
348 ),
349 TP_printk(WIPHY_PR_FMT ", virtual intf name: %s, type: %d",
350 WIPHY_PR_ARG, __get_str(vir_intf_name), __entry->type)
351);
352
353DECLARE_EVENT_CLASS(wiphy_wdev_evt,
354 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
355 TP_ARGS(wiphy, wdev),
356 TP_STRUCT__entry(
357 WIPHY_ENTRY
358 WDEV_ENTRY
359 ),
360 TP_fast_assign(
361 WIPHY_ASSIGN;
362 WDEV_ASSIGN;
363 ),
Johannes Bergec816082012-11-16 17:22:28 +0100364 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300365);
366
367DEFINE_EVENT(wiphy_wdev_evt, rdev_return_wdev,
368 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
369 TP_ARGS(wiphy, wdev)
370);
371
372DEFINE_EVENT(wiphy_wdev_evt, rdev_del_virtual_intf,
373 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
374 TP_ARGS(wiphy, wdev)
375);
376
377TRACE_EVENT(rdev_change_virtual_intf,
378 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
379 enum nl80211_iftype type),
380 TP_ARGS(wiphy, netdev, type),
381 TP_STRUCT__entry(
382 WIPHY_ENTRY
383 NETDEV_ENTRY
384 __field(enum nl80211_iftype, type)
385 ),
386 TP_fast_assign(
387 WIPHY_ASSIGN;
388 NETDEV_ASSIGN;
389 __entry->type = type;
390 ),
Johannes Bergec816082012-11-16 17:22:28 +0100391 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", type: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300392 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->type)
393);
394
395DECLARE_EVENT_CLASS(key_handle,
396 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
397 bool pairwise, const u8 *mac_addr),
398 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr),
399 TP_STRUCT__entry(
400 WIPHY_ENTRY
401 NETDEV_ENTRY
402 MAC_ENTRY(mac_addr)
403 __field(u8, key_index)
404 __field(bool, pairwise)
405 ),
406 TP_fast_assign(
407 WIPHY_ASSIGN;
408 NETDEV_ASSIGN;
409 MAC_ASSIGN(mac_addr, mac_addr);
410 __entry->key_index = key_index;
411 __entry->pairwise = pairwise;
412 ),
Johannes Bergec816082012-11-16 17:22:28 +0100413 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 +0300414 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
415 BOOL_TO_STR(__entry->pairwise), MAC_PR_ARG(mac_addr))
416);
417
418DEFINE_EVENT(key_handle, rdev_add_key,
419 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
420 bool pairwise, const u8 *mac_addr),
421 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
422);
423
424DEFINE_EVENT(key_handle, rdev_get_key,
425 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
426 bool pairwise, const u8 *mac_addr),
427 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
428);
429
430DEFINE_EVENT(key_handle, rdev_del_key,
431 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
432 bool pairwise, const u8 *mac_addr),
433 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
434);
435
436TRACE_EVENT(rdev_set_default_key,
437 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
438 bool unicast, bool multicast),
439 TP_ARGS(wiphy, netdev, key_index, unicast, multicast),
440 TP_STRUCT__entry(
441 WIPHY_ENTRY
442 NETDEV_ENTRY
443 __field(u8, key_index)
444 __field(bool, unicast)
445 __field(bool, multicast)
446 ),
447 TP_fast_assign(
448 WIPHY_ASSIGN;
449 NETDEV_ASSIGN;
450 __entry->key_index = key_index;
451 __entry->unicast = unicast;
452 __entry->multicast = multicast;
453 ),
Johannes Bergec816082012-11-16 17:22:28 +0100454 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u, unicast: %s, multicast: %s",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300455 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
456 BOOL_TO_STR(__entry->unicast),
457 BOOL_TO_STR(__entry->multicast))
458);
459
460TRACE_EVENT(rdev_set_default_mgmt_key,
461 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index),
462 TP_ARGS(wiphy, netdev, key_index),
463 TP_STRUCT__entry(
464 WIPHY_ENTRY
465 NETDEV_ENTRY
466 __field(u8, key_index)
467 ),
468 TP_fast_assign(
469 WIPHY_ASSIGN;
470 NETDEV_ASSIGN;
471 __entry->key_index = key_index;
472 ),
Johannes Bergec816082012-11-16 17:22:28 +0100473 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300474 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index)
475);
476
477TRACE_EVENT(rdev_start_ap,
478 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
479 struct cfg80211_ap_settings *settings),
480 TP_ARGS(wiphy, netdev, settings),
481 TP_STRUCT__entry(
482 WIPHY_ENTRY
483 NETDEV_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +0100484 CHAN_DEF_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +0300485 __field(int, beacon_interval)
486 __field(int, dtim_period)
487 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
488 __field(enum nl80211_hidden_ssid, hidden_ssid)
489 __field(u32, wpa_ver)
490 __field(bool, privacy)
491 __field(enum nl80211_auth_type, auth_type)
492 __field(int, inactivity_timeout)
493 ),
494 TP_fast_assign(
495 WIPHY_ASSIGN;
496 NETDEV_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +0100497 CHAN_DEF_ASSIGN(&settings->chandef);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300498 __entry->beacon_interval = settings->beacon_interval;
499 __entry->dtim_period = settings->dtim_period;
500 __entry->hidden_ssid = settings->hidden_ssid;
501 __entry->wpa_ver = settings->crypto.wpa_versions;
502 __entry->privacy = settings->privacy;
503 __entry->auth_type = settings->auth_type;
504 __entry->inactivity_timeout = settings->inactivity_timeout;
505 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
506 memcpy(__entry->ssid, settings->ssid, settings->ssid_len);
507 ),
Johannes Bergec816082012-11-16 17:22:28 +0100508 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", AP settings - ssid: %s, "
Johannes Berg683b6d32012-11-08 21:25:48 +0100509 CHAN_DEF_PR_FMT ", beacon interval: %d, dtim period: %d, "
Beni Lev14e8a3c2012-07-31 18:48:27 +0300510 "hidden ssid: %d, wpa versions: %u, privacy: %s, "
511 "auth type: %d, inactivity timeout: %d",
Johannes Berg683b6d32012-11-08 21:25:48 +0100512 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ssid, CHAN_DEF_PR_ARG,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300513 __entry->beacon_interval, __entry->dtim_period,
514 __entry->hidden_ssid, __entry->wpa_ver,
515 BOOL_TO_STR(__entry->privacy), __entry->auth_type,
516 __entry->inactivity_timeout)
517);
518
519TRACE_EVENT(rdev_change_beacon,
520 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
521 struct cfg80211_beacon_data *info),
522 TP_ARGS(wiphy, netdev, info),
523 TP_STRUCT__entry(
524 WIPHY_ENTRY
525 NETDEV_ENTRY
526 __dynamic_array(u8, head, info ? info->head_len : 0)
527 __dynamic_array(u8, tail, info ? info->tail_len : 0)
528 __dynamic_array(u8, beacon_ies, info ? info->beacon_ies_len : 0)
529 __dynamic_array(u8, proberesp_ies,
530 info ? info->proberesp_ies_len : 0)
531 __dynamic_array(u8, assocresp_ies,
532 info ? info->assocresp_ies_len : 0)
533 __dynamic_array(u8, probe_resp, info ? info->probe_resp_len : 0)
534 ),
535 TP_fast_assign(
536 WIPHY_ASSIGN;
537 NETDEV_ASSIGN;
538 if (info) {
539 if (info->head)
540 memcpy(__get_dynamic_array(head), info->head,
541 info->head_len);
542 if (info->tail)
543 memcpy(__get_dynamic_array(tail), info->tail,
544 info->tail_len);
545 if (info->beacon_ies)
546 memcpy(__get_dynamic_array(beacon_ies),
547 info->beacon_ies, info->beacon_ies_len);
548 if (info->proberesp_ies)
549 memcpy(__get_dynamic_array(proberesp_ies),
550 info->proberesp_ies,
551 info->proberesp_ies_len);
552 if (info->assocresp_ies)
553 memcpy(__get_dynamic_array(assocresp_ies),
554 info->assocresp_ies,
555 info->assocresp_ies_len);
556 if (info->probe_resp)
557 memcpy(__get_dynamic_array(probe_resp),
558 info->probe_resp, info->probe_resp_len);
559 }
560 ),
Johannes Bergec816082012-11-16 17:22:28 +0100561 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300562);
563
564DECLARE_EVENT_CLASS(wiphy_netdev_evt,
565 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
566 TP_ARGS(wiphy, netdev),
567 TP_STRUCT__entry(
568 WIPHY_ENTRY
569 NETDEV_ENTRY
570 ),
571 TP_fast_assign(
572 WIPHY_ASSIGN;
573 NETDEV_ASSIGN;
574 ),
Johannes Bergec816082012-11-16 17:22:28 +0100575 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300576);
577
578DEFINE_EVENT(wiphy_netdev_evt, rdev_stop_ap,
579 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
580 TP_ARGS(wiphy, netdev)
581);
582
583DEFINE_EVENT(wiphy_netdev_evt, rdev_get_et_stats,
584 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
585 TP_ARGS(wiphy, netdev)
586);
587
588DEFINE_EVENT(wiphy_netdev_evt, rdev_sched_scan_stop,
589 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
590 TP_ARGS(wiphy, netdev)
591);
592
593DEFINE_EVENT(wiphy_netdev_evt, rdev_set_rekey_data,
594 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
595 TP_ARGS(wiphy, netdev)
596);
597
598DEFINE_EVENT(wiphy_netdev_evt, rdev_get_mesh_config,
599 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
600 TP_ARGS(wiphy, netdev)
601);
602
603DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_mesh,
604 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
605 TP_ARGS(wiphy, netdev)
606);
607
608DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ibss,
609 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
610 TP_ARGS(wiphy, netdev)
611);
612
613DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa,
614 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
615 TP_ARGS(wiphy, netdev)
616);
617
618DECLARE_EVENT_CLASS(station_add_change,
619 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
620 struct station_parameters *params),
621 TP_ARGS(wiphy, netdev, mac, params),
622 TP_STRUCT__entry(
623 WIPHY_ENTRY
624 NETDEV_ENTRY
625 MAC_ENTRY(sta_mac)
626 __field(u32, sta_flags_mask)
627 __field(u32, sta_flags_set)
628 __field(u32, sta_modify_mask)
629 __field(int, listen_interval)
630 __field(u16, aid)
631 __field(u8, plink_action)
632 __field(u8, plink_state)
633 __field(u8, uapsd_queues)
634 __array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap))
635 ),
636 TP_fast_assign(
637 WIPHY_ASSIGN;
638 NETDEV_ASSIGN;
639 MAC_ASSIGN(sta_mac, mac);
640 __entry->sta_flags_mask = params->sta_flags_mask;
641 __entry->sta_flags_set = params->sta_flags_set;
642 __entry->sta_modify_mask = params->sta_modify_mask;
643 __entry->listen_interval = params->listen_interval;
644 __entry->aid = params->aid;
645 __entry->plink_action = params->plink_action;
646 __entry->plink_state = params->plink_state;
647 __entry->uapsd_queues = params->uapsd_queues;
648 memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap));
649 if (params->ht_capa)
650 memcpy(__entry->ht_capa, params->ht_capa,
651 sizeof(struct ieee80211_ht_cap));
652 ),
Johannes Bergec816082012-11-16 17:22:28 +0100653 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +0300654 ", station flags mask: %u, station flags set: %u, "
655 "station modify mask: %u, listen interval: %d, aid: %u, "
656 "plink action: %u, plink state: %u, uapsd queues: %u",
657 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
658 __entry->sta_flags_mask, __entry->sta_flags_set,
659 __entry->sta_modify_mask, __entry->listen_interval,
660 __entry->aid, __entry->plink_action, __entry->plink_state,
661 __entry->uapsd_queues)
662);
663
664DEFINE_EVENT(station_add_change, rdev_add_station,
665 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
666 struct station_parameters *params),
667 TP_ARGS(wiphy, netdev, mac, params)
668);
669
670DEFINE_EVENT(station_add_change, rdev_change_station,
671 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
672 struct station_parameters *params),
673 TP_ARGS(wiphy, netdev, mac, params)
674);
675
676DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt,
677 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
678 TP_ARGS(wiphy, netdev, mac),
679 TP_STRUCT__entry(
680 WIPHY_ENTRY
681 NETDEV_ENTRY
682 MAC_ENTRY(sta_mac)
683 ),
684 TP_fast_assign(
685 WIPHY_ASSIGN;
686 NETDEV_ASSIGN;
687 MAC_ASSIGN(sta_mac, mac);
688 ),
Johannes Bergec816082012-11-16 17:22:28 +0100689 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300690 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac))
691);
692
693DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_station,
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_get_station,
699 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
700 TP_ARGS(wiphy, netdev, mac)
701);
702
703DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath,
704 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
705 TP_ARGS(wiphy, netdev, mac)
706);
707
708DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_set_wds_peer,
709 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
710 TP_ARGS(wiphy, netdev, mac)
711);
712
713TRACE_EVENT(rdev_dump_station,
714 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
715 u8 *mac),
716 TP_ARGS(wiphy, netdev, idx, mac),
717 TP_STRUCT__entry(
718 WIPHY_ENTRY
719 NETDEV_ENTRY
720 MAC_ENTRY(sta_mac)
721 __field(int, idx)
722 ),
723 TP_fast_assign(
724 WIPHY_ASSIGN;
725 NETDEV_ASSIGN;
726 MAC_ASSIGN(sta_mac, mac);
727 __entry->idx = idx;
728 ),
Johannes Bergec816082012-11-16 17:22:28 +0100729 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT ", idx: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300730 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
731 __entry->idx)
732);
733
734TRACE_EVENT(rdev_return_int_station_info,
735 TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo),
736 TP_ARGS(wiphy, ret, sinfo),
737 TP_STRUCT__entry(
738 WIPHY_ENTRY
739 __field(int, ret)
740 SINFO_ENTRY
741 ),
742 TP_fast_assign(
743 WIPHY_ASSIGN;
744 __entry->ret = ret;
745 SINFO_ASSIGN;
746 ),
747 TP_printk(WIPHY_PR_FMT ", returned %d" ,
748 WIPHY_PR_ARG, __entry->ret)
749);
750
751DECLARE_EVENT_CLASS(mpath_evt,
752 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
753 u8 *next_hop),
754 TP_ARGS(wiphy, netdev, dst, next_hop),
755 TP_STRUCT__entry(
756 WIPHY_ENTRY
757 NETDEV_ENTRY
758 MAC_ENTRY(dst)
759 MAC_ENTRY(next_hop)
760 ),
761 TP_fast_assign(
762 WIPHY_ASSIGN;
763 NETDEV_ASSIGN;
764 MAC_ASSIGN(dst, dst);
765 MAC_ASSIGN(next_hop, next_hop);
766 ),
Johannes Bergec816082012-11-16 17:22:28 +0100767 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT ", next hop: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300768 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dst),
769 MAC_PR_ARG(next_hop))
770);
771
772DEFINE_EVENT(mpath_evt, rdev_add_mpath,
773 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
774 u8 *next_hop),
775 TP_ARGS(wiphy, netdev, dst, next_hop)
776);
777
778DEFINE_EVENT(mpath_evt, rdev_change_mpath,
779 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
780 u8 *next_hop),
781 TP_ARGS(wiphy, netdev, dst, next_hop)
782);
783
784DEFINE_EVENT(mpath_evt, rdev_get_mpath,
785 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
786 u8 *next_hop),
787 TP_ARGS(wiphy, netdev, dst, next_hop)
788);
789
790TRACE_EVENT(rdev_dump_mpath,
791 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
792 u8 *dst, u8 *next_hop),
793 TP_ARGS(wiphy, netdev, idx, dst, next_hop),
794 TP_STRUCT__entry(
795 WIPHY_ENTRY
796 NETDEV_ENTRY
797 MAC_ENTRY(dst)
798 MAC_ENTRY(next_hop)
799 __field(int, idx)
800 ),
801 TP_fast_assign(
802 WIPHY_ASSIGN;
803 NETDEV_ASSIGN;
804 MAC_ASSIGN(dst, dst);
805 MAC_ASSIGN(next_hop, next_hop);
806 __entry->idx = idx;
807 ),
Johannes Bergec816082012-11-16 17:22:28 +0100808 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
Beni Lev14e8a3c2012-07-31 18:48:27 +0300809 MAC_PR_FMT ", next hop: " MAC_PR_FMT,
810 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
811 MAC_PR_ARG(next_hop))
812);
813
814TRACE_EVENT(rdev_return_int_mpath_info,
815 TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo),
816 TP_ARGS(wiphy, ret, pinfo),
817 TP_STRUCT__entry(
818 WIPHY_ENTRY
819 __field(int, ret)
820 __field(int, generation)
821 __field(u32, filled)
822 __field(u32, frame_qlen)
823 __field(u32, sn)
824 __field(u32, metric)
825 __field(u32, exptime)
826 __field(u32, discovery_timeout)
827 __field(u8, discovery_retries)
828 __field(u8, flags)
829 ),
830 TP_fast_assign(
831 WIPHY_ASSIGN;
832 __entry->ret = ret;
833 __entry->generation = pinfo->generation;
834 __entry->filled = pinfo->filled;
835 __entry->frame_qlen = pinfo->frame_qlen;
836 __entry->sn = pinfo->sn;
837 __entry->metric = pinfo->metric;
838 __entry->exptime = pinfo->exptime;
839 __entry->discovery_timeout = pinfo->discovery_timeout;
840 __entry->discovery_retries = pinfo->discovery_retries;
841 __entry->flags = pinfo->flags;
842 ),
843 TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, "
844 "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u,"
845 " discovery timeout: %u, discovery retries: %u, flags: %u",
846 WIPHY_PR_ARG, __entry->ret, __entry->generation,
847 __entry->filled, __entry->frame_qlen, __entry->sn,
848 __entry->metric, __entry->exptime, __entry->discovery_timeout,
849 __entry->discovery_retries, __entry->flags)
850);
851
852TRACE_EVENT(rdev_return_int_mesh_config,
853 TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf),
854 TP_ARGS(wiphy, ret, conf),
855 TP_STRUCT__entry(
856 WIPHY_ENTRY
857 MESH_CFG_ENTRY
858 __field(int, ret)
859 ),
860 TP_fast_assign(
861 WIPHY_ASSIGN;
862 MESH_CFG_ASSIGN;
863 __entry->ret = ret;
864 ),
865 TP_printk(WIPHY_PR_FMT ", returned: %d",
866 WIPHY_PR_ARG, __entry->ret)
867);
868
869TRACE_EVENT(rdev_update_mesh_config,
870 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask,
871 const struct mesh_config *conf),
872 TP_ARGS(wiphy, netdev, mask, conf),
873 TP_STRUCT__entry(
874 WIPHY_ENTRY
875 NETDEV_ENTRY
876 MESH_CFG_ENTRY
877 __field(u32, mask)
878 ),
879 TP_fast_assign(
880 WIPHY_ASSIGN;
881 NETDEV_ASSIGN;
882 MESH_CFG_ASSIGN;
883 __entry->mask = mask;
884 ),
Johannes Bergec816082012-11-16 17:22:28 +0100885 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mask: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300886 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask)
887);
888
889TRACE_EVENT(rdev_join_mesh,
890 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
891 const struct mesh_config *conf,
892 const struct mesh_setup *setup),
893 TP_ARGS(wiphy, netdev, conf, setup),
894 TP_STRUCT__entry(
895 WIPHY_ENTRY
896 NETDEV_ENTRY
897 MESH_CFG_ENTRY
898 ),
899 TP_fast_assign(
900 WIPHY_ASSIGN;
901 NETDEV_ASSIGN;
902 MESH_CFG_ASSIGN;
903 ),
Johannes Bergec816082012-11-16 17:22:28 +0100904 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300905 WIPHY_PR_ARG, NETDEV_PR_ARG)
906);
907
908TRACE_EVENT(rdev_change_bss,
909 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
910 struct bss_parameters *params),
911 TP_ARGS(wiphy, netdev, params),
912 TP_STRUCT__entry(
913 WIPHY_ENTRY
914 NETDEV_ENTRY
915 __field(int, use_cts_prot)
916 __field(int, use_short_preamble)
917 __field(int, use_short_slot_time)
918 __field(int, ap_isolate)
919 __field(int, ht_opmode)
920 ),
921 TP_fast_assign(
922 WIPHY_ASSIGN;
923 NETDEV_ASSIGN;
924 __entry->use_cts_prot = params->use_cts_prot;
925 __entry->use_short_preamble = params->use_short_preamble;
926 __entry->use_short_slot_time = params->use_short_slot_time;
927 __entry->ap_isolate = params->ap_isolate;
928 __entry->ht_opmode = params->ht_opmode;
929 ),
Johannes Bergec816082012-11-16 17:22:28 +0100930 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", use cts prot: %d, "
Beni Lev14e8a3c2012-07-31 18:48:27 +0300931 "use short preamble: %d, use short slot time: %d, "
932 "ap isolate: %d, ht opmode: %d",
933 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot,
934 __entry->use_short_preamble, __entry->use_short_slot_time,
935 __entry->ap_isolate, __entry->ht_opmode)
936);
937
938TRACE_EVENT(rdev_set_txq_params,
939 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
940 struct ieee80211_txq_params *params),
941 TP_ARGS(wiphy, netdev, params),
942 TP_STRUCT__entry(
943 WIPHY_ENTRY
944 NETDEV_ENTRY
945 __field(enum nl80211_ac, ac)
946 __field(u16, txop)
947 __field(u16, cwmin)
948 __field(u16, cwmax)
949 __field(u8, aifs)
950 ),
951 TP_fast_assign(
952 WIPHY_ASSIGN;
953 NETDEV_ASSIGN;
954 __entry->ac = params->ac;
955 __entry->txop = params->txop;
956 __entry->cwmin = params->cwmin;
957 __entry->cwmax = params->cwmax;
958 __entry->aifs = params->aifs;
959 ),
Johannes Bergec816082012-11-16 17:22:28 +0100960 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 +0300961 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop,
962 __entry->cwmin, __entry->cwmax, __entry->aifs)
963);
964
965TRACE_EVENT(rdev_libertas_set_mesh_channel,
966 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
967 struct ieee80211_channel *chan),
968 TP_ARGS(wiphy, netdev, chan),
969 TP_STRUCT__entry(
970 WIPHY_ENTRY
971 NETDEV_ENTRY
972 CHAN_ENTRY
973 ),
974 TP_fast_assign(
975 WIPHY_ASSIGN;
976 NETDEV_ASSIGN;
977 CHAN_ASSIGN(chan);
978 ),
Johannes Bergec816082012-11-16 17:22:28 +0100979 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_PR_FMT, WIPHY_PR_ARG,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300980 NETDEV_PR_ARG, CHAN_PR_ARG)
981);
982
983TRACE_EVENT(rdev_set_monitor_channel,
Johannes Berg683b6d32012-11-08 21:25:48 +0100984 TP_PROTO(struct wiphy *wiphy,
985 struct cfg80211_chan_def *chandef),
986 TP_ARGS(wiphy, chandef),
Beni Lev14e8a3c2012-07-31 18:48:27 +0300987 TP_STRUCT__entry(
988 WIPHY_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +0100989 CHAN_DEF_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +0300990 ),
991 TP_fast_assign(
992 WIPHY_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +0100993 CHAN_DEF_ASSIGN(chandef);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300994 ),
Johannes Bergec816082012-11-16 17:22:28 +0100995 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
Johannes Berg683b6d32012-11-08 21:25:48 +0100996 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300997);
998
999TRACE_EVENT(rdev_auth,
1000 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1001 struct cfg80211_auth_request *req),
1002 TP_ARGS(wiphy, netdev, req),
1003 TP_STRUCT__entry(
1004 WIPHY_ENTRY
1005 NETDEV_ENTRY
1006 MAC_ENTRY(bssid)
1007 __field(enum nl80211_auth_type, auth_type)
1008 ),
1009 TP_fast_assign(
1010 WIPHY_ASSIGN;
1011 NETDEV_ASSIGN;
1012 if (req->bss)
1013 MAC_ASSIGN(bssid, req->bss->bssid);
1014 else
1015 memset(__entry->bssid, 0, ETH_ALEN);
1016 __entry->auth_type = req->auth_type;
1017 ),
Johannes Bergec816082012-11-16 17:22:28 +01001018 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", auth type: %d, bssid: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001019 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type,
1020 MAC_PR_ARG(bssid))
1021);
1022
1023TRACE_EVENT(rdev_assoc,
1024 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1025 struct cfg80211_assoc_request *req),
1026 TP_ARGS(wiphy, netdev, req),
1027 TP_STRUCT__entry(
1028 WIPHY_ENTRY
1029 NETDEV_ENTRY
1030 MAC_ENTRY(bssid)
1031 MAC_ENTRY(prev_bssid)
1032 __field(bool, use_mfp)
1033 __field(u32, flags)
1034 ),
1035 TP_fast_assign(
1036 WIPHY_ASSIGN;
1037 NETDEV_ASSIGN;
1038 if (req->bss)
1039 MAC_ASSIGN(bssid, req->bss->bssid);
1040 else
1041 memset(__entry->bssid, 0, ETH_ALEN);
1042 MAC_ASSIGN(prev_bssid, req->prev_bssid);
1043 __entry->use_mfp = req->use_mfp;
1044 __entry->flags = req->flags;
1045 ),
Johannes Bergec816082012-11-16 17:22:28 +01001046 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001047 ", previous bssid: " MAC_PR_FMT ", use mfp: %s, flags: %u",
1048 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1049 MAC_PR_ARG(prev_bssid), BOOL_TO_STR(__entry->use_mfp),
1050 __entry->flags)
1051);
1052
1053TRACE_EVENT(rdev_deauth,
1054 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1055 struct cfg80211_deauth_request *req),
1056 TP_ARGS(wiphy, netdev, req),
1057 TP_STRUCT__entry(
1058 WIPHY_ENTRY
1059 NETDEV_ENTRY
1060 MAC_ENTRY(bssid)
1061 __field(u16, reason_code)
1062 ),
1063 TP_fast_assign(
1064 WIPHY_ASSIGN;
1065 NETDEV_ASSIGN;
1066 MAC_ASSIGN(bssid, req->bssid);
1067 __entry->reason_code = req->reason_code;
1068 ),
Johannes Bergec816082012-11-16 17:22:28 +01001069 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", reason: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001070 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1071 __entry->reason_code)
1072);
1073
1074TRACE_EVENT(rdev_disassoc,
1075 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1076 struct cfg80211_disassoc_request *req),
1077 TP_ARGS(wiphy, netdev, req),
1078 TP_STRUCT__entry(
1079 WIPHY_ENTRY
1080 NETDEV_ENTRY
1081 MAC_ENTRY(bssid)
1082 __field(u16, reason_code)
1083 __field(bool, local_state_change)
1084 ),
1085 TP_fast_assign(
1086 WIPHY_ASSIGN;
1087 NETDEV_ASSIGN;
1088 if (req->bss)
1089 MAC_ASSIGN(bssid, req->bss->bssid);
1090 else
1091 memset(__entry->bssid, 0, ETH_ALEN);
1092 __entry->reason_code = req->reason_code;
1093 __entry->local_state_change = req->local_state_change;
1094 ),
Johannes Bergec816082012-11-16 17:22:28 +01001095 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001096 ", reason: %u, local state change: %s",
1097 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1098 __entry->reason_code,
1099 BOOL_TO_STR(__entry->local_state_change))
1100);
1101
1102TRACE_EVENT(rdev_mgmt_tx_cancel_wait,
1103 TP_PROTO(struct wiphy *wiphy,
1104 struct wireless_dev *wdev, u64 cookie),
1105 TP_ARGS(wiphy, wdev, cookie),
1106 TP_STRUCT__entry(
1107 WIPHY_ENTRY
1108 WDEV_ENTRY
1109 __field(u64, cookie)
1110 ),
1111 TP_fast_assign(
1112 WIPHY_ASSIGN;
1113 WDEV_ASSIGN;
1114 __entry->cookie = cookie;
1115 ),
Johannes Bergec816082012-11-16 17:22:28 +01001116 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001117 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1118);
1119
1120TRACE_EVENT(rdev_set_power_mgmt,
1121 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1122 bool enabled, int timeout),
1123 TP_ARGS(wiphy, netdev, enabled, timeout),
1124 TP_STRUCT__entry(
1125 WIPHY_ENTRY
1126 NETDEV_ENTRY
1127 __field(bool, enabled)
1128 __field(int, timeout)
1129 ),
1130 TP_fast_assign(
1131 WIPHY_ASSIGN;
1132 NETDEV_ASSIGN;
1133 __entry->enabled = enabled;
1134 __entry->timeout = timeout;
1135 ),
Johannes Bergec816082012-11-16 17:22:28 +01001136 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %senabled, timeout: %d ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001137 WIPHY_PR_ARG, NETDEV_PR_ARG,
1138 __entry->enabled ? "" : "not ", __entry->timeout)
1139);
1140
1141TRACE_EVENT(rdev_connect,
1142 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1143 struct cfg80211_connect_params *sme),
1144 TP_ARGS(wiphy, netdev, sme),
1145 TP_STRUCT__entry(
1146 WIPHY_ENTRY
1147 NETDEV_ENTRY
1148 MAC_ENTRY(bssid)
1149 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1150 __field(enum nl80211_auth_type, auth_type)
1151 __field(bool, privacy)
1152 __field(u32, wpa_versions)
1153 __field(u32, flags)
1154 ),
1155 TP_fast_assign(
1156 WIPHY_ASSIGN;
1157 NETDEV_ASSIGN;
1158 MAC_ASSIGN(bssid, sme->bssid);
1159 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1160 memcpy(__entry->ssid, sme->ssid, sme->ssid_len);
1161 __entry->auth_type = sme->auth_type;
1162 __entry->privacy = sme->privacy;
1163 __entry->wpa_versions = sme->crypto.wpa_versions;
1164 __entry->flags = sme->flags;
1165 ),
Johannes Bergec816082012-11-16 17:22:28 +01001166 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001167 ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, "
1168 "flags: %u",
1169 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid,
1170 __entry->auth_type, BOOL_TO_STR(__entry->privacy),
1171 __entry->wpa_versions, __entry->flags)
1172);
1173
1174TRACE_EVENT(rdev_set_cqm_rssi_config,
1175 TP_PROTO(struct wiphy *wiphy,
1176 struct net_device *netdev, s32 rssi_thold,
1177 u32 rssi_hyst),
1178 TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst),
1179 TP_STRUCT__entry(
1180 WIPHY_ENTRY
1181 NETDEV_ENTRY
1182 __field(s32, rssi_thold)
1183 __field(u32, rssi_hyst)
1184 ),
1185 TP_fast_assign(
1186 WIPHY_ASSIGN;
1187 NETDEV_ASSIGN;
1188 __entry->rssi_thold = rssi_thold;
1189 __entry->rssi_hyst = rssi_hyst;
1190 ),
Johannes Bergec816082012-11-16 17:22:28 +01001191 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001192 ", rssi_thold: %d, rssi_hyst: %u ",
1193 WIPHY_PR_ARG, NETDEV_PR_ARG,
1194 __entry->rssi_thold, __entry->rssi_hyst)
1195);
1196
1197TRACE_EVENT(rdev_set_cqm_txe_config,
1198 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate,
1199 u32 pkts, u32 intvl),
1200 TP_ARGS(wiphy, netdev, rate, pkts, intvl),
1201 TP_STRUCT__entry(
1202 WIPHY_ENTRY
1203 NETDEV_ENTRY
1204 __field(u32, rate)
1205 __field(u32, pkts)
1206 __field(u32, intvl)
1207 ),
1208 TP_fast_assign(
1209 WIPHY_ASSIGN;
1210 NETDEV_ASSIGN;
1211 __entry->rate = rate;
1212 __entry->pkts = pkts;
1213 __entry->intvl = intvl;
1214 ),
Johannes Bergec816082012-11-16 17:22:28 +01001215 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001216 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts,
1217 __entry->intvl)
1218);
1219
1220TRACE_EVENT(rdev_disconnect,
1221 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1222 u16 reason_code),
1223 TP_ARGS(wiphy, netdev, reason_code),
1224 TP_STRUCT__entry(
1225 WIPHY_ENTRY
1226 NETDEV_ENTRY
1227 __field(u16, reason_code)
1228 ),
1229 TP_fast_assign(
1230 WIPHY_ASSIGN;
1231 NETDEV_ASSIGN;
1232 __entry->reason_code = reason_code;
1233 ),
Johannes Bergec816082012-11-16 17:22:28 +01001234 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001235 NETDEV_PR_ARG, __entry->reason_code)
1236);
1237
1238TRACE_EVENT(rdev_join_ibss,
1239 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1240 struct cfg80211_ibss_params *params),
1241 TP_ARGS(wiphy, netdev, params),
1242 TP_STRUCT__entry(
1243 WIPHY_ENTRY
1244 NETDEV_ENTRY
1245 MAC_ENTRY(bssid)
1246 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1247 ),
1248 TP_fast_assign(
1249 WIPHY_ASSIGN;
1250 NETDEV_ASSIGN;
1251 MAC_ASSIGN(bssid, params->bssid);
1252 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1253 memcpy(__entry->ssid, params->ssid, params->ssid_len);
1254 ),
Johannes Bergec816082012-11-16 17:22:28 +01001255 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001256 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid)
1257);
1258
1259TRACE_EVENT(rdev_set_wiphy_params,
1260 TP_PROTO(struct wiphy *wiphy, u32 changed),
1261 TP_ARGS(wiphy, changed),
1262 TP_STRUCT__entry(
1263 WIPHY_ENTRY
1264 __field(u32, changed)
1265 ),
1266 TP_fast_assign(
1267 WIPHY_ASSIGN;
1268 __entry->changed = changed;
1269 ),
1270 TP_printk(WIPHY_PR_FMT ", changed: %u",
1271 WIPHY_PR_ARG, __entry->changed)
1272);
1273
Johannes Bergc8442112012-10-24 10:17:18 +02001274DEFINE_EVENT(wiphy_wdev_evt, rdev_get_tx_power,
1275 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1276 TP_ARGS(wiphy, wdev)
1277);
1278
Beni Lev14e8a3c2012-07-31 18:48:27 +03001279TRACE_EVENT(rdev_set_tx_power,
Johannes Bergc8442112012-10-24 10:17:18 +02001280 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1281 enum nl80211_tx_power_setting type, int mbm),
1282 TP_ARGS(wiphy, wdev, type, mbm),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001283 TP_STRUCT__entry(
1284 WIPHY_ENTRY
Johannes Bergc8442112012-10-24 10:17:18 +02001285 WDEV_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001286 __field(enum nl80211_tx_power_setting, type)
1287 __field(int, mbm)
1288 ),
1289 TP_fast_assign(
1290 WIPHY_ASSIGN;
Johannes Bergc8442112012-10-24 10:17:18 +02001291 WDEV_ASSIGN;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001292 __entry->type = type;
1293 __entry->mbm = mbm;
1294 ),
Johannes Bergec816082012-11-16 17:22:28 +01001295 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d",
Johannes Bergc8442112012-10-24 10:17:18 +02001296 WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001297);
1298
1299TRACE_EVENT(rdev_return_int_int,
1300 TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill),
1301 TP_ARGS(wiphy, func_ret, func_fill),
1302 TP_STRUCT__entry(
1303 WIPHY_ENTRY
1304 __field(int, func_ret)
1305 __field(int, func_fill)
1306 ),
1307 TP_fast_assign(
1308 WIPHY_ASSIGN;
1309 __entry->func_ret = func_ret;
1310 __entry->func_fill = func_fill;
1311 ),
1312 TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d",
1313 WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill)
1314);
1315
1316#ifdef CONFIG_NL80211_TESTMODE
1317TRACE_EVENT(rdev_testmode_cmd,
David Spinadelfc73f112013-07-31 18:04:15 +03001318 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1319 TP_ARGS(wiphy, wdev),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001320 TP_STRUCT__entry(
1321 WIPHY_ENTRY
David Spinadelfc73f112013-07-31 18:04:15 +03001322 WDEV_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001323 ),
1324 TP_fast_assign(
1325 WIPHY_ASSIGN;
David Spinadelfc73f112013-07-31 18:04:15 +03001326 WDEV_ASSIGN;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001327 ),
David Spinadelfc73f112013-07-31 18:04:15 +03001328 TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001329);
1330
1331TRACE_EVENT(rdev_testmode_dump,
1332 TP_PROTO(struct wiphy *wiphy),
1333 TP_ARGS(wiphy),
1334 TP_STRUCT__entry(
1335 WIPHY_ENTRY
1336 ),
1337 TP_fast_assign(
1338 WIPHY_ASSIGN;
1339 ),
1340 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
1341);
1342#endif /* CONFIG_NL80211_TESTMODE */
1343
1344TRACE_EVENT(rdev_set_bitrate_mask,
1345 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1346 const u8 *peer, const struct cfg80211_bitrate_mask *mask),
1347 TP_ARGS(wiphy, netdev, peer, mask),
1348 TP_STRUCT__entry(
1349 WIPHY_ENTRY
1350 NETDEV_ENTRY
1351 MAC_ENTRY(peer)
1352 ),
1353 TP_fast_assign(
1354 WIPHY_ASSIGN;
1355 NETDEV_ASSIGN;
1356 MAC_ASSIGN(peer, peer);
1357 ),
Johannes Bergec816082012-11-16 17:22:28 +01001358 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001359 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1360);
1361
1362TRACE_EVENT(rdev_mgmt_frame_register,
1363 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1364 u16 frame_type, bool reg),
1365 TP_ARGS(wiphy, wdev, frame_type, reg),
1366 TP_STRUCT__entry(
1367 WIPHY_ENTRY
1368 WDEV_ENTRY
1369 __field(u16, frame_type)
1370 __field(bool, reg)
1371 ),
1372 TP_fast_assign(
1373 WIPHY_ASSIGN;
1374 WDEV_ASSIGN;
1375 __entry->frame_type = frame_type;
1376 __entry->reg = reg;
1377 ),
Johannes Bergec816082012-11-16 17:22:28 +01001378 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", frame_type: 0x%.2x, reg: %s ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001379 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->frame_type,
1380 __entry->reg ? "true" : "false")
1381);
1382
1383TRACE_EVENT(rdev_return_int_tx_rx,
1384 TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx),
1385 TP_ARGS(wiphy, ret, tx, rx),
1386 TP_STRUCT__entry(
1387 WIPHY_ENTRY
1388 __field(int, ret)
1389 __field(u32, tx)
1390 __field(u32, rx)
1391 ),
1392 TP_fast_assign(
1393 WIPHY_ASSIGN;
1394 __entry->ret = ret;
1395 __entry->tx = tx;
1396 __entry->rx = rx;
1397 ),
1398 TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u",
1399 WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx)
1400);
1401
1402TRACE_EVENT(rdev_return_void_tx_rx,
1403 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max,
1404 u32 rx, u32 rx_max),
1405 TP_ARGS(wiphy, tx, tx_max, rx, rx_max),
1406 TP_STRUCT__entry(
1407 WIPHY_ENTRY
1408 __field(u32, tx)
1409 __field(u32, tx_max)
1410 __field(u32, rx)
1411 __field(u32, rx_max)
1412 ),
1413 TP_fast_assign(
1414 WIPHY_ASSIGN;
1415 __entry->tx = tx;
1416 __entry->tx_max = tx_max;
1417 __entry->rx = rx;
1418 __entry->rx_max = rx_max;
1419 ),
1420 TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ",
1421 WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx,
1422 __entry->rx_max)
1423);
1424
1425DECLARE_EVENT_CLASS(tx_rx_evt,
1426 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1427 TP_ARGS(wiphy, rx, tx),
1428 TP_STRUCT__entry(
1429 WIPHY_ENTRY
1430 __field(u32, tx)
1431 __field(u32, rx)
1432 ),
1433 TP_fast_assign(
1434 WIPHY_ASSIGN;
1435 __entry->tx = tx;
1436 __entry->rx = rx;
1437 ),
1438 TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ",
1439 WIPHY_PR_ARG, __entry->tx, __entry->rx)
1440);
1441
1442DEFINE_EVENT(tx_rx_evt, rdev_set_ringparam,
1443 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1444 TP_ARGS(wiphy, rx, tx)
1445);
1446
1447DEFINE_EVENT(tx_rx_evt, rdev_set_antenna,
1448 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1449 TP_ARGS(wiphy, rx, tx)
1450);
1451
1452TRACE_EVENT(rdev_sched_scan_start,
1453 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1454 struct cfg80211_sched_scan_request *request),
1455 TP_ARGS(wiphy, netdev, request),
1456 TP_STRUCT__entry(
1457 WIPHY_ENTRY
1458 NETDEV_ENTRY
1459 ),
1460 TP_fast_assign(
1461 WIPHY_ASSIGN;
1462 NETDEV_ASSIGN;
1463 ),
Johannes Bergec816082012-11-16 17:22:28 +01001464 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001465 WIPHY_PR_ARG, NETDEV_PR_ARG)
1466);
1467
1468TRACE_EVENT(rdev_tdls_mgmt,
1469 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1470 u8 *peer, u8 action_code, u8 dialog_token,
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301471 u16 status_code, u32 peer_capability,
1472 const u8 *buf, size_t len),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001473 TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code,
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301474 peer_capability, buf, len),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001475 TP_STRUCT__entry(
1476 WIPHY_ENTRY
1477 NETDEV_ENTRY
1478 MAC_ENTRY(peer)
1479 __field(u8, action_code)
1480 __field(u8, dialog_token)
1481 __field(u16, status_code)
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301482 __field(u32, peer_capability)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001483 __dynamic_array(u8, buf, len)
1484 ),
1485 TP_fast_assign(
1486 WIPHY_ASSIGN;
1487 NETDEV_ASSIGN;
1488 MAC_ASSIGN(peer, peer);
1489 __entry->action_code = action_code;
1490 __entry->dialog_token = dialog_token;
1491 __entry->status_code = status_code;
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301492 __entry->peer_capability = peer_capability;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001493 memcpy(__get_dynamic_array(buf), buf, len);
1494 ),
Johannes Bergec816082012-11-16 17:22:28 +01001495 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", action_code: %u, "
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301496 "dialog_token: %u, status_code: %u, peer_capability: %u buf: %#.2x ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001497 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
1498 __entry->action_code, __entry->dialog_token,
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301499 __entry->status_code, __entry->peer_capability,
1500 ((u8 *)__get_dynamic_array(buf))[0])
Beni Lev14e8a3c2012-07-31 18:48:27 +03001501);
1502
1503TRACE_EVENT(rdev_dump_survey,
1504 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx),
1505 TP_ARGS(wiphy, netdev, idx),
1506 TP_STRUCT__entry(
1507 WIPHY_ENTRY
1508 NETDEV_ENTRY
1509 __field(int, idx)
1510 ),
1511 TP_fast_assign(
1512 WIPHY_ASSIGN;
1513 NETDEV_ASSIGN;
1514 __entry->idx = idx;
1515 ),
Johannes Bergec816082012-11-16 17:22:28 +01001516 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001517 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx)
1518);
1519
1520TRACE_EVENT(rdev_return_int_survey_info,
1521 TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info),
1522 TP_ARGS(wiphy, ret, info),
1523 TP_STRUCT__entry(
1524 WIPHY_ENTRY
1525 CHAN_ENTRY
1526 __field(int, ret)
1527 __field(u64, channel_time)
1528 __field(u64, channel_time_busy)
1529 __field(u64, channel_time_ext_busy)
1530 __field(u64, channel_time_rx)
1531 __field(u64, channel_time_tx)
1532 __field(u32, filled)
1533 __field(s8, noise)
1534 ),
1535 TP_fast_assign(
1536 WIPHY_ASSIGN;
1537 CHAN_ASSIGN(info->channel);
1538 __entry->ret = ret;
1539 __entry->channel_time = info->channel_time;
1540 __entry->channel_time_busy = info->channel_time_busy;
1541 __entry->channel_time_ext_busy = info->channel_time_ext_busy;
1542 __entry->channel_time_rx = info->channel_time_rx;
1543 __entry->channel_time_tx = info->channel_time_tx;
1544 __entry->filled = info->filled;
1545 __entry->noise = info->noise;
1546 ),
1547 TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT
1548 ", channel time: %llu, channel time busy: %llu, "
1549 "channel time extension busy: %llu, channel time rx: %llu, "
1550 "channel time tx: %llu, filled: %u, noise: %d",
1551 WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG,
1552 __entry->channel_time, __entry->channel_time_busy,
1553 __entry->channel_time_ext_busy, __entry->channel_time_rx,
1554 __entry->channel_time_tx, __entry->filled, __entry->noise)
1555);
1556
1557TRACE_EVENT(rdev_tdls_oper,
1558 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1559 u8 *peer, enum nl80211_tdls_operation oper),
1560 TP_ARGS(wiphy, netdev, peer, oper),
1561 TP_STRUCT__entry(
1562 WIPHY_ENTRY
1563 NETDEV_ENTRY
1564 MAC_ENTRY(peer)
1565 __field(enum nl80211_tdls_operation, oper)
1566 ),
1567 TP_fast_assign(
1568 WIPHY_ASSIGN;
1569 NETDEV_ASSIGN;
1570 MAC_ASSIGN(peer, peer);
1571 __entry->oper = oper;
1572 ),
Johannes Bergec816082012-11-16 17:22:28 +01001573 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", oper: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001574 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper)
1575);
1576
1577DECLARE_EVENT_CLASS(rdev_pmksa,
1578 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1579 struct cfg80211_pmksa *pmksa),
1580 TP_ARGS(wiphy, netdev, pmksa),
1581 TP_STRUCT__entry(
1582 WIPHY_ENTRY
1583 NETDEV_ENTRY
1584 MAC_ENTRY(bssid)
1585 ),
1586 TP_fast_assign(
1587 WIPHY_ASSIGN;
1588 NETDEV_ASSIGN;
1589 MAC_ASSIGN(bssid, pmksa->bssid);
1590 ),
Johannes Bergec816082012-11-16 17:22:28 +01001591 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001592 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid))
1593);
1594
1595TRACE_EVENT(rdev_probe_client,
1596 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1597 const u8 *peer),
1598 TP_ARGS(wiphy, netdev, peer),
1599 TP_STRUCT__entry(
1600 WIPHY_ENTRY
1601 NETDEV_ENTRY
1602 MAC_ENTRY(peer)
1603 ),
1604 TP_fast_assign(
1605 WIPHY_ASSIGN;
1606 NETDEV_ASSIGN;
1607 MAC_ASSIGN(peer, peer);
1608 ),
Johannes Bergec816082012-11-16 17:22:28 +01001609 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001610 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1611);
1612
1613DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa,
1614 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1615 struct cfg80211_pmksa *pmksa),
1616 TP_ARGS(wiphy, netdev, pmksa)
1617);
1618
1619DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa,
1620 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1621 struct cfg80211_pmksa *pmksa),
1622 TP_ARGS(wiphy, netdev, pmksa)
1623);
1624
1625TRACE_EVENT(rdev_remain_on_channel,
1626 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1627 struct ieee80211_channel *chan,
Johannes Berg42d97a52012-11-08 18:31:02 +01001628 unsigned int duration),
1629 TP_ARGS(wiphy, wdev, chan, duration),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001630 TP_STRUCT__entry(
1631 WIPHY_ENTRY
1632 WDEV_ENTRY
1633 CHAN_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001634 __field(unsigned int, duration)
1635 ),
1636 TP_fast_assign(
1637 WIPHY_ASSIGN;
1638 WDEV_ASSIGN;
1639 CHAN_ASSIGN(chan);
Beni Lev14e8a3c2012-07-31 18:48:27 +03001640 __entry->duration = duration;
1641 ),
Johannes Bergec816082012-11-16 17:22:28 +01001642 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", duration: %u",
Johannes Berg42d97a52012-11-08 18:31:02 +01001643 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001644);
1645
1646TRACE_EVENT(rdev_return_int_cookie,
1647 TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie),
1648 TP_ARGS(wiphy, ret, cookie),
1649 TP_STRUCT__entry(
1650 WIPHY_ENTRY
1651 __field(int, ret)
1652 __field(u64, cookie)
1653 ),
1654 TP_fast_assign(
1655 WIPHY_ASSIGN;
1656 __entry->ret = ret;
1657 __entry->cookie = cookie;
1658 ),
1659 TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu",
1660 WIPHY_PR_ARG, __entry->ret, __entry->cookie)
1661);
1662
1663TRACE_EVENT(rdev_cancel_remain_on_channel,
1664 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
1665 TP_ARGS(wiphy, wdev, cookie),
1666 TP_STRUCT__entry(
1667 WIPHY_ENTRY
1668 WDEV_ENTRY
1669 __field(u64, cookie)
1670 ),
1671 TP_fast_assign(
1672 WIPHY_ASSIGN;
1673 WDEV_ASSIGN;
1674 __entry->cookie = cookie;
1675 ),
Johannes Bergec816082012-11-16 17:22:28 +01001676 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001677 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1678);
1679
1680TRACE_EVENT(rdev_mgmt_tx,
1681 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
Andrei Otcheretianskib176e622013-11-18 19:06:49 +02001682 struct cfg80211_mgmt_tx_params *params),
1683 TP_ARGS(wiphy, wdev, params),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001684 TP_STRUCT__entry(
1685 WIPHY_ENTRY
1686 WDEV_ENTRY
1687 CHAN_ENTRY
1688 __field(bool, offchan)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001689 __field(unsigned int, wait)
1690 __field(bool, no_cck)
1691 __field(bool, dont_wait_for_ack)
1692 ),
1693 TP_fast_assign(
1694 WIPHY_ASSIGN;
1695 WDEV_ASSIGN;
Andrei Otcheretianskib176e622013-11-18 19:06:49 +02001696 CHAN_ASSIGN(params->chan);
1697 __entry->offchan = params->offchan;
1698 __entry->wait = params->wait;
1699 __entry->no_cck = params->no_cck;
1700 __entry->dont_wait_for_ack = params->dont_wait_for_ack;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001701 ),
Johannes Bergec816082012-11-16 17:22:28 +01001702 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s,"
Johannes Berg42d97a52012-11-08 18:31:02 +01001703 " wait: %u, no cck: %s, dont wait for ack: %s",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001704 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG,
Johannes Berg42d97a52012-11-08 18:31:02 +01001705 BOOL_TO_STR(__entry->offchan), __entry->wait,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001706 BOOL_TO_STR(__entry->no_cck),
1707 BOOL_TO_STR(__entry->dont_wait_for_ack))
1708);
1709
1710TRACE_EVENT(rdev_set_noack_map,
1711 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1712 u16 noack_map),
1713 TP_ARGS(wiphy, netdev, noack_map),
1714 TP_STRUCT__entry(
1715 WIPHY_ENTRY
1716 NETDEV_ENTRY
1717 __field(u16, noack_map)
1718 ),
1719 TP_fast_assign(
1720 WIPHY_ASSIGN;
1721 NETDEV_ASSIGN;
1722 __entry->noack_map = noack_map;
1723 ),
Johannes Bergec816082012-11-16 17:22:28 +01001724 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", noack_map: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001725 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map)
1726);
1727
1728TRACE_EVENT(rdev_get_et_sset_count,
1729 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int sset),
1730 TP_ARGS(wiphy, netdev, sset),
1731 TP_STRUCT__entry(
1732 WIPHY_ENTRY
1733 NETDEV_ENTRY
1734 __field(int, sset)
1735 ),
1736 TP_fast_assign(
1737 WIPHY_ASSIGN;
1738 NETDEV_ASSIGN;
1739 __entry->sset = sset;
1740 ),
Johannes Bergec816082012-11-16 17:22:28 +01001741 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", sset: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001742 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sset)
1743);
1744
1745TRACE_EVENT(rdev_get_et_strings,
1746 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 sset),
1747 TP_ARGS(wiphy, netdev, sset),
1748 TP_STRUCT__entry(
1749 WIPHY_ENTRY
1750 NETDEV_ENTRY
1751 __field(u32, sset)
1752 ),
1753 TP_fast_assign(
1754 WIPHY_ASSIGN;
1755 NETDEV_ASSIGN;
1756 __entry->sset = sset;
1757 ),
Johannes Bergec816082012-11-16 17:22:28 +01001758 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", sset: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001759 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sset)
1760);
1761
1762DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel,
1763 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1764 TP_ARGS(wiphy, wdev)
1765);
1766
Johannes Berg683b6d32012-11-08 21:25:48 +01001767TRACE_EVENT(rdev_return_chandef,
1768 TP_PROTO(struct wiphy *wiphy, int ret,
1769 struct cfg80211_chan_def *chandef),
1770 TP_ARGS(wiphy, ret, chandef),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001771 TP_STRUCT__entry(
1772 WIPHY_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01001773 __field(int, ret)
1774 CHAN_DEF_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001775 ),
1776 TP_fast_assign(
1777 WIPHY_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01001778 if (ret == 0)
1779 CHAN_DEF_ASSIGN(chandef);
1780 else
1781 CHAN_DEF_ASSIGN((struct cfg80211_chan_def *)NULL);
1782 __entry->ret = ret;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001783 ),
Johannes Bergec816082012-11-16 17:22:28 +01001784 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", ret: %d",
Johannes Berg683b6d32012-11-08 21:25:48 +01001785 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->ret)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001786);
1787
Johannes Bergeeb126e2012-10-23 15:16:50 +02001788DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device,
1789 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1790 TP_ARGS(wiphy, wdev)
1791);
1792
1793DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device,
1794 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1795 TP_ARGS(wiphy, wdev)
1796);
1797
Vasanthakumar Thiagarajan77765ea2013-01-18 11:18:45 +05301798TRACE_EVENT(rdev_set_mac_acl,
1799 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1800 struct cfg80211_acl_data *params),
1801 TP_ARGS(wiphy, netdev, params),
1802 TP_STRUCT__entry(
1803 WIPHY_ENTRY
1804 NETDEV_ENTRY
1805 __field(u32, acl_policy)
1806 ),
1807 TP_fast_assign(
1808 WIPHY_ASSIGN;
Vladimir Kondratiev021fcdc2013-03-07 11:08:29 +02001809 NETDEV_ASSIGN;
Vasanthakumar Thiagarajan77765ea2013-01-18 11:18:45 +05301810 __entry->acl_policy = params->acl_policy;
1811 ),
1812 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", acl policy: %d",
1813 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->acl_policy)
1814);
1815
Jouni Malinen355199e2013-02-27 17:14:27 +02001816TRACE_EVENT(rdev_update_ft_ies,
1817 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1818 struct cfg80211_update_ft_ies_params *ftie),
1819 TP_ARGS(wiphy, netdev, ftie),
1820 TP_STRUCT__entry(
1821 WIPHY_ENTRY
1822 NETDEV_ENTRY
1823 __field(u16, md)
1824 __dynamic_array(u8, ie, ftie->ie_len)
1825 ),
1826 TP_fast_assign(
1827 WIPHY_ASSIGN;
1828 NETDEV_ASSIGN;
1829 __entry->md = ftie->md;
1830 memcpy(__get_dynamic_array(ie), ftie->ie, ftie->ie_len);
1831 ),
1832 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", md: 0x%x",
1833 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->md)
1834);
1835
Arend van Spriel5de17982013-04-18 15:49:00 +02001836TRACE_EVENT(rdev_crit_proto_start,
1837 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1838 enum nl80211_crit_proto_id protocol, u16 duration),
1839 TP_ARGS(wiphy, wdev, protocol, duration),
1840 TP_STRUCT__entry(
1841 WIPHY_ENTRY
1842 WDEV_ENTRY
1843 __field(u16, proto)
1844 __field(u16, duration)
1845 ),
1846 TP_fast_assign(
1847 WIPHY_ASSIGN;
1848 WDEV_ASSIGN;
1849 __entry->proto = protocol;
1850 __entry->duration = duration;
1851 ),
1852 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", proto=%x, duration=%u",
1853 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->proto, __entry->duration)
1854);
1855
1856TRACE_EVENT(rdev_crit_proto_stop,
1857 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1858 TP_ARGS(wiphy, wdev),
1859 TP_STRUCT__entry(
1860 WIPHY_ENTRY
1861 WDEV_ENTRY
1862 ),
1863 TP_fast_assign(
1864 WIPHY_ASSIGN;
1865 WDEV_ASSIGN;
1866 ),
1867 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
1868 WIPHY_PR_ARG, WDEV_PR_ARG)
1869);
1870
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001871TRACE_EVENT(rdev_channel_switch,
1872 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1873 struct cfg80211_csa_settings *params),
1874 TP_ARGS(wiphy, netdev, params),
1875 TP_STRUCT__entry(
1876 WIPHY_ENTRY
1877 NETDEV_ENTRY
1878 CHAN_DEF_ENTRY
1879 __field(u16, counter_offset_beacon)
1880 __field(u16, counter_offset_presp)
1881 __field(bool, radar_required)
1882 __field(bool, block_tx)
1883 __field(u8, count)
1884 ),
1885 TP_fast_assign(
1886 WIPHY_ASSIGN;
1887 NETDEV_ASSIGN;
1888 CHAN_DEF_ASSIGN(&params->chandef);
1889 __entry->counter_offset_beacon = params->counter_offset_beacon;
1890 __entry->counter_offset_presp = params->counter_offset_presp;
1891 __entry->radar_required = params->radar_required;
1892 __entry->block_tx = params->block_tx;
1893 __entry->count = params->count;
1894 ),
1895 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
1896 ", block_tx: %d, count: %u, radar_required: %d"
1897 ", counter offsets (beacon/presp): %u/%u",
1898 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
1899 __entry->block_tx, __entry->count, __entry->radar_required,
1900 __entry->counter_offset_beacon,
1901 __entry->counter_offset_presp)
1902);
1903
Kyeyoon Parkfa9ffc72013-12-16 23:01:30 -08001904TRACE_EVENT(rdev_set_qos_map,
1905 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1906 struct cfg80211_qos_map *qos_map),
1907 TP_ARGS(wiphy, netdev, qos_map),
1908 TP_STRUCT__entry(
1909 WIPHY_ENTRY
1910 NETDEV_ENTRY
1911 QOS_MAP_ENTRY
1912 ),
1913 TP_fast_assign(
1914 WIPHY_ASSIGN;
1915 NETDEV_ASSIGN;
1916 QOS_MAP_ASSIGN(qos_map);
1917 ),
1918 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", num_des: %u",
1919 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->num_des)
1920);
1921
Beni Lev4ee3e062012-08-27 12:49:39 +03001922/*************************************************************
1923 * cfg80211 exported functions traces *
1924 *************************************************************/
1925
1926TRACE_EVENT(cfg80211_return_bool,
1927 TP_PROTO(bool ret),
1928 TP_ARGS(ret),
1929 TP_STRUCT__entry(
1930 __field(bool, ret)
1931 ),
1932 TP_fast_assign(
1933 __entry->ret = ret;
1934 ),
1935 TP_printk("returned %s", BOOL_TO_STR(__entry->ret))
1936);
1937
1938DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt,
1939 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
1940 TP_ARGS(netdev, macaddr),
1941 TP_STRUCT__entry(
1942 NETDEV_ENTRY
1943 MAC_ENTRY(macaddr)
1944 ),
1945 TP_fast_assign(
1946 NETDEV_ASSIGN;
1947 MAC_ASSIGN(macaddr, macaddr);
1948 ),
1949 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
1950 NETDEV_PR_ARG, MAC_PR_ARG(macaddr))
1951);
1952
1953DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate,
1954 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
1955 TP_ARGS(netdev, macaddr)
1956);
1957
1958DECLARE_EVENT_CLASS(netdev_evt_only,
1959 TP_PROTO(struct net_device *netdev),
1960 TP_ARGS(netdev),
1961 TP_STRUCT__entry(
1962 NETDEV_ENTRY
1963 ),
1964 TP_fast_assign(
1965 NETDEV_ASSIGN;
1966 ),
1967 TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG)
1968);
1969
1970DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth,
1971 TP_PROTO(struct net_device *netdev),
1972 TP_ARGS(netdev)
1973);
1974
1975TRACE_EVENT(cfg80211_send_rx_assoc,
1976 TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss),
1977 TP_ARGS(netdev, bss),
1978 TP_STRUCT__entry(
1979 NETDEV_ENTRY
1980 MAC_ENTRY(bssid)
1981 CHAN_ENTRY
1982 ),
1983 TP_fast_assign(
1984 NETDEV_ASSIGN;
1985 MAC_ASSIGN(bssid, bss->bssid);
1986 CHAN_ASSIGN(bss->channel);
1987 ),
Johannes Bergec816082012-11-16 17:22:28 +01001988 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", " CHAN_PR_FMT,
Beni Lev4ee3e062012-08-27 12:49:39 +03001989 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
1990);
1991
Johannes Berg6ff57cf2013-05-16 00:55:00 +02001992DECLARE_EVENT_CLASS(netdev_frame_event,
1993 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
1994 TP_ARGS(netdev, buf, len),
1995 TP_STRUCT__entry(
1996 NETDEV_ENTRY
1997 __dynamic_array(u8, frame, len)
1998 ),
1999 TP_fast_assign(
2000 NETDEV_ASSIGN;
2001 memcpy(__get_dynamic_array(frame), buf, len);
2002 ),
2003 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2004 NETDEV_PR_ARG,
2005 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
Beni Lev4ee3e062012-08-27 12:49:39 +03002006);
2007
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002008DEFINE_EVENT(netdev_frame_event, cfg80211_rx_unprot_mlme_mgmt,
2009 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2010 TP_ARGS(netdev, buf, len)
Beni Lev4ee3e062012-08-27 12:49:39 +03002011);
2012
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002013DEFINE_EVENT(netdev_frame_event, cfg80211_rx_mlme_mgmt,
2014 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2015 TP_ARGS(netdev, buf, len)
Beni Lev4ee3e062012-08-27 12:49:39 +03002016);
2017
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002018TRACE_EVENT(cfg80211_tx_mlme_mgmt,
2019 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2020 TP_ARGS(netdev, buf, len),
2021 TP_STRUCT__entry(
2022 NETDEV_ENTRY
2023 __dynamic_array(u8, frame, len)
2024 ),
2025 TP_fast_assign(
2026 NETDEV_ASSIGN;
2027 memcpy(__get_dynamic_array(frame), buf, len);
2028 ),
2029 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2030 NETDEV_PR_ARG,
2031 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
Beni Lev4ee3e062012-08-27 12:49:39 +03002032);
2033
2034DECLARE_EVENT_CLASS(netdev_mac_evt,
2035 TP_PROTO(struct net_device *netdev, const u8 *mac),
2036 TP_ARGS(netdev, mac),
2037 TP_STRUCT__entry(
2038 NETDEV_ENTRY
2039 MAC_ENTRY(mac)
2040 ),
2041 TP_fast_assign(
2042 NETDEV_ASSIGN;
2043 MAC_ASSIGN(mac, mac)
2044 ),
2045 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
2046 NETDEV_PR_ARG, MAC_PR_ARG(mac))
2047);
2048
2049DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout,
2050 TP_PROTO(struct net_device *netdev, const u8 *mac),
2051 TP_ARGS(netdev, mac)
2052);
2053
2054DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout,
2055 TP_PROTO(struct net_device *netdev, const u8 *mac),
2056 TP_ARGS(netdev, mac)
2057);
2058
2059TRACE_EVENT(cfg80211_michael_mic_failure,
2060 TP_PROTO(struct net_device *netdev, const u8 *addr,
2061 enum nl80211_key_type key_type, int key_id, const u8 *tsc),
2062 TP_ARGS(netdev, addr, key_type, key_id, tsc),
2063 TP_STRUCT__entry(
2064 NETDEV_ENTRY
2065 MAC_ENTRY(addr)
2066 __field(enum nl80211_key_type, key_type)
2067 __field(int, key_id)
2068 __array(u8, tsc, 6)
2069 ),
2070 TP_fast_assign(
2071 NETDEV_ASSIGN;
2072 MAC_ASSIGN(addr, addr);
2073 __entry->key_type = key_type;
2074 __entry->key_id = key_id;
2075 memcpy(__entry->tsc, tsc, 6);
2076 ),
Johannes Bergec816082012-11-16 17:22:28 +01002077 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm",
Beni Lev4ee3e062012-08-27 12:49:39 +03002078 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type,
2079 __entry->key_id, __entry->tsc)
2080);
2081
2082TRACE_EVENT(cfg80211_ready_on_channel,
2083 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2084 struct ieee80211_channel *chan,
Johannes Berg42d97a52012-11-08 18:31:02 +01002085 unsigned int duration),
2086 TP_ARGS(wdev, cookie, chan, duration),
Beni Lev4ee3e062012-08-27 12:49:39 +03002087 TP_STRUCT__entry(
2088 WDEV_ENTRY
2089 __field(u64, cookie)
2090 CHAN_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002091 __field(unsigned int, duration)
2092 ),
2093 TP_fast_assign(
2094 WDEV_ASSIGN;
2095 __entry->cookie = cookie;
2096 CHAN_ASSIGN(chan);
Beni Lev4ee3e062012-08-27 12:49:39 +03002097 __entry->duration = duration;
2098 ),
Johannes Berg42d97a52012-11-08 18:31:02 +01002099 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u",
Beni Lev4ee3e062012-08-27 12:49:39 +03002100 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG,
Johannes Berg42d97a52012-11-08 18:31:02 +01002101 __entry->duration)
Beni Lev4ee3e062012-08-27 12:49:39 +03002102);
2103
2104TRACE_EVENT(cfg80211_ready_on_channel_expired,
2105 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
Johannes Berg42d97a52012-11-08 18:31:02 +01002106 struct ieee80211_channel *chan),
2107 TP_ARGS(wdev, cookie, chan),
Beni Lev4ee3e062012-08-27 12:49:39 +03002108 TP_STRUCT__entry(
2109 WDEV_ENTRY
2110 __field(u64, cookie)
2111 CHAN_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002112 ),
2113 TP_fast_assign(
2114 WDEV_ASSIGN;
2115 __entry->cookie = cookie;
2116 CHAN_ASSIGN(chan);
Beni Lev4ee3e062012-08-27 12:49:39 +03002117 ),
Johannes Berg42d97a52012-11-08 18:31:02 +01002118 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
2119 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002120);
2121
2122TRACE_EVENT(cfg80211_new_sta,
2123 TP_PROTO(struct net_device *netdev, const u8 *mac_addr,
2124 struct station_info *sinfo),
2125 TP_ARGS(netdev, mac_addr, sinfo),
2126 TP_STRUCT__entry(
2127 NETDEV_ENTRY
2128 MAC_ENTRY(mac_addr)
2129 SINFO_ENTRY
2130 ),
2131 TP_fast_assign(
2132 NETDEV_ASSIGN;
2133 MAC_ASSIGN(mac_addr, mac_addr);
2134 SINFO_ASSIGN;
2135 ),
Johannes Bergec816082012-11-16 17:22:28 +01002136 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT,
Beni Lev4ee3e062012-08-27 12:49:39 +03002137 NETDEV_PR_ARG, MAC_PR_ARG(mac_addr))
2138);
2139
2140DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta,
2141 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2142 TP_ARGS(netdev, macaddr)
2143);
2144
2145TRACE_EVENT(cfg80211_rx_mgmt,
2146 TP_PROTO(struct wireless_dev *wdev, int freq, int sig_mbm),
2147 TP_ARGS(wdev, freq, sig_mbm),
2148 TP_STRUCT__entry(
2149 WDEV_ENTRY
2150 __field(int, freq)
2151 __field(int, sig_mbm)
2152 ),
2153 TP_fast_assign(
2154 WDEV_ASSIGN;
2155 __entry->freq = freq;
2156 __entry->sig_mbm = sig_mbm;
2157 ),
2158 TP_printk(WDEV_PR_FMT ", freq: %d, sig mbm: %d",
2159 WDEV_PR_ARG, __entry->freq, __entry->sig_mbm)
2160);
2161
2162TRACE_EVENT(cfg80211_mgmt_tx_status,
2163 TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
2164 TP_ARGS(wdev, cookie, ack),
2165 TP_STRUCT__entry(
2166 WDEV_ENTRY
2167 __field(u64, cookie)
2168 __field(bool, ack)
2169 ),
2170 TP_fast_assign(
2171 WDEV_ASSIGN;
2172 __entry->cookie = cookie;
2173 __entry->ack = ack;
2174 ),
2175 TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
2176 WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
2177);
2178
2179TRACE_EVENT(cfg80211_cqm_rssi_notify,
2180 TP_PROTO(struct net_device *netdev,
2181 enum nl80211_cqm_rssi_threshold_event rssi_event),
2182 TP_ARGS(netdev, rssi_event),
2183 TP_STRUCT__entry(
2184 NETDEV_ENTRY
2185 __field(enum nl80211_cqm_rssi_threshold_event, rssi_event)
2186 ),
2187 TP_fast_assign(
2188 NETDEV_ASSIGN;
2189 __entry->rssi_event = rssi_event;
2190 ),
2191 TP_printk(NETDEV_PR_FMT ", rssi event: %d",
2192 NETDEV_PR_ARG, __entry->rssi_event)
2193);
2194
Johannes Berg683b6d32012-11-08 21:25:48 +01002195TRACE_EVENT(cfg80211_reg_can_beacon,
2196 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2197 TP_ARGS(wiphy, chandef),
Beni Lev4ee3e062012-08-27 12:49:39 +03002198 TP_STRUCT__entry(
2199 WIPHY_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01002200 CHAN_DEF_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002201 ),
2202 TP_fast_assign(
2203 WIPHY_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01002204 CHAN_DEF_ASSIGN(chandef);
Beni Lev4ee3e062012-08-27 12:49:39 +03002205 ),
Johannes Bergec816082012-11-16 17:22:28 +01002206 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
Johannes Berg683b6d32012-11-08 21:25:48 +01002207 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002208);
2209
Simon Wunderlich04f39042013-02-08 18:16:19 +01002210TRACE_EVENT(cfg80211_chandef_dfs_required,
2211 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2212 TP_ARGS(wiphy, chandef),
2213 TP_STRUCT__entry(
2214 WIPHY_ENTRY
2215 CHAN_DEF_ENTRY
2216 ),
2217 TP_fast_assign(
2218 WIPHY_ASSIGN;
2219 CHAN_DEF_ASSIGN(chandef);
2220 ),
2221 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2222 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2223);
2224
Beni Lev4ee3e062012-08-27 12:49:39 +03002225TRACE_EVENT(cfg80211_ch_switch_notify,
Johannes Berg683b6d32012-11-08 21:25:48 +01002226 TP_PROTO(struct net_device *netdev,
2227 struct cfg80211_chan_def *chandef),
2228 TP_ARGS(netdev, chandef),
Beni Lev4ee3e062012-08-27 12:49:39 +03002229 TP_STRUCT__entry(
2230 NETDEV_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01002231 CHAN_DEF_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002232 ),
2233 TP_fast_assign(
2234 NETDEV_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01002235 CHAN_DEF_ASSIGN(chandef);
Beni Lev4ee3e062012-08-27 12:49:39 +03002236 ),
Johannes Bergec816082012-11-16 17:22:28 +01002237 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
Johannes Berg683b6d32012-11-08 21:25:48 +01002238 NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002239);
2240
Simon Wunderlich04f39042013-02-08 18:16:19 +01002241TRACE_EVENT(cfg80211_radar_event,
2242 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2243 TP_ARGS(wiphy, chandef),
2244 TP_STRUCT__entry(
2245 WIPHY_ENTRY
2246 CHAN_DEF_ENTRY
2247 ),
2248 TP_fast_assign(
2249 WIPHY_ASSIGN;
2250 CHAN_DEF_ASSIGN(chandef);
2251 ),
2252 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2253 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2254);
2255
2256TRACE_EVENT(cfg80211_cac_event,
2257 TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt),
2258 TP_ARGS(netdev, evt),
2259 TP_STRUCT__entry(
2260 NETDEV_ENTRY
2261 __field(enum nl80211_radar_event, evt)
2262 ),
2263 TP_fast_assign(
2264 NETDEV_ASSIGN;
2265 __entry->evt = evt;
2266 ),
2267 TP_printk(NETDEV_PR_FMT ", event: %d",
2268 NETDEV_PR_ARG, __entry->evt)
2269);
2270
Beni Lev4ee3e062012-08-27 12:49:39 +03002271DECLARE_EVENT_CLASS(cfg80211_rx_evt,
2272 TP_PROTO(struct net_device *netdev, const u8 *addr),
2273 TP_ARGS(netdev, addr),
2274 TP_STRUCT__entry(
2275 NETDEV_ENTRY
2276 MAC_ENTRY(addr)
2277 ),
2278 TP_fast_assign(
2279 NETDEV_ASSIGN;
2280 MAC_ASSIGN(addr, addr);
2281 ),
Johannes Bergec816082012-11-16 17:22:28 +01002282 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr))
Beni Lev4ee3e062012-08-27 12:49:39 +03002283);
2284
Beni Lev4ee3e062012-08-27 12:49:39 +03002285DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame,
2286 TP_PROTO(struct net_device *netdev, const u8 *addr),
2287 TP_ARGS(netdev, addr)
2288);
2289
2290DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame,
2291 TP_PROTO(struct net_device *netdev, const u8 *addr),
2292 TP_ARGS(netdev, addr)
2293);
2294
Antonio Quartullife94f3a2014-01-29 17:53:43 +01002295TRACE_EVENT(cfg80211_ibss_joined,
2296 TP_PROTO(struct net_device *netdev, const u8 *bssid,
2297 struct ieee80211_channel *channel),
2298 TP_ARGS(netdev, bssid, channel),
2299 TP_STRUCT__entry(
2300 NETDEV_ENTRY
2301 MAC_ENTRY(bssid)
2302 CHAN_ENTRY
2303 ),
2304 TP_fast_assign(
2305 NETDEV_ASSIGN;
2306 MAC_ASSIGN(bssid, bssid);
2307 CHAN_ASSIGN(channel);
2308 ),
2309 TP_printk(NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", " CHAN_PR_FMT,
2310 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
2311);
2312
Beni Lev4ee3e062012-08-27 12:49:39 +03002313TRACE_EVENT(cfg80211_probe_status,
2314 TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie,
2315 bool acked),
2316 TP_ARGS(netdev, addr, cookie, acked),
2317 TP_STRUCT__entry(
2318 NETDEV_ENTRY
2319 MAC_ENTRY(addr)
2320 __field(u64, cookie)
2321 __field(bool, acked)
2322 ),
2323 TP_fast_assign(
2324 NETDEV_ASSIGN;
2325 MAC_ASSIGN(addr, addr);
2326 __entry->cookie = cookie;
2327 __entry->acked = acked;
2328 ),
Johannes Bergec816082012-11-16 17:22:28 +01002329 TP_printk(NETDEV_PR_FMT " addr:" MAC_PR_FMT ", cookie: %llu, acked: %s",
Beni Lev4ee3e062012-08-27 12:49:39 +03002330 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie,
2331 BOOL_TO_STR(__entry->acked))
2332);
2333
2334TRACE_EVENT(cfg80211_cqm_pktloss_notify,
2335 TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets),
2336 TP_ARGS(netdev, peer, num_packets),
2337 TP_STRUCT__entry(
2338 NETDEV_ENTRY
2339 MAC_ENTRY(peer)
2340 __field(u32, num_packets)
2341 ),
2342 TP_fast_assign(
2343 NETDEV_ASSIGN;
2344 MAC_ASSIGN(peer, peer);
2345 __entry->num_packets = num_packets;
2346 ),
2347 TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u",
2348 NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets)
2349);
2350
2351DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify,
2352 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2353 TP_ARGS(netdev, macaddr)
2354);
2355
2356TRACE_EVENT(cfg80211_pmksa_candidate_notify,
2357 TP_PROTO(struct net_device *netdev, int index, const u8 *bssid,
2358 bool preauth),
2359 TP_ARGS(netdev, index, bssid, preauth),
2360 TP_STRUCT__entry(
2361 NETDEV_ENTRY
2362 __field(int, index)
2363 MAC_ENTRY(bssid)
2364 __field(bool, preauth)
2365 ),
2366 TP_fast_assign(
2367 NETDEV_ASSIGN;
2368 __entry->index = index;
2369 MAC_ASSIGN(bssid, bssid);
2370 __entry->preauth = preauth;
2371 ),
2372 TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s",
2373 NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid),
2374 BOOL_TO_STR(__entry->preauth))
2375);
2376
2377TRACE_EVENT(cfg80211_report_obss_beacon,
2378 TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len,
2379 int freq, int sig_dbm),
2380 TP_ARGS(wiphy, frame, len, freq, sig_dbm),
2381 TP_STRUCT__entry(
2382 WIPHY_ENTRY
2383 __field(int, freq)
2384 __field(int, sig_dbm)
2385 ),
2386 TP_fast_assign(
2387 WIPHY_ASSIGN;
2388 __entry->freq = freq;
2389 __entry->sig_dbm = sig_dbm;
2390 ),
2391 TP_printk(WIPHY_PR_FMT ", freq: %d, sig_dbm: %d",
2392 WIPHY_PR_ARG, __entry->freq, __entry->sig_dbm)
2393);
2394
Jouni Malinen3475b092012-11-16 22:49:57 +02002395TRACE_EVENT(cfg80211_tdls_oper_request,
2396 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer,
2397 enum nl80211_tdls_operation oper, u16 reason_code),
2398 TP_ARGS(wiphy, netdev, peer, oper, reason_code),
2399 TP_STRUCT__entry(
2400 WIPHY_ENTRY
2401 NETDEV_ENTRY
2402 MAC_ENTRY(peer)
2403 __field(enum nl80211_tdls_operation, oper)
2404 __field(u16, reason_code)
2405 ),
2406 TP_fast_assign(
2407 WIPHY_ASSIGN;
2408 NETDEV_ASSIGN;
2409 MAC_ASSIGN(peer, peer);
2410 __entry->oper = oper;
2411 __entry->reason_code = reason_code;
2412 ),
2413 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", oper: %d, reason_code %u",
2414 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper,
2415 __entry->reason_code)
2416 );
2417
Beni Lev4ee3e062012-08-27 12:49:39 +03002418TRACE_EVENT(cfg80211_scan_done,
2419 TP_PROTO(struct cfg80211_scan_request *request, bool aborted),
2420 TP_ARGS(request, aborted),
2421 TP_STRUCT__entry(
2422 __field(u32, n_channels)
2423 __dynamic_array(u8, ie, request ? request->ie_len : 0)
2424 __array(u32, rates, IEEE80211_NUM_BANDS)
2425 __field(u32, wdev_id)
2426 MAC_ENTRY(wiphy_mac)
2427 __field(bool, no_cck)
2428 __field(bool, aborted)
2429 ),
2430 TP_fast_assign(
2431 if (request) {
2432 memcpy(__get_dynamic_array(ie), request->ie,
2433 request->ie_len);
2434 memcpy(__entry->rates, request->rates,
2435 IEEE80211_NUM_BANDS);
2436 __entry->wdev_id = request->wdev ?
2437 request->wdev->identifier : 0;
2438 if (request->wiphy)
2439 MAC_ASSIGN(wiphy_mac,
2440 request->wiphy->perm_addr);
2441 __entry->no_cck = request->no_cck;
2442 }
2443 __entry->aborted = aborted;
2444 ),
2445 TP_printk("aborted: %s", BOOL_TO_STR(__entry->aborted))
2446);
2447
2448DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_results,
2449 TP_PROTO(struct wiphy *wiphy),
2450 TP_ARGS(wiphy)
2451);
2452
2453DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_stopped,
2454 TP_PROTO(struct wiphy *wiphy),
2455 TP_ARGS(wiphy)
2456);
2457
2458TRACE_EVENT(cfg80211_get_bss,
2459 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
2460 const u8 *bssid, const u8 *ssid, size_t ssid_len,
2461 u16 capa_mask, u16 capa_val),
2462 TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, capa_mask, capa_val),
2463 TP_STRUCT__entry(
2464 WIPHY_ENTRY
2465 CHAN_ENTRY
2466 MAC_ENTRY(bssid)
2467 __dynamic_array(u8, ssid, ssid_len)
2468 __field(u16, capa_mask)
2469 __field(u16, capa_val)
2470 ),
2471 TP_fast_assign(
2472 WIPHY_ASSIGN;
2473 CHAN_ASSIGN(channel);
2474 MAC_ASSIGN(bssid, bssid);
2475 memcpy(__get_dynamic_array(ssid), ssid, ssid_len);
2476 __entry->capa_mask = capa_mask;
2477 __entry->capa_val = capa_val;
2478 ),
Johannes Bergec816082012-11-16 17:22:28 +01002479 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT ", buf: %#.2x, "
Beni Lev4ee3e062012-08-27 12:49:39 +03002480 "capa_mask: %d, capa_val: %u", WIPHY_PR_ARG, CHAN_PR_ARG,
2481 MAC_PR_ARG(bssid), ((u8 *)__get_dynamic_array(ssid))[0],
2482 __entry->capa_mask, __entry->capa_val)
2483);
2484
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002485TRACE_EVENT(cfg80211_inform_bss_width_frame,
Beni Lev4ee3e062012-08-27 12:49:39 +03002486 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002487 enum nl80211_bss_scan_width scan_width,
Beni Lev4ee3e062012-08-27 12:49:39 +03002488 struct ieee80211_mgmt *mgmt, size_t len,
2489 s32 signal),
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002490 TP_ARGS(wiphy, channel, scan_width, mgmt, len, signal),
Beni Lev4ee3e062012-08-27 12:49:39 +03002491 TP_STRUCT__entry(
2492 WIPHY_ENTRY
2493 CHAN_ENTRY
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002494 __field(enum nl80211_bss_scan_width, scan_width)
Beni Lev4ee3e062012-08-27 12:49:39 +03002495 __dynamic_array(u8, mgmt, len)
2496 __field(s32, signal)
2497 ),
2498 TP_fast_assign(
2499 WIPHY_ASSIGN;
2500 CHAN_ASSIGN(channel);
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002501 __entry->scan_width = scan_width;
Beni Lev4ee3e062012-08-27 12:49:39 +03002502 if (mgmt)
2503 memcpy(__get_dynamic_array(mgmt), mgmt, len);
2504 __entry->signal = signal;
2505 ),
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002506 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT "(scan_width: %d) signal: %d",
2507 WIPHY_PR_ARG, CHAN_PR_ARG, __entry->scan_width,
2508 __entry->signal)
Beni Lev4ee3e062012-08-27 12:49:39 +03002509);
2510
2511DECLARE_EVENT_CLASS(cfg80211_bss_evt,
2512 TP_PROTO(struct cfg80211_bss *pub),
2513 TP_ARGS(pub),
2514 TP_STRUCT__entry(
2515 MAC_ENTRY(bssid)
2516 CHAN_ENTRY
2517 ),
2518 TP_fast_assign(
2519 MAC_ASSIGN(bssid, pub->bssid);
2520 CHAN_ASSIGN(pub->channel);
2521 ),
Johannes Bergec816082012-11-16 17:22:28 +01002522 TP_printk(MAC_PR_FMT ", " CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002523);
2524
2525DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss,
2526 TP_PROTO(struct cfg80211_bss *pub),
2527 TP_ARGS(pub)
2528);
2529
2530TRACE_EVENT(cfg80211_return_uint,
2531 TP_PROTO(unsigned int ret),
2532 TP_ARGS(ret),
2533 TP_STRUCT__entry(
2534 __field(unsigned int, ret)
2535 ),
2536 TP_fast_assign(
2537 __entry->ret = ret;
2538 ),
2539 TP_printk("ret: %d", __entry->ret)
2540);
2541
2542TRACE_EVENT(cfg80211_return_u32,
2543 TP_PROTO(u32 ret),
2544 TP_ARGS(ret),
2545 TP_STRUCT__entry(
2546 __field(u32, ret)
2547 ),
2548 TP_fast_assign(
2549 __entry->ret = ret;
2550 ),
2551 TP_printk("ret: %u", __entry->ret)
2552);
2553
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002554TRACE_EVENT(cfg80211_report_wowlan_wakeup,
2555 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2556 struct cfg80211_wowlan_wakeup *wakeup),
2557 TP_ARGS(wiphy, wdev, wakeup),
2558 TP_STRUCT__entry(
2559 WIPHY_ENTRY
2560 WDEV_ENTRY
Johannes Berga92eecb2013-04-29 12:09:14 +02002561 __field(bool, non_wireless)
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002562 __field(bool, disconnect)
2563 __field(bool, magic_pkt)
2564 __field(bool, gtk_rekey_failure)
2565 __field(bool, eap_identity_req)
2566 __field(bool, four_way_handshake)
2567 __field(bool, rfkill_release)
2568 __field(s32, pattern_idx)
2569 __field(u32, packet_len)
Johannes Berga92eecb2013-04-29 12:09:14 +02002570 __dynamic_array(u8, packet,
2571 wakeup ? wakeup->packet_present_len : 0)
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002572 ),
2573 TP_fast_assign(
2574 WIPHY_ASSIGN;
2575 WDEV_ASSIGN;
Johannes Berga92eecb2013-04-29 12:09:14 +02002576 __entry->non_wireless = !wakeup;
2577 __entry->disconnect = wakeup ? wakeup->disconnect : false;
2578 __entry->magic_pkt = wakeup ? wakeup->magic_pkt : false;
2579 __entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false;
2580 __entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false;
2581 __entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false;
2582 __entry->rfkill_release = wakeup ? wakeup->rfkill_release : false;
2583 __entry->pattern_idx = wakeup ? wakeup->pattern_idx : false;
2584 __entry->packet_len = wakeup ? wakeup->packet_len : false;
2585 if (wakeup && wakeup->packet && wakeup->packet_present_len)
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002586 memcpy(__get_dynamic_array(packet), wakeup->packet,
2587 wakeup->packet_present_len);
2588 ),
2589 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
2590);
2591
Jouni Malinen355199e2013-02-27 17:14:27 +02002592TRACE_EVENT(cfg80211_ft_event,
2593 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2594 struct cfg80211_ft_event_params *ft_event),
2595 TP_ARGS(wiphy, netdev, ft_event),
2596 TP_STRUCT__entry(
2597 WIPHY_ENTRY
2598 NETDEV_ENTRY
2599 __dynamic_array(u8, ies, ft_event->ies_len)
2600 MAC_ENTRY(target_ap)
2601 __dynamic_array(u8, ric_ies, ft_event->ric_ies_len)
2602 ),
2603 TP_fast_assign(
2604 WIPHY_ASSIGN;
2605 NETDEV_ASSIGN;
2606 if (ft_event->ies)
2607 memcpy(__get_dynamic_array(ies), ft_event->ies,
2608 ft_event->ies_len);
2609 MAC_ASSIGN(target_ap, ft_event->target_ap);
2610 if (ft_event->ric_ies)
2611 memcpy(__get_dynamic_array(ric_ies), ft_event->ric_ies,
2612 ft_event->ric_ies_len);
2613 ),
2614 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", target_ap: " MAC_PR_FMT,
2615 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(target_ap))
2616);
2617
Beni Lev14e8a3c2012-07-31 18:48:27 +03002618#endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
2619
2620#undef TRACE_INCLUDE_PATH
2621#define TRACE_INCLUDE_PATH .
2622#undef TRACE_INCLUDE_FILE
2623#define TRACE_INCLUDE_FILE trace
2624#include <trace/define_trace.h>