blob: fbcc23edee5474459950b8566ecffd541ad4ed7d [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,
1471 u16 status_code, const u8 *buf, size_t len),
1472 TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code,
1473 buf, len),
1474 TP_STRUCT__entry(
1475 WIPHY_ENTRY
1476 NETDEV_ENTRY
1477 MAC_ENTRY(peer)
1478 __field(u8, action_code)
1479 __field(u8, dialog_token)
1480 __field(u16, status_code)
1481 __dynamic_array(u8, buf, len)
1482 ),
1483 TP_fast_assign(
1484 WIPHY_ASSIGN;
1485 NETDEV_ASSIGN;
1486 MAC_ASSIGN(peer, peer);
1487 __entry->action_code = action_code;
1488 __entry->dialog_token = dialog_token;
1489 __entry->status_code = status_code;
1490 memcpy(__get_dynamic_array(buf), buf, len);
1491 ),
Johannes Bergec816082012-11-16 17:22:28 +01001492 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", action_code: %u, "
Beni Lev14e8a3c2012-07-31 18:48:27 +03001493 "dialog_token: %u, status_code: %u, buf: %#.2x ",
1494 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
1495 __entry->action_code, __entry->dialog_token,
1496 __entry->status_code, ((u8 *)__get_dynamic_array(buf))[0])
1497);
1498
1499TRACE_EVENT(rdev_dump_survey,
1500 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx),
1501 TP_ARGS(wiphy, netdev, idx),
1502 TP_STRUCT__entry(
1503 WIPHY_ENTRY
1504 NETDEV_ENTRY
1505 __field(int, idx)
1506 ),
1507 TP_fast_assign(
1508 WIPHY_ASSIGN;
1509 NETDEV_ASSIGN;
1510 __entry->idx = idx;
1511 ),
Johannes Bergec816082012-11-16 17:22:28 +01001512 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001513 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx)
1514);
1515
1516TRACE_EVENT(rdev_return_int_survey_info,
1517 TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info),
1518 TP_ARGS(wiphy, ret, info),
1519 TP_STRUCT__entry(
1520 WIPHY_ENTRY
1521 CHAN_ENTRY
1522 __field(int, ret)
1523 __field(u64, channel_time)
1524 __field(u64, channel_time_busy)
1525 __field(u64, channel_time_ext_busy)
1526 __field(u64, channel_time_rx)
1527 __field(u64, channel_time_tx)
1528 __field(u32, filled)
1529 __field(s8, noise)
1530 ),
1531 TP_fast_assign(
1532 WIPHY_ASSIGN;
1533 CHAN_ASSIGN(info->channel);
1534 __entry->ret = ret;
1535 __entry->channel_time = info->channel_time;
1536 __entry->channel_time_busy = info->channel_time_busy;
1537 __entry->channel_time_ext_busy = info->channel_time_ext_busy;
1538 __entry->channel_time_rx = info->channel_time_rx;
1539 __entry->channel_time_tx = info->channel_time_tx;
1540 __entry->filled = info->filled;
1541 __entry->noise = info->noise;
1542 ),
1543 TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT
1544 ", channel time: %llu, channel time busy: %llu, "
1545 "channel time extension busy: %llu, channel time rx: %llu, "
1546 "channel time tx: %llu, filled: %u, noise: %d",
1547 WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG,
1548 __entry->channel_time, __entry->channel_time_busy,
1549 __entry->channel_time_ext_busy, __entry->channel_time_rx,
1550 __entry->channel_time_tx, __entry->filled, __entry->noise)
1551);
1552
1553TRACE_EVENT(rdev_tdls_oper,
1554 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1555 u8 *peer, enum nl80211_tdls_operation oper),
1556 TP_ARGS(wiphy, netdev, peer, oper),
1557 TP_STRUCT__entry(
1558 WIPHY_ENTRY
1559 NETDEV_ENTRY
1560 MAC_ENTRY(peer)
1561 __field(enum nl80211_tdls_operation, oper)
1562 ),
1563 TP_fast_assign(
1564 WIPHY_ASSIGN;
1565 NETDEV_ASSIGN;
1566 MAC_ASSIGN(peer, peer);
1567 __entry->oper = oper;
1568 ),
Johannes Bergec816082012-11-16 17:22:28 +01001569 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", oper: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001570 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper)
1571);
1572
1573DECLARE_EVENT_CLASS(rdev_pmksa,
1574 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1575 struct cfg80211_pmksa *pmksa),
1576 TP_ARGS(wiphy, netdev, pmksa),
1577 TP_STRUCT__entry(
1578 WIPHY_ENTRY
1579 NETDEV_ENTRY
1580 MAC_ENTRY(bssid)
1581 ),
1582 TP_fast_assign(
1583 WIPHY_ASSIGN;
1584 NETDEV_ASSIGN;
1585 MAC_ASSIGN(bssid, pmksa->bssid);
1586 ),
Johannes Bergec816082012-11-16 17:22:28 +01001587 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001588 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid))
1589);
1590
1591TRACE_EVENT(rdev_probe_client,
1592 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1593 const u8 *peer),
1594 TP_ARGS(wiphy, netdev, peer),
1595 TP_STRUCT__entry(
1596 WIPHY_ENTRY
1597 NETDEV_ENTRY
1598 MAC_ENTRY(peer)
1599 ),
1600 TP_fast_assign(
1601 WIPHY_ASSIGN;
1602 NETDEV_ASSIGN;
1603 MAC_ASSIGN(peer, peer);
1604 ),
Johannes Bergec816082012-11-16 17:22:28 +01001605 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001606 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1607);
1608
1609DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa,
1610 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1611 struct cfg80211_pmksa *pmksa),
1612 TP_ARGS(wiphy, netdev, pmksa)
1613);
1614
1615DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa,
1616 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1617 struct cfg80211_pmksa *pmksa),
1618 TP_ARGS(wiphy, netdev, pmksa)
1619);
1620
1621TRACE_EVENT(rdev_remain_on_channel,
1622 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1623 struct ieee80211_channel *chan,
Johannes Berg42d97a52012-11-08 18:31:02 +01001624 unsigned int duration),
1625 TP_ARGS(wiphy, wdev, chan, duration),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001626 TP_STRUCT__entry(
1627 WIPHY_ENTRY
1628 WDEV_ENTRY
1629 CHAN_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001630 __field(unsigned int, duration)
1631 ),
1632 TP_fast_assign(
1633 WIPHY_ASSIGN;
1634 WDEV_ASSIGN;
1635 CHAN_ASSIGN(chan);
Beni Lev14e8a3c2012-07-31 18:48:27 +03001636 __entry->duration = duration;
1637 ),
Johannes Bergec816082012-11-16 17:22:28 +01001638 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", duration: %u",
Johannes Berg42d97a52012-11-08 18:31:02 +01001639 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001640);
1641
1642TRACE_EVENT(rdev_return_int_cookie,
1643 TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie),
1644 TP_ARGS(wiphy, ret, cookie),
1645 TP_STRUCT__entry(
1646 WIPHY_ENTRY
1647 __field(int, ret)
1648 __field(u64, cookie)
1649 ),
1650 TP_fast_assign(
1651 WIPHY_ASSIGN;
1652 __entry->ret = ret;
1653 __entry->cookie = cookie;
1654 ),
1655 TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu",
1656 WIPHY_PR_ARG, __entry->ret, __entry->cookie)
1657);
1658
1659TRACE_EVENT(rdev_cancel_remain_on_channel,
1660 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
1661 TP_ARGS(wiphy, wdev, cookie),
1662 TP_STRUCT__entry(
1663 WIPHY_ENTRY
1664 WDEV_ENTRY
1665 __field(u64, cookie)
1666 ),
1667 TP_fast_assign(
1668 WIPHY_ASSIGN;
1669 WDEV_ASSIGN;
1670 __entry->cookie = cookie;
1671 ),
Johannes Bergec816082012-11-16 17:22:28 +01001672 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001673 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1674);
1675
1676TRACE_EVENT(rdev_mgmt_tx,
1677 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
Andrei Otcheretianskib176e622013-11-18 19:06:49 +02001678 struct cfg80211_mgmt_tx_params *params),
1679 TP_ARGS(wiphy, wdev, params),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001680 TP_STRUCT__entry(
1681 WIPHY_ENTRY
1682 WDEV_ENTRY
1683 CHAN_ENTRY
1684 __field(bool, offchan)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001685 __field(unsigned int, wait)
1686 __field(bool, no_cck)
1687 __field(bool, dont_wait_for_ack)
1688 ),
1689 TP_fast_assign(
1690 WIPHY_ASSIGN;
1691 WDEV_ASSIGN;
Andrei Otcheretianskib176e622013-11-18 19:06:49 +02001692 CHAN_ASSIGN(params->chan);
1693 __entry->offchan = params->offchan;
1694 __entry->wait = params->wait;
1695 __entry->no_cck = params->no_cck;
1696 __entry->dont_wait_for_ack = params->dont_wait_for_ack;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001697 ),
Johannes Bergec816082012-11-16 17:22:28 +01001698 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s,"
Johannes Berg42d97a52012-11-08 18:31:02 +01001699 " wait: %u, no cck: %s, dont wait for ack: %s",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001700 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG,
Johannes Berg42d97a52012-11-08 18:31:02 +01001701 BOOL_TO_STR(__entry->offchan), __entry->wait,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001702 BOOL_TO_STR(__entry->no_cck),
1703 BOOL_TO_STR(__entry->dont_wait_for_ack))
1704);
1705
1706TRACE_EVENT(rdev_set_noack_map,
1707 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1708 u16 noack_map),
1709 TP_ARGS(wiphy, netdev, noack_map),
1710 TP_STRUCT__entry(
1711 WIPHY_ENTRY
1712 NETDEV_ENTRY
1713 __field(u16, noack_map)
1714 ),
1715 TP_fast_assign(
1716 WIPHY_ASSIGN;
1717 NETDEV_ASSIGN;
1718 __entry->noack_map = noack_map;
1719 ),
Johannes Bergec816082012-11-16 17:22:28 +01001720 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", noack_map: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001721 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map)
1722);
1723
1724TRACE_EVENT(rdev_get_et_sset_count,
1725 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int sset),
1726 TP_ARGS(wiphy, netdev, sset),
1727 TP_STRUCT__entry(
1728 WIPHY_ENTRY
1729 NETDEV_ENTRY
1730 __field(int, sset)
1731 ),
1732 TP_fast_assign(
1733 WIPHY_ASSIGN;
1734 NETDEV_ASSIGN;
1735 __entry->sset = sset;
1736 ),
Johannes Bergec816082012-11-16 17:22:28 +01001737 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", sset: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001738 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sset)
1739);
1740
1741TRACE_EVENT(rdev_get_et_strings,
1742 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 sset),
1743 TP_ARGS(wiphy, netdev, sset),
1744 TP_STRUCT__entry(
1745 WIPHY_ENTRY
1746 NETDEV_ENTRY
1747 __field(u32, sset)
1748 ),
1749 TP_fast_assign(
1750 WIPHY_ASSIGN;
1751 NETDEV_ASSIGN;
1752 __entry->sset = sset;
1753 ),
Johannes Bergec816082012-11-16 17:22:28 +01001754 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", sset: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001755 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sset)
1756);
1757
1758DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel,
1759 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1760 TP_ARGS(wiphy, wdev)
1761);
1762
Johannes Berg683b6d32012-11-08 21:25:48 +01001763TRACE_EVENT(rdev_return_chandef,
1764 TP_PROTO(struct wiphy *wiphy, int ret,
1765 struct cfg80211_chan_def *chandef),
1766 TP_ARGS(wiphy, ret, chandef),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001767 TP_STRUCT__entry(
1768 WIPHY_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01001769 __field(int, ret)
1770 CHAN_DEF_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001771 ),
1772 TP_fast_assign(
1773 WIPHY_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01001774 if (ret == 0)
1775 CHAN_DEF_ASSIGN(chandef);
1776 else
1777 CHAN_DEF_ASSIGN((struct cfg80211_chan_def *)NULL);
1778 __entry->ret = ret;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001779 ),
Johannes Bergec816082012-11-16 17:22:28 +01001780 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", ret: %d",
Johannes Berg683b6d32012-11-08 21:25:48 +01001781 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->ret)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001782);
1783
Johannes Bergeeb126e2012-10-23 15:16:50 +02001784DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device,
1785 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1786 TP_ARGS(wiphy, wdev)
1787);
1788
1789DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device,
1790 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1791 TP_ARGS(wiphy, wdev)
1792);
1793
Vasanthakumar Thiagarajan77765ea2013-01-18 11:18:45 +05301794TRACE_EVENT(rdev_set_mac_acl,
1795 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1796 struct cfg80211_acl_data *params),
1797 TP_ARGS(wiphy, netdev, params),
1798 TP_STRUCT__entry(
1799 WIPHY_ENTRY
1800 NETDEV_ENTRY
1801 __field(u32, acl_policy)
1802 ),
1803 TP_fast_assign(
1804 WIPHY_ASSIGN;
Vladimir Kondratiev021fcdc2013-03-07 11:08:29 +02001805 NETDEV_ASSIGN;
Vasanthakumar Thiagarajan77765ea2013-01-18 11:18:45 +05301806 __entry->acl_policy = params->acl_policy;
1807 ),
1808 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", acl policy: %d",
1809 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->acl_policy)
1810);
1811
Jouni Malinen355199e2013-02-27 17:14:27 +02001812TRACE_EVENT(rdev_update_ft_ies,
1813 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1814 struct cfg80211_update_ft_ies_params *ftie),
1815 TP_ARGS(wiphy, netdev, ftie),
1816 TP_STRUCT__entry(
1817 WIPHY_ENTRY
1818 NETDEV_ENTRY
1819 __field(u16, md)
1820 __dynamic_array(u8, ie, ftie->ie_len)
1821 ),
1822 TP_fast_assign(
1823 WIPHY_ASSIGN;
1824 NETDEV_ASSIGN;
1825 __entry->md = ftie->md;
1826 memcpy(__get_dynamic_array(ie), ftie->ie, ftie->ie_len);
1827 ),
1828 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", md: 0x%x",
1829 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->md)
1830);
1831
Arend van Spriel5de17982013-04-18 15:49:00 +02001832TRACE_EVENT(rdev_crit_proto_start,
1833 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1834 enum nl80211_crit_proto_id protocol, u16 duration),
1835 TP_ARGS(wiphy, wdev, protocol, duration),
1836 TP_STRUCT__entry(
1837 WIPHY_ENTRY
1838 WDEV_ENTRY
1839 __field(u16, proto)
1840 __field(u16, duration)
1841 ),
1842 TP_fast_assign(
1843 WIPHY_ASSIGN;
1844 WDEV_ASSIGN;
1845 __entry->proto = protocol;
1846 __entry->duration = duration;
1847 ),
1848 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", proto=%x, duration=%u",
1849 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->proto, __entry->duration)
1850);
1851
1852TRACE_EVENT(rdev_crit_proto_stop,
1853 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1854 TP_ARGS(wiphy, wdev),
1855 TP_STRUCT__entry(
1856 WIPHY_ENTRY
1857 WDEV_ENTRY
1858 ),
1859 TP_fast_assign(
1860 WIPHY_ASSIGN;
1861 WDEV_ASSIGN;
1862 ),
1863 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
1864 WIPHY_PR_ARG, WDEV_PR_ARG)
1865);
1866
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001867TRACE_EVENT(rdev_channel_switch,
1868 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1869 struct cfg80211_csa_settings *params),
1870 TP_ARGS(wiphy, netdev, params),
1871 TP_STRUCT__entry(
1872 WIPHY_ENTRY
1873 NETDEV_ENTRY
1874 CHAN_DEF_ENTRY
1875 __field(u16, counter_offset_beacon)
1876 __field(u16, counter_offset_presp)
1877 __field(bool, radar_required)
1878 __field(bool, block_tx)
1879 __field(u8, count)
1880 ),
1881 TP_fast_assign(
1882 WIPHY_ASSIGN;
1883 NETDEV_ASSIGN;
1884 CHAN_DEF_ASSIGN(&params->chandef);
1885 __entry->counter_offset_beacon = params->counter_offset_beacon;
1886 __entry->counter_offset_presp = params->counter_offset_presp;
1887 __entry->radar_required = params->radar_required;
1888 __entry->block_tx = params->block_tx;
1889 __entry->count = params->count;
1890 ),
1891 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
1892 ", block_tx: %d, count: %u, radar_required: %d"
1893 ", counter offsets (beacon/presp): %u/%u",
1894 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
1895 __entry->block_tx, __entry->count, __entry->radar_required,
1896 __entry->counter_offset_beacon,
1897 __entry->counter_offset_presp)
1898);
1899
Kyeyoon Parkfa9ffc72013-12-16 23:01:30 -08001900TRACE_EVENT(rdev_set_qos_map,
1901 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1902 struct cfg80211_qos_map *qos_map),
1903 TP_ARGS(wiphy, netdev, qos_map),
1904 TP_STRUCT__entry(
1905 WIPHY_ENTRY
1906 NETDEV_ENTRY
1907 QOS_MAP_ENTRY
1908 ),
1909 TP_fast_assign(
1910 WIPHY_ASSIGN;
1911 NETDEV_ASSIGN;
1912 QOS_MAP_ASSIGN(qos_map);
1913 ),
1914 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", num_des: %u",
1915 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->num_des)
1916);
1917
Beni Lev4ee3e062012-08-27 12:49:39 +03001918/*************************************************************
1919 * cfg80211 exported functions traces *
1920 *************************************************************/
1921
1922TRACE_EVENT(cfg80211_return_bool,
1923 TP_PROTO(bool ret),
1924 TP_ARGS(ret),
1925 TP_STRUCT__entry(
1926 __field(bool, ret)
1927 ),
1928 TP_fast_assign(
1929 __entry->ret = ret;
1930 ),
1931 TP_printk("returned %s", BOOL_TO_STR(__entry->ret))
1932);
1933
1934DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt,
1935 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
1936 TP_ARGS(netdev, macaddr),
1937 TP_STRUCT__entry(
1938 NETDEV_ENTRY
1939 MAC_ENTRY(macaddr)
1940 ),
1941 TP_fast_assign(
1942 NETDEV_ASSIGN;
1943 MAC_ASSIGN(macaddr, macaddr);
1944 ),
1945 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
1946 NETDEV_PR_ARG, MAC_PR_ARG(macaddr))
1947);
1948
1949DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate,
1950 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
1951 TP_ARGS(netdev, macaddr)
1952);
1953
1954DECLARE_EVENT_CLASS(netdev_evt_only,
1955 TP_PROTO(struct net_device *netdev),
1956 TP_ARGS(netdev),
1957 TP_STRUCT__entry(
1958 NETDEV_ENTRY
1959 ),
1960 TP_fast_assign(
1961 NETDEV_ASSIGN;
1962 ),
1963 TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG)
1964);
1965
1966DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth,
1967 TP_PROTO(struct net_device *netdev),
1968 TP_ARGS(netdev)
1969);
1970
1971TRACE_EVENT(cfg80211_send_rx_assoc,
1972 TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss),
1973 TP_ARGS(netdev, bss),
1974 TP_STRUCT__entry(
1975 NETDEV_ENTRY
1976 MAC_ENTRY(bssid)
1977 CHAN_ENTRY
1978 ),
1979 TP_fast_assign(
1980 NETDEV_ASSIGN;
1981 MAC_ASSIGN(bssid, bss->bssid);
1982 CHAN_ASSIGN(bss->channel);
1983 ),
Johannes Bergec816082012-11-16 17:22:28 +01001984 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", " CHAN_PR_FMT,
Beni Lev4ee3e062012-08-27 12:49:39 +03001985 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
1986);
1987
Johannes Berg6ff57cf2013-05-16 00:55:00 +02001988DECLARE_EVENT_CLASS(netdev_frame_event,
1989 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
1990 TP_ARGS(netdev, buf, len),
1991 TP_STRUCT__entry(
1992 NETDEV_ENTRY
1993 __dynamic_array(u8, frame, len)
1994 ),
1995 TP_fast_assign(
1996 NETDEV_ASSIGN;
1997 memcpy(__get_dynamic_array(frame), buf, len);
1998 ),
1999 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2000 NETDEV_PR_ARG,
2001 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
Beni Lev4ee3e062012-08-27 12:49:39 +03002002);
2003
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002004DEFINE_EVENT(netdev_frame_event, cfg80211_rx_unprot_mlme_mgmt,
2005 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2006 TP_ARGS(netdev, buf, len)
Beni Lev4ee3e062012-08-27 12:49:39 +03002007);
2008
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002009DEFINE_EVENT(netdev_frame_event, cfg80211_rx_mlme_mgmt,
2010 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2011 TP_ARGS(netdev, buf, len)
Beni Lev4ee3e062012-08-27 12:49:39 +03002012);
2013
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002014TRACE_EVENT(cfg80211_tx_mlme_mgmt,
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
2030DECLARE_EVENT_CLASS(netdev_mac_evt,
2031 TP_PROTO(struct net_device *netdev, const u8 *mac),
2032 TP_ARGS(netdev, mac),
2033 TP_STRUCT__entry(
2034 NETDEV_ENTRY
2035 MAC_ENTRY(mac)
2036 ),
2037 TP_fast_assign(
2038 NETDEV_ASSIGN;
2039 MAC_ASSIGN(mac, mac)
2040 ),
2041 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
2042 NETDEV_PR_ARG, MAC_PR_ARG(mac))
2043);
2044
2045DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout,
2046 TP_PROTO(struct net_device *netdev, const u8 *mac),
2047 TP_ARGS(netdev, mac)
2048);
2049
2050DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout,
2051 TP_PROTO(struct net_device *netdev, const u8 *mac),
2052 TP_ARGS(netdev, mac)
2053);
2054
2055TRACE_EVENT(cfg80211_michael_mic_failure,
2056 TP_PROTO(struct net_device *netdev, const u8 *addr,
2057 enum nl80211_key_type key_type, int key_id, const u8 *tsc),
2058 TP_ARGS(netdev, addr, key_type, key_id, tsc),
2059 TP_STRUCT__entry(
2060 NETDEV_ENTRY
2061 MAC_ENTRY(addr)
2062 __field(enum nl80211_key_type, key_type)
2063 __field(int, key_id)
2064 __array(u8, tsc, 6)
2065 ),
2066 TP_fast_assign(
2067 NETDEV_ASSIGN;
2068 MAC_ASSIGN(addr, addr);
2069 __entry->key_type = key_type;
2070 __entry->key_id = key_id;
2071 memcpy(__entry->tsc, tsc, 6);
2072 ),
Johannes Bergec816082012-11-16 17:22:28 +01002073 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm",
Beni Lev4ee3e062012-08-27 12:49:39 +03002074 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type,
2075 __entry->key_id, __entry->tsc)
2076);
2077
2078TRACE_EVENT(cfg80211_ready_on_channel,
2079 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2080 struct ieee80211_channel *chan,
Johannes Berg42d97a52012-11-08 18:31:02 +01002081 unsigned int duration),
2082 TP_ARGS(wdev, cookie, chan, duration),
Beni Lev4ee3e062012-08-27 12:49:39 +03002083 TP_STRUCT__entry(
2084 WDEV_ENTRY
2085 __field(u64, cookie)
2086 CHAN_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002087 __field(unsigned int, duration)
2088 ),
2089 TP_fast_assign(
2090 WDEV_ASSIGN;
2091 __entry->cookie = cookie;
2092 CHAN_ASSIGN(chan);
Beni Lev4ee3e062012-08-27 12:49:39 +03002093 __entry->duration = duration;
2094 ),
Johannes Berg42d97a52012-11-08 18:31:02 +01002095 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u",
Beni Lev4ee3e062012-08-27 12:49:39 +03002096 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG,
Johannes Berg42d97a52012-11-08 18:31:02 +01002097 __entry->duration)
Beni Lev4ee3e062012-08-27 12:49:39 +03002098);
2099
2100TRACE_EVENT(cfg80211_ready_on_channel_expired,
2101 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
Johannes Berg42d97a52012-11-08 18:31:02 +01002102 struct ieee80211_channel *chan),
2103 TP_ARGS(wdev, cookie, chan),
Beni Lev4ee3e062012-08-27 12:49:39 +03002104 TP_STRUCT__entry(
2105 WDEV_ENTRY
2106 __field(u64, cookie)
2107 CHAN_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002108 ),
2109 TP_fast_assign(
2110 WDEV_ASSIGN;
2111 __entry->cookie = cookie;
2112 CHAN_ASSIGN(chan);
Beni Lev4ee3e062012-08-27 12:49:39 +03002113 ),
Johannes Berg42d97a52012-11-08 18:31:02 +01002114 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
2115 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002116);
2117
2118TRACE_EVENT(cfg80211_new_sta,
2119 TP_PROTO(struct net_device *netdev, const u8 *mac_addr,
2120 struct station_info *sinfo),
2121 TP_ARGS(netdev, mac_addr, sinfo),
2122 TP_STRUCT__entry(
2123 NETDEV_ENTRY
2124 MAC_ENTRY(mac_addr)
2125 SINFO_ENTRY
2126 ),
2127 TP_fast_assign(
2128 NETDEV_ASSIGN;
2129 MAC_ASSIGN(mac_addr, mac_addr);
2130 SINFO_ASSIGN;
2131 ),
Johannes Bergec816082012-11-16 17:22:28 +01002132 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT,
Beni Lev4ee3e062012-08-27 12:49:39 +03002133 NETDEV_PR_ARG, MAC_PR_ARG(mac_addr))
2134);
2135
2136DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta,
2137 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2138 TP_ARGS(netdev, macaddr)
2139);
2140
2141TRACE_EVENT(cfg80211_rx_mgmt,
2142 TP_PROTO(struct wireless_dev *wdev, int freq, int sig_mbm),
2143 TP_ARGS(wdev, freq, sig_mbm),
2144 TP_STRUCT__entry(
2145 WDEV_ENTRY
2146 __field(int, freq)
2147 __field(int, sig_mbm)
2148 ),
2149 TP_fast_assign(
2150 WDEV_ASSIGN;
2151 __entry->freq = freq;
2152 __entry->sig_mbm = sig_mbm;
2153 ),
2154 TP_printk(WDEV_PR_FMT ", freq: %d, sig mbm: %d",
2155 WDEV_PR_ARG, __entry->freq, __entry->sig_mbm)
2156);
2157
2158TRACE_EVENT(cfg80211_mgmt_tx_status,
2159 TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
2160 TP_ARGS(wdev, cookie, ack),
2161 TP_STRUCT__entry(
2162 WDEV_ENTRY
2163 __field(u64, cookie)
2164 __field(bool, ack)
2165 ),
2166 TP_fast_assign(
2167 WDEV_ASSIGN;
2168 __entry->cookie = cookie;
2169 __entry->ack = ack;
2170 ),
2171 TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
2172 WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
2173);
2174
2175TRACE_EVENT(cfg80211_cqm_rssi_notify,
2176 TP_PROTO(struct net_device *netdev,
2177 enum nl80211_cqm_rssi_threshold_event rssi_event),
2178 TP_ARGS(netdev, rssi_event),
2179 TP_STRUCT__entry(
2180 NETDEV_ENTRY
2181 __field(enum nl80211_cqm_rssi_threshold_event, rssi_event)
2182 ),
2183 TP_fast_assign(
2184 NETDEV_ASSIGN;
2185 __entry->rssi_event = rssi_event;
2186 ),
2187 TP_printk(NETDEV_PR_FMT ", rssi event: %d",
2188 NETDEV_PR_ARG, __entry->rssi_event)
2189);
2190
Johannes Berg683b6d32012-11-08 21:25:48 +01002191TRACE_EVENT(cfg80211_reg_can_beacon,
2192 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2193 TP_ARGS(wiphy, chandef),
Beni Lev4ee3e062012-08-27 12:49:39 +03002194 TP_STRUCT__entry(
2195 WIPHY_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01002196 CHAN_DEF_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002197 ),
2198 TP_fast_assign(
2199 WIPHY_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01002200 CHAN_DEF_ASSIGN(chandef);
Beni Lev4ee3e062012-08-27 12:49:39 +03002201 ),
Johannes Bergec816082012-11-16 17:22:28 +01002202 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
Johannes Berg683b6d32012-11-08 21:25:48 +01002203 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002204);
2205
Simon Wunderlich04f39042013-02-08 18:16:19 +01002206TRACE_EVENT(cfg80211_chandef_dfs_required,
2207 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2208 TP_ARGS(wiphy, chandef),
2209 TP_STRUCT__entry(
2210 WIPHY_ENTRY
2211 CHAN_DEF_ENTRY
2212 ),
2213 TP_fast_assign(
2214 WIPHY_ASSIGN;
2215 CHAN_DEF_ASSIGN(chandef);
2216 ),
2217 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2218 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2219);
2220
Beni Lev4ee3e062012-08-27 12:49:39 +03002221TRACE_EVENT(cfg80211_ch_switch_notify,
Johannes Berg683b6d32012-11-08 21:25:48 +01002222 TP_PROTO(struct net_device *netdev,
2223 struct cfg80211_chan_def *chandef),
2224 TP_ARGS(netdev, chandef),
Beni Lev4ee3e062012-08-27 12:49:39 +03002225 TP_STRUCT__entry(
2226 NETDEV_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01002227 CHAN_DEF_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002228 ),
2229 TP_fast_assign(
2230 NETDEV_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01002231 CHAN_DEF_ASSIGN(chandef);
Beni Lev4ee3e062012-08-27 12:49:39 +03002232 ),
Johannes Bergec816082012-11-16 17:22:28 +01002233 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
Johannes Berg683b6d32012-11-08 21:25:48 +01002234 NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002235);
2236
Simon Wunderlich04f39042013-02-08 18:16:19 +01002237TRACE_EVENT(cfg80211_radar_event,
2238 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2239 TP_ARGS(wiphy, chandef),
2240 TP_STRUCT__entry(
2241 WIPHY_ENTRY
2242 CHAN_DEF_ENTRY
2243 ),
2244 TP_fast_assign(
2245 WIPHY_ASSIGN;
2246 CHAN_DEF_ASSIGN(chandef);
2247 ),
2248 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2249 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2250);
2251
2252TRACE_EVENT(cfg80211_cac_event,
2253 TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt),
2254 TP_ARGS(netdev, evt),
2255 TP_STRUCT__entry(
2256 NETDEV_ENTRY
2257 __field(enum nl80211_radar_event, evt)
2258 ),
2259 TP_fast_assign(
2260 NETDEV_ASSIGN;
2261 __entry->evt = evt;
2262 ),
2263 TP_printk(NETDEV_PR_FMT ", event: %d",
2264 NETDEV_PR_ARG, __entry->evt)
2265);
2266
Beni Lev4ee3e062012-08-27 12:49:39 +03002267DECLARE_EVENT_CLASS(cfg80211_rx_evt,
2268 TP_PROTO(struct net_device *netdev, const u8 *addr),
2269 TP_ARGS(netdev, addr),
2270 TP_STRUCT__entry(
2271 NETDEV_ENTRY
2272 MAC_ENTRY(addr)
2273 ),
2274 TP_fast_assign(
2275 NETDEV_ASSIGN;
2276 MAC_ASSIGN(addr, addr);
2277 ),
Johannes Bergec816082012-11-16 17:22:28 +01002278 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr))
Beni Lev4ee3e062012-08-27 12:49:39 +03002279);
2280
2281DEFINE_EVENT(cfg80211_rx_evt, cfg80211_ibss_joined,
2282 TP_PROTO(struct net_device *netdev, const u8 *addr),
2283 TP_ARGS(netdev, addr)
2284);
2285
2286DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame,
2287 TP_PROTO(struct net_device *netdev, const u8 *addr),
2288 TP_ARGS(netdev, addr)
2289);
2290
2291DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame,
2292 TP_PROTO(struct net_device *netdev, const u8 *addr),
2293 TP_ARGS(netdev, addr)
2294);
2295
2296TRACE_EVENT(cfg80211_probe_status,
2297 TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie,
2298 bool acked),
2299 TP_ARGS(netdev, addr, cookie, acked),
2300 TP_STRUCT__entry(
2301 NETDEV_ENTRY
2302 MAC_ENTRY(addr)
2303 __field(u64, cookie)
2304 __field(bool, acked)
2305 ),
2306 TP_fast_assign(
2307 NETDEV_ASSIGN;
2308 MAC_ASSIGN(addr, addr);
2309 __entry->cookie = cookie;
2310 __entry->acked = acked;
2311 ),
Johannes Bergec816082012-11-16 17:22:28 +01002312 TP_printk(NETDEV_PR_FMT " addr:" MAC_PR_FMT ", cookie: %llu, acked: %s",
Beni Lev4ee3e062012-08-27 12:49:39 +03002313 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie,
2314 BOOL_TO_STR(__entry->acked))
2315);
2316
2317TRACE_EVENT(cfg80211_cqm_pktloss_notify,
2318 TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets),
2319 TP_ARGS(netdev, peer, num_packets),
2320 TP_STRUCT__entry(
2321 NETDEV_ENTRY
2322 MAC_ENTRY(peer)
2323 __field(u32, num_packets)
2324 ),
2325 TP_fast_assign(
2326 NETDEV_ASSIGN;
2327 MAC_ASSIGN(peer, peer);
2328 __entry->num_packets = num_packets;
2329 ),
2330 TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u",
2331 NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets)
2332);
2333
2334DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify,
2335 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2336 TP_ARGS(netdev, macaddr)
2337);
2338
2339TRACE_EVENT(cfg80211_pmksa_candidate_notify,
2340 TP_PROTO(struct net_device *netdev, int index, const u8 *bssid,
2341 bool preauth),
2342 TP_ARGS(netdev, index, bssid, preauth),
2343 TP_STRUCT__entry(
2344 NETDEV_ENTRY
2345 __field(int, index)
2346 MAC_ENTRY(bssid)
2347 __field(bool, preauth)
2348 ),
2349 TP_fast_assign(
2350 NETDEV_ASSIGN;
2351 __entry->index = index;
2352 MAC_ASSIGN(bssid, bssid);
2353 __entry->preauth = preauth;
2354 ),
2355 TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s",
2356 NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid),
2357 BOOL_TO_STR(__entry->preauth))
2358);
2359
2360TRACE_EVENT(cfg80211_report_obss_beacon,
2361 TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len,
2362 int freq, int sig_dbm),
2363 TP_ARGS(wiphy, frame, len, freq, sig_dbm),
2364 TP_STRUCT__entry(
2365 WIPHY_ENTRY
2366 __field(int, freq)
2367 __field(int, sig_dbm)
2368 ),
2369 TP_fast_assign(
2370 WIPHY_ASSIGN;
2371 __entry->freq = freq;
2372 __entry->sig_dbm = sig_dbm;
2373 ),
2374 TP_printk(WIPHY_PR_FMT ", freq: %d, sig_dbm: %d",
2375 WIPHY_PR_ARG, __entry->freq, __entry->sig_dbm)
2376);
2377
Jouni Malinen3475b092012-11-16 22:49:57 +02002378TRACE_EVENT(cfg80211_tdls_oper_request,
2379 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer,
2380 enum nl80211_tdls_operation oper, u16 reason_code),
2381 TP_ARGS(wiphy, netdev, peer, oper, reason_code),
2382 TP_STRUCT__entry(
2383 WIPHY_ENTRY
2384 NETDEV_ENTRY
2385 MAC_ENTRY(peer)
2386 __field(enum nl80211_tdls_operation, oper)
2387 __field(u16, reason_code)
2388 ),
2389 TP_fast_assign(
2390 WIPHY_ASSIGN;
2391 NETDEV_ASSIGN;
2392 MAC_ASSIGN(peer, peer);
2393 __entry->oper = oper;
2394 __entry->reason_code = reason_code;
2395 ),
2396 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", oper: %d, reason_code %u",
2397 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper,
2398 __entry->reason_code)
2399 );
2400
Beni Lev4ee3e062012-08-27 12:49:39 +03002401TRACE_EVENT(cfg80211_scan_done,
2402 TP_PROTO(struct cfg80211_scan_request *request, bool aborted),
2403 TP_ARGS(request, aborted),
2404 TP_STRUCT__entry(
2405 __field(u32, n_channels)
2406 __dynamic_array(u8, ie, request ? request->ie_len : 0)
2407 __array(u32, rates, IEEE80211_NUM_BANDS)
2408 __field(u32, wdev_id)
2409 MAC_ENTRY(wiphy_mac)
2410 __field(bool, no_cck)
2411 __field(bool, aborted)
2412 ),
2413 TP_fast_assign(
2414 if (request) {
2415 memcpy(__get_dynamic_array(ie), request->ie,
2416 request->ie_len);
2417 memcpy(__entry->rates, request->rates,
2418 IEEE80211_NUM_BANDS);
2419 __entry->wdev_id = request->wdev ?
2420 request->wdev->identifier : 0;
2421 if (request->wiphy)
2422 MAC_ASSIGN(wiphy_mac,
2423 request->wiphy->perm_addr);
2424 __entry->no_cck = request->no_cck;
2425 }
2426 __entry->aborted = aborted;
2427 ),
2428 TP_printk("aborted: %s", BOOL_TO_STR(__entry->aborted))
2429);
2430
2431DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_results,
2432 TP_PROTO(struct wiphy *wiphy),
2433 TP_ARGS(wiphy)
2434);
2435
2436DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_stopped,
2437 TP_PROTO(struct wiphy *wiphy),
2438 TP_ARGS(wiphy)
2439);
2440
2441TRACE_EVENT(cfg80211_get_bss,
2442 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
2443 const u8 *bssid, const u8 *ssid, size_t ssid_len,
2444 u16 capa_mask, u16 capa_val),
2445 TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, capa_mask, capa_val),
2446 TP_STRUCT__entry(
2447 WIPHY_ENTRY
2448 CHAN_ENTRY
2449 MAC_ENTRY(bssid)
2450 __dynamic_array(u8, ssid, ssid_len)
2451 __field(u16, capa_mask)
2452 __field(u16, capa_val)
2453 ),
2454 TP_fast_assign(
2455 WIPHY_ASSIGN;
2456 CHAN_ASSIGN(channel);
2457 MAC_ASSIGN(bssid, bssid);
2458 memcpy(__get_dynamic_array(ssid), ssid, ssid_len);
2459 __entry->capa_mask = capa_mask;
2460 __entry->capa_val = capa_val;
2461 ),
Johannes Bergec816082012-11-16 17:22:28 +01002462 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT ", buf: %#.2x, "
Beni Lev4ee3e062012-08-27 12:49:39 +03002463 "capa_mask: %d, capa_val: %u", WIPHY_PR_ARG, CHAN_PR_ARG,
2464 MAC_PR_ARG(bssid), ((u8 *)__get_dynamic_array(ssid))[0],
2465 __entry->capa_mask, __entry->capa_val)
2466);
2467
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002468TRACE_EVENT(cfg80211_inform_bss_width_frame,
Beni Lev4ee3e062012-08-27 12:49:39 +03002469 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002470 enum nl80211_bss_scan_width scan_width,
Beni Lev4ee3e062012-08-27 12:49:39 +03002471 struct ieee80211_mgmt *mgmt, size_t len,
2472 s32 signal),
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002473 TP_ARGS(wiphy, channel, scan_width, mgmt, len, signal),
Beni Lev4ee3e062012-08-27 12:49:39 +03002474 TP_STRUCT__entry(
2475 WIPHY_ENTRY
2476 CHAN_ENTRY
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002477 __field(enum nl80211_bss_scan_width, scan_width)
Beni Lev4ee3e062012-08-27 12:49:39 +03002478 __dynamic_array(u8, mgmt, len)
2479 __field(s32, signal)
2480 ),
2481 TP_fast_assign(
2482 WIPHY_ASSIGN;
2483 CHAN_ASSIGN(channel);
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002484 __entry->scan_width = scan_width;
Beni Lev4ee3e062012-08-27 12:49:39 +03002485 if (mgmt)
2486 memcpy(__get_dynamic_array(mgmt), mgmt, len);
2487 __entry->signal = signal;
2488 ),
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002489 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT "(scan_width: %d) signal: %d",
2490 WIPHY_PR_ARG, CHAN_PR_ARG, __entry->scan_width,
2491 __entry->signal)
Beni Lev4ee3e062012-08-27 12:49:39 +03002492);
2493
2494DECLARE_EVENT_CLASS(cfg80211_bss_evt,
2495 TP_PROTO(struct cfg80211_bss *pub),
2496 TP_ARGS(pub),
2497 TP_STRUCT__entry(
2498 MAC_ENTRY(bssid)
2499 CHAN_ENTRY
2500 ),
2501 TP_fast_assign(
2502 MAC_ASSIGN(bssid, pub->bssid);
2503 CHAN_ASSIGN(pub->channel);
2504 ),
Johannes Bergec816082012-11-16 17:22:28 +01002505 TP_printk(MAC_PR_FMT ", " CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002506);
2507
2508DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss,
2509 TP_PROTO(struct cfg80211_bss *pub),
2510 TP_ARGS(pub)
2511);
2512
2513TRACE_EVENT(cfg80211_return_uint,
2514 TP_PROTO(unsigned int ret),
2515 TP_ARGS(ret),
2516 TP_STRUCT__entry(
2517 __field(unsigned int, ret)
2518 ),
2519 TP_fast_assign(
2520 __entry->ret = ret;
2521 ),
2522 TP_printk("ret: %d", __entry->ret)
2523);
2524
2525TRACE_EVENT(cfg80211_return_u32,
2526 TP_PROTO(u32 ret),
2527 TP_ARGS(ret),
2528 TP_STRUCT__entry(
2529 __field(u32, ret)
2530 ),
2531 TP_fast_assign(
2532 __entry->ret = ret;
2533 ),
2534 TP_printk("ret: %u", __entry->ret)
2535);
2536
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002537TRACE_EVENT(cfg80211_report_wowlan_wakeup,
2538 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2539 struct cfg80211_wowlan_wakeup *wakeup),
2540 TP_ARGS(wiphy, wdev, wakeup),
2541 TP_STRUCT__entry(
2542 WIPHY_ENTRY
2543 WDEV_ENTRY
Johannes Berga92eecb2013-04-29 12:09:14 +02002544 __field(bool, non_wireless)
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002545 __field(bool, disconnect)
2546 __field(bool, magic_pkt)
2547 __field(bool, gtk_rekey_failure)
2548 __field(bool, eap_identity_req)
2549 __field(bool, four_way_handshake)
2550 __field(bool, rfkill_release)
2551 __field(s32, pattern_idx)
2552 __field(u32, packet_len)
Johannes Berga92eecb2013-04-29 12:09:14 +02002553 __dynamic_array(u8, packet,
2554 wakeup ? wakeup->packet_present_len : 0)
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002555 ),
2556 TP_fast_assign(
2557 WIPHY_ASSIGN;
2558 WDEV_ASSIGN;
Johannes Berga92eecb2013-04-29 12:09:14 +02002559 __entry->non_wireless = !wakeup;
2560 __entry->disconnect = wakeup ? wakeup->disconnect : false;
2561 __entry->magic_pkt = wakeup ? wakeup->magic_pkt : false;
2562 __entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false;
2563 __entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false;
2564 __entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false;
2565 __entry->rfkill_release = wakeup ? wakeup->rfkill_release : false;
2566 __entry->pattern_idx = wakeup ? wakeup->pattern_idx : false;
2567 __entry->packet_len = wakeup ? wakeup->packet_len : false;
2568 if (wakeup && wakeup->packet && wakeup->packet_present_len)
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002569 memcpy(__get_dynamic_array(packet), wakeup->packet,
2570 wakeup->packet_present_len);
2571 ),
2572 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
2573);
2574
Jouni Malinen355199e2013-02-27 17:14:27 +02002575TRACE_EVENT(cfg80211_ft_event,
2576 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2577 struct cfg80211_ft_event_params *ft_event),
2578 TP_ARGS(wiphy, netdev, ft_event),
2579 TP_STRUCT__entry(
2580 WIPHY_ENTRY
2581 NETDEV_ENTRY
2582 __dynamic_array(u8, ies, ft_event->ies_len)
2583 MAC_ENTRY(target_ap)
2584 __dynamic_array(u8, ric_ies, ft_event->ric_ies_len)
2585 ),
2586 TP_fast_assign(
2587 WIPHY_ASSIGN;
2588 NETDEV_ASSIGN;
2589 if (ft_event->ies)
2590 memcpy(__get_dynamic_array(ies), ft_event->ies,
2591 ft_event->ies_len);
2592 MAC_ASSIGN(target_ap, ft_event->target_ap);
2593 if (ft_event->ric_ies)
2594 memcpy(__get_dynamic_array(ric_ies), ft_event->ric_ies,
2595 ft_event->ric_ies_len);
2596 ),
2597 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", target_ap: " MAC_PR_FMT,
2598 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(target_ap))
2599);
2600
Beni Lev14e8a3c2012-07-31 18:48:27 +03002601#endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
2602
2603#undef TRACE_INCLUDE_PATH
2604#define TRACE_INCLUDE_PATH .
2605#undef TRACE_INCLUDE_FILE
2606#define TRACE_INCLUDE_FILE trace
2607#include <trace/define_trace.h>