blob: 0c524cd76c837ccf23a070a802e1ab405fd235f4 [file] [log] [blame]
Beni Lev14e8a3c2012-07-31 18:48:27 +03001#undef TRACE_SYSTEM
2#define TRACE_SYSTEM cfg80211
3
4#if !defined(__RDEV_OPS_TRACE) || defined(TRACE_HEADER_MULTI_READ)
5#define __RDEV_OPS_TRACE
6
7#include <linux/tracepoint.h>
8
9#include <linux/rtnetlink.h>
10#include <net/cfg80211.h>
11#include "core.h"
12
13#define MAC_ENTRY(entry_mac) __array(u8, entry_mac, ETH_ALEN)
14#define MAC_ASSIGN(entry_mac, given_mac) do { \
15 if (given_mac) \
16 memcpy(__entry->entry_mac, given_mac, ETH_ALEN); \
17 else \
18 memset(__entry->entry_mac, 0, ETH_ALEN); \
19 } while (0)
20#define MAC_PR_FMT "%pM"
21#define MAC_PR_ARG(entry_mac) (__entry->entry_mac)
22
Johannes Bergec816082012-11-16 17:22:28 +010023#define MAXNAME 32
24#define WIPHY_ENTRY __array(char, wiphy_name, 32)
25#define WIPHY_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(wiphy), MAXNAME)
26#define WIPHY_PR_FMT "%s"
27#define WIPHY_PR_ARG __entry->wiphy_name
Beni Lev14e8a3c2012-07-31 18:48:27 +030028
Johannes Bergec816082012-11-16 17:22:28 +010029#define WDEV_ENTRY __field(u32, id)
Johannes Bergce1eadd2013-03-19 20:26:57 +010030#define WDEV_ASSIGN (__entry->id) = (!IS_ERR_OR_NULL(wdev) \
31 ? wdev->identifier : 0)
Johannes Bergec816082012-11-16 17:22:28 +010032#define WDEV_PR_FMT "wdev(%u)"
33#define WDEV_PR_ARG (__entry->id)
Beni Lev14e8a3c2012-07-31 18:48:27 +030034
Johannes Bergec816082012-11-16 17:22:28 +010035#define NETDEV_ENTRY __array(char, name, IFNAMSIZ) \
36 __field(int, ifindex)
Beni Lev14e8a3c2012-07-31 18:48:27 +030037#define NETDEV_ASSIGN \
38 do { \
39 memcpy(__entry->name, netdev->name, IFNAMSIZ); \
Beni Lev14e8a3c2012-07-31 18:48:27 +030040 (__entry->ifindex) = (netdev->ifindex); \
41 } while (0)
Johannes Bergec816082012-11-16 17:22:28 +010042#define NETDEV_PR_FMT "netdev:%s(%d)"
43#define NETDEV_PR_ARG __entry->name, __entry->ifindex
Beni Lev14e8a3c2012-07-31 18:48:27 +030044
45#define MESH_CFG_ENTRY __field(u16, dot11MeshRetryTimeout) \
46 __field(u16, dot11MeshConfirmTimeout) \
47 __field(u16, dot11MeshHoldingTimeout) \
48 __field(u16, dot11MeshMaxPeerLinks) \
49 __field(u8, dot11MeshMaxRetries) \
50 __field(u8, dot11MeshTTL) \
51 __field(u8, element_ttl) \
52 __field(bool, auto_open_plinks) \
53 __field(u32, dot11MeshNbrOffsetMaxNeighbor) \
54 __field(u8, dot11MeshHWMPmaxPREQretries) \
55 __field(u32, path_refresh_time) \
56 __field(u32, dot11MeshHWMPactivePathTimeout) \
57 __field(u16, min_discovery_timeout) \
58 __field(u16, dot11MeshHWMPpreqMinInterval) \
59 __field(u16, dot11MeshHWMPperrMinInterval) \
60 __field(u16, dot11MeshHWMPnetDiameterTraversalTime) \
61 __field(u8, dot11MeshHWMPRootMode) \
62 __field(u16, dot11MeshHWMPRannInterval) \
63 __field(bool, dot11MeshGateAnnouncementProtocol) \
64 __field(bool, dot11MeshForwarding) \
65 __field(s32, rssi_threshold) \
66 __field(u16, ht_opmode) \
67 __field(u32, dot11MeshHWMPactivePathToRootTimeout) \
68 __field(u16, dot11MeshHWMProotInterval) \
69 __field(u16, dot11MeshHWMPconfirmationInterval)
70#define MESH_CFG_ASSIGN \
71 do { \
72 __entry->dot11MeshRetryTimeout = conf->dot11MeshRetryTimeout; \
73 __entry->dot11MeshConfirmTimeout = \
74 conf->dot11MeshConfirmTimeout; \
75 __entry->dot11MeshHoldingTimeout = \
76 conf->dot11MeshHoldingTimeout; \
77 __entry->dot11MeshMaxPeerLinks = conf->dot11MeshMaxPeerLinks; \
78 __entry->dot11MeshMaxRetries = conf->dot11MeshMaxRetries; \
79 __entry->dot11MeshTTL = conf->dot11MeshTTL; \
80 __entry->element_ttl = conf->element_ttl; \
81 __entry->auto_open_plinks = conf->auto_open_plinks; \
82 __entry->dot11MeshNbrOffsetMaxNeighbor = \
83 conf->dot11MeshNbrOffsetMaxNeighbor; \
84 __entry->dot11MeshHWMPmaxPREQretries = \
85 conf->dot11MeshHWMPmaxPREQretries; \
86 __entry->path_refresh_time = conf->path_refresh_time; \
87 __entry->dot11MeshHWMPactivePathTimeout = \
88 conf->dot11MeshHWMPactivePathTimeout; \
89 __entry->min_discovery_timeout = conf->min_discovery_timeout; \
90 __entry->dot11MeshHWMPpreqMinInterval = \
91 conf->dot11MeshHWMPpreqMinInterval; \
92 __entry->dot11MeshHWMPperrMinInterval = \
93 conf->dot11MeshHWMPperrMinInterval; \
94 __entry->dot11MeshHWMPnetDiameterTraversalTime = \
95 conf->dot11MeshHWMPnetDiameterTraversalTime; \
96 __entry->dot11MeshHWMPRootMode = conf->dot11MeshHWMPRootMode; \
97 __entry->dot11MeshHWMPRannInterval = \
98 conf->dot11MeshHWMPRannInterval; \
99 __entry->dot11MeshGateAnnouncementProtocol = \
100 conf->dot11MeshGateAnnouncementProtocol; \
101 __entry->dot11MeshForwarding = conf->dot11MeshForwarding; \
102 __entry->rssi_threshold = conf->rssi_threshold; \
103 __entry->ht_opmode = conf->ht_opmode; \
104 __entry->dot11MeshHWMPactivePathToRootTimeout = \
105 conf->dot11MeshHWMPactivePathToRootTimeout; \
106 __entry->dot11MeshHWMProotInterval = \
107 conf->dot11MeshHWMProotInterval; \
108 __entry->dot11MeshHWMPconfirmationInterval = \
109 conf->dot11MeshHWMPconfirmationInterval; \
110 } while (0)
111
112#define CHAN_ENTRY __field(enum ieee80211_band, band) \
113 __field(u16, center_freq)
114#define CHAN_ASSIGN(chan) \
115 do { \
116 if (chan) { \
117 __entry->band = chan->band; \
118 __entry->center_freq = chan->center_freq; \
119 } else { \
120 __entry->band = 0; \
121 __entry->center_freq = 0; \
122 } \
123 } while (0)
Johannes Bergec816082012-11-16 17:22:28 +0100124#define CHAN_PR_FMT "band: %d, freq: %u"
Beni Lev14e8a3c2012-07-31 18:48:27 +0300125#define CHAN_PR_ARG __entry->band, __entry->center_freq
126
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100127#define CHAN_DEF_ENTRY __field(enum ieee80211_band, band) \
128 __field(u32, control_freq) \
129 __field(u32, width) \
130 __field(u32, center_freq1) \
131 __field(u32, center_freq2)
Johannes Berg683b6d32012-11-08 21:25:48 +0100132#define CHAN_DEF_ASSIGN(chandef) \
133 do { \
134 if ((chandef) && (chandef)->chan) { \
135 __entry->band = (chandef)->chan->band; \
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100136 __entry->control_freq = \
Johannes Berg683b6d32012-11-08 21:25:48 +0100137 (chandef)->chan->center_freq; \
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100138 __entry->width = (chandef)->width; \
139 __entry->center_freq1 = (chandef)->center_freq1;\
140 __entry->center_freq2 = (chandef)->center_freq2;\
Johannes Berg683b6d32012-11-08 21:25:48 +0100141 } else { \
142 __entry->band = 0; \
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100143 __entry->control_freq = 0; \
144 __entry->width = 0; \
145 __entry->center_freq1 = 0; \
146 __entry->center_freq2 = 0; \
Johannes Berg683b6d32012-11-08 21:25:48 +0100147 } \
148 } while (0)
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100149#define CHAN_DEF_PR_FMT \
Johannes Bergec816082012-11-16 17:22:28 +0100150 "band: %d, control freq: %u, width: %d, cf1: %u, cf2: %u"
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100151#define CHAN_DEF_PR_ARG __entry->band, __entry->control_freq, \
152 __entry->width, __entry->center_freq1, \
153 __entry->center_freq2
Johannes Berg683b6d32012-11-08 21:25:48 +0100154
Beni Lev14e8a3c2012-07-31 18:48:27 +0300155#define SINFO_ENTRY __field(int, generation) \
156 __field(u32, connected_time) \
157 __field(u32, inactive_time) \
158 __field(u32, rx_bytes) \
159 __field(u32, tx_bytes) \
160 __field(u32, rx_packets) \
161 __field(u32, tx_packets) \
162 __field(u32, tx_retries) \
163 __field(u32, tx_failed) \
164 __field(u32, rx_dropped_misc) \
165 __field(u32, beacon_loss_count) \
166 __field(u16, llid) \
167 __field(u16, plid) \
168 __field(u8, plink_state)
169#define SINFO_ASSIGN \
170 do { \
171 __entry->generation = sinfo->generation; \
172 __entry->connected_time = sinfo->connected_time; \
173 __entry->inactive_time = sinfo->inactive_time; \
174 __entry->rx_bytes = sinfo->rx_bytes; \
175 __entry->tx_bytes = sinfo->tx_bytes; \
176 __entry->rx_packets = sinfo->rx_packets; \
177 __entry->tx_packets = sinfo->tx_packets; \
178 __entry->tx_retries = sinfo->tx_retries; \
179 __entry->tx_failed = sinfo->tx_failed; \
180 __entry->rx_dropped_misc = sinfo->rx_dropped_misc; \
181 __entry->beacon_loss_count = sinfo->beacon_loss_count; \
182 __entry->llid = sinfo->llid; \
183 __entry->plid = sinfo->plid; \
184 __entry->plink_state = sinfo->plink_state; \
185 } while (0)
186
187#define BOOL_TO_STR(bo) (bo) ? "true" : "false"
188
Kyeyoon Parkfa9ffc72013-12-16 23:01:30 -0800189#define QOS_MAP_ENTRY __field(u8, num_des) \
190 __array(u8, dscp_exception, \
191 2 * IEEE80211_QOS_MAP_MAX_EX) \
192 __array(u8, up, IEEE80211_QOS_MAP_LEN_MIN)
193#define QOS_MAP_ASSIGN(qos_map) \
194 do { \
195 if ((qos_map)) { \
196 __entry->num_des = (qos_map)->num_des; \
197 memcpy(__entry->dscp_exception, \
198 &(qos_map)->dscp_exception, \
199 2 * IEEE80211_QOS_MAP_MAX_EX); \
200 memcpy(__entry->up, &(qos_map)->up, \
201 IEEE80211_QOS_MAP_LEN_MIN); \
202 } else { \
203 __entry->num_des = 0; \
204 memset(__entry->dscp_exception, 0, \
205 2 * IEEE80211_QOS_MAP_MAX_EX); \
206 memset(__entry->up, 0, \
207 IEEE80211_QOS_MAP_LEN_MIN); \
208 } \
209 } while (0)
210
Beni Lev14e8a3c2012-07-31 18:48:27 +0300211/*************************************************************
212 * rdev->ops traces *
213 *************************************************************/
214
215TRACE_EVENT(rdev_suspend,
216 TP_PROTO(struct wiphy *wiphy, struct cfg80211_wowlan *wow),
217 TP_ARGS(wiphy, wow),
218 TP_STRUCT__entry(
219 WIPHY_ENTRY
220 __field(bool, any)
221 __field(bool, disconnect)
222 __field(bool, magic_pkt)
223 __field(bool, gtk_rekey_failure)
224 __field(bool, eap_identity_req)
225 __field(bool, four_way_handshake)
226 __field(bool, rfkill_release)
227 __field(bool, valid_wow)
228 ),
229 TP_fast_assign(
230 WIPHY_ASSIGN;
231 if (wow) {
232 __entry->any = wow->any;
233 __entry->disconnect = wow->disconnect;
234 __entry->magic_pkt = wow->magic_pkt;
235 __entry->gtk_rekey_failure = wow->gtk_rekey_failure;
236 __entry->eap_identity_req = wow->eap_identity_req;
237 __entry->four_way_handshake = wow->four_way_handshake;
238 __entry->rfkill_release = wow->rfkill_release;
239 __entry->valid_wow = true;
240 } else {
241 __entry->valid_wow = false;
242 }
243 ),
244 TP_printk(WIPHY_PR_FMT ", wow%s - any: %d, disconnect: %d, "
245 "magic pkt: %d, gtk rekey failure: %d, eap identify req: %d, "
246 "four way handshake: %d, rfkill release: %d.",
247 WIPHY_PR_ARG, __entry->valid_wow ? "" : "(Not configured!)",
248 __entry->any, __entry->disconnect, __entry->magic_pkt,
249 __entry->gtk_rekey_failure, __entry->eap_identity_req,
250 __entry->four_way_handshake, __entry->rfkill_release)
251);
252
253TRACE_EVENT(rdev_return_int,
254 TP_PROTO(struct wiphy *wiphy, int ret),
255 TP_ARGS(wiphy, ret),
256 TP_STRUCT__entry(
257 WIPHY_ENTRY
258 __field(int, ret)
259 ),
260 TP_fast_assign(
261 WIPHY_ASSIGN;
262 __entry->ret = ret;
263 ),
264 TP_printk(WIPHY_PR_FMT ", returned: %d", WIPHY_PR_ARG, __entry->ret)
265);
266
267TRACE_EVENT(rdev_scan,
268 TP_PROTO(struct wiphy *wiphy, struct cfg80211_scan_request *request),
269 TP_ARGS(wiphy, request),
270 TP_STRUCT__entry(
271 WIPHY_ENTRY
272 ),
273 TP_fast_assign(
274 WIPHY_ASSIGN;
275 ),
276 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
277);
278
279DECLARE_EVENT_CLASS(wiphy_only_evt,
280 TP_PROTO(struct wiphy *wiphy),
281 TP_ARGS(wiphy),
282 TP_STRUCT__entry(
283 WIPHY_ENTRY
284 ),
285 TP_fast_assign(
286 WIPHY_ASSIGN;
287 ),
288 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
289);
290
291DEFINE_EVENT(wiphy_only_evt, rdev_resume,
292 TP_PROTO(struct wiphy *wiphy),
293 TP_ARGS(wiphy)
294);
295
296DEFINE_EVENT(wiphy_only_evt, rdev_return_void,
297 TP_PROTO(struct wiphy *wiphy),
298 TP_ARGS(wiphy)
299);
300
Beni Lev14e8a3c2012-07-31 18:48:27 +0300301DEFINE_EVENT(wiphy_only_evt, rdev_get_antenna,
302 TP_PROTO(struct wiphy *wiphy),
303 TP_ARGS(wiphy)
304);
305
Beni Lev14e8a3c2012-07-31 18:48:27 +0300306DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll,
307 TP_PROTO(struct wiphy *wiphy),
308 TP_ARGS(wiphy)
309);
310
311DECLARE_EVENT_CLASS(wiphy_enabled_evt,
312 TP_PROTO(struct wiphy *wiphy, bool enabled),
313 TP_ARGS(wiphy, enabled),
314 TP_STRUCT__entry(
315 WIPHY_ENTRY
316 __field(bool, enabled)
317 ),
318 TP_fast_assign(
319 WIPHY_ASSIGN;
320 __entry->enabled = enabled;
321 ),
322 TP_printk(WIPHY_PR_FMT ", %senabled ",
323 WIPHY_PR_ARG, __entry->enabled ? "" : "not ")
324);
325
326DEFINE_EVENT(wiphy_enabled_evt, rdev_set_wakeup,
327 TP_PROTO(struct wiphy *wiphy, bool enabled),
328 TP_ARGS(wiphy, enabled)
329);
330
331TRACE_EVENT(rdev_add_virtual_intf,
332 TP_PROTO(struct wiphy *wiphy, char *name, enum nl80211_iftype type),
333 TP_ARGS(wiphy, name, type),
334 TP_STRUCT__entry(
335 WIPHY_ENTRY
336 __string(vir_intf_name, name ? name : "<noname>")
337 __field(enum nl80211_iftype, type)
338 ),
339 TP_fast_assign(
340 WIPHY_ASSIGN;
341 __assign_str(vir_intf_name, name ? name : "<noname>");
342 __entry->type = type;
343 ),
344 TP_printk(WIPHY_PR_FMT ", virtual intf name: %s, type: %d",
345 WIPHY_PR_ARG, __get_str(vir_intf_name), __entry->type)
346);
347
348DECLARE_EVENT_CLASS(wiphy_wdev_evt,
349 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
350 TP_ARGS(wiphy, wdev),
351 TP_STRUCT__entry(
352 WIPHY_ENTRY
353 WDEV_ENTRY
354 ),
355 TP_fast_assign(
356 WIPHY_ASSIGN;
357 WDEV_ASSIGN;
358 ),
Johannes Bergec816082012-11-16 17:22:28 +0100359 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300360);
361
362DEFINE_EVENT(wiphy_wdev_evt, rdev_return_wdev,
363 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
364 TP_ARGS(wiphy, wdev)
365);
366
367DEFINE_EVENT(wiphy_wdev_evt, rdev_del_virtual_intf,
368 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
369 TP_ARGS(wiphy, wdev)
370);
371
372TRACE_EVENT(rdev_change_virtual_intf,
373 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
374 enum nl80211_iftype type),
375 TP_ARGS(wiphy, netdev, type),
376 TP_STRUCT__entry(
377 WIPHY_ENTRY
378 NETDEV_ENTRY
379 __field(enum nl80211_iftype, type)
380 ),
381 TP_fast_assign(
382 WIPHY_ASSIGN;
383 NETDEV_ASSIGN;
384 __entry->type = type;
385 ),
Johannes Bergec816082012-11-16 17:22:28 +0100386 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", type: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300387 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->type)
388);
389
390DECLARE_EVENT_CLASS(key_handle,
391 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
392 bool pairwise, const u8 *mac_addr),
393 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr),
394 TP_STRUCT__entry(
395 WIPHY_ENTRY
396 NETDEV_ENTRY
397 MAC_ENTRY(mac_addr)
398 __field(u8, key_index)
399 __field(bool, pairwise)
400 ),
401 TP_fast_assign(
402 WIPHY_ASSIGN;
403 NETDEV_ASSIGN;
404 MAC_ASSIGN(mac_addr, mac_addr);
405 __entry->key_index = key_index;
406 __entry->pairwise = pairwise;
407 ),
Johannes Bergec816082012-11-16 17:22:28 +0100408 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key_index: %u, pairwise: %s, mac addr: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300409 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
410 BOOL_TO_STR(__entry->pairwise), MAC_PR_ARG(mac_addr))
411);
412
413DEFINE_EVENT(key_handle, rdev_add_key,
414 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
415 bool pairwise, const u8 *mac_addr),
416 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
417);
418
419DEFINE_EVENT(key_handle, rdev_get_key,
420 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
421 bool pairwise, const u8 *mac_addr),
422 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
423);
424
425DEFINE_EVENT(key_handle, rdev_del_key,
426 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
427 bool pairwise, const u8 *mac_addr),
428 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
429);
430
431TRACE_EVENT(rdev_set_default_key,
432 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
433 bool unicast, bool multicast),
434 TP_ARGS(wiphy, netdev, key_index, unicast, multicast),
435 TP_STRUCT__entry(
436 WIPHY_ENTRY
437 NETDEV_ENTRY
438 __field(u8, key_index)
439 __field(bool, unicast)
440 __field(bool, multicast)
441 ),
442 TP_fast_assign(
443 WIPHY_ASSIGN;
444 NETDEV_ASSIGN;
445 __entry->key_index = key_index;
446 __entry->unicast = unicast;
447 __entry->multicast = multicast;
448 ),
Johannes Bergec816082012-11-16 17:22:28 +0100449 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u, unicast: %s, multicast: %s",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300450 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
451 BOOL_TO_STR(__entry->unicast),
452 BOOL_TO_STR(__entry->multicast))
453);
454
455TRACE_EVENT(rdev_set_default_mgmt_key,
456 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index),
457 TP_ARGS(wiphy, netdev, key_index),
458 TP_STRUCT__entry(
459 WIPHY_ENTRY
460 NETDEV_ENTRY
461 __field(u8, key_index)
462 ),
463 TP_fast_assign(
464 WIPHY_ASSIGN;
465 NETDEV_ASSIGN;
466 __entry->key_index = key_index;
467 ),
Johannes Bergec816082012-11-16 17:22:28 +0100468 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300469 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index)
470);
471
472TRACE_EVENT(rdev_start_ap,
473 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
474 struct cfg80211_ap_settings *settings),
475 TP_ARGS(wiphy, netdev, settings),
476 TP_STRUCT__entry(
477 WIPHY_ENTRY
478 NETDEV_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +0100479 CHAN_DEF_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +0300480 __field(int, beacon_interval)
481 __field(int, dtim_period)
482 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
483 __field(enum nl80211_hidden_ssid, hidden_ssid)
484 __field(u32, wpa_ver)
485 __field(bool, privacy)
486 __field(enum nl80211_auth_type, auth_type)
487 __field(int, inactivity_timeout)
488 ),
489 TP_fast_assign(
490 WIPHY_ASSIGN;
491 NETDEV_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +0100492 CHAN_DEF_ASSIGN(&settings->chandef);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300493 __entry->beacon_interval = settings->beacon_interval;
494 __entry->dtim_period = settings->dtim_period;
495 __entry->hidden_ssid = settings->hidden_ssid;
496 __entry->wpa_ver = settings->crypto.wpa_versions;
497 __entry->privacy = settings->privacy;
498 __entry->auth_type = settings->auth_type;
499 __entry->inactivity_timeout = settings->inactivity_timeout;
500 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
501 memcpy(__entry->ssid, settings->ssid, settings->ssid_len);
502 ),
Johannes Bergec816082012-11-16 17:22:28 +0100503 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", AP settings - ssid: %s, "
Johannes Berg683b6d32012-11-08 21:25:48 +0100504 CHAN_DEF_PR_FMT ", beacon interval: %d, dtim period: %d, "
Beni Lev14e8a3c2012-07-31 18:48:27 +0300505 "hidden ssid: %d, wpa versions: %u, privacy: %s, "
506 "auth type: %d, inactivity timeout: %d",
Johannes Berg683b6d32012-11-08 21:25:48 +0100507 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ssid, CHAN_DEF_PR_ARG,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300508 __entry->beacon_interval, __entry->dtim_period,
509 __entry->hidden_ssid, __entry->wpa_ver,
510 BOOL_TO_STR(__entry->privacy), __entry->auth_type,
511 __entry->inactivity_timeout)
512);
513
514TRACE_EVENT(rdev_change_beacon,
515 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
516 struct cfg80211_beacon_data *info),
517 TP_ARGS(wiphy, netdev, info),
518 TP_STRUCT__entry(
519 WIPHY_ENTRY
520 NETDEV_ENTRY
521 __dynamic_array(u8, head, info ? info->head_len : 0)
522 __dynamic_array(u8, tail, info ? info->tail_len : 0)
523 __dynamic_array(u8, beacon_ies, info ? info->beacon_ies_len : 0)
524 __dynamic_array(u8, proberesp_ies,
525 info ? info->proberesp_ies_len : 0)
526 __dynamic_array(u8, assocresp_ies,
527 info ? info->assocresp_ies_len : 0)
528 __dynamic_array(u8, probe_resp, info ? info->probe_resp_len : 0)
529 ),
530 TP_fast_assign(
531 WIPHY_ASSIGN;
532 NETDEV_ASSIGN;
533 if (info) {
534 if (info->head)
535 memcpy(__get_dynamic_array(head), info->head,
536 info->head_len);
537 if (info->tail)
538 memcpy(__get_dynamic_array(tail), info->tail,
539 info->tail_len);
540 if (info->beacon_ies)
541 memcpy(__get_dynamic_array(beacon_ies),
542 info->beacon_ies, info->beacon_ies_len);
543 if (info->proberesp_ies)
544 memcpy(__get_dynamic_array(proberesp_ies),
545 info->proberesp_ies,
546 info->proberesp_ies_len);
547 if (info->assocresp_ies)
548 memcpy(__get_dynamic_array(assocresp_ies),
549 info->assocresp_ies,
550 info->assocresp_ies_len);
551 if (info->probe_resp)
552 memcpy(__get_dynamic_array(probe_resp),
553 info->probe_resp, info->probe_resp_len);
554 }
555 ),
Johannes Bergec816082012-11-16 17:22:28 +0100556 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300557);
558
559DECLARE_EVENT_CLASS(wiphy_netdev_evt,
560 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
561 TP_ARGS(wiphy, netdev),
562 TP_STRUCT__entry(
563 WIPHY_ENTRY
564 NETDEV_ENTRY
565 ),
566 TP_fast_assign(
567 WIPHY_ASSIGN;
568 NETDEV_ASSIGN;
569 ),
Johannes Bergec816082012-11-16 17:22:28 +0100570 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300571);
572
573DEFINE_EVENT(wiphy_netdev_evt, rdev_stop_ap,
574 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
575 TP_ARGS(wiphy, netdev)
576);
577
Beni Lev14e8a3c2012-07-31 18:48:27 +0300578DEFINE_EVENT(wiphy_netdev_evt, rdev_sched_scan_stop,
579 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
580 TP_ARGS(wiphy, netdev)
581);
582
583DEFINE_EVENT(wiphy_netdev_evt, rdev_set_rekey_data,
584 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
585 TP_ARGS(wiphy, netdev)
586);
587
588DEFINE_EVENT(wiphy_netdev_evt, rdev_get_mesh_config,
589 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
590 TP_ARGS(wiphy, netdev)
591);
592
593DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_mesh,
594 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
595 TP_ARGS(wiphy, netdev)
596);
597
598DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ibss,
599 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
600 TP_ARGS(wiphy, netdev)
601);
602
603DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa,
604 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
605 TP_ARGS(wiphy, netdev)
606);
607
608DECLARE_EVENT_CLASS(station_add_change,
609 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
610 struct station_parameters *params),
611 TP_ARGS(wiphy, netdev, mac, params),
612 TP_STRUCT__entry(
613 WIPHY_ENTRY
614 NETDEV_ENTRY
615 MAC_ENTRY(sta_mac)
616 __field(u32, sta_flags_mask)
617 __field(u32, sta_flags_set)
618 __field(u32, sta_modify_mask)
619 __field(int, listen_interval)
620 __field(u16, aid)
621 __field(u8, plink_action)
622 __field(u8, plink_state)
623 __field(u8, uapsd_queues)
624 __array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap))
625 ),
626 TP_fast_assign(
627 WIPHY_ASSIGN;
628 NETDEV_ASSIGN;
629 MAC_ASSIGN(sta_mac, mac);
630 __entry->sta_flags_mask = params->sta_flags_mask;
631 __entry->sta_flags_set = params->sta_flags_set;
632 __entry->sta_modify_mask = params->sta_modify_mask;
633 __entry->listen_interval = params->listen_interval;
634 __entry->aid = params->aid;
635 __entry->plink_action = params->plink_action;
636 __entry->plink_state = params->plink_state;
637 __entry->uapsd_queues = params->uapsd_queues;
638 memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap));
639 if (params->ht_capa)
640 memcpy(__entry->ht_capa, params->ht_capa,
641 sizeof(struct ieee80211_ht_cap));
642 ),
Johannes Bergec816082012-11-16 17:22:28 +0100643 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +0300644 ", station flags mask: %u, station flags set: %u, "
645 "station modify mask: %u, listen interval: %d, aid: %u, "
646 "plink action: %u, plink state: %u, uapsd queues: %u",
647 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
648 __entry->sta_flags_mask, __entry->sta_flags_set,
649 __entry->sta_modify_mask, __entry->listen_interval,
650 __entry->aid, __entry->plink_action, __entry->plink_state,
651 __entry->uapsd_queues)
652);
653
654DEFINE_EVENT(station_add_change, rdev_add_station,
655 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
656 struct station_parameters *params),
657 TP_ARGS(wiphy, netdev, mac, params)
658);
659
660DEFINE_EVENT(station_add_change, rdev_change_station,
661 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
662 struct station_parameters *params),
663 TP_ARGS(wiphy, netdev, mac, params)
664);
665
666DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt,
667 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
668 TP_ARGS(wiphy, netdev, mac),
669 TP_STRUCT__entry(
670 WIPHY_ENTRY
671 NETDEV_ENTRY
672 MAC_ENTRY(sta_mac)
673 ),
674 TP_fast_assign(
675 WIPHY_ASSIGN;
676 NETDEV_ASSIGN;
677 MAC_ASSIGN(sta_mac, mac);
678 ),
Johannes Bergec816082012-11-16 17:22:28 +0100679 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300680 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac))
681);
682
683DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_station,
684 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
685 TP_ARGS(wiphy, netdev, mac)
686);
687
688DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_station,
689 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
690 TP_ARGS(wiphy, netdev, mac)
691);
692
693DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath,
694 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
695 TP_ARGS(wiphy, netdev, mac)
696);
697
698DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_set_wds_peer,
699 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
700 TP_ARGS(wiphy, netdev, mac)
701);
702
703TRACE_EVENT(rdev_dump_station,
704 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
705 u8 *mac),
706 TP_ARGS(wiphy, netdev, idx, mac),
707 TP_STRUCT__entry(
708 WIPHY_ENTRY
709 NETDEV_ENTRY
710 MAC_ENTRY(sta_mac)
711 __field(int, idx)
712 ),
713 TP_fast_assign(
714 WIPHY_ASSIGN;
715 NETDEV_ASSIGN;
716 MAC_ASSIGN(sta_mac, mac);
717 __entry->idx = idx;
718 ),
Johannes Bergec816082012-11-16 17:22:28 +0100719 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT ", idx: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300720 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
721 __entry->idx)
722);
723
724TRACE_EVENT(rdev_return_int_station_info,
725 TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo),
726 TP_ARGS(wiphy, ret, sinfo),
727 TP_STRUCT__entry(
728 WIPHY_ENTRY
729 __field(int, ret)
730 SINFO_ENTRY
731 ),
732 TP_fast_assign(
733 WIPHY_ASSIGN;
734 __entry->ret = ret;
735 SINFO_ASSIGN;
736 ),
737 TP_printk(WIPHY_PR_FMT ", returned %d" ,
738 WIPHY_PR_ARG, __entry->ret)
739);
740
741DECLARE_EVENT_CLASS(mpath_evt,
742 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
743 u8 *next_hop),
744 TP_ARGS(wiphy, netdev, dst, next_hop),
745 TP_STRUCT__entry(
746 WIPHY_ENTRY
747 NETDEV_ENTRY
748 MAC_ENTRY(dst)
749 MAC_ENTRY(next_hop)
750 ),
751 TP_fast_assign(
752 WIPHY_ASSIGN;
753 NETDEV_ASSIGN;
754 MAC_ASSIGN(dst, dst);
755 MAC_ASSIGN(next_hop, next_hop);
756 ),
Johannes Bergec816082012-11-16 17:22:28 +0100757 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT ", next hop: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300758 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dst),
759 MAC_PR_ARG(next_hop))
760);
761
762DEFINE_EVENT(mpath_evt, rdev_add_mpath,
763 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
764 u8 *next_hop),
765 TP_ARGS(wiphy, netdev, dst, next_hop)
766);
767
768DEFINE_EVENT(mpath_evt, rdev_change_mpath,
769 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
770 u8 *next_hop),
771 TP_ARGS(wiphy, netdev, dst, next_hop)
772);
773
774DEFINE_EVENT(mpath_evt, rdev_get_mpath,
775 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
776 u8 *next_hop),
777 TP_ARGS(wiphy, netdev, dst, next_hop)
778);
779
780TRACE_EVENT(rdev_dump_mpath,
781 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx,
782 u8 *dst, u8 *next_hop),
783 TP_ARGS(wiphy, netdev, idx, dst, next_hop),
784 TP_STRUCT__entry(
785 WIPHY_ENTRY
786 NETDEV_ENTRY
787 MAC_ENTRY(dst)
788 MAC_ENTRY(next_hop)
789 __field(int, idx)
790 ),
791 TP_fast_assign(
792 WIPHY_ASSIGN;
793 NETDEV_ASSIGN;
794 MAC_ASSIGN(dst, dst);
795 MAC_ASSIGN(next_hop, next_hop);
796 __entry->idx = idx;
797 ),
Johannes Bergec816082012-11-16 17:22:28 +0100798 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
Beni Lev14e8a3c2012-07-31 18:48:27 +0300799 MAC_PR_FMT ", next hop: " MAC_PR_FMT,
800 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
801 MAC_PR_ARG(next_hop))
802);
803
804TRACE_EVENT(rdev_return_int_mpath_info,
805 TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo),
806 TP_ARGS(wiphy, ret, pinfo),
807 TP_STRUCT__entry(
808 WIPHY_ENTRY
809 __field(int, ret)
810 __field(int, generation)
811 __field(u32, filled)
812 __field(u32, frame_qlen)
813 __field(u32, sn)
814 __field(u32, metric)
815 __field(u32, exptime)
816 __field(u32, discovery_timeout)
817 __field(u8, discovery_retries)
818 __field(u8, flags)
819 ),
820 TP_fast_assign(
821 WIPHY_ASSIGN;
822 __entry->ret = ret;
823 __entry->generation = pinfo->generation;
824 __entry->filled = pinfo->filled;
825 __entry->frame_qlen = pinfo->frame_qlen;
826 __entry->sn = pinfo->sn;
827 __entry->metric = pinfo->metric;
828 __entry->exptime = pinfo->exptime;
829 __entry->discovery_timeout = pinfo->discovery_timeout;
830 __entry->discovery_retries = pinfo->discovery_retries;
831 __entry->flags = pinfo->flags;
832 ),
833 TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, "
834 "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u,"
835 " discovery timeout: %u, discovery retries: %u, flags: %u",
836 WIPHY_PR_ARG, __entry->ret, __entry->generation,
837 __entry->filled, __entry->frame_qlen, __entry->sn,
838 __entry->metric, __entry->exptime, __entry->discovery_timeout,
839 __entry->discovery_retries, __entry->flags)
840);
841
842TRACE_EVENT(rdev_return_int_mesh_config,
843 TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf),
844 TP_ARGS(wiphy, ret, conf),
845 TP_STRUCT__entry(
846 WIPHY_ENTRY
847 MESH_CFG_ENTRY
848 __field(int, ret)
849 ),
850 TP_fast_assign(
851 WIPHY_ASSIGN;
852 MESH_CFG_ASSIGN;
853 __entry->ret = ret;
854 ),
855 TP_printk(WIPHY_PR_FMT ", returned: %d",
856 WIPHY_PR_ARG, __entry->ret)
857);
858
859TRACE_EVENT(rdev_update_mesh_config,
860 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask,
861 const struct mesh_config *conf),
862 TP_ARGS(wiphy, netdev, mask, conf),
863 TP_STRUCT__entry(
864 WIPHY_ENTRY
865 NETDEV_ENTRY
866 MESH_CFG_ENTRY
867 __field(u32, mask)
868 ),
869 TP_fast_assign(
870 WIPHY_ASSIGN;
871 NETDEV_ASSIGN;
872 MESH_CFG_ASSIGN;
873 __entry->mask = mask;
874 ),
Johannes Bergec816082012-11-16 17:22:28 +0100875 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mask: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300876 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask)
877);
878
879TRACE_EVENT(rdev_join_mesh,
880 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
881 const struct mesh_config *conf,
882 const struct mesh_setup *setup),
883 TP_ARGS(wiphy, netdev, conf, setup),
884 TP_STRUCT__entry(
885 WIPHY_ENTRY
886 NETDEV_ENTRY
887 MESH_CFG_ENTRY
888 ),
889 TP_fast_assign(
890 WIPHY_ASSIGN;
891 NETDEV_ASSIGN;
892 MESH_CFG_ASSIGN;
893 ),
Johannes Bergec816082012-11-16 17:22:28 +0100894 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300895 WIPHY_PR_ARG, NETDEV_PR_ARG)
896);
897
898TRACE_EVENT(rdev_change_bss,
899 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
900 struct bss_parameters *params),
901 TP_ARGS(wiphy, netdev, params),
902 TP_STRUCT__entry(
903 WIPHY_ENTRY
904 NETDEV_ENTRY
905 __field(int, use_cts_prot)
906 __field(int, use_short_preamble)
907 __field(int, use_short_slot_time)
908 __field(int, ap_isolate)
909 __field(int, ht_opmode)
910 ),
911 TP_fast_assign(
912 WIPHY_ASSIGN;
913 NETDEV_ASSIGN;
914 __entry->use_cts_prot = params->use_cts_prot;
915 __entry->use_short_preamble = params->use_short_preamble;
916 __entry->use_short_slot_time = params->use_short_slot_time;
917 __entry->ap_isolate = params->ap_isolate;
918 __entry->ht_opmode = params->ht_opmode;
919 ),
Johannes Bergec816082012-11-16 17:22:28 +0100920 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", use cts prot: %d, "
Beni Lev14e8a3c2012-07-31 18:48:27 +0300921 "use short preamble: %d, use short slot time: %d, "
922 "ap isolate: %d, ht opmode: %d",
923 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot,
924 __entry->use_short_preamble, __entry->use_short_slot_time,
925 __entry->ap_isolate, __entry->ht_opmode)
926);
927
928TRACE_EVENT(rdev_set_txq_params,
929 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
930 struct ieee80211_txq_params *params),
931 TP_ARGS(wiphy, netdev, params),
932 TP_STRUCT__entry(
933 WIPHY_ENTRY
934 NETDEV_ENTRY
935 __field(enum nl80211_ac, ac)
936 __field(u16, txop)
937 __field(u16, cwmin)
938 __field(u16, cwmax)
939 __field(u8, aifs)
940 ),
941 TP_fast_assign(
942 WIPHY_ASSIGN;
943 NETDEV_ASSIGN;
944 __entry->ac = params->ac;
945 __entry->txop = params->txop;
946 __entry->cwmin = params->cwmin;
947 __entry->cwmax = params->cwmax;
948 __entry->aifs = params->aifs;
949 ),
Johannes Bergec816082012-11-16 17:22:28 +0100950 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", ac: %d, txop: %u, cwmin: %u, cwmax: %u, aifs: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300951 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop,
952 __entry->cwmin, __entry->cwmax, __entry->aifs)
953);
954
955TRACE_EVENT(rdev_libertas_set_mesh_channel,
956 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
957 struct ieee80211_channel *chan),
958 TP_ARGS(wiphy, netdev, chan),
959 TP_STRUCT__entry(
960 WIPHY_ENTRY
961 NETDEV_ENTRY
962 CHAN_ENTRY
963 ),
964 TP_fast_assign(
965 WIPHY_ASSIGN;
966 NETDEV_ASSIGN;
967 CHAN_ASSIGN(chan);
968 ),
Johannes Bergec816082012-11-16 17:22:28 +0100969 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_PR_FMT, WIPHY_PR_ARG,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300970 NETDEV_PR_ARG, CHAN_PR_ARG)
971);
972
973TRACE_EVENT(rdev_set_monitor_channel,
Johannes Berg683b6d32012-11-08 21:25:48 +0100974 TP_PROTO(struct wiphy *wiphy,
975 struct cfg80211_chan_def *chandef),
976 TP_ARGS(wiphy, chandef),
Beni Lev14e8a3c2012-07-31 18:48:27 +0300977 TP_STRUCT__entry(
978 WIPHY_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +0100979 CHAN_DEF_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +0300980 ),
981 TP_fast_assign(
982 WIPHY_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +0100983 CHAN_DEF_ASSIGN(chandef);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300984 ),
Johannes Bergec816082012-11-16 17:22:28 +0100985 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
Johannes Berg683b6d32012-11-08 21:25:48 +0100986 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300987);
988
989TRACE_EVENT(rdev_auth,
990 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
991 struct cfg80211_auth_request *req),
992 TP_ARGS(wiphy, netdev, req),
993 TP_STRUCT__entry(
994 WIPHY_ENTRY
995 NETDEV_ENTRY
996 MAC_ENTRY(bssid)
997 __field(enum nl80211_auth_type, auth_type)
998 ),
999 TP_fast_assign(
1000 WIPHY_ASSIGN;
1001 NETDEV_ASSIGN;
1002 if (req->bss)
1003 MAC_ASSIGN(bssid, req->bss->bssid);
1004 else
1005 memset(__entry->bssid, 0, ETH_ALEN);
1006 __entry->auth_type = req->auth_type;
1007 ),
Johannes Bergec816082012-11-16 17:22:28 +01001008 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", auth type: %d, bssid: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001009 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type,
1010 MAC_PR_ARG(bssid))
1011);
1012
1013TRACE_EVENT(rdev_assoc,
1014 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1015 struct cfg80211_assoc_request *req),
1016 TP_ARGS(wiphy, netdev, req),
1017 TP_STRUCT__entry(
1018 WIPHY_ENTRY
1019 NETDEV_ENTRY
1020 MAC_ENTRY(bssid)
1021 MAC_ENTRY(prev_bssid)
1022 __field(bool, use_mfp)
1023 __field(u32, flags)
1024 ),
1025 TP_fast_assign(
1026 WIPHY_ASSIGN;
1027 NETDEV_ASSIGN;
1028 if (req->bss)
1029 MAC_ASSIGN(bssid, req->bss->bssid);
1030 else
1031 memset(__entry->bssid, 0, ETH_ALEN);
1032 MAC_ASSIGN(prev_bssid, req->prev_bssid);
1033 __entry->use_mfp = req->use_mfp;
1034 __entry->flags = req->flags;
1035 ),
Johannes Bergec816082012-11-16 17:22:28 +01001036 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001037 ", previous bssid: " MAC_PR_FMT ", use mfp: %s, flags: %u",
1038 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1039 MAC_PR_ARG(prev_bssid), BOOL_TO_STR(__entry->use_mfp),
1040 __entry->flags)
1041);
1042
1043TRACE_EVENT(rdev_deauth,
1044 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1045 struct cfg80211_deauth_request *req),
1046 TP_ARGS(wiphy, netdev, req),
1047 TP_STRUCT__entry(
1048 WIPHY_ENTRY
1049 NETDEV_ENTRY
1050 MAC_ENTRY(bssid)
1051 __field(u16, reason_code)
1052 ),
1053 TP_fast_assign(
1054 WIPHY_ASSIGN;
1055 NETDEV_ASSIGN;
1056 MAC_ASSIGN(bssid, req->bssid);
1057 __entry->reason_code = req->reason_code;
1058 ),
Johannes Bergec816082012-11-16 17:22:28 +01001059 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", reason: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001060 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1061 __entry->reason_code)
1062);
1063
1064TRACE_EVENT(rdev_disassoc,
1065 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1066 struct cfg80211_disassoc_request *req),
1067 TP_ARGS(wiphy, netdev, req),
1068 TP_STRUCT__entry(
1069 WIPHY_ENTRY
1070 NETDEV_ENTRY
1071 MAC_ENTRY(bssid)
1072 __field(u16, reason_code)
1073 __field(bool, local_state_change)
1074 ),
1075 TP_fast_assign(
1076 WIPHY_ASSIGN;
1077 NETDEV_ASSIGN;
1078 if (req->bss)
1079 MAC_ASSIGN(bssid, req->bss->bssid);
1080 else
1081 memset(__entry->bssid, 0, ETH_ALEN);
1082 __entry->reason_code = req->reason_code;
1083 __entry->local_state_change = req->local_state_change;
1084 ),
Johannes Bergec816082012-11-16 17:22:28 +01001085 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001086 ", reason: %u, local state change: %s",
1087 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1088 __entry->reason_code,
1089 BOOL_TO_STR(__entry->local_state_change))
1090);
1091
1092TRACE_EVENT(rdev_mgmt_tx_cancel_wait,
1093 TP_PROTO(struct wiphy *wiphy,
1094 struct wireless_dev *wdev, u64 cookie),
1095 TP_ARGS(wiphy, wdev, cookie),
1096 TP_STRUCT__entry(
1097 WIPHY_ENTRY
1098 WDEV_ENTRY
1099 __field(u64, cookie)
1100 ),
1101 TP_fast_assign(
1102 WIPHY_ASSIGN;
1103 WDEV_ASSIGN;
1104 __entry->cookie = cookie;
1105 ),
Johannes Bergec816082012-11-16 17:22:28 +01001106 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001107 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1108);
1109
1110TRACE_EVENT(rdev_set_power_mgmt,
1111 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1112 bool enabled, int timeout),
1113 TP_ARGS(wiphy, netdev, enabled, timeout),
1114 TP_STRUCT__entry(
1115 WIPHY_ENTRY
1116 NETDEV_ENTRY
1117 __field(bool, enabled)
1118 __field(int, timeout)
1119 ),
1120 TP_fast_assign(
1121 WIPHY_ASSIGN;
1122 NETDEV_ASSIGN;
1123 __entry->enabled = enabled;
1124 __entry->timeout = timeout;
1125 ),
Johannes Bergec816082012-11-16 17:22:28 +01001126 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %senabled, timeout: %d ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001127 WIPHY_PR_ARG, NETDEV_PR_ARG,
1128 __entry->enabled ? "" : "not ", __entry->timeout)
1129);
1130
1131TRACE_EVENT(rdev_connect,
1132 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1133 struct cfg80211_connect_params *sme),
1134 TP_ARGS(wiphy, netdev, sme),
1135 TP_STRUCT__entry(
1136 WIPHY_ENTRY
1137 NETDEV_ENTRY
1138 MAC_ENTRY(bssid)
1139 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1140 __field(enum nl80211_auth_type, auth_type)
1141 __field(bool, privacy)
1142 __field(u32, wpa_versions)
1143 __field(u32, flags)
1144 ),
1145 TP_fast_assign(
1146 WIPHY_ASSIGN;
1147 NETDEV_ASSIGN;
1148 MAC_ASSIGN(bssid, sme->bssid);
1149 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1150 memcpy(__entry->ssid, sme->ssid, sme->ssid_len);
1151 __entry->auth_type = sme->auth_type;
1152 __entry->privacy = sme->privacy;
1153 __entry->wpa_versions = sme->crypto.wpa_versions;
1154 __entry->flags = sme->flags;
1155 ),
Johannes Bergec816082012-11-16 17:22:28 +01001156 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001157 ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, "
1158 "flags: %u",
1159 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid,
1160 __entry->auth_type, BOOL_TO_STR(__entry->privacy),
1161 __entry->wpa_versions, __entry->flags)
1162);
1163
1164TRACE_EVENT(rdev_set_cqm_rssi_config,
1165 TP_PROTO(struct wiphy *wiphy,
1166 struct net_device *netdev, s32 rssi_thold,
1167 u32 rssi_hyst),
1168 TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst),
1169 TP_STRUCT__entry(
1170 WIPHY_ENTRY
1171 NETDEV_ENTRY
1172 __field(s32, rssi_thold)
1173 __field(u32, rssi_hyst)
1174 ),
1175 TP_fast_assign(
1176 WIPHY_ASSIGN;
1177 NETDEV_ASSIGN;
1178 __entry->rssi_thold = rssi_thold;
1179 __entry->rssi_hyst = rssi_hyst;
1180 ),
Johannes Bergec816082012-11-16 17:22:28 +01001181 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001182 ", rssi_thold: %d, rssi_hyst: %u ",
1183 WIPHY_PR_ARG, NETDEV_PR_ARG,
1184 __entry->rssi_thold, __entry->rssi_hyst)
1185);
1186
1187TRACE_EVENT(rdev_set_cqm_txe_config,
1188 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate,
1189 u32 pkts, u32 intvl),
1190 TP_ARGS(wiphy, netdev, rate, pkts, intvl),
1191 TP_STRUCT__entry(
1192 WIPHY_ENTRY
1193 NETDEV_ENTRY
1194 __field(u32, rate)
1195 __field(u32, pkts)
1196 __field(u32, intvl)
1197 ),
1198 TP_fast_assign(
1199 WIPHY_ASSIGN;
1200 NETDEV_ASSIGN;
1201 __entry->rate = rate;
1202 __entry->pkts = pkts;
1203 __entry->intvl = intvl;
1204 ),
Johannes Bergec816082012-11-16 17:22:28 +01001205 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001206 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts,
1207 __entry->intvl)
1208);
1209
1210TRACE_EVENT(rdev_disconnect,
1211 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1212 u16 reason_code),
1213 TP_ARGS(wiphy, netdev, reason_code),
1214 TP_STRUCT__entry(
1215 WIPHY_ENTRY
1216 NETDEV_ENTRY
1217 __field(u16, reason_code)
1218 ),
1219 TP_fast_assign(
1220 WIPHY_ASSIGN;
1221 NETDEV_ASSIGN;
1222 __entry->reason_code = reason_code;
1223 ),
Johannes Bergec816082012-11-16 17:22:28 +01001224 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001225 NETDEV_PR_ARG, __entry->reason_code)
1226);
1227
1228TRACE_EVENT(rdev_join_ibss,
1229 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1230 struct cfg80211_ibss_params *params),
1231 TP_ARGS(wiphy, netdev, params),
1232 TP_STRUCT__entry(
1233 WIPHY_ENTRY
1234 NETDEV_ENTRY
1235 MAC_ENTRY(bssid)
1236 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1237 ),
1238 TP_fast_assign(
1239 WIPHY_ASSIGN;
1240 NETDEV_ASSIGN;
1241 MAC_ASSIGN(bssid, params->bssid);
1242 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1243 memcpy(__entry->ssid, params->ssid, params->ssid_len);
1244 ),
Johannes Bergec816082012-11-16 17:22:28 +01001245 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001246 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid)
1247);
1248
1249TRACE_EVENT(rdev_set_wiphy_params,
1250 TP_PROTO(struct wiphy *wiphy, u32 changed),
1251 TP_ARGS(wiphy, changed),
1252 TP_STRUCT__entry(
1253 WIPHY_ENTRY
1254 __field(u32, changed)
1255 ),
1256 TP_fast_assign(
1257 WIPHY_ASSIGN;
1258 __entry->changed = changed;
1259 ),
1260 TP_printk(WIPHY_PR_FMT ", changed: %u",
1261 WIPHY_PR_ARG, __entry->changed)
1262);
1263
Johannes Bergc8442112012-10-24 10:17:18 +02001264DEFINE_EVENT(wiphy_wdev_evt, rdev_get_tx_power,
1265 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1266 TP_ARGS(wiphy, wdev)
1267);
1268
Beni Lev14e8a3c2012-07-31 18:48:27 +03001269TRACE_EVENT(rdev_set_tx_power,
Johannes Bergc8442112012-10-24 10:17:18 +02001270 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1271 enum nl80211_tx_power_setting type, int mbm),
1272 TP_ARGS(wiphy, wdev, type, mbm),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001273 TP_STRUCT__entry(
1274 WIPHY_ENTRY
Johannes Bergc8442112012-10-24 10:17:18 +02001275 WDEV_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001276 __field(enum nl80211_tx_power_setting, type)
1277 __field(int, mbm)
1278 ),
1279 TP_fast_assign(
1280 WIPHY_ASSIGN;
Johannes Bergc8442112012-10-24 10:17:18 +02001281 WDEV_ASSIGN;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001282 __entry->type = type;
1283 __entry->mbm = mbm;
1284 ),
Johannes Bergec816082012-11-16 17:22:28 +01001285 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d",
Johannes Bergc8442112012-10-24 10:17:18 +02001286 WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001287);
1288
1289TRACE_EVENT(rdev_return_int_int,
1290 TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill),
1291 TP_ARGS(wiphy, func_ret, func_fill),
1292 TP_STRUCT__entry(
1293 WIPHY_ENTRY
1294 __field(int, func_ret)
1295 __field(int, func_fill)
1296 ),
1297 TP_fast_assign(
1298 WIPHY_ASSIGN;
1299 __entry->func_ret = func_ret;
1300 __entry->func_fill = func_fill;
1301 ),
1302 TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d",
1303 WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill)
1304);
1305
1306#ifdef CONFIG_NL80211_TESTMODE
1307TRACE_EVENT(rdev_testmode_cmd,
David Spinadelfc73f112013-07-31 18:04:15 +03001308 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1309 TP_ARGS(wiphy, wdev),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001310 TP_STRUCT__entry(
1311 WIPHY_ENTRY
David Spinadelfc73f112013-07-31 18:04:15 +03001312 WDEV_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001313 ),
1314 TP_fast_assign(
1315 WIPHY_ASSIGN;
David Spinadelfc73f112013-07-31 18:04:15 +03001316 WDEV_ASSIGN;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001317 ),
David Spinadelfc73f112013-07-31 18:04:15 +03001318 TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001319);
1320
1321TRACE_EVENT(rdev_testmode_dump,
1322 TP_PROTO(struct wiphy *wiphy),
1323 TP_ARGS(wiphy),
1324 TP_STRUCT__entry(
1325 WIPHY_ENTRY
1326 ),
1327 TP_fast_assign(
1328 WIPHY_ASSIGN;
1329 ),
1330 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
1331);
1332#endif /* CONFIG_NL80211_TESTMODE */
1333
1334TRACE_EVENT(rdev_set_bitrate_mask,
1335 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1336 const u8 *peer, const struct cfg80211_bitrate_mask *mask),
1337 TP_ARGS(wiphy, netdev, peer, mask),
1338 TP_STRUCT__entry(
1339 WIPHY_ENTRY
1340 NETDEV_ENTRY
1341 MAC_ENTRY(peer)
1342 ),
1343 TP_fast_assign(
1344 WIPHY_ASSIGN;
1345 NETDEV_ASSIGN;
1346 MAC_ASSIGN(peer, peer);
1347 ),
Johannes Bergec816082012-11-16 17:22:28 +01001348 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001349 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1350);
1351
1352TRACE_EVENT(rdev_mgmt_frame_register,
1353 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1354 u16 frame_type, bool reg),
1355 TP_ARGS(wiphy, wdev, frame_type, reg),
1356 TP_STRUCT__entry(
1357 WIPHY_ENTRY
1358 WDEV_ENTRY
1359 __field(u16, frame_type)
1360 __field(bool, reg)
1361 ),
1362 TP_fast_assign(
1363 WIPHY_ASSIGN;
1364 WDEV_ASSIGN;
1365 __entry->frame_type = frame_type;
1366 __entry->reg = reg;
1367 ),
Johannes Bergec816082012-11-16 17:22:28 +01001368 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", frame_type: 0x%.2x, reg: %s ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001369 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->frame_type,
1370 __entry->reg ? "true" : "false")
1371);
1372
1373TRACE_EVENT(rdev_return_int_tx_rx,
1374 TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx),
1375 TP_ARGS(wiphy, ret, tx, rx),
1376 TP_STRUCT__entry(
1377 WIPHY_ENTRY
1378 __field(int, ret)
1379 __field(u32, tx)
1380 __field(u32, rx)
1381 ),
1382 TP_fast_assign(
1383 WIPHY_ASSIGN;
1384 __entry->ret = ret;
1385 __entry->tx = tx;
1386 __entry->rx = rx;
1387 ),
1388 TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u",
1389 WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx)
1390);
1391
1392TRACE_EVENT(rdev_return_void_tx_rx,
1393 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max,
1394 u32 rx, u32 rx_max),
1395 TP_ARGS(wiphy, tx, tx_max, rx, rx_max),
1396 TP_STRUCT__entry(
1397 WIPHY_ENTRY
1398 __field(u32, tx)
1399 __field(u32, tx_max)
1400 __field(u32, rx)
1401 __field(u32, rx_max)
1402 ),
1403 TP_fast_assign(
1404 WIPHY_ASSIGN;
1405 __entry->tx = tx;
1406 __entry->tx_max = tx_max;
1407 __entry->rx = rx;
1408 __entry->rx_max = rx_max;
1409 ),
1410 TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ",
1411 WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx,
1412 __entry->rx_max)
1413);
1414
1415DECLARE_EVENT_CLASS(tx_rx_evt,
1416 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1417 TP_ARGS(wiphy, rx, tx),
1418 TP_STRUCT__entry(
1419 WIPHY_ENTRY
1420 __field(u32, tx)
1421 __field(u32, rx)
1422 ),
1423 TP_fast_assign(
1424 WIPHY_ASSIGN;
1425 __entry->tx = tx;
1426 __entry->rx = rx;
1427 ),
1428 TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ",
1429 WIPHY_PR_ARG, __entry->tx, __entry->rx)
1430);
1431
Beni Lev14e8a3c2012-07-31 18:48:27 +03001432DEFINE_EVENT(tx_rx_evt, rdev_set_antenna,
1433 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1434 TP_ARGS(wiphy, rx, tx)
1435);
1436
1437TRACE_EVENT(rdev_sched_scan_start,
1438 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1439 struct cfg80211_sched_scan_request *request),
1440 TP_ARGS(wiphy, netdev, request),
1441 TP_STRUCT__entry(
1442 WIPHY_ENTRY
1443 NETDEV_ENTRY
1444 ),
1445 TP_fast_assign(
1446 WIPHY_ASSIGN;
1447 NETDEV_ASSIGN;
1448 ),
Johannes Bergec816082012-11-16 17:22:28 +01001449 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001450 WIPHY_PR_ARG, NETDEV_PR_ARG)
1451);
1452
1453TRACE_EVENT(rdev_tdls_mgmt,
1454 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1455 u8 *peer, u8 action_code, u8 dialog_token,
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301456 u16 status_code, u32 peer_capability,
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001457 bool initiator, const u8 *buf, size_t len),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001458 TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code,
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001459 peer_capability, initiator, buf, len),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001460 TP_STRUCT__entry(
1461 WIPHY_ENTRY
1462 NETDEV_ENTRY
1463 MAC_ENTRY(peer)
1464 __field(u8, action_code)
1465 __field(u8, dialog_token)
1466 __field(u16, status_code)
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301467 __field(u32, peer_capability)
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001468 __field(bool, initiator)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001469 __dynamic_array(u8, buf, len)
1470 ),
1471 TP_fast_assign(
1472 WIPHY_ASSIGN;
1473 NETDEV_ASSIGN;
1474 MAC_ASSIGN(peer, peer);
1475 __entry->action_code = action_code;
1476 __entry->dialog_token = dialog_token;
1477 __entry->status_code = status_code;
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301478 __entry->peer_capability = peer_capability;
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001479 __entry->initiator = initiator;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001480 memcpy(__get_dynamic_array(buf), buf, len);
1481 ),
Johannes Bergec816082012-11-16 17:22:28 +01001482 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", action_code: %u, "
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001483 "dialog_token: %u, status_code: %u, peer_capability: %u "
1484 "initiator: %s buf: %#.2x ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001485 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
1486 __entry->action_code, __entry->dialog_token,
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301487 __entry->status_code, __entry->peer_capability,
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001488 BOOL_TO_STR(__entry->initiator),
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301489 ((u8 *)__get_dynamic_array(buf))[0])
Beni Lev14e8a3c2012-07-31 18:48:27 +03001490);
1491
1492TRACE_EVENT(rdev_dump_survey,
1493 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx),
1494 TP_ARGS(wiphy, netdev, idx),
1495 TP_STRUCT__entry(
1496 WIPHY_ENTRY
1497 NETDEV_ENTRY
1498 __field(int, idx)
1499 ),
1500 TP_fast_assign(
1501 WIPHY_ASSIGN;
1502 NETDEV_ASSIGN;
1503 __entry->idx = idx;
1504 ),
Johannes Bergec816082012-11-16 17:22:28 +01001505 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001506 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx)
1507);
1508
1509TRACE_EVENT(rdev_return_int_survey_info,
1510 TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info),
1511 TP_ARGS(wiphy, ret, info),
1512 TP_STRUCT__entry(
1513 WIPHY_ENTRY
1514 CHAN_ENTRY
1515 __field(int, ret)
1516 __field(u64, channel_time)
1517 __field(u64, channel_time_busy)
1518 __field(u64, channel_time_ext_busy)
1519 __field(u64, channel_time_rx)
1520 __field(u64, channel_time_tx)
1521 __field(u32, filled)
1522 __field(s8, noise)
1523 ),
1524 TP_fast_assign(
1525 WIPHY_ASSIGN;
1526 CHAN_ASSIGN(info->channel);
1527 __entry->ret = ret;
1528 __entry->channel_time = info->channel_time;
1529 __entry->channel_time_busy = info->channel_time_busy;
1530 __entry->channel_time_ext_busy = info->channel_time_ext_busy;
1531 __entry->channel_time_rx = info->channel_time_rx;
1532 __entry->channel_time_tx = info->channel_time_tx;
1533 __entry->filled = info->filled;
1534 __entry->noise = info->noise;
1535 ),
1536 TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT
1537 ", channel time: %llu, channel time busy: %llu, "
1538 "channel time extension busy: %llu, channel time rx: %llu, "
1539 "channel time tx: %llu, filled: %u, noise: %d",
1540 WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG,
1541 __entry->channel_time, __entry->channel_time_busy,
1542 __entry->channel_time_ext_busy, __entry->channel_time_rx,
1543 __entry->channel_time_tx, __entry->filled, __entry->noise)
1544);
1545
1546TRACE_EVENT(rdev_tdls_oper,
1547 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1548 u8 *peer, enum nl80211_tdls_operation oper),
1549 TP_ARGS(wiphy, netdev, peer, oper),
1550 TP_STRUCT__entry(
1551 WIPHY_ENTRY
1552 NETDEV_ENTRY
1553 MAC_ENTRY(peer)
1554 __field(enum nl80211_tdls_operation, oper)
1555 ),
1556 TP_fast_assign(
1557 WIPHY_ASSIGN;
1558 NETDEV_ASSIGN;
1559 MAC_ASSIGN(peer, peer);
1560 __entry->oper = oper;
1561 ),
Johannes Bergec816082012-11-16 17:22:28 +01001562 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", oper: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001563 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper)
1564);
1565
1566DECLARE_EVENT_CLASS(rdev_pmksa,
1567 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1568 struct cfg80211_pmksa *pmksa),
1569 TP_ARGS(wiphy, netdev, pmksa),
1570 TP_STRUCT__entry(
1571 WIPHY_ENTRY
1572 NETDEV_ENTRY
1573 MAC_ENTRY(bssid)
1574 ),
1575 TP_fast_assign(
1576 WIPHY_ASSIGN;
1577 NETDEV_ASSIGN;
1578 MAC_ASSIGN(bssid, pmksa->bssid);
1579 ),
Johannes Bergec816082012-11-16 17:22:28 +01001580 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001581 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid))
1582);
1583
1584TRACE_EVENT(rdev_probe_client,
1585 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1586 const u8 *peer),
1587 TP_ARGS(wiphy, netdev, peer),
1588 TP_STRUCT__entry(
1589 WIPHY_ENTRY
1590 NETDEV_ENTRY
1591 MAC_ENTRY(peer)
1592 ),
1593 TP_fast_assign(
1594 WIPHY_ASSIGN;
1595 NETDEV_ASSIGN;
1596 MAC_ASSIGN(peer, peer);
1597 ),
Johannes Bergec816082012-11-16 17:22:28 +01001598 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001599 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1600);
1601
1602DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa,
1603 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1604 struct cfg80211_pmksa *pmksa),
1605 TP_ARGS(wiphy, netdev, pmksa)
1606);
1607
1608DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa,
1609 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1610 struct cfg80211_pmksa *pmksa),
1611 TP_ARGS(wiphy, netdev, pmksa)
1612);
1613
1614TRACE_EVENT(rdev_remain_on_channel,
1615 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1616 struct ieee80211_channel *chan,
Johannes Berg42d97a52012-11-08 18:31:02 +01001617 unsigned int duration),
1618 TP_ARGS(wiphy, wdev, chan, duration),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001619 TP_STRUCT__entry(
1620 WIPHY_ENTRY
1621 WDEV_ENTRY
1622 CHAN_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001623 __field(unsigned int, duration)
1624 ),
1625 TP_fast_assign(
1626 WIPHY_ASSIGN;
1627 WDEV_ASSIGN;
1628 CHAN_ASSIGN(chan);
Beni Lev14e8a3c2012-07-31 18:48:27 +03001629 __entry->duration = duration;
1630 ),
Johannes Bergec816082012-11-16 17:22:28 +01001631 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", duration: %u",
Johannes Berg42d97a52012-11-08 18:31:02 +01001632 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001633);
1634
1635TRACE_EVENT(rdev_return_int_cookie,
1636 TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie),
1637 TP_ARGS(wiphy, ret, cookie),
1638 TP_STRUCT__entry(
1639 WIPHY_ENTRY
1640 __field(int, ret)
1641 __field(u64, cookie)
1642 ),
1643 TP_fast_assign(
1644 WIPHY_ASSIGN;
1645 __entry->ret = ret;
1646 __entry->cookie = cookie;
1647 ),
1648 TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu",
1649 WIPHY_PR_ARG, __entry->ret, __entry->cookie)
1650);
1651
1652TRACE_EVENT(rdev_cancel_remain_on_channel,
1653 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
1654 TP_ARGS(wiphy, wdev, cookie),
1655 TP_STRUCT__entry(
1656 WIPHY_ENTRY
1657 WDEV_ENTRY
1658 __field(u64, cookie)
1659 ),
1660 TP_fast_assign(
1661 WIPHY_ASSIGN;
1662 WDEV_ASSIGN;
1663 __entry->cookie = cookie;
1664 ),
Johannes Bergec816082012-11-16 17:22:28 +01001665 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001666 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1667);
1668
1669TRACE_EVENT(rdev_mgmt_tx,
1670 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
Andrei Otcheretianskib176e622013-11-18 19:06:49 +02001671 struct cfg80211_mgmt_tx_params *params),
1672 TP_ARGS(wiphy, wdev, params),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001673 TP_STRUCT__entry(
1674 WIPHY_ENTRY
1675 WDEV_ENTRY
1676 CHAN_ENTRY
1677 __field(bool, offchan)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001678 __field(unsigned int, wait)
1679 __field(bool, no_cck)
1680 __field(bool, dont_wait_for_ack)
1681 ),
1682 TP_fast_assign(
1683 WIPHY_ASSIGN;
1684 WDEV_ASSIGN;
Andrei Otcheretianskib176e622013-11-18 19:06:49 +02001685 CHAN_ASSIGN(params->chan);
1686 __entry->offchan = params->offchan;
1687 __entry->wait = params->wait;
1688 __entry->no_cck = params->no_cck;
1689 __entry->dont_wait_for_ack = params->dont_wait_for_ack;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001690 ),
Johannes Bergec816082012-11-16 17:22:28 +01001691 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s,"
Johannes Berg42d97a52012-11-08 18:31:02 +01001692 " wait: %u, no cck: %s, dont wait for ack: %s",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001693 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG,
Johannes Berg42d97a52012-11-08 18:31:02 +01001694 BOOL_TO_STR(__entry->offchan), __entry->wait,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001695 BOOL_TO_STR(__entry->no_cck),
1696 BOOL_TO_STR(__entry->dont_wait_for_ack))
1697);
1698
1699TRACE_EVENT(rdev_set_noack_map,
1700 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1701 u16 noack_map),
1702 TP_ARGS(wiphy, netdev, noack_map),
1703 TP_STRUCT__entry(
1704 WIPHY_ENTRY
1705 NETDEV_ENTRY
1706 __field(u16, noack_map)
1707 ),
1708 TP_fast_assign(
1709 WIPHY_ASSIGN;
1710 NETDEV_ASSIGN;
1711 __entry->noack_map = noack_map;
1712 ),
Johannes Bergec816082012-11-16 17:22:28 +01001713 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", noack_map: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001714 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map)
1715);
1716
Beni Lev14e8a3c2012-07-31 18:48:27 +03001717DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel,
1718 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1719 TP_ARGS(wiphy, wdev)
1720);
1721
Johannes Berg683b6d32012-11-08 21:25:48 +01001722TRACE_EVENT(rdev_return_chandef,
1723 TP_PROTO(struct wiphy *wiphy, int ret,
1724 struct cfg80211_chan_def *chandef),
1725 TP_ARGS(wiphy, ret, chandef),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001726 TP_STRUCT__entry(
1727 WIPHY_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01001728 __field(int, ret)
1729 CHAN_DEF_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001730 ),
1731 TP_fast_assign(
1732 WIPHY_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01001733 if (ret == 0)
1734 CHAN_DEF_ASSIGN(chandef);
1735 else
1736 CHAN_DEF_ASSIGN((struct cfg80211_chan_def *)NULL);
1737 __entry->ret = ret;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001738 ),
Johannes Bergec816082012-11-16 17:22:28 +01001739 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", ret: %d",
Johannes Berg683b6d32012-11-08 21:25:48 +01001740 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->ret)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001741);
1742
Johannes Bergeeb126e2012-10-23 15:16:50 +02001743DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device,
1744 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1745 TP_ARGS(wiphy, wdev)
1746);
1747
1748DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device,
1749 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1750 TP_ARGS(wiphy, wdev)
1751);
1752
Vasanthakumar Thiagarajan77765ea2013-01-18 11:18:45 +05301753TRACE_EVENT(rdev_set_mac_acl,
1754 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1755 struct cfg80211_acl_data *params),
1756 TP_ARGS(wiphy, netdev, params),
1757 TP_STRUCT__entry(
1758 WIPHY_ENTRY
1759 NETDEV_ENTRY
1760 __field(u32, acl_policy)
1761 ),
1762 TP_fast_assign(
1763 WIPHY_ASSIGN;
Vladimir Kondratiev021fcdc2013-03-07 11:08:29 +02001764 NETDEV_ASSIGN;
Vasanthakumar Thiagarajan77765ea2013-01-18 11:18:45 +05301765 __entry->acl_policy = params->acl_policy;
1766 ),
1767 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", acl policy: %d",
1768 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->acl_policy)
1769);
1770
Jouni Malinen355199e2013-02-27 17:14:27 +02001771TRACE_EVENT(rdev_update_ft_ies,
1772 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1773 struct cfg80211_update_ft_ies_params *ftie),
1774 TP_ARGS(wiphy, netdev, ftie),
1775 TP_STRUCT__entry(
1776 WIPHY_ENTRY
1777 NETDEV_ENTRY
1778 __field(u16, md)
1779 __dynamic_array(u8, ie, ftie->ie_len)
1780 ),
1781 TP_fast_assign(
1782 WIPHY_ASSIGN;
1783 NETDEV_ASSIGN;
1784 __entry->md = ftie->md;
1785 memcpy(__get_dynamic_array(ie), ftie->ie, ftie->ie_len);
1786 ),
1787 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", md: 0x%x",
1788 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->md)
1789);
1790
Arend van Spriel5de17982013-04-18 15:49:00 +02001791TRACE_EVENT(rdev_crit_proto_start,
1792 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1793 enum nl80211_crit_proto_id protocol, u16 duration),
1794 TP_ARGS(wiphy, wdev, protocol, duration),
1795 TP_STRUCT__entry(
1796 WIPHY_ENTRY
1797 WDEV_ENTRY
1798 __field(u16, proto)
1799 __field(u16, duration)
1800 ),
1801 TP_fast_assign(
1802 WIPHY_ASSIGN;
1803 WDEV_ASSIGN;
1804 __entry->proto = protocol;
1805 __entry->duration = duration;
1806 ),
1807 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", proto=%x, duration=%u",
1808 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->proto, __entry->duration)
1809);
1810
1811TRACE_EVENT(rdev_crit_proto_stop,
1812 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1813 TP_ARGS(wiphy, wdev),
1814 TP_STRUCT__entry(
1815 WIPHY_ENTRY
1816 WDEV_ENTRY
1817 ),
1818 TP_fast_assign(
1819 WIPHY_ASSIGN;
1820 WDEV_ASSIGN;
1821 ),
1822 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
1823 WIPHY_PR_ARG, WDEV_PR_ARG)
1824);
1825
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001826TRACE_EVENT(rdev_channel_switch,
1827 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1828 struct cfg80211_csa_settings *params),
1829 TP_ARGS(wiphy, netdev, params),
1830 TP_STRUCT__entry(
1831 WIPHY_ENTRY
1832 NETDEV_ENTRY
1833 CHAN_DEF_ENTRY
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001834 __field(bool, radar_required)
1835 __field(bool, block_tx)
1836 __field(u8, count)
Andrei Otcheretianski9a774c72014-05-09 14:11:46 +03001837 __dynamic_array(u16, bcn_ofs, params->n_counter_offsets_beacon)
1838 __dynamic_array(u16, pres_ofs, params->n_counter_offsets_presp)
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001839 ),
1840 TP_fast_assign(
1841 WIPHY_ASSIGN;
1842 NETDEV_ASSIGN;
1843 CHAN_DEF_ASSIGN(&params->chandef);
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001844 __entry->radar_required = params->radar_required;
1845 __entry->block_tx = params->block_tx;
1846 __entry->count = params->count;
Andrei Otcheretianski9a774c72014-05-09 14:11:46 +03001847 memcpy(__get_dynamic_array(bcn_ofs),
1848 params->counter_offsets_beacon,
1849 params->n_counter_offsets_beacon * sizeof(u16));
1850
1851 /* probe response offsets are optional */
1852 if (params->n_counter_offsets_presp)
1853 memcpy(__get_dynamic_array(pres_ofs),
1854 params->counter_offsets_presp,
1855 params->n_counter_offsets_presp * sizeof(u16));
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001856 ),
1857 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
Andrei Otcheretianski9a774c72014-05-09 14:11:46 +03001858 ", block_tx: %d, count: %u, radar_required: %d",
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001859 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
Andrei Otcheretianski9a774c72014-05-09 14:11:46 +03001860 __entry->block_tx, __entry->count, __entry->radar_required)
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02001861);
1862
Kyeyoon Parkfa9ffc72013-12-16 23:01:30 -08001863TRACE_EVENT(rdev_set_qos_map,
1864 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1865 struct cfg80211_qos_map *qos_map),
1866 TP_ARGS(wiphy, netdev, qos_map),
1867 TP_STRUCT__entry(
1868 WIPHY_ENTRY
1869 NETDEV_ENTRY
1870 QOS_MAP_ENTRY
1871 ),
1872 TP_fast_assign(
1873 WIPHY_ASSIGN;
1874 NETDEV_ASSIGN;
1875 QOS_MAP_ASSIGN(qos_map);
1876 ),
1877 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", num_des: %u",
1878 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->num_des)
1879);
1880
Jouni Malinene16821b2014-04-28 11:22:08 +03001881TRACE_EVENT(rdev_set_ap_chanwidth,
1882 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1883 struct cfg80211_chan_def *chandef),
1884 TP_ARGS(wiphy, netdev, chandef),
1885 TP_STRUCT__entry(
1886 WIPHY_ENTRY
1887 NETDEV_ENTRY
1888 CHAN_DEF_ENTRY
1889 ),
1890 TP_fast_assign(
1891 WIPHY_ASSIGN;
1892 NETDEV_ASSIGN;
1893 CHAN_DEF_ASSIGN(chandef);
1894 ),
1895 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
1896 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
1897);
1898
Beni Lev4ee3e062012-08-27 12:49:39 +03001899/*************************************************************
1900 * cfg80211 exported functions traces *
1901 *************************************************************/
1902
1903TRACE_EVENT(cfg80211_return_bool,
1904 TP_PROTO(bool ret),
1905 TP_ARGS(ret),
1906 TP_STRUCT__entry(
1907 __field(bool, ret)
1908 ),
1909 TP_fast_assign(
1910 __entry->ret = ret;
1911 ),
1912 TP_printk("returned %s", BOOL_TO_STR(__entry->ret))
1913);
1914
1915DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt,
1916 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
1917 TP_ARGS(netdev, macaddr),
1918 TP_STRUCT__entry(
1919 NETDEV_ENTRY
1920 MAC_ENTRY(macaddr)
1921 ),
1922 TP_fast_assign(
1923 NETDEV_ASSIGN;
1924 MAC_ASSIGN(macaddr, macaddr);
1925 ),
1926 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
1927 NETDEV_PR_ARG, MAC_PR_ARG(macaddr))
1928);
1929
1930DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate,
1931 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
1932 TP_ARGS(netdev, macaddr)
1933);
1934
1935DECLARE_EVENT_CLASS(netdev_evt_only,
1936 TP_PROTO(struct net_device *netdev),
1937 TP_ARGS(netdev),
1938 TP_STRUCT__entry(
1939 NETDEV_ENTRY
1940 ),
1941 TP_fast_assign(
1942 NETDEV_ASSIGN;
1943 ),
1944 TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG)
1945);
1946
1947DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth,
1948 TP_PROTO(struct net_device *netdev),
1949 TP_ARGS(netdev)
1950);
1951
1952TRACE_EVENT(cfg80211_send_rx_assoc,
1953 TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss),
1954 TP_ARGS(netdev, bss),
1955 TP_STRUCT__entry(
1956 NETDEV_ENTRY
1957 MAC_ENTRY(bssid)
1958 CHAN_ENTRY
1959 ),
1960 TP_fast_assign(
1961 NETDEV_ASSIGN;
1962 MAC_ASSIGN(bssid, bss->bssid);
1963 CHAN_ASSIGN(bss->channel);
1964 ),
Johannes Bergec816082012-11-16 17:22:28 +01001965 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", " CHAN_PR_FMT,
Beni Lev4ee3e062012-08-27 12:49:39 +03001966 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
1967);
1968
Johannes Berg6ff57cf2013-05-16 00:55:00 +02001969DECLARE_EVENT_CLASS(netdev_frame_event,
1970 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
1971 TP_ARGS(netdev, buf, len),
1972 TP_STRUCT__entry(
1973 NETDEV_ENTRY
1974 __dynamic_array(u8, frame, len)
1975 ),
1976 TP_fast_assign(
1977 NETDEV_ASSIGN;
1978 memcpy(__get_dynamic_array(frame), buf, len);
1979 ),
1980 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
1981 NETDEV_PR_ARG,
1982 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
Beni Lev4ee3e062012-08-27 12:49:39 +03001983);
1984
Johannes Berg6ff57cf2013-05-16 00:55:00 +02001985DEFINE_EVENT(netdev_frame_event, cfg80211_rx_unprot_mlme_mgmt,
1986 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
1987 TP_ARGS(netdev, buf, len)
Beni Lev4ee3e062012-08-27 12:49:39 +03001988);
1989
Johannes Berg6ff57cf2013-05-16 00:55:00 +02001990DEFINE_EVENT(netdev_frame_event, cfg80211_rx_mlme_mgmt,
1991 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
1992 TP_ARGS(netdev, buf, len)
Beni Lev4ee3e062012-08-27 12:49:39 +03001993);
1994
Johannes Berg6ff57cf2013-05-16 00:55:00 +02001995TRACE_EVENT(cfg80211_tx_mlme_mgmt,
1996 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
1997 TP_ARGS(netdev, buf, len),
1998 TP_STRUCT__entry(
1999 NETDEV_ENTRY
2000 __dynamic_array(u8, frame, len)
2001 ),
2002 TP_fast_assign(
2003 NETDEV_ASSIGN;
2004 memcpy(__get_dynamic_array(frame), buf, len);
2005 ),
2006 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2007 NETDEV_PR_ARG,
2008 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
Beni Lev4ee3e062012-08-27 12:49:39 +03002009);
2010
2011DECLARE_EVENT_CLASS(netdev_mac_evt,
2012 TP_PROTO(struct net_device *netdev, const u8 *mac),
2013 TP_ARGS(netdev, mac),
2014 TP_STRUCT__entry(
2015 NETDEV_ENTRY
2016 MAC_ENTRY(mac)
2017 ),
2018 TP_fast_assign(
2019 NETDEV_ASSIGN;
2020 MAC_ASSIGN(mac, mac)
2021 ),
2022 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
2023 NETDEV_PR_ARG, MAC_PR_ARG(mac))
2024);
2025
2026DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout,
2027 TP_PROTO(struct net_device *netdev, const u8 *mac),
2028 TP_ARGS(netdev, mac)
2029);
2030
2031DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout,
2032 TP_PROTO(struct net_device *netdev, const u8 *mac),
2033 TP_ARGS(netdev, mac)
2034);
2035
2036TRACE_EVENT(cfg80211_michael_mic_failure,
2037 TP_PROTO(struct net_device *netdev, const u8 *addr,
2038 enum nl80211_key_type key_type, int key_id, const u8 *tsc),
2039 TP_ARGS(netdev, addr, key_type, key_id, tsc),
2040 TP_STRUCT__entry(
2041 NETDEV_ENTRY
2042 MAC_ENTRY(addr)
2043 __field(enum nl80211_key_type, key_type)
2044 __field(int, key_id)
2045 __array(u8, tsc, 6)
2046 ),
2047 TP_fast_assign(
2048 NETDEV_ASSIGN;
2049 MAC_ASSIGN(addr, addr);
2050 __entry->key_type = key_type;
2051 __entry->key_id = key_id;
Eliad Peller8c26d452014-07-17 15:00:56 +03002052 if (tsc)
2053 memcpy(__entry->tsc, tsc, 6);
Beni Lev4ee3e062012-08-27 12:49:39 +03002054 ),
Johannes Bergec816082012-11-16 17:22:28 +01002055 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm",
Beni Lev4ee3e062012-08-27 12:49:39 +03002056 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type,
2057 __entry->key_id, __entry->tsc)
2058);
2059
2060TRACE_EVENT(cfg80211_ready_on_channel,
2061 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2062 struct ieee80211_channel *chan,
Johannes Berg42d97a52012-11-08 18:31:02 +01002063 unsigned int duration),
2064 TP_ARGS(wdev, cookie, chan, duration),
Beni Lev4ee3e062012-08-27 12:49:39 +03002065 TP_STRUCT__entry(
2066 WDEV_ENTRY
2067 __field(u64, cookie)
2068 CHAN_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002069 __field(unsigned int, duration)
2070 ),
2071 TP_fast_assign(
2072 WDEV_ASSIGN;
2073 __entry->cookie = cookie;
2074 CHAN_ASSIGN(chan);
Beni Lev4ee3e062012-08-27 12:49:39 +03002075 __entry->duration = duration;
2076 ),
Johannes Berg42d97a52012-11-08 18:31:02 +01002077 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u",
Beni Lev4ee3e062012-08-27 12:49:39 +03002078 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG,
Johannes Berg42d97a52012-11-08 18:31:02 +01002079 __entry->duration)
Beni Lev4ee3e062012-08-27 12:49:39 +03002080);
2081
2082TRACE_EVENT(cfg80211_ready_on_channel_expired,
2083 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
Johannes Berg42d97a52012-11-08 18:31:02 +01002084 struct ieee80211_channel *chan),
2085 TP_ARGS(wdev, cookie, chan),
Beni Lev4ee3e062012-08-27 12:49:39 +03002086 TP_STRUCT__entry(
2087 WDEV_ENTRY
2088 __field(u64, cookie)
2089 CHAN_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002090 ),
2091 TP_fast_assign(
2092 WDEV_ASSIGN;
2093 __entry->cookie = cookie;
2094 CHAN_ASSIGN(chan);
Beni Lev4ee3e062012-08-27 12:49:39 +03002095 ),
Johannes Berg42d97a52012-11-08 18:31:02 +01002096 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
2097 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002098);
2099
2100TRACE_EVENT(cfg80211_new_sta,
2101 TP_PROTO(struct net_device *netdev, const u8 *mac_addr,
2102 struct station_info *sinfo),
2103 TP_ARGS(netdev, mac_addr, sinfo),
2104 TP_STRUCT__entry(
2105 NETDEV_ENTRY
2106 MAC_ENTRY(mac_addr)
2107 SINFO_ENTRY
2108 ),
2109 TP_fast_assign(
2110 NETDEV_ASSIGN;
2111 MAC_ASSIGN(mac_addr, mac_addr);
2112 SINFO_ASSIGN;
2113 ),
Johannes Bergec816082012-11-16 17:22:28 +01002114 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT,
Beni Lev4ee3e062012-08-27 12:49:39 +03002115 NETDEV_PR_ARG, MAC_PR_ARG(mac_addr))
2116);
2117
2118DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta,
2119 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2120 TP_ARGS(netdev, macaddr)
2121);
2122
2123TRACE_EVENT(cfg80211_rx_mgmt,
2124 TP_PROTO(struct wireless_dev *wdev, int freq, int sig_mbm),
2125 TP_ARGS(wdev, freq, sig_mbm),
2126 TP_STRUCT__entry(
2127 WDEV_ENTRY
2128 __field(int, freq)
2129 __field(int, sig_mbm)
2130 ),
2131 TP_fast_assign(
2132 WDEV_ASSIGN;
2133 __entry->freq = freq;
2134 __entry->sig_mbm = sig_mbm;
2135 ),
2136 TP_printk(WDEV_PR_FMT ", freq: %d, sig mbm: %d",
2137 WDEV_PR_ARG, __entry->freq, __entry->sig_mbm)
2138);
2139
2140TRACE_EVENT(cfg80211_mgmt_tx_status,
2141 TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
2142 TP_ARGS(wdev, cookie, ack),
2143 TP_STRUCT__entry(
2144 WDEV_ENTRY
2145 __field(u64, cookie)
2146 __field(bool, ack)
2147 ),
2148 TP_fast_assign(
2149 WDEV_ASSIGN;
2150 __entry->cookie = cookie;
2151 __entry->ack = ack;
2152 ),
2153 TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
2154 WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
2155);
2156
2157TRACE_EVENT(cfg80211_cqm_rssi_notify,
2158 TP_PROTO(struct net_device *netdev,
2159 enum nl80211_cqm_rssi_threshold_event rssi_event),
2160 TP_ARGS(netdev, rssi_event),
2161 TP_STRUCT__entry(
2162 NETDEV_ENTRY
2163 __field(enum nl80211_cqm_rssi_threshold_event, rssi_event)
2164 ),
2165 TP_fast_assign(
2166 NETDEV_ASSIGN;
2167 __entry->rssi_event = rssi_event;
2168 ),
2169 TP_printk(NETDEV_PR_FMT ", rssi event: %d",
2170 NETDEV_PR_ARG, __entry->rssi_event)
2171);
2172
Johannes Berg683b6d32012-11-08 21:25:48 +01002173TRACE_EVENT(cfg80211_reg_can_beacon,
Ilan Peer174e0cd2014-02-23 09:13:01 +02002174 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef,
2175 enum nl80211_iftype iftype),
2176 TP_ARGS(wiphy, chandef, iftype),
Beni Lev4ee3e062012-08-27 12:49:39 +03002177 TP_STRUCT__entry(
2178 WIPHY_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01002179 CHAN_DEF_ENTRY
Ilan Peer174e0cd2014-02-23 09:13:01 +02002180 __field(enum nl80211_iftype, iftype)
Beni Lev4ee3e062012-08-27 12:49:39 +03002181 ),
2182 TP_fast_assign(
2183 WIPHY_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01002184 CHAN_DEF_ASSIGN(chandef);
Ilan Peer174e0cd2014-02-23 09:13:01 +02002185 __entry->iftype = iftype;
Beni Lev4ee3e062012-08-27 12:49:39 +03002186 ),
Ilan Peer174e0cd2014-02-23 09:13:01 +02002187 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", iftype=%d",
2188 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->iftype)
Beni Lev4ee3e062012-08-27 12:49:39 +03002189);
2190
Simon Wunderlich04f39042013-02-08 18:16:19 +01002191TRACE_EVENT(cfg80211_chandef_dfs_required,
2192 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2193 TP_ARGS(wiphy, chandef),
2194 TP_STRUCT__entry(
2195 WIPHY_ENTRY
2196 CHAN_DEF_ENTRY
2197 ),
2198 TP_fast_assign(
2199 WIPHY_ASSIGN;
2200 CHAN_DEF_ASSIGN(chandef);
2201 ),
2202 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2203 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2204);
2205
Beni Lev4ee3e062012-08-27 12:49:39 +03002206TRACE_EVENT(cfg80211_ch_switch_notify,
Johannes Berg683b6d32012-11-08 21:25:48 +01002207 TP_PROTO(struct net_device *netdev,
2208 struct cfg80211_chan_def *chandef),
2209 TP_ARGS(netdev, chandef),
Beni Lev4ee3e062012-08-27 12:49:39 +03002210 TP_STRUCT__entry(
2211 NETDEV_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01002212 CHAN_DEF_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002213 ),
2214 TP_fast_assign(
2215 NETDEV_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01002216 CHAN_DEF_ASSIGN(chandef);
Beni Lev4ee3e062012-08-27 12:49:39 +03002217 ),
Johannes Bergec816082012-11-16 17:22:28 +01002218 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
Johannes Berg683b6d32012-11-08 21:25:48 +01002219 NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002220);
2221
Simon Wunderlich04f39042013-02-08 18:16:19 +01002222TRACE_EVENT(cfg80211_radar_event,
2223 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2224 TP_ARGS(wiphy, chandef),
2225 TP_STRUCT__entry(
2226 WIPHY_ENTRY
2227 CHAN_DEF_ENTRY
2228 ),
2229 TP_fast_assign(
2230 WIPHY_ASSIGN;
2231 CHAN_DEF_ASSIGN(chandef);
2232 ),
2233 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2234 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2235);
2236
2237TRACE_EVENT(cfg80211_cac_event,
2238 TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt),
2239 TP_ARGS(netdev, evt),
2240 TP_STRUCT__entry(
2241 NETDEV_ENTRY
2242 __field(enum nl80211_radar_event, evt)
2243 ),
2244 TP_fast_assign(
2245 NETDEV_ASSIGN;
2246 __entry->evt = evt;
2247 ),
2248 TP_printk(NETDEV_PR_FMT ", event: %d",
2249 NETDEV_PR_ARG, __entry->evt)
2250);
2251
Beni Lev4ee3e062012-08-27 12:49:39 +03002252DECLARE_EVENT_CLASS(cfg80211_rx_evt,
2253 TP_PROTO(struct net_device *netdev, const u8 *addr),
2254 TP_ARGS(netdev, addr),
2255 TP_STRUCT__entry(
2256 NETDEV_ENTRY
2257 MAC_ENTRY(addr)
2258 ),
2259 TP_fast_assign(
2260 NETDEV_ASSIGN;
2261 MAC_ASSIGN(addr, addr);
2262 ),
Johannes Bergec816082012-11-16 17:22:28 +01002263 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr))
Beni Lev4ee3e062012-08-27 12:49:39 +03002264);
2265
Beni Lev4ee3e062012-08-27 12:49:39 +03002266DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame,
2267 TP_PROTO(struct net_device *netdev, const u8 *addr),
2268 TP_ARGS(netdev, addr)
2269);
2270
2271DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame,
2272 TP_PROTO(struct net_device *netdev, const u8 *addr),
2273 TP_ARGS(netdev, addr)
2274);
2275
Antonio Quartullife94f3a2014-01-29 17:53:43 +01002276TRACE_EVENT(cfg80211_ibss_joined,
2277 TP_PROTO(struct net_device *netdev, const u8 *bssid,
2278 struct ieee80211_channel *channel),
2279 TP_ARGS(netdev, bssid, channel),
2280 TP_STRUCT__entry(
2281 NETDEV_ENTRY
2282 MAC_ENTRY(bssid)
2283 CHAN_ENTRY
2284 ),
2285 TP_fast_assign(
2286 NETDEV_ASSIGN;
2287 MAC_ASSIGN(bssid, bssid);
2288 CHAN_ASSIGN(channel);
2289 ),
2290 TP_printk(NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", " CHAN_PR_FMT,
2291 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
2292);
2293
Beni Lev4ee3e062012-08-27 12:49:39 +03002294TRACE_EVENT(cfg80211_probe_status,
2295 TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie,
2296 bool acked),
2297 TP_ARGS(netdev, addr, cookie, acked),
2298 TP_STRUCT__entry(
2299 NETDEV_ENTRY
2300 MAC_ENTRY(addr)
2301 __field(u64, cookie)
2302 __field(bool, acked)
2303 ),
2304 TP_fast_assign(
2305 NETDEV_ASSIGN;
2306 MAC_ASSIGN(addr, addr);
2307 __entry->cookie = cookie;
2308 __entry->acked = acked;
2309 ),
Johannes Bergec816082012-11-16 17:22:28 +01002310 TP_printk(NETDEV_PR_FMT " addr:" MAC_PR_FMT ", cookie: %llu, acked: %s",
Beni Lev4ee3e062012-08-27 12:49:39 +03002311 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie,
2312 BOOL_TO_STR(__entry->acked))
2313);
2314
2315TRACE_EVENT(cfg80211_cqm_pktloss_notify,
2316 TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets),
2317 TP_ARGS(netdev, peer, num_packets),
2318 TP_STRUCT__entry(
2319 NETDEV_ENTRY
2320 MAC_ENTRY(peer)
2321 __field(u32, num_packets)
2322 ),
2323 TP_fast_assign(
2324 NETDEV_ASSIGN;
2325 MAC_ASSIGN(peer, peer);
2326 __entry->num_packets = num_packets;
2327 ),
2328 TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u",
2329 NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets)
2330);
2331
2332DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify,
2333 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2334 TP_ARGS(netdev, macaddr)
2335);
2336
2337TRACE_EVENT(cfg80211_pmksa_candidate_notify,
2338 TP_PROTO(struct net_device *netdev, int index, const u8 *bssid,
2339 bool preauth),
2340 TP_ARGS(netdev, index, bssid, preauth),
2341 TP_STRUCT__entry(
2342 NETDEV_ENTRY
2343 __field(int, index)
2344 MAC_ENTRY(bssid)
2345 __field(bool, preauth)
2346 ),
2347 TP_fast_assign(
2348 NETDEV_ASSIGN;
2349 __entry->index = index;
2350 MAC_ASSIGN(bssid, bssid);
2351 __entry->preauth = preauth;
2352 ),
2353 TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s",
2354 NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid),
2355 BOOL_TO_STR(__entry->preauth))
2356);
2357
2358TRACE_EVENT(cfg80211_report_obss_beacon,
2359 TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len,
2360 int freq, int sig_dbm),
2361 TP_ARGS(wiphy, frame, len, freq, sig_dbm),
2362 TP_STRUCT__entry(
2363 WIPHY_ENTRY
2364 __field(int, freq)
2365 __field(int, sig_dbm)
2366 ),
2367 TP_fast_assign(
2368 WIPHY_ASSIGN;
2369 __entry->freq = freq;
2370 __entry->sig_dbm = sig_dbm;
2371 ),
2372 TP_printk(WIPHY_PR_FMT ", freq: %d, sig_dbm: %d",
2373 WIPHY_PR_ARG, __entry->freq, __entry->sig_dbm)
2374);
2375
Jouni Malinen3475b092012-11-16 22:49:57 +02002376TRACE_EVENT(cfg80211_tdls_oper_request,
2377 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer,
2378 enum nl80211_tdls_operation oper, u16 reason_code),
2379 TP_ARGS(wiphy, netdev, peer, oper, reason_code),
2380 TP_STRUCT__entry(
2381 WIPHY_ENTRY
2382 NETDEV_ENTRY
2383 MAC_ENTRY(peer)
2384 __field(enum nl80211_tdls_operation, oper)
2385 __field(u16, reason_code)
2386 ),
2387 TP_fast_assign(
2388 WIPHY_ASSIGN;
2389 NETDEV_ASSIGN;
2390 MAC_ASSIGN(peer, peer);
2391 __entry->oper = oper;
2392 __entry->reason_code = reason_code;
2393 ),
2394 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", oper: %d, reason_code %u",
2395 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper,
2396 __entry->reason_code)
2397 );
2398
Beni Lev4ee3e062012-08-27 12:49:39 +03002399TRACE_EVENT(cfg80211_scan_done,
2400 TP_PROTO(struct cfg80211_scan_request *request, bool aborted),
2401 TP_ARGS(request, aborted),
2402 TP_STRUCT__entry(
2403 __field(u32, n_channels)
2404 __dynamic_array(u8, ie, request ? request->ie_len : 0)
2405 __array(u32, rates, IEEE80211_NUM_BANDS)
2406 __field(u32, wdev_id)
2407 MAC_ENTRY(wiphy_mac)
2408 __field(bool, no_cck)
2409 __field(bool, aborted)
2410 ),
2411 TP_fast_assign(
2412 if (request) {
2413 memcpy(__get_dynamic_array(ie), request->ie,
2414 request->ie_len);
2415 memcpy(__entry->rates, request->rates,
2416 IEEE80211_NUM_BANDS);
2417 __entry->wdev_id = request->wdev ?
2418 request->wdev->identifier : 0;
2419 if (request->wiphy)
2420 MAC_ASSIGN(wiphy_mac,
2421 request->wiphy->perm_addr);
2422 __entry->no_cck = request->no_cck;
2423 }
2424 __entry->aborted = aborted;
2425 ),
2426 TP_printk("aborted: %s", BOOL_TO_STR(__entry->aborted))
2427);
2428
2429DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_results,
2430 TP_PROTO(struct wiphy *wiphy),
2431 TP_ARGS(wiphy)
2432);
2433
2434DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_stopped,
2435 TP_PROTO(struct wiphy *wiphy),
2436 TP_ARGS(wiphy)
2437);
2438
2439TRACE_EVENT(cfg80211_get_bss,
2440 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
2441 const u8 *bssid, const u8 *ssid, size_t ssid_len,
2442 u16 capa_mask, u16 capa_val),
2443 TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, capa_mask, capa_val),
2444 TP_STRUCT__entry(
2445 WIPHY_ENTRY
2446 CHAN_ENTRY
2447 MAC_ENTRY(bssid)
2448 __dynamic_array(u8, ssid, ssid_len)
2449 __field(u16, capa_mask)
2450 __field(u16, capa_val)
2451 ),
2452 TP_fast_assign(
2453 WIPHY_ASSIGN;
2454 CHAN_ASSIGN(channel);
2455 MAC_ASSIGN(bssid, bssid);
2456 memcpy(__get_dynamic_array(ssid), ssid, ssid_len);
2457 __entry->capa_mask = capa_mask;
2458 __entry->capa_val = capa_val;
2459 ),
Johannes Bergec816082012-11-16 17:22:28 +01002460 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT ", buf: %#.2x, "
Beni Lev4ee3e062012-08-27 12:49:39 +03002461 "capa_mask: %d, capa_val: %u", WIPHY_PR_ARG, CHAN_PR_ARG,
2462 MAC_PR_ARG(bssid), ((u8 *)__get_dynamic_array(ssid))[0],
2463 __entry->capa_mask, __entry->capa_val)
2464);
2465
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002466TRACE_EVENT(cfg80211_inform_bss_width_frame,
Beni Lev4ee3e062012-08-27 12:49:39 +03002467 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002468 enum nl80211_bss_scan_width scan_width,
Beni Lev4ee3e062012-08-27 12:49:39 +03002469 struct ieee80211_mgmt *mgmt, size_t len,
2470 s32 signal),
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002471 TP_ARGS(wiphy, channel, scan_width, mgmt, len, signal),
Beni Lev4ee3e062012-08-27 12:49:39 +03002472 TP_STRUCT__entry(
2473 WIPHY_ENTRY
2474 CHAN_ENTRY
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002475 __field(enum nl80211_bss_scan_width, scan_width)
Beni Lev4ee3e062012-08-27 12:49:39 +03002476 __dynamic_array(u8, mgmt, len)
2477 __field(s32, signal)
2478 ),
2479 TP_fast_assign(
2480 WIPHY_ASSIGN;
2481 CHAN_ASSIGN(channel);
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002482 __entry->scan_width = scan_width;
Beni Lev4ee3e062012-08-27 12:49:39 +03002483 if (mgmt)
2484 memcpy(__get_dynamic_array(mgmt), mgmt, len);
2485 __entry->signal = signal;
2486 ),
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02002487 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT "(scan_width: %d) signal: %d",
2488 WIPHY_PR_ARG, CHAN_PR_ARG, __entry->scan_width,
2489 __entry->signal)
Beni Lev4ee3e062012-08-27 12:49:39 +03002490);
2491
2492DECLARE_EVENT_CLASS(cfg80211_bss_evt,
2493 TP_PROTO(struct cfg80211_bss *pub),
2494 TP_ARGS(pub),
2495 TP_STRUCT__entry(
2496 MAC_ENTRY(bssid)
2497 CHAN_ENTRY
2498 ),
2499 TP_fast_assign(
2500 MAC_ASSIGN(bssid, pub->bssid);
2501 CHAN_ASSIGN(pub->channel);
2502 ),
Johannes Bergec816082012-11-16 17:22:28 +01002503 TP_printk(MAC_PR_FMT ", " CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002504);
2505
2506DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss,
2507 TP_PROTO(struct cfg80211_bss *pub),
2508 TP_ARGS(pub)
2509);
2510
2511TRACE_EVENT(cfg80211_return_uint,
2512 TP_PROTO(unsigned int ret),
2513 TP_ARGS(ret),
2514 TP_STRUCT__entry(
2515 __field(unsigned int, ret)
2516 ),
2517 TP_fast_assign(
2518 __entry->ret = ret;
2519 ),
2520 TP_printk("ret: %d", __entry->ret)
2521);
2522
2523TRACE_EVENT(cfg80211_return_u32,
2524 TP_PROTO(u32 ret),
2525 TP_ARGS(ret),
2526 TP_STRUCT__entry(
2527 __field(u32, ret)
2528 ),
2529 TP_fast_assign(
2530 __entry->ret = ret;
2531 ),
2532 TP_printk("ret: %u", __entry->ret)
2533);
2534
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002535TRACE_EVENT(cfg80211_report_wowlan_wakeup,
2536 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2537 struct cfg80211_wowlan_wakeup *wakeup),
2538 TP_ARGS(wiphy, wdev, wakeup),
2539 TP_STRUCT__entry(
2540 WIPHY_ENTRY
2541 WDEV_ENTRY
Johannes Berga92eecb2013-04-29 12:09:14 +02002542 __field(bool, non_wireless)
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002543 __field(bool, disconnect)
2544 __field(bool, magic_pkt)
2545 __field(bool, gtk_rekey_failure)
2546 __field(bool, eap_identity_req)
2547 __field(bool, four_way_handshake)
2548 __field(bool, rfkill_release)
2549 __field(s32, pattern_idx)
2550 __field(u32, packet_len)
Johannes Berga92eecb2013-04-29 12:09:14 +02002551 __dynamic_array(u8, packet,
2552 wakeup ? wakeup->packet_present_len : 0)
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002553 ),
2554 TP_fast_assign(
2555 WIPHY_ASSIGN;
2556 WDEV_ASSIGN;
Johannes Berga92eecb2013-04-29 12:09:14 +02002557 __entry->non_wireless = !wakeup;
2558 __entry->disconnect = wakeup ? wakeup->disconnect : false;
2559 __entry->magic_pkt = wakeup ? wakeup->magic_pkt : false;
2560 __entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false;
2561 __entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false;
2562 __entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false;
2563 __entry->rfkill_release = wakeup ? wakeup->rfkill_release : false;
2564 __entry->pattern_idx = wakeup ? wakeup->pattern_idx : false;
2565 __entry->packet_len = wakeup ? wakeup->packet_len : false;
2566 if (wakeup && wakeup->packet && wakeup->packet_present_len)
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01002567 memcpy(__get_dynamic_array(packet), wakeup->packet,
2568 wakeup->packet_present_len);
2569 ),
2570 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
2571);
2572
Jouni Malinen355199e2013-02-27 17:14:27 +02002573TRACE_EVENT(cfg80211_ft_event,
2574 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2575 struct cfg80211_ft_event_params *ft_event),
2576 TP_ARGS(wiphy, netdev, ft_event),
2577 TP_STRUCT__entry(
2578 WIPHY_ENTRY
2579 NETDEV_ENTRY
2580 __dynamic_array(u8, ies, ft_event->ies_len)
2581 MAC_ENTRY(target_ap)
2582 __dynamic_array(u8, ric_ies, ft_event->ric_ies_len)
2583 ),
2584 TP_fast_assign(
2585 WIPHY_ASSIGN;
2586 NETDEV_ASSIGN;
2587 if (ft_event->ies)
2588 memcpy(__get_dynamic_array(ies), ft_event->ies,
2589 ft_event->ies_len);
2590 MAC_ASSIGN(target_ap, ft_event->target_ap);
2591 if (ft_event->ric_ies)
2592 memcpy(__get_dynamic_array(ric_ies), ft_event->ric_ies,
2593 ft_event->ric_ies_len);
2594 ),
2595 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", target_ap: " MAC_PR_FMT,
2596 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(target_ap))
2597);
2598
Michal Kaziorf04c2202014-04-09 15:11:01 +02002599TRACE_EVENT(cfg80211_stop_iface,
2600 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2601 TP_ARGS(wiphy, wdev),
2602 TP_STRUCT__entry(
2603 WIPHY_ENTRY
2604 WDEV_ENTRY
2605 ),
2606 TP_fast_assign(
2607 WIPHY_ASSIGN;
2608 WDEV_ASSIGN;
2609 ),
2610 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
2611 WIPHY_PR_ARG, WDEV_PR_ARG)
2612);
2613
Beni Lev14e8a3c2012-07-31 18:48:27 +03002614#endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
2615
2616#undef TRACE_INCLUDE_PATH
2617#define TRACE_INCLUDE_PATH .
2618#undef TRACE_INCLUDE_FILE
2619#define TRACE_INCLUDE_FILE trace
2620#include <trace/define_trace.h>