blob: b23cab016521890307eda9f14e05277ffde1e779 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Beni Lev14e8a3c2012-07-31 18:48:27 +03002#undef TRACE_SYSTEM
3#define TRACE_SYSTEM cfg80211
4
5#if !defined(__RDEV_OPS_TRACE) || defined(TRACE_HEADER_MULTI_READ)
6#define __RDEV_OPS_TRACE
7
8#include <linux/tracepoint.h>
9
10#include <linux/rtnetlink.h>
Joe Perchesd2beae12015-03-02 19:54:58 -080011#include <linux/etherdevice.h>
Beni Lev14e8a3c2012-07-31 18:48:27 +030012#include <net/cfg80211.h>
13#include "core.h"
14
15#define MAC_ENTRY(entry_mac) __array(u8, entry_mac, ETH_ALEN)
16#define MAC_ASSIGN(entry_mac, given_mac) do { \
17 if (given_mac) \
18 memcpy(__entry->entry_mac, given_mac, ETH_ALEN); \
19 else \
Joe Perchesd2beae12015-03-02 19:54:58 -080020 eth_zero_addr(__entry->entry_mac); \
Beni Lev14e8a3c2012-07-31 18:48:27 +030021 } while (0)
22#define MAC_PR_FMT "%pM"
23#define MAC_PR_ARG(entry_mac) (__entry->entry_mac)
24
Johannes Bergec816082012-11-16 17:22:28 +010025#define MAXNAME 32
26#define WIPHY_ENTRY __array(char, wiphy_name, 32)
27#define WIPHY_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(wiphy), MAXNAME)
28#define WIPHY_PR_FMT "%s"
29#define WIPHY_PR_ARG __entry->wiphy_name
Beni Lev14e8a3c2012-07-31 18:48:27 +030030
Johannes Bergec816082012-11-16 17:22:28 +010031#define WDEV_ENTRY __field(u32, id)
Johannes Bergce1eadd2013-03-19 20:26:57 +010032#define WDEV_ASSIGN (__entry->id) = (!IS_ERR_OR_NULL(wdev) \
33 ? wdev->identifier : 0)
Johannes Bergec816082012-11-16 17:22:28 +010034#define WDEV_PR_FMT "wdev(%u)"
35#define WDEV_PR_ARG (__entry->id)
Beni Lev14e8a3c2012-07-31 18:48:27 +030036
Johannes Bergec816082012-11-16 17:22:28 +010037#define NETDEV_ENTRY __array(char, name, IFNAMSIZ) \
38 __field(int, ifindex)
Beni Lev14e8a3c2012-07-31 18:48:27 +030039#define NETDEV_ASSIGN \
40 do { \
41 memcpy(__entry->name, netdev->name, IFNAMSIZ); \
Beni Lev14e8a3c2012-07-31 18:48:27 +030042 (__entry->ifindex) = (netdev->ifindex); \
43 } while (0)
Johannes Bergec816082012-11-16 17:22:28 +010044#define NETDEV_PR_FMT "netdev:%s(%d)"
45#define NETDEV_PR_ARG __entry->name, __entry->ifindex
Beni Lev14e8a3c2012-07-31 18:48:27 +030046
47#define MESH_CFG_ENTRY __field(u16, dot11MeshRetryTimeout) \
48 __field(u16, dot11MeshConfirmTimeout) \
49 __field(u16, dot11MeshHoldingTimeout) \
50 __field(u16, dot11MeshMaxPeerLinks) \
51 __field(u8, dot11MeshMaxRetries) \
52 __field(u8, dot11MeshTTL) \
53 __field(u8, element_ttl) \
54 __field(bool, auto_open_plinks) \
55 __field(u32, dot11MeshNbrOffsetMaxNeighbor) \
56 __field(u8, dot11MeshHWMPmaxPREQretries) \
57 __field(u32, path_refresh_time) \
58 __field(u32, dot11MeshHWMPactivePathTimeout) \
59 __field(u16, min_discovery_timeout) \
60 __field(u16, dot11MeshHWMPpreqMinInterval) \
61 __field(u16, dot11MeshHWMPperrMinInterval) \
62 __field(u16, dot11MeshHWMPnetDiameterTraversalTime) \
63 __field(u8, dot11MeshHWMPRootMode) \
64 __field(u16, dot11MeshHWMPRannInterval) \
65 __field(bool, dot11MeshGateAnnouncementProtocol) \
66 __field(bool, dot11MeshForwarding) \
67 __field(s32, rssi_threshold) \
68 __field(u16, ht_opmode) \
69 __field(u32, dot11MeshHWMPactivePathToRootTimeout) \
70 __field(u16, dot11MeshHWMProotInterval) \
71 __field(u16, dot11MeshHWMPconfirmationInterval)
72#define MESH_CFG_ASSIGN \
73 do { \
74 __entry->dot11MeshRetryTimeout = conf->dot11MeshRetryTimeout; \
75 __entry->dot11MeshConfirmTimeout = \
76 conf->dot11MeshConfirmTimeout; \
77 __entry->dot11MeshHoldingTimeout = \
78 conf->dot11MeshHoldingTimeout; \
79 __entry->dot11MeshMaxPeerLinks = conf->dot11MeshMaxPeerLinks; \
80 __entry->dot11MeshMaxRetries = conf->dot11MeshMaxRetries; \
81 __entry->dot11MeshTTL = conf->dot11MeshTTL; \
82 __entry->element_ttl = conf->element_ttl; \
83 __entry->auto_open_plinks = conf->auto_open_plinks; \
84 __entry->dot11MeshNbrOffsetMaxNeighbor = \
85 conf->dot11MeshNbrOffsetMaxNeighbor; \
86 __entry->dot11MeshHWMPmaxPREQretries = \
87 conf->dot11MeshHWMPmaxPREQretries; \
88 __entry->path_refresh_time = conf->path_refresh_time; \
89 __entry->dot11MeshHWMPactivePathTimeout = \
90 conf->dot11MeshHWMPactivePathTimeout; \
91 __entry->min_discovery_timeout = conf->min_discovery_timeout; \
92 __entry->dot11MeshHWMPpreqMinInterval = \
93 conf->dot11MeshHWMPpreqMinInterval; \
94 __entry->dot11MeshHWMPperrMinInterval = \
95 conf->dot11MeshHWMPperrMinInterval; \
96 __entry->dot11MeshHWMPnetDiameterTraversalTime = \
97 conf->dot11MeshHWMPnetDiameterTraversalTime; \
98 __entry->dot11MeshHWMPRootMode = conf->dot11MeshHWMPRootMode; \
99 __entry->dot11MeshHWMPRannInterval = \
100 conf->dot11MeshHWMPRannInterval; \
101 __entry->dot11MeshGateAnnouncementProtocol = \
102 conf->dot11MeshGateAnnouncementProtocol; \
103 __entry->dot11MeshForwarding = conf->dot11MeshForwarding; \
104 __entry->rssi_threshold = conf->rssi_threshold; \
105 __entry->ht_opmode = conf->ht_opmode; \
106 __entry->dot11MeshHWMPactivePathToRootTimeout = \
107 conf->dot11MeshHWMPactivePathToRootTimeout; \
108 __entry->dot11MeshHWMProotInterval = \
109 conf->dot11MeshHWMProotInterval; \
110 __entry->dot11MeshHWMPconfirmationInterval = \
111 conf->dot11MeshHWMPconfirmationInterval; \
112 } while (0)
113
Johannes Berg57fbcce2016-04-12 15:56:15 +0200114#define CHAN_ENTRY __field(enum nl80211_band, band) \
Thomas Pedersen934f4c72020-04-01 18:18:03 -0700115 __field(u32, center_freq) \
116 __field(u16, freq_offset)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300117#define CHAN_ASSIGN(chan) \
118 do { \
119 if (chan) { \
120 __entry->band = chan->band; \
121 __entry->center_freq = chan->center_freq; \
Thomas Pedersen934f4c72020-04-01 18:18:03 -0700122 __entry->freq_offset = chan->freq_offset; \
Beni Lev14e8a3c2012-07-31 18:48:27 +0300123 } else { \
124 __entry->band = 0; \
125 __entry->center_freq = 0; \
Thomas Pedersen934f4c72020-04-01 18:18:03 -0700126 __entry->freq_offset = 0; \
Beni Lev14e8a3c2012-07-31 18:48:27 +0300127 } \
128 } while (0)
Thomas Pedersen934f4c72020-04-01 18:18:03 -0700129#define CHAN_PR_FMT "band: %d, freq: %u.%03u"
130#define CHAN_PR_ARG __entry->band, __entry->center_freq, __entry->freq_offset
Beni Lev14e8a3c2012-07-31 18:48:27 +0300131
Johannes Berg57fbcce2016-04-12 15:56:15 +0200132#define CHAN_DEF_ENTRY __field(enum nl80211_band, band) \
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100133 __field(u32, control_freq) \
Thomas Pedersen934f4c72020-04-01 18:18:03 -0700134 __field(u32, freq_offset) \
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100135 __field(u32, width) \
136 __field(u32, center_freq1) \
Thomas Pedersen934f4c72020-04-01 18:18:03 -0700137 __field(u32, freq1_offset) \
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100138 __field(u32, center_freq2)
Johannes Berg683b6d32012-11-08 21:25:48 +0100139#define CHAN_DEF_ASSIGN(chandef) \
140 do { \
141 if ((chandef) && (chandef)->chan) { \
142 __entry->band = (chandef)->chan->band; \
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100143 __entry->control_freq = \
Johannes Berg683b6d32012-11-08 21:25:48 +0100144 (chandef)->chan->center_freq; \
Thomas Pedersen934f4c72020-04-01 18:18:03 -0700145 __entry->freq_offset = \
146 (chandef)->chan->freq_offset; \
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100147 __entry->width = (chandef)->width; \
148 __entry->center_freq1 = (chandef)->center_freq1;\
Thomas Pedersen934f4c72020-04-01 18:18:03 -0700149 __entry->freq1_offset = (chandef)->freq1_offset;\
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100150 __entry->center_freq2 = (chandef)->center_freq2;\
Johannes Berg683b6d32012-11-08 21:25:48 +0100151 } else { \
152 __entry->band = 0; \
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100153 __entry->control_freq = 0; \
Thomas Pedersen934f4c72020-04-01 18:18:03 -0700154 __entry->freq_offset = 0; \
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100155 __entry->width = 0; \
156 __entry->center_freq1 = 0; \
Thomas Pedersen934f4c72020-04-01 18:18:03 -0700157 __entry->freq1_offset = 0; \
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100158 __entry->center_freq2 = 0; \
Johannes Berg683b6d32012-11-08 21:25:48 +0100159 } \
160 } while (0)
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100161#define CHAN_DEF_PR_FMT \
Thomas Pedersen934f4c72020-04-01 18:18:03 -0700162 "band: %d, control freq: %u.%03u, width: %d, cf1: %u.%03u, cf2: %u"
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100163#define CHAN_DEF_PR_ARG __entry->band, __entry->control_freq, \
Thomas Pedersen934f4c72020-04-01 18:18:03 -0700164 __entry->freq_offset, __entry->width, \
165 __entry->center_freq1, __entry->freq1_offset, \
Johannes Berg3d9d1d62012-11-08 23:14:50 +0100166 __entry->center_freq2
Johannes Berg683b6d32012-11-08 21:25:48 +0100167
Beni Lev14e8a3c2012-07-31 18:48:27 +0300168#define SINFO_ENTRY __field(int, generation) \
169 __field(u32, connected_time) \
170 __field(u32, inactive_time) \
171 __field(u32, rx_bytes) \
172 __field(u32, tx_bytes) \
173 __field(u32, rx_packets) \
174 __field(u32, tx_packets) \
175 __field(u32, tx_retries) \
176 __field(u32, tx_failed) \
177 __field(u32, rx_dropped_misc) \
178 __field(u32, beacon_loss_count) \
179 __field(u16, llid) \
180 __field(u16, plid) \
181 __field(u8, plink_state)
182#define SINFO_ASSIGN \
183 do { \
184 __entry->generation = sinfo->generation; \
185 __entry->connected_time = sinfo->connected_time; \
186 __entry->inactive_time = sinfo->inactive_time; \
187 __entry->rx_bytes = sinfo->rx_bytes; \
188 __entry->tx_bytes = sinfo->tx_bytes; \
189 __entry->rx_packets = sinfo->rx_packets; \
190 __entry->tx_packets = sinfo->tx_packets; \
191 __entry->tx_retries = sinfo->tx_retries; \
192 __entry->tx_failed = sinfo->tx_failed; \
193 __entry->rx_dropped_misc = sinfo->rx_dropped_misc; \
194 __entry->beacon_loss_count = sinfo->beacon_loss_count; \
195 __entry->llid = sinfo->llid; \
196 __entry->plid = sinfo->plid; \
197 __entry->plink_state = sinfo->plink_state; \
198 } while (0)
199
200#define BOOL_TO_STR(bo) (bo) ? "true" : "false"
201
Kyeyoon Parkfa9ffc72013-12-16 23:01:30 -0800202#define QOS_MAP_ENTRY __field(u8, num_des) \
203 __array(u8, dscp_exception, \
204 2 * IEEE80211_QOS_MAP_MAX_EX) \
205 __array(u8, up, IEEE80211_QOS_MAP_LEN_MIN)
206#define QOS_MAP_ASSIGN(qos_map) \
207 do { \
208 if ((qos_map)) { \
209 __entry->num_des = (qos_map)->num_des; \
210 memcpy(__entry->dscp_exception, \
211 &(qos_map)->dscp_exception, \
212 2 * IEEE80211_QOS_MAP_MAX_EX); \
213 memcpy(__entry->up, &(qos_map)->up, \
214 IEEE80211_QOS_MAP_LEN_MIN); \
215 } else { \
216 __entry->num_des = 0; \
217 memset(__entry->dscp_exception, 0, \
218 2 * IEEE80211_QOS_MAP_MAX_EX); \
219 memset(__entry->up, 0, \
220 IEEE80211_QOS_MAP_LEN_MIN); \
221 } \
222 } while (0)
223
Beni Lev14e8a3c2012-07-31 18:48:27 +0300224/*************************************************************
225 * rdev->ops traces *
226 *************************************************************/
227
228TRACE_EVENT(rdev_suspend,
229 TP_PROTO(struct wiphy *wiphy, struct cfg80211_wowlan *wow),
230 TP_ARGS(wiphy, wow),
231 TP_STRUCT__entry(
232 WIPHY_ENTRY
233 __field(bool, any)
234 __field(bool, disconnect)
235 __field(bool, magic_pkt)
236 __field(bool, gtk_rekey_failure)
237 __field(bool, eap_identity_req)
238 __field(bool, four_way_handshake)
239 __field(bool, rfkill_release)
240 __field(bool, valid_wow)
241 ),
242 TP_fast_assign(
243 WIPHY_ASSIGN;
244 if (wow) {
245 __entry->any = wow->any;
246 __entry->disconnect = wow->disconnect;
247 __entry->magic_pkt = wow->magic_pkt;
248 __entry->gtk_rekey_failure = wow->gtk_rekey_failure;
249 __entry->eap_identity_req = wow->eap_identity_req;
250 __entry->four_way_handshake = wow->four_way_handshake;
251 __entry->rfkill_release = wow->rfkill_release;
252 __entry->valid_wow = true;
253 } else {
254 __entry->valid_wow = false;
255 }
256 ),
257 TP_printk(WIPHY_PR_FMT ", wow%s - any: %d, disconnect: %d, "
258 "magic pkt: %d, gtk rekey failure: %d, eap identify req: %d, "
259 "four way handshake: %d, rfkill release: %d.",
260 WIPHY_PR_ARG, __entry->valid_wow ? "" : "(Not configured!)",
261 __entry->any, __entry->disconnect, __entry->magic_pkt,
262 __entry->gtk_rekey_failure, __entry->eap_identity_req,
263 __entry->four_way_handshake, __entry->rfkill_release)
264);
265
266TRACE_EVENT(rdev_return_int,
267 TP_PROTO(struct wiphy *wiphy, int ret),
268 TP_ARGS(wiphy, ret),
269 TP_STRUCT__entry(
270 WIPHY_ENTRY
271 __field(int, ret)
272 ),
273 TP_fast_assign(
274 WIPHY_ASSIGN;
275 __entry->ret = ret;
276 ),
277 TP_printk(WIPHY_PR_FMT ", returned: %d", WIPHY_PR_ARG, __entry->ret)
278);
279
280TRACE_EVENT(rdev_scan,
281 TP_PROTO(struct wiphy *wiphy, struct cfg80211_scan_request *request),
282 TP_ARGS(wiphy, request),
283 TP_STRUCT__entry(
284 WIPHY_ENTRY
285 ),
286 TP_fast_assign(
287 WIPHY_ASSIGN;
288 ),
289 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
290);
291
292DECLARE_EVENT_CLASS(wiphy_only_evt,
293 TP_PROTO(struct wiphy *wiphy),
294 TP_ARGS(wiphy),
295 TP_STRUCT__entry(
296 WIPHY_ENTRY
297 ),
298 TP_fast_assign(
299 WIPHY_ASSIGN;
300 ),
301 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
302);
303
304DEFINE_EVENT(wiphy_only_evt, rdev_resume,
305 TP_PROTO(struct wiphy *wiphy),
306 TP_ARGS(wiphy)
307);
308
309DEFINE_EVENT(wiphy_only_evt, rdev_return_void,
310 TP_PROTO(struct wiphy *wiphy),
311 TP_ARGS(wiphy)
312);
313
Beni Lev14e8a3c2012-07-31 18:48:27 +0300314DEFINE_EVENT(wiphy_only_evt, rdev_get_antenna,
315 TP_PROTO(struct wiphy *wiphy),
316 TP_ARGS(wiphy)
317);
318
Beni Lev14e8a3c2012-07-31 18:48:27 +0300319DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll,
320 TP_PROTO(struct wiphy *wiphy),
321 TP_ARGS(wiphy)
322);
323
324DECLARE_EVENT_CLASS(wiphy_enabled_evt,
325 TP_PROTO(struct wiphy *wiphy, bool enabled),
326 TP_ARGS(wiphy, enabled),
327 TP_STRUCT__entry(
328 WIPHY_ENTRY
329 __field(bool, enabled)
330 ),
331 TP_fast_assign(
332 WIPHY_ASSIGN;
333 __entry->enabled = enabled;
334 ),
335 TP_printk(WIPHY_PR_FMT ", %senabled ",
336 WIPHY_PR_ARG, __entry->enabled ? "" : "not ")
337);
338
339DEFINE_EVENT(wiphy_enabled_evt, rdev_set_wakeup,
340 TP_PROTO(struct wiphy *wiphy, bool enabled),
341 TP_ARGS(wiphy, enabled)
342);
343
344TRACE_EVENT(rdev_add_virtual_intf,
345 TP_PROTO(struct wiphy *wiphy, char *name, enum nl80211_iftype type),
346 TP_ARGS(wiphy, name, type),
347 TP_STRUCT__entry(
348 WIPHY_ENTRY
349 __string(vir_intf_name, name ? name : "<noname>")
350 __field(enum nl80211_iftype, type)
351 ),
352 TP_fast_assign(
353 WIPHY_ASSIGN;
354 __assign_str(vir_intf_name, name ? name : "<noname>");
355 __entry->type = type;
356 ),
357 TP_printk(WIPHY_PR_FMT ", virtual intf name: %s, type: %d",
358 WIPHY_PR_ARG, __get_str(vir_intf_name), __entry->type)
359);
360
361DECLARE_EVENT_CLASS(wiphy_wdev_evt,
362 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
363 TP_ARGS(wiphy, wdev),
364 TP_STRUCT__entry(
365 WIPHY_ENTRY
366 WDEV_ENTRY
367 ),
368 TP_fast_assign(
369 WIPHY_ASSIGN;
370 WDEV_ASSIGN;
371 ),
Johannes Bergec816082012-11-16 17:22:28 +0100372 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300373);
374
Johannes Berg9bb7e0f2018-09-10 13:29:12 +0200375DECLARE_EVENT_CLASS(wiphy_wdev_cookie_evt,
376 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
377 TP_ARGS(wiphy, wdev, cookie),
378 TP_STRUCT__entry(
379 WIPHY_ENTRY
380 WDEV_ENTRY
381 __field(u64, cookie)
382 ),
383 TP_fast_assign(
384 WIPHY_ASSIGN;
385 WDEV_ASSIGN;
386 __entry->cookie = cookie;
387 ),
388 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %lld",
389 WIPHY_PR_ARG, WDEV_PR_ARG,
390 (unsigned long long)__entry->cookie)
391);
392
Beni Lev14e8a3c2012-07-31 18:48:27 +0300393DEFINE_EVENT(wiphy_wdev_evt, rdev_return_wdev,
394 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
395 TP_ARGS(wiphy, wdev)
396);
397
398DEFINE_EVENT(wiphy_wdev_evt, rdev_del_virtual_intf,
399 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
400 TP_ARGS(wiphy, wdev)
401);
402
403TRACE_EVENT(rdev_change_virtual_intf,
404 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
405 enum nl80211_iftype type),
406 TP_ARGS(wiphy, netdev, type),
407 TP_STRUCT__entry(
408 WIPHY_ENTRY
409 NETDEV_ENTRY
410 __field(enum nl80211_iftype, type)
411 ),
412 TP_fast_assign(
413 WIPHY_ASSIGN;
414 NETDEV_ASSIGN;
415 __entry->type = type;
416 ),
Johannes Bergec816082012-11-16 17:22:28 +0100417 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", type: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300418 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->type)
419);
420
421DECLARE_EVENT_CLASS(key_handle,
422 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
423 bool pairwise, const u8 *mac_addr),
424 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr),
425 TP_STRUCT__entry(
426 WIPHY_ENTRY
427 NETDEV_ENTRY
428 MAC_ENTRY(mac_addr)
429 __field(u8, key_index)
430 __field(bool, pairwise)
431 ),
432 TP_fast_assign(
433 WIPHY_ASSIGN;
434 NETDEV_ASSIGN;
435 MAC_ASSIGN(mac_addr, mac_addr);
436 __entry->key_index = key_index;
437 __entry->pairwise = pairwise;
438 ),
Johannes Bergec816082012-11-16 17:22:28 +0100439 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 +0300440 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
441 BOOL_TO_STR(__entry->pairwise), MAC_PR_ARG(mac_addr))
442);
443
Beni Lev14e8a3c2012-07-31 18:48:27 +0300444DEFINE_EVENT(key_handle, rdev_get_key,
445 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
446 bool pairwise, const u8 *mac_addr),
447 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
448);
449
450DEFINE_EVENT(key_handle, rdev_del_key,
451 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
452 bool pairwise, const u8 *mac_addr),
453 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
454);
455
Alexander Wetzel6cdd3972019-03-19 21:34:07 +0100456TRACE_EVENT(rdev_add_key,
457 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
458 bool pairwise, const u8 *mac_addr, u8 mode),
459 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr, mode),
460 TP_STRUCT__entry(
461 WIPHY_ENTRY
462 NETDEV_ENTRY
463 MAC_ENTRY(mac_addr)
464 __field(u8, key_index)
465 __field(bool, pairwise)
466 __field(u8, mode)
467 ),
468 TP_fast_assign(
469 WIPHY_ASSIGN;
470 NETDEV_ASSIGN;
471 MAC_ASSIGN(mac_addr, mac_addr);
472 __entry->key_index = key_index;
473 __entry->pairwise = pairwise;
474 __entry->mode = mode;
475 ),
476 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key_index: %u, "
477 "mode: %u, pairwise: %s, mac addr: " MAC_PR_FMT,
478 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
479 __entry->mode, BOOL_TO_STR(__entry->pairwise),
480 MAC_PR_ARG(mac_addr))
481);
482
Beni Lev14e8a3c2012-07-31 18:48:27 +0300483TRACE_EVENT(rdev_set_default_key,
484 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
485 bool unicast, bool multicast),
486 TP_ARGS(wiphy, netdev, key_index, unicast, multicast),
487 TP_STRUCT__entry(
488 WIPHY_ENTRY
489 NETDEV_ENTRY
490 __field(u8, key_index)
491 __field(bool, unicast)
492 __field(bool, multicast)
493 ),
494 TP_fast_assign(
495 WIPHY_ASSIGN;
496 NETDEV_ASSIGN;
497 __entry->key_index = key_index;
498 __entry->unicast = unicast;
499 __entry->multicast = multicast;
500 ),
Johannes Bergec816082012-11-16 17:22:28 +0100501 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u, unicast: %s, multicast: %s",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300502 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
503 BOOL_TO_STR(__entry->unicast),
504 BOOL_TO_STR(__entry->multicast))
505);
506
507TRACE_EVENT(rdev_set_default_mgmt_key,
508 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index),
509 TP_ARGS(wiphy, netdev, key_index),
510 TP_STRUCT__entry(
511 WIPHY_ENTRY
512 NETDEV_ENTRY
513 __field(u8, key_index)
514 ),
515 TP_fast_assign(
516 WIPHY_ASSIGN;
517 NETDEV_ASSIGN;
518 __entry->key_index = key_index;
519 ),
Johannes Bergec816082012-11-16 17:22:28 +0100520 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300521 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index)
522);
523
Jouni Malinen56be3932020-02-22 15:25:43 +0200524TRACE_EVENT(rdev_set_default_beacon_key,
525 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index),
526 TP_ARGS(wiphy, netdev, key_index),
527 TP_STRUCT__entry(
528 WIPHY_ENTRY
529 NETDEV_ENTRY
530 __field(u8, key_index)
531 ),
532 TP_fast_assign(
533 WIPHY_ASSIGN;
534 NETDEV_ASSIGN;
535 __entry->key_index = key_index;
536 ),
537 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u",
538 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index)
539);
540
Beni Lev14e8a3c2012-07-31 18:48:27 +0300541TRACE_EVENT(rdev_start_ap,
542 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
543 struct cfg80211_ap_settings *settings),
544 TP_ARGS(wiphy, netdev, settings),
545 TP_STRUCT__entry(
546 WIPHY_ENTRY
547 NETDEV_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +0100548 CHAN_DEF_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +0300549 __field(int, beacon_interval)
550 __field(int, dtim_period)
551 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
552 __field(enum nl80211_hidden_ssid, hidden_ssid)
553 __field(u32, wpa_ver)
554 __field(bool, privacy)
555 __field(enum nl80211_auth_type, auth_type)
556 __field(int, inactivity_timeout)
557 ),
558 TP_fast_assign(
559 WIPHY_ASSIGN;
560 NETDEV_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +0100561 CHAN_DEF_ASSIGN(&settings->chandef);
Beni Lev14e8a3c2012-07-31 18:48:27 +0300562 __entry->beacon_interval = settings->beacon_interval;
563 __entry->dtim_period = settings->dtim_period;
564 __entry->hidden_ssid = settings->hidden_ssid;
565 __entry->wpa_ver = settings->crypto.wpa_versions;
566 __entry->privacy = settings->privacy;
567 __entry->auth_type = settings->auth_type;
568 __entry->inactivity_timeout = settings->inactivity_timeout;
569 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
570 memcpy(__entry->ssid, settings->ssid, settings->ssid_len);
571 ),
Johannes Bergec816082012-11-16 17:22:28 +0100572 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", AP settings - ssid: %s, "
Johannes Berg683b6d32012-11-08 21:25:48 +0100573 CHAN_DEF_PR_FMT ", beacon interval: %d, dtim period: %d, "
Beni Lev14e8a3c2012-07-31 18:48:27 +0300574 "hidden ssid: %d, wpa versions: %u, privacy: %s, "
575 "auth type: %d, inactivity timeout: %d",
Johannes Berg683b6d32012-11-08 21:25:48 +0100576 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ssid, CHAN_DEF_PR_ARG,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300577 __entry->beacon_interval, __entry->dtim_period,
578 __entry->hidden_ssid, __entry->wpa_ver,
579 BOOL_TO_STR(__entry->privacy), __entry->auth_type,
580 __entry->inactivity_timeout)
581);
582
583TRACE_EVENT(rdev_change_beacon,
584 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
585 struct cfg80211_beacon_data *info),
586 TP_ARGS(wiphy, netdev, info),
587 TP_STRUCT__entry(
588 WIPHY_ENTRY
589 NETDEV_ENTRY
590 __dynamic_array(u8, head, info ? info->head_len : 0)
591 __dynamic_array(u8, tail, info ? info->tail_len : 0)
592 __dynamic_array(u8, beacon_ies, info ? info->beacon_ies_len : 0)
593 __dynamic_array(u8, proberesp_ies,
594 info ? info->proberesp_ies_len : 0)
595 __dynamic_array(u8, assocresp_ies,
596 info ? info->assocresp_ies_len : 0)
597 __dynamic_array(u8, probe_resp, info ? info->probe_resp_len : 0)
598 ),
599 TP_fast_assign(
600 WIPHY_ASSIGN;
601 NETDEV_ASSIGN;
602 if (info) {
603 if (info->head)
604 memcpy(__get_dynamic_array(head), info->head,
605 info->head_len);
606 if (info->tail)
607 memcpy(__get_dynamic_array(tail), info->tail,
608 info->tail_len);
609 if (info->beacon_ies)
610 memcpy(__get_dynamic_array(beacon_ies),
611 info->beacon_ies, info->beacon_ies_len);
612 if (info->proberesp_ies)
613 memcpy(__get_dynamic_array(proberesp_ies),
614 info->proberesp_ies,
615 info->proberesp_ies_len);
616 if (info->assocresp_ies)
617 memcpy(__get_dynamic_array(assocresp_ies),
618 info->assocresp_ies,
619 info->assocresp_ies_len);
620 if (info->probe_resp)
621 memcpy(__get_dynamic_array(probe_resp),
622 info->probe_resp, info->probe_resp_len);
623 }
624 ),
Johannes Bergec816082012-11-16 17:22:28 +0100625 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300626);
627
628DECLARE_EVENT_CLASS(wiphy_netdev_evt,
629 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
630 TP_ARGS(wiphy, netdev),
631 TP_STRUCT__entry(
632 WIPHY_ENTRY
633 NETDEV_ENTRY
634 ),
635 TP_fast_assign(
636 WIPHY_ASSIGN;
637 NETDEV_ASSIGN;
638 ),
Johannes Bergec816082012-11-16 17:22:28 +0100639 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300640);
641
642DEFINE_EVENT(wiphy_netdev_evt, rdev_stop_ap,
643 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
644 TP_ARGS(wiphy, netdev)
645);
646
Beni Lev14e8a3c2012-07-31 18:48:27 +0300647DEFINE_EVENT(wiphy_netdev_evt, rdev_set_rekey_data,
648 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
649 TP_ARGS(wiphy, netdev)
650);
651
652DEFINE_EVENT(wiphy_netdev_evt, rdev_get_mesh_config,
653 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
654 TP_ARGS(wiphy, netdev)
655);
656
657DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_mesh,
658 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
659 TP_ARGS(wiphy, netdev)
660);
661
662DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ibss,
663 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
664 TP_ARGS(wiphy, netdev)
665);
666
Rostislav Lisovy6e0bd6c2014-11-03 10:33:18 +0100667DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ocb,
668 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
669 TP_ARGS(wiphy, netdev)
670);
671
Beni Lev14e8a3c2012-07-31 18:48:27 +0300672DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa,
673 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
674 TP_ARGS(wiphy, netdev)
675);
676
Orr Mazor26ec17a2019-12-22 14:55:31 +0000677DEFINE_EVENT(wiphy_netdev_evt, rdev_end_cac,
678 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
679 TP_ARGS(wiphy, netdev)
680);
681
Beni Lev14e8a3c2012-07-31 18:48:27 +0300682DECLARE_EVENT_CLASS(station_add_change,
683 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
684 struct station_parameters *params),
685 TP_ARGS(wiphy, netdev, mac, params),
686 TP_STRUCT__entry(
687 WIPHY_ENTRY
688 NETDEV_ENTRY
689 MAC_ENTRY(sta_mac)
690 __field(u32, sta_flags_mask)
691 __field(u32, sta_flags_set)
692 __field(u32, sta_modify_mask)
693 __field(int, listen_interval)
Johannes Berg6e045902015-10-22 22:27:47 +0300694 __field(u16, capability)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300695 __field(u16, aid)
696 __field(u8, plink_action)
697 __field(u8, plink_state)
698 __field(u8, uapsd_queues)
Johannes Berg6e045902015-10-22 22:27:47 +0300699 __field(u8, max_sp)
700 __field(u8, opmode_notif)
701 __field(bool, opmode_notif_used)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300702 __array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap))
Johannes Berg6e045902015-10-22 22:27:47 +0300703 __array(u8, vht_capa, (int)sizeof(struct ieee80211_vht_cap))
Johannes Berg5d8325ec2015-03-20 19:56:41 +0100704 __array(char, vlan, IFNAMSIZ)
Johannes Berg6e045902015-10-22 22:27:47 +0300705 __dynamic_array(u8, supported_rates,
706 params->supported_rates_len)
707 __dynamic_array(u8, ext_capab, params->ext_capab_len)
708 __dynamic_array(u8, supported_channels,
709 params->supported_channels_len)
710 __dynamic_array(u8, supported_oper_classes,
711 params->supported_oper_classes_len)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300712 ),
713 TP_fast_assign(
714 WIPHY_ASSIGN;
715 NETDEV_ASSIGN;
716 MAC_ASSIGN(sta_mac, mac);
717 __entry->sta_flags_mask = params->sta_flags_mask;
718 __entry->sta_flags_set = params->sta_flags_set;
719 __entry->sta_modify_mask = params->sta_modify_mask;
720 __entry->listen_interval = params->listen_interval;
721 __entry->aid = params->aid;
722 __entry->plink_action = params->plink_action;
723 __entry->plink_state = params->plink_state;
724 __entry->uapsd_queues = params->uapsd_queues;
725 memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap));
726 if (params->ht_capa)
727 memcpy(__entry->ht_capa, params->ht_capa,
728 sizeof(struct ieee80211_ht_cap));
Johannes Berg6e045902015-10-22 22:27:47 +0300729 memset(__entry->vht_capa, 0, sizeof(struct ieee80211_vht_cap));
730 if (params->vht_capa)
731 memcpy(__entry->vht_capa, params->vht_capa,
732 sizeof(struct ieee80211_vht_cap));
Johannes Berg5d8325ec2015-03-20 19:56:41 +0100733 memset(__entry->vlan, 0, sizeof(__entry->vlan));
734 if (params->vlan)
735 memcpy(__entry->vlan, params->vlan->name, IFNAMSIZ);
Johannes Berg6e045902015-10-22 22:27:47 +0300736 if (params->supported_rates && params->supported_rates_len)
737 memcpy(__get_dynamic_array(supported_rates),
738 params->supported_rates,
739 params->supported_rates_len);
740 if (params->ext_capab && params->ext_capab_len)
741 memcpy(__get_dynamic_array(ext_capab),
742 params->ext_capab,
743 params->ext_capab_len);
744 if (params->supported_channels &&
745 params->supported_channels_len)
746 memcpy(__get_dynamic_array(supported_channels),
747 params->supported_channels,
748 params->supported_channels_len);
749 if (params->supported_oper_classes &&
750 params->supported_oper_classes_len)
751 memcpy(__get_dynamic_array(supported_oper_classes),
752 params->supported_oper_classes,
753 params->supported_oper_classes_len);
754 __entry->max_sp = params->max_sp;
755 __entry->capability = params->capability;
756 __entry->opmode_notif = params->opmode_notif;
757 __entry->opmode_notif_used = params->opmode_notif_used;
Beni Lev14e8a3c2012-07-31 18:48:27 +0300758 ),
Johannes Bergec816082012-11-16 17:22:28 +0100759 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +0300760 ", station flags mask: %u, station flags set: %u, "
761 "station modify mask: %u, listen interval: %d, aid: %u, "
Johannes Berg5d8325ec2015-03-20 19:56:41 +0100762 "plink action: %u, plink state: %u, uapsd queues: %u, vlan:%s",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300763 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
764 __entry->sta_flags_mask, __entry->sta_flags_set,
765 __entry->sta_modify_mask, __entry->listen_interval,
766 __entry->aid, __entry->plink_action, __entry->plink_state,
Johannes Berg5d8325ec2015-03-20 19:56:41 +0100767 __entry->uapsd_queues, __entry->vlan)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300768);
769
770DEFINE_EVENT(station_add_change, rdev_add_station,
771 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
772 struct station_parameters *params),
773 TP_ARGS(wiphy, netdev, mac, params)
774);
775
776DEFINE_EVENT(station_add_change, rdev_change_station,
777 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
778 struct station_parameters *params),
779 TP_ARGS(wiphy, netdev, mac, params)
780);
781
782DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt,
783 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
784 TP_ARGS(wiphy, netdev, mac),
785 TP_STRUCT__entry(
786 WIPHY_ENTRY
787 NETDEV_ENTRY
788 MAC_ENTRY(sta_mac)
789 ),
790 TP_fast_assign(
791 WIPHY_ASSIGN;
792 NETDEV_ASSIGN;
793 MAC_ASSIGN(sta_mac, mac);
794 ),
Johannes Bergec816082012-11-16 17:22:28 +0100795 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300796 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac))
797);
798
Jouni Malinen89c771e2014-10-10 20:52:40 +0300799DECLARE_EVENT_CLASS(station_del,
800 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
801 struct station_del_parameters *params),
802 TP_ARGS(wiphy, netdev, params),
803 TP_STRUCT__entry(
804 WIPHY_ENTRY
805 NETDEV_ENTRY
806 MAC_ENTRY(sta_mac)
Jouni Malinen98856862014-10-20 13:20:45 +0300807 __field(u8, subtype)
808 __field(u16, reason_code)
Jouni Malinen89c771e2014-10-10 20:52:40 +0300809 ),
810 TP_fast_assign(
811 WIPHY_ASSIGN;
812 NETDEV_ASSIGN;
813 MAC_ASSIGN(sta_mac, params->mac);
Jouni Malinen98856862014-10-20 13:20:45 +0300814 __entry->subtype = params->subtype;
815 __entry->reason_code = params->reason_code;
Jouni Malinen89c771e2014-10-10 20:52:40 +0300816 ),
Jouni Malinen98856862014-10-20 13:20:45 +0300817 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
818 ", subtype: %u, reason_code: %u",
819 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
820 __entry->subtype, __entry->reason_code)
Jouni Malinen89c771e2014-10-10 20:52:40 +0300821);
822
823DEFINE_EVENT(station_del, rdev_del_station,
824 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
825 struct station_del_parameters *params),
826 TP_ARGS(wiphy, netdev, params)
Beni Lev14e8a3c2012-07-31 18:48:27 +0300827);
828
829DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_station,
830 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
831 TP_ARGS(wiphy, netdev, mac)
832);
833
834DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath,
835 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
836 TP_ARGS(wiphy, netdev, mac)
837);
838
839DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_set_wds_peer,
840 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
841 TP_ARGS(wiphy, netdev, mac)
842);
843
844TRACE_EVENT(rdev_dump_station,
Johannes Bergaaaa10e2018-11-09 11:10:47 +0100845 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300846 u8 *mac),
Johannes Bergaaaa10e2018-11-09 11:10:47 +0100847 TP_ARGS(wiphy, netdev, _idx, mac),
Beni Lev14e8a3c2012-07-31 18:48:27 +0300848 TP_STRUCT__entry(
849 WIPHY_ENTRY
850 NETDEV_ENTRY
851 MAC_ENTRY(sta_mac)
852 __field(int, idx)
853 ),
854 TP_fast_assign(
855 WIPHY_ASSIGN;
856 NETDEV_ASSIGN;
857 MAC_ASSIGN(sta_mac, mac);
Johannes Bergaaaa10e2018-11-09 11:10:47 +0100858 __entry->idx = _idx;
Beni Lev14e8a3c2012-07-31 18:48:27 +0300859 ),
Johannes Bergec816082012-11-16 17:22:28 +0100860 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT ", idx: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +0300861 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
862 __entry->idx)
863);
864
865TRACE_EVENT(rdev_return_int_station_info,
866 TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo),
867 TP_ARGS(wiphy, ret, sinfo),
868 TP_STRUCT__entry(
869 WIPHY_ENTRY
870 __field(int, ret)
871 SINFO_ENTRY
872 ),
873 TP_fast_assign(
874 WIPHY_ASSIGN;
875 __entry->ret = ret;
876 SINFO_ASSIGN;
877 ),
878 TP_printk(WIPHY_PR_FMT ", returned %d" ,
879 WIPHY_PR_ARG, __entry->ret)
880);
881
882DECLARE_EVENT_CLASS(mpath_evt,
883 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
884 u8 *next_hop),
885 TP_ARGS(wiphy, netdev, dst, next_hop),
886 TP_STRUCT__entry(
887 WIPHY_ENTRY
888 NETDEV_ENTRY
889 MAC_ENTRY(dst)
890 MAC_ENTRY(next_hop)
891 ),
892 TP_fast_assign(
893 WIPHY_ASSIGN;
894 NETDEV_ASSIGN;
895 MAC_ASSIGN(dst, dst);
896 MAC_ASSIGN(next_hop, next_hop);
897 ),
Johannes Bergec816082012-11-16 17:22:28 +0100898 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT ", next hop: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300899 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dst),
900 MAC_PR_ARG(next_hop))
901);
902
903DEFINE_EVENT(mpath_evt, rdev_add_mpath,
904 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
905 u8 *next_hop),
906 TP_ARGS(wiphy, netdev, dst, next_hop)
907);
908
909DEFINE_EVENT(mpath_evt, rdev_change_mpath,
910 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
911 u8 *next_hop),
912 TP_ARGS(wiphy, netdev, dst, next_hop)
913);
914
915DEFINE_EVENT(mpath_evt, rdev_get_mpath,
916 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
917 u8 *next_hop),
918 TP_ARGS(wiphy, netdev, dst, next_hop)
919);
920
921TRACE_EVENT(rdev_dump_mpath,
Johannes Bergaaaa10e2018-11-09 11:10:47 +0100922 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
Beni Lev14e8a3c2012-07-31 18:48:27 +0300923 u8 *dst, u8 *next_hop),
Johannes Bergaaaa10e2018-11-09 11:10:47 +0100924 TP_ARGS(wiphy, netdev, _idx, dst, next_hop),
Beni Lev14e8a3c2012-07-31 18:48:27 +0300925 TP_STRUCT__entry(
926 WIPHY_ENTRY
927 NETDEV_ENTRY
928 MAC_ENTRY(dst)
929 MAC_ENTRY(next_hop)
930 __field(int, idx)
931 ),
932 TP_fast_assign(
933 WIPHY_ASSIGN;
934 NETDEV_ASSIGN;
935 MAC_ASSIGN(dst, dst);
936 MAC_ASSIGN(next_hop, next_hop);
Johannes Bergaaaa10e2018-11-09 11:10:47 +0100937 __entry->idx = _idx;
Beni Lev14e8a3c2012-07-31 18:48:27 +0300938 ),
Johannes Bergec816082012-11-16 17:22:28 +0100939 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
Beni Lev14e8a3c2012-07-31 18:48:27 +0300940 MAC_PR_FMT ", next hop: " MAC_PR_FMT,
941 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
942 MAC_PR_ARG(next_hop))
943);
944
Henning Rogge66be7d22014-09-12 08:58:49 +0200945TRACE_EVENT(rdev_get_mpp,
946 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
947 u8 *dst, u8 *mpp),
948 TP_ARGS(wiphy, netdev, dst, mpp),
949 TP_STRUCT__entry(
950 WIPHY_ENTRY
951 NETDEV_ENTRY
952 MAC_ENTRY(dst)
953 MAC_ENTRY(mpp)
954 ),
955 TP_fast_assign(
956 WIPHY_ASSIGN;
957 NETDEV_ASSIGN;
958 MAC_ASSIGN(dst, dst);
959 MAC_ASSIGN(mpp, mpp);
960 ),
961 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT
962 ", mpp: " MAC_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG,
963 MAC_PR_ARG(dst), MAC_PR_ARG(mpp))
964);
965
966TRACE_EVENT(rdev_dump_mpp,
Johannes Bergaaaa10e2018-11-09 11:10:47 +0100967 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
Henning Rogge66be7d22014-09-12 08:58:49 +0200968 u8 *dst, u8 *mpp),
Johannes Bergaaaa10e2018-11-09 11:10:47 +0100969 TP_ARGS(wiphy, netdev, _idx, mpp, dst),
Henning Rogge66be7d22014-09-12 08:58:49 +0200970 TP_STRUCT__entry(
971 WIPHY_ENTRY
972 NETDEV_ENTRY
973 MAC_ENTRY(dst)
974 MAC_ENTRY(mpp)
975 __field(int, idx)
976 ),
977 TP_fast_assign(
978 WIPHY_ASSIGN;
979 NETDEV_ASSIGN;
980 MAC_ASSIGN(dst, dst);
981 MAC_ASSIGN(mpp, mpp);
Johannes Bergaaaa10e2018-11-09 11:10:47 +0100982 __entry->idx = _idx;
Henning Rogge66be7d22014-09-12 08:58:49 +0200983 ),
984 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
985 MAC_PR_FMT ", mpp: " MAC_PR_FMT,
986 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
987 MAC_PR_ARG(mpp))
988);
989
Beni Lev14e8a3c2012-07-31 18:48:27 +0300990TRACE_EVENT(rdev_return_int_mpath_info,
991 TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo),
992 TP_ARGS(wiphy, ret, pinfo),
993 TP_STRUCT__entry(
994 WIPHY_ENTRY
995 __field(int, ret)
996 __field(int, generation)
997 __field(u32, filled)
998 __field(u32, frame_qlen)
999 __field(u32, sn)
1000 __field(u32, metric)
1001 __field(u32, exptime)
1002 __field(u32, discovery_timeout)
1003 __field(u8, discovery_retries)
1004 __field(u8, flags)
1005 ),
1006 TP_fast_assign(
1007 WIPHY_ASSIGN;
1008 __entry->ret = ret;
1009 __entry->generation = pinfo->generation;
1010 __entry->filled = pinfo->filled;
1011 __entry->frame_qlen = pinfo->frame_qlen;
1012 __entry->sn = pinfo->sn;
1013 __entry->metric = pinfo->metric;
1014 __entry->exptime = pinfo->exptime;
1015 __entry->discovery_timeout = pinfo->discovery_timeout;
1016 __entry->discovery_retries = pinfo->discovery_retries;
1017 __entry->flags = pinfo->flags;
1018 ),
1019 TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, "
1020 "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u,"
1021 " discovery timeout: %u, discovery retries: %u, flags: %u",
1022 WIPHY_PR_ARG, __entry->ret, __entry->generation,
1023 __entry->filled, __entry->frame_qlen, __entry->sn,
1024 __entry->metric, __entry->exptime, __entry->discovery_timeout,
1025 __entry->discovery_retries, __entry->flags)
1026);
1027
1028TRACE_EVENT(rdev_return_int_mesh_config,
1029 TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf),
1030 TP_ARGS(wiphy, ret, conf),
1031 TP_STRUCT__entry(
1032 WIPHY_ENTRY
1033 MESH_CFG_ENTRY
1034 __field(int, ret)
1035 ),
1036 TP_fast_assign(
1037 WIPHY_ASSIGN;
1038 MESH_CFG_ASSIGN;
1039 __entry->ret = ret;
1040 ),
1041 TP_printk(WIPHY_PR_FMT ", returned: %d",
1042 WIPHY_PR_ARG, __entry->ret)
1043);
1044
1045TRACE_EVENT(rdev_update_mesh_config,
1046 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask,
1047 const struct mesh_config *conf),
1048 TP_ARGS(wiphy, netdev, mask, conf),
1049 TP_STRUCT__entry(
1050 WIPHY_ENTRY
1051 NETDEV_ENTRY
1052 MESH_CFG_ENTRY
1053 __field(u32, mask)
1054 ),
1055 TP_fast_assign(
1056 WIPHY_ASSIGN;
1057 NETDEV_ASSIGN;
1058 MESH_CFG_ASSIGN;
1059 __entry->mask = mask;
1060 ),
Johannes Bergec816082012-11-16 17:22:28 +01001061 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mask: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001062 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask)
1063);
1064
1065TRACE_EVENT(rdev_join_mesh,
1066 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1067 const struct mesh_config *conf,
1068 const struct mesh_setup *setup),
1069 TP_ARGS(wiphy, netdev, conf, setup),
1070 TP_STRUCT__entry(
1071 WIPHY_ENTRY
1072 NETDEV_ENTRY
1073 MESH_CFG_ENTRY
1074 ),
1075 TP_fast_assign(
1076 WIPHY_ASSIGN;
1077 NETDEV_ASSIGN;
1078 MESH_CFG_ASSIGN;
1079 ),
Johannes Bergec816082012-11-16 17:22:28 +01001080 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001081 WIPHY_PR_ARG, NETDEV_PR_ARG)
1082);
1083
1084TRACE_EVENT(rdev_change_bss,
1085 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1086 struct bss_parameters *params),
1087 TP_ARGS(wiphy, netdev, params),
1088 TP_STRUCT__entry(
1089 WIPHY_ENTRY
1090 NETDEV_ENTRY
1091 __field(int, use_cts_prot)
1092 __field(int, use_short_preamble)
1093 __field(int, use_short_slot_time)
1094 __field(int, ap_isolate)
1095 __field(int, ht_opmode)
1096 ),
1097 TP_fast_assign(
1098 WIPHY_ASSIGN;
1099 NETDEV_ASSIGN;
1100 __entry->use_cts_prot = params->use_cts_prot;
1101 __entry->use_short_preamble = params->use_short_preamble;
1102 __entry->use_short_slot_time = params->use_short_slot_time;
1103 __entry->ap_isolate = params->ap_isolate;
1104 __entry->ht_opmode = params->ht_opmode;
1105 ),
Johannes Bergec816082012-11-16 17:22:28 +01001106 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", use cts prot: %d, "
Beni Lev14e8a3c2012-07-31 18:48:27 +03001107 "use short preamble: %d, use short slot time: %d, "
1108 "ap isolate: %d, ht opmode: %d",
1109 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot,
1110 __entry->use_short_preamble, __entry->use_short_slot_time,
1111 __entry->ap_isolate, __entry->ht_opmode)
1112);
1113
1114TRACE_EVENT(rdev_set_txq_params,
1115 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1116 struct ieee80211_txq_params *params),
1117 TP_ARGS(wiphy, netdev, params),
1118 TP_STRUCT__entry(
1119 WIPHY_ENTRY
1120 NETDEV_ENTRY
1121 __field(enum nl80211_ac, ac)
1122 __field(u16, txop)
1123 __field(u16, cwmin)
1124 __field(u16, cwmax)
1125 __field(u8, aifs)
1126 ),
1127 TP_fast_assign(
1128 WIPHY_ASSIGN;
1129 NETDEV_ASSIGN;
1130 __entry->ac = params->ac;
1131 __entry->txop = params->txop;
1132 __entry->cwmin = params->cwmin;
1133 __entry->cwmax = params->cwmax;
1134 __entry->aifs = params->aifs;
1135 ),
Johannes Bergec816082012-11-16 17:22:28 +01001136 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 +03001137 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop,
1138 __entry->cwmin, __entry->cwmax, __entry->aifs)
1139);
1140
1141TRACE_EVENT(rdev_libertas_set_mesh_channel,
1142 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1143 struct ieee80211_channel *chan),
1144 TP_ARGS(wiphy, netdev, chan),
1145 TP_STRUCT__entry(
1146 WIPHY_ENTRY
1147 NETDEV_ENTRY
1148 CHAN_ENTRY
1149 ),
1150 TP_fast_assign(
1151 WIPHY_ASSIGN;
1152 NETDEV_ASSIGN;
1153 CHAN_ASSIGN(chan);
1154 ),
Johannes Bergec816082012-11-16 17:22:28 +01001155 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_PR_FMT, WIPHY_PR_ARG,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001156 NETDEV_PR_ARG, CHAN_PR_ARG)
1157);
1158
1159TRACE_EVENT(rdev_set_monitor_channel,
Johannes Berg683b6d32012-11-08 21:25:48 +01001160 TP_PROTO(struct wiphy *wiphy,
1161 struct cfg80211_chan_def *chandef),
1162 TP_ARGS(wiphy, chandef),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001163 TP_STRUCT__entry(
1164 WIPHY_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01001165 CHAN_DEF_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001166 ),
1167 TP_fast_assign(
1168 WIPHY_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01001169 CHAN_DEF_ASSIGN(chandef);
Beni Lev14e8a3c2012-07-31 18:48:27 +03001170 ),
Johannes Bergec816082012-11-16 17:22:28 +01001171 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
Johannes Berg683b6d32012-11-08 21:25:48 +01001172 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001173);
1174
1175TRACE_EVENT(rdev_auth,
1176 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1177 struct cfg80211_auth_request *req),
1178 TP_ARGS(wiphy, netdev, req),
1179 TP_STRUCT__entry(
1180 WIPHY_ENTRY
1181 NETDEV_ENTRY
1182 MAC_ENTRY(bssid)
1183 __field(enum nl80211_auth_type, auth_type)
1184 ),
1185 TP_fast_assign(
1186 WIPHY_ASSIGN;
1187 NETDEV_ASSIGN;
1188 if (req->bss)
1189 MAC_ASSIGN(bssid, req->bss->bssid);
1190 else
Joe Perchesd2beae12015-03-02 19:54:58 -08001191 eth_zero_addr(__entry->bssid);
Beni Lev14e8a3c2012-07-31 18:48:27 +03001192 __entry->auth_type = req->auth_type;
1193 ),
Johannes Bergec816082012-11-16 17:22:28 +01001194 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", auth type: %d, bssid: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001195 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type,
1196 MAC_PR_ARG(bssid))
1197);
1198
1199TRACE_EVENT(rdev_assoc,
1200 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1201 struct cfg80211_assoc_request *req),
1202 TP_ARGS(wiphy, netdev, req),
1203 TP_STRUCT__entry(
1204 WIPHY_ENTRY
1205 NETDEV_ENTRY
1206 MAC_ENTRY(bssid)
1207 MAC_ENTRY(prev_bssid)
1208 __field(bool, use_mfp)
1209 __field(u32, flags)
1210 ),
1211 TP_fast_assign(
1212 WIPHY_ASSIGN;
1213 NETDEV_ASSIGN;
1214 if (req->bss)
1215 MAC_ASSIGN(bssid, req->bss->bssid);
1216 else
Joe Perchesd2beae12015-03-02 19:54:58 -08001217 eth_zero_addr(__entry->bssid);
Beni Lev14e8a3c2012-07-31 18:48:27 +03001218 MAC_ASSIGN(prev_bssid, req->prev_bssid);
1219 __entry->use_mfp = req->use_mfp;
1220 __entry->flags = req->flags;
1221 ),
Johannes Bergec816082012-11-16 17:22:28 +01001222 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001223 ", previous bssid: " MAC_PR_FMT ", use mfp: %s, flags: %u",
1224 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1225 MAC_PR_ARG(prev_bssid), BOOL_TO_STR(__entry->use_mfp),
1226 __entry->flags)
1227);
1228
1229TRACE_EVENT(rdev_deauth,
1230 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1231 struct cfg80211_deauth_request *req),
1232 TP_ARGS(wiphy, netdev, req),
1233 TP_STRUCT__entry(
1234 WIPHY_ENTRY
1235 NETDEV_ENTRY
1236 MAC_ENTRY(bssid)
1237 __field(u16, reason_code)
1238 ),
1239 TP_fast_assign(
1240 WIPHY_ASSIGN;
1241 NETDEV_ASSIGN;
1242 MAC_ASSIGN(bssid, req->bssid);
1243 __entry->reason_code = req->reason_code;
1244 ),
Johannes Bergec816082012-11-16 17:22:28 +01001245 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", reason: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001246 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1247 __entry->reason_code)
1248);
1249
1250TRACE_EVENT(rdev_disassoc,
1251 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1252 struct cfg80211_disassoc_request *req),
1253 TP_ARGS(wiphy, netdev, req),
1254 TP_STRUCT__entry(
1255 WIPHY_ENTRY
1256 NETDEV_ENTRY
1257 MAC_ENTRY(bssid)
1258 __field(u16, reason_code)
1259 __field(bool, local_state_change)
1260 ),
1261 TP_fast_assign(
1262 WIPHY_ASSIGN;
1263 NETDEV_ASSIGN;
1264 if (req->bss)
1265 MAC_ASSIGN(bssid, req->bss->bssid);
1266 else
Joe Perchesd2beae12015-03-02 19:54:58 -08001267 eth_zero_addr(__entry->bssid);
Beni Lev14e8a3c2012-07-31 18:48:27 +03001268 __entry->reason_code = req->reason_code;
1269 __entry->local_state_change = req->local_state_change;
1270 ),
Johannes Bergec816082012-11-16 17:22:28 +01001271 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001272 ", reason: %u, local state change: %s",
1273 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1274 __entry->reason_code,
1275 BOOL_TO_STR(__entry->local_state_change))
1276);
1277
1278TRACE_EVENT(rdev_mgmt_tx_cancel_wait,
1279 TP_PROTO(struct wiphy *wiphy,
1280 struct wireless_dev *wdev, u64 cookie),
1281 TP_ARGS(wiphy, wdev, cookie),
1282 TP_STRUCT__entry(
1283 WIPHY_ENTRY
1284 WDEV_ENTRY
1285 __field(u64, cookie)
1286 ),
1287 TP_fast_assign(
1288 WIPHY_ASSIGN;
1289 WDEV_ASSIGN;
1290 __entry->cookie = cookie;
1291 ),
Johannes Bergec816082012-11-16 17:22:28 +01001292 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001293 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1294);
1295
1296TRACE_EVENT(rdev_set_power_mgmt,
1297 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1298 bool enabled, int timeout),
1299 TP_ARGS(wiphy, netdev, enabled, timeout),
1300 TP_STRUCT__entry(
1301 WIPHY_ENTRY
1302 NETDEV_ENTRY
1303 __field(bool, enabled)
1304 __field(int, timeout)
1305 ),
1306 TP_fast_assign(
1307 WIPHY_ASSIGN;
1308 NETDEV_ASSIGN;
1309 __entry->enabled = enabled;
1310 __entry->timeout = timeout;
1311 ),
Johannes Bergec816082012-11-16 17:22:28 +01001312 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %senabled, timeout: %d ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001313 WIPHY_PR_ARG, NETDEV_PR_ARG,
1314 __entry->enabled ? "" : "not ", __entry->timeout)
1315);
1316
1317TRACE_EVENT(rdev_connect,
1318 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1319 struct cfg80211_connect_params *sme),
1320 TP_ARGS(wiphy, netdev, sme),
1321 TP_STRUCT__entry(
1322 WIPHY_ENTRY
1323 NETDEV_ENTRY
1324 MAC_ENTRY(bssid)
1325 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1326 __field(enum nl80211_auth_type, auth_type)
1327 __field(bool, privacy)
1328 __field(u32, wpa_versions)
1329 __field(u32, flags)
Jouni Malinenba6fbac2016-03-29 13:53:27 +03001330 MAC_ENTRY(prev_bssid)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001331 ),
1332 TP_fast_assign(
1333 WIPHY_ASSIGN;
1334 NETDEV_ASSIGN;
1335 MAC_ASSIGN(bssid, sme->bssid);
1336 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1337 memcpy(__entry->ssid, sme->ssid, sme->ssid_len);
1338 __entry->auth_type = sme->auth_type;
1339 __entry->privacy = sme->privacy;
1340 __entry->wpa_versions = sme->crypto.wpa_versions;
1341 __entry->flags = sme->flags;
Jouni Malinenba6fbac2016-03-29 13:53:27 +03001342 MAC_ASSIGN(prev_bssid, sme->prev_bssid);
Beni Lev14e8a3c2012-07-31 18:48:27 +03001343 ),
Johannes Bergec816082012-11-16 17:22:28 +01001344 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001345 ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, "
Jouni Malinenba6fbac2016-03-29 13:53:27 +03001346 "flags: %u, previous bssid: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001347 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid,
1348 __entry->auth_type, BOOL_TO_STR(__entry->privacy),
Jouni Malinenba6fbac2016-03-29 13:53:27 +03001349 __entry->wpa_versions, __entry->flags, MAC_PR_ARG(prev_bssid))
Beni Lev14e8a3c2012-07-31 18:48:27 +03001350);
1351
vamsi krishna088e8df2016-10-27 16:51:11 +03001352TRACE_EVENT(rdev_update_connect_params,
1353 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1354 struct cfg80211_connect_params *sme, u32 changed),
1355 TP_ARGS(wiphy, netdev, sme, changed),
1356 TP_STRUCT__entry(
1357 WIPHY_ENTRY
1358 NETDEV_ENTRY
1359 __field(u32, changed)
1360 ),
1361 TP_fast_assign(
1362 WIPHY_ASSIGN;
1363 NETDEV_ASSIGN;
1364 __entry->changed = changed;
1365 ),
1366 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", parameters changed: %u",
1367 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->changed)
1368);
1369
Beni Lev14e8a3c2012-07-31 18:48:27 +03001370TRACE_EVENT(rdev_set_cqm_rssi_config,
1371 TP_PROTO(struct wiphy *wiphy,
1372 struct net_device *netdev, s32 rssi_thold,
1373 u32 rssi_hyst),
1374 TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst),
1375 TP_STRUCT__entry(
1376 WIPHY_ENTRY
1377 NETDEV_ENTRY
1378 __field(s32, rssi_thold)
1379 __field(u32, rssi_hyst)
1380 ),
1381 TP_fast_assign(
1382 WIPHY_ASSIGN;
1383 NETDEV_ASSIGN;
1384 __entry->rssi_thold = rssi_thold;
1385 __entry->rssi_hyst = rssi_hyst;
1386 ),
Johannes Bergec816082012-11-16 17:22:28 +01001387 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
Beni Lev14e8a3c2012-07-31 18:48:27 +03001388 ", rssi_thold: %d, rssi_hyst: %u ",
1389 WIPHY_PR_ARG, NETDEV_PR_ARG,
1390 __entry->rssi_thold, __entry->rssi_hyst)
1391);
1392
Andrew Zaborowski4a4b8162017-02-10 10:02:31 +01001393TRACE_EVENT(rdev_set_cqm_rssi_range_config,
1394 TP_PROTO(struct wiphy *wiphy,
1395 struct net_device *netdev, s32 low, s32 high),
1396 TP_ARGS(wiphy, netdev, low, high),
1397 TP_STRUCT__entry(
1398 WIPHY_ENTRY
1399 NETDEV_ENTRY
1400 __field(s32, rssi_low)
1401 __field(s32, rssi_high)
1402 ),
1403 TP_fast_assign(
1404 WIPHY_ASSIGN;
1405 NETDEV_ASSIGN;
1406 __entry->rssi_low = low;
1407 __entry->rssi_high = high;
1408 ),
1409 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
1410 ", range: %d - %d ",
1411 WIPHY_PR_ARG, NETDEV_PR_ARG,
1412 __entry->rssi_low, __entry->rssi_high)
1413);
1414
Beni Lev14e8a3c2012-07-31 18:48:27 +03001415TRACE_EVENT(rdev_set_cqm_txe_config,
1416 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate,
1417 u32 pkts, u32 intvl),
1418 TP_ARGS(wiphy, netdev, rate, pkts, intvl),
1419 TP_STRUCT__entry(
1420 WIPHY_ENTRY
1421 NETDEV_ENTRY
1422 __field(u32, rate)
1423 __field(u32, pkts)
1424 __field(u32, intvl)
1425 ),
1426 TP_fast_assign(
1427 WIPHY_ASSIGN;
1428 NETDEV_ASSIGN;
1429 __entry->rate = rate;
1430 __entry->pkts = pkts;
1431 __entry->intvl = intvl;
1432 ),
Johannes Bergec816082012-11-16 17:22:28 +01001433 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001434 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts,
1435 __entry->intvl)
1436);
1437
1438TRACE_EVENT(rdev_disconnect,
1439 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1440 u16 reason_code),
1441 TP_ARGS(wiphy, netdev, reason_code),
1442 TP_STRUCT__entry(
1443 WIPHY_ENTRY
1444 NETDEV_ENTRY
1445 __field(u16, reason_code)
1446 ),
1447 TP_fast_assign(
1448 WIPHY_ASSIGN;
1449 NETDEV_ASSIGN;
1450 __entry->reason_code = reason_code;
1451 ),
Johannes Bergec816082012-11-16 17:22:28 +01001452 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001453 NETDEV_PR_ARG, __entry->reason_code)
1454);
1455
1456TRACE_EVENT(rdev_join_ibss,
1457 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1458 struct cfg80211_ibss_params *params),
1459 TP_ARGS(wiphy, netdev, params),
1460 TP_STRUCT__entry(
1461 WIPHY_ENTRY
1462 NETDEV_ENTRY
1463 MAC_ENTRY(bssid)
1464 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1465 ),
1466 TP_fast_assign(
1467 WIPHY_ASSIGN;
1468 NETDEV_ASSIGN;
1469 MAC_ASSIGN(bssid, params->bssid);
1470 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1471 memcpy(__entry->ssid, params->ssid, params->ssid_len);
1472 ),
Johannes Bergec816082012-11-16 17:22:28 +01001473 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001474 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid)
1475);
1476
Rostislav Lisovy6e0bd6c2014-11-03 10:33:18 +01001477TRACE_EVENT(rdev_join_ocb,
1478 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1479 const struct ocb_setup *setup),
1480 TP_ARGS(wiphy, netdev, setup),
1481 TP_STRUCT__entry(
1482 WIPHY_ENTRY
1483 NETDEV_ENTRY
1484 ),
1485 TP_fast_assign(
1486 WIPHY_ASSIGN;
1487 NETDEV_ASSIGN;
1488 ),
1489 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
1490 WIPHY_PR_ARG, NETDEV_PR_ARG)
1491);
1492
Beni Lev14e8a3c2012-07-31 18:48:27 +03001493TRACE_EVENT(rdev_set_wiphy_params,
1494 TP_PROTO(struct wiphy *wiphy, u32 changed),
1495 TP_ARGS(wiphy, changed),
1496 TP_STRUCT__entry(
1497 WIPHY_ENTRY
1498 __field(u32, changed)
1499 ),
1500 TP_fast_assign(
1501 WIPHY_ASSIGN;
1502 __entry->changed = changed;
1503 ),
1504 TP_printk(WIPHY_PR_FMT ", changed: %u",
1505 WIPHY_PR_ARG, __entry->changed)
1506);
1507
Johannes Bergc8442112012-10-24 10:17:18 +02001508DEFINE_EVENT(wiphy_wdev_evt, rdev_get_tx_power,
1509 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1510 TP_ARGS(wiphy, wdev)
1511);
1512
Beni Lev14e8a3c2012-07-31 18:48:27 +03001513TRACE_EVENT(rdev_set_tx_power,
Johannes Bergc8442112012-10-24 10:17:18 +02001514 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1515 enum nl80211_tx_power_setting type, int mbm),
1516 TP_ARGS(wiphy, wdev, type, mbm),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001517 TP_STRUCT__entry(
1518 WIPHY_ENTRY
Johannes Bergc8442112012-10-24 10:17:18 +02001519 WDEV_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001520 __field(enum nl80211_tx_power_setting, type)
1521 __field(int, mbm)
1522 ),
1523 TP_fast_assign(
1524 WIPHY_ASSIGN;
Johannes Bergc8442112012-10-24 10:17:18 +02001525 WDEV_ASSIGN;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001526 __entry->type = type;
1527 __entry->mbm = mbm;
1528 ),
Johannes Bergec816082012-11-16 17:22:28 +01001529 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d",
Johannes Bergc8442112012-10-24 10:17:18 +02001530 WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001531);
1532
1533TRACE_EVENT(rdev_return_int_int,
1534 TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill),
1535 TP_ARGS(wiphy, func_ret, func_fill),
1536 TP_STRUCT__entry(
1537 WIPHY_ENTRY
1538 __field(int, func_ret)
1539 __field(int, func_fill)
1540 ),
1541 TP_fast_assign(
1542 WIPHY_ASSIGN;
1543 __entry->func_ret = func_ret;
1544 __entry->func_fill = func_fill;
1545 ),
1546 TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d",
1547 WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill)
1548);
1549
1550#ifdef CONFIG_NL80211_TESTMODE
1551TRACE_EVENT(rdev_testmode_cmd,
David Spinadelfc73f112013-07-31 18:04:15 +03001552 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1553 TP_ARGS(wiphy, wdev),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001554 TP_STRUCT__entry(
1555 WIPHY_ENTRY
David Spinadelfc73f112013-07-31 18:04:15 +03001556 WDEV_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001557 ),
1558 TP_fast_assign(
1559 WIPHY_ASSIGN;
David Spinadelfc73f112013-07-31 18:04:15 +03001560 WDEV_ASSIGN;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001561 ),
David Spinadelfc73f112013-07-31 18:04:15 +03001562 TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001563);
1564
1565TRACE_EVENT(rdev_testmode_dump,
1566 TP_PROTO(struct wiphy *wiphy),
1567 TP_ARGS(wiphy),
1568 TP_STRUCT__entry(
1569 WIPHY_ENTRY
1570 ),
1571 TP_fast_assign(
1572 WIPHY_ASSIGN;
1573 ),
1574 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
1575);
1576#endif /* CONFIG_NL80211_TESTMODE */
1577
1578TRACE_EVENT(rdev_set_bitrate_mask,
1579 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1580 const u8 *peer, const struct cfg80211_bitrate_mask *mask),
1581 TP_ARGS(wiphy, netdev, peer, mask),
1582 TP_STRUCT__entry(
1583 WIPHY_ENTRY
1584 NETDEV_ENTRY
1585 MAC_ENTRY(peer)
1586 ),
1587 TP_fast_assign(
1588 WIPHY_ASSIGN;
1589 NETDEV_ASSIGN;
1590 MAC_ASSIGN(peer, peer);
1591 ),
Johannes Bergec816082012-11-16 17:22:28 +01001592 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001593 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1594);
1595
Johannes Berg6cd536f2020-04-17 12:43:01 +02001596TRACE_EVENT(rdev_update_mgmt_frame_registrations,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001597 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
Johannes Berg6cd536f2020-04-17 12:43:01 +02001598 struct mgmt_frame_regs *upd),
1599 TP_ARGS(wiphy, wdev, upd),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001600 TP_STRUCT__entry(
1601 WIPHY_ENTRY
1602 WDEV_ENTRY
Johannes Berg6cd536f2020-04-17 12:43:01 +02001603 __field(u16, global_stypes)
1604 __field(u16, interface_stypes)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001605 ),
1606 TP_fast_assign(
1607 WIPHY_ASSIGN;
1608 WDEV_ASSIGN;
Johannes Berg6cd536f2020-04-17 12:43:01 +02001609 __entry->global_stypes = upd->global_stypes;
1610 __entry->interface_stypes = upd->interface_stypes;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001611 ),
Johannes Berg6cd536f2020-04-17 12:43:01 +02001612 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", global: 0x%.2x, intf: 0x%.2x",
1613 WIPHY_PR_ARG, WDEV_PR_ARG,
1614 __entry->global_stypes, __entry->interface_stypes)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001615);
1616
1617TRACE_EVENT(rdev_return_int_tx_rx,
1618 TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx),
1619 TP_ARGS(wiphy, ret, tx, rx),
1620 TP_STRUCT__entry(
1621 WIPHY_ENTRY
1622 __field(int, ret)
1623 __field(u32, tx)
1624 __field(u32, rx)
1625 ),
1626 TP_fast_assign(
1627 WIPHY_ASSIGN;
1628 __entry->ret = ret;
1629 __entry->tx = tx;
1630 __entry->rx = rx;
1631 ),
1632 TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u",
1633 WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx)
1634);
1635
1636TRACE_EVENT(rdev_return_void_tx_rx,
1637 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max,
1638 u32 rx, u32 rx_max),
1639 TP_ARGS(wiphy, tx, tx_max, rx, rx_max),
1640 TP_STRUCT__entry(
1641 WIPHY_ENTRY
1642 __field(u32, tx)
1643 __field(u32, tx_max)
1644 __field(u32, rx)
1645 __field(u32, rx_max)
1646 ),
1647 TP_fast_assign(
1648 WIPHY_ASSIGN;
1649 __entry->tx = tx;
1650 __entry->tx_max = tx_max;
1651 __entry->rx = rx;
1652 __entry->rx_max = rx_max;
1653 ),
1654 TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ",
1655 WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx,
1656 __entry->rx_max)
1657);
1658
1659DECLARE_EVENT_CLASS(tx_rx_evt,
1660 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1661 TP_ARGS(wiphy, rx, tx),
1662 TP_STRUCT__entry(
1663 WIPHY_ENTRY
1664 __field(u32, tx)
1665 __field(u32, rx)
1666 ),
1667 TP_fast_assign(
1668 WIPHY_ASSIGN;
1669 __entry->tx = tx;
1670 __entry->rx = rx;
1671 ),
1672 TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ",
1673 WIPHY_PR_ARG, __entry->tx, __entry->rx)
1674);
1675
Beni Lev14e8a3c2012-07-31 18:48:27 +03001676DEFINE_EVENT(tx_rx_evt, rdev_set_antenna,
1677 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1678 TP_ARGS(wiphy, rx, tx)
1679);
1680
Arend Van Sprielca986ad2017-04-21 13:05:00 +01001681DECLARE_EVENT_CLASS(wiphy_netdev_id_evt,
1682 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 id),
1683 TP_ARGS(wiphy, netdev, id),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001684 TP_STRUCT__entry(
1685 WIPHY_ENTRY
1686 NETDEV_ENTRY
Arend Van Sprielca986ad2017-04-21 13:05:00 +01001687 __field(u64, id)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001688 ),
1689 TP_fast_assign(
1690 WIPHY_ASSIGN;
1691 NETDEV_ASSIGN;
Arend Van Sprielca986ad2017-04-21 13:05:00 +01001692 __entry->id = id;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001693 ),
Arend Van Sprielca986ad2017-04-21 13:05:00 +01001694 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", id: %llu",
1695 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->id)
1696);
1697
1698DEFINE_EVENT(wiphy_netdev_id_evt, rdev_sched_scan_start,
1699 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 id),
1700 TP_ARGS(wiphy, netdev, id)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001701);
1702
Arend Van Spriel3a3ecf12017-04-21 13:05:02 +01001703DEFINE_EVENT(wiphy_netdev_id_evt, rdev_sched_scan_stop,
1704 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 id),
1705 TP_ARGS(wiphy, netdev, id)
1706);
1707
Beni Lev14e8a3c2012-07-31 18:48:27 +03001708TRACE_EVENT(rdev_tdls_mgmt,
1709 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1710 u8 *peer, u8 action_code, u8 dialog_token,
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301711 u16 status_code, u32 peer_capability,
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001712 bool initiator, const u8 *buf, size_t len),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001713 TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code,
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001714 peer_capability, initiator, buf, len),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001715 TP_STRUCT__entry(
1716 WIPHY_ENTRY
1717 NETDEV_ENTRY
1718 MAC_ENTRY(peer)
1719 __field(u8, action_code)
1720 __field(u8, dialog_token)
1721 __field(u16, status_code)
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301722 __field(u32, peer_capability)
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001723 __field(bool, initiator)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001724 __dynamic_array(u8, buf, len)
1725 ),
1726 TP_fast_assign(
1727 WIPHY_ASSIGN;
1728 NETDEV_ASSIGN;
1729 MAC_ASSIGN(peer, peer);
1730 __entry->action_code = action_code;
1731 __entry->dialog_token = dialog_token;
1732 __entry->status_code = status_code;
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301733 __entry->peer_capability = peer_capability;
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001734 __entry->initiator = initiator;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001735 memcpy(__get_dynamic_array(buf), buf, len);
1736 ),
Johannes Bergec816082012-11-16 17:22:28 +01001737 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", action_code: %u, "
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001738 "dialog_token: %u, status_code: %u, peer_capability: %u "
1739 "initiator: %s buf: %#.2x ",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001740 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
1741 __entry->action_code, __entry->dialog_token,
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301742 __entry->status_code, __entry->peer_capability,
Arik Nemtsov31fa97c2014-06-11 17:18:21 +03001743 BOOL_TO_STR(__entry->initiator),
Sunil Dutt Undekaridf942e72014-02-20 16:22:09 +05301744 ((u8 *)__get_dynamic_array(buf))[0])
Beni Lev14e8a3c2012-07-31 18:48:27 +03001745);
1746
1747TRACE_EVENT(rdev_dump_survey,
Johannes Bergaaaa10e2018-11-09 11:10:47 +01001748 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx),
1749 TP_ARGS(wiphy, netdev, _idx),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001750 TP_STRUCT__entry(
1751 WIPHY_ENTRY
1752 NETDEV_ENTRY
1753 __field(int, idx)
1754 ),
1755 TP_fast_assign(
1756 WIPHY_ASSIGN;
1757 NETDEV_ASSIGN;
Johannes Bergaaaa10e2018-11-09 11:10:47 +01001758 __entry->idx = _idx;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001759 ),
Johannes Bergec816082012-11-16 17:22:28 +01001760 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001761 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx)
1762);
1763
1764TRACE_EVENT(rdev_return_int_survey_info,
1765 TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info),
1766 TP_ARGS(wiphy, ret, info),
1767 TP_STRUCT__entry(
1768 WIPHY_ENTRY
1769 CHAN_ENTRY
1770 __field(int, ret)
Johannes Berg4ed20be2014-11-14 16:35:34 +01001771 __field(u64, time)
1772 __field(u64, time_busy)
1773 __field(u64, time_ext_busy)
1774 __field(u64, time_rx)
1775 __field(u64, time_tx)
Johannes Berg052536a2014-11-14 16:44:11 +01001776 __field(u64, time_scan)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001777 __field(u32, filled)
1778 __field(s8, noise)
1779 ),
1780 TP_fast_assign(
1781 WIPHY_ASSIGN;
1782 CHAN_ASSIGN(info->channel);
1783 __entry->ret = ret;
Johannes Berg4ed20be2014-11-14 16:35:34 +01001784 __entry->time = info->time;
1785 __entry->time_busy = info->time_busy;
1786 __entry->time_ext_busy = info->time_ext_busy;
1787 __entry->time_rx = info->time_rx;
1788 __entry->time_tx = info->time_tx;
Johannes Berg052536a2014-11-14 16:44:11 +01001789 __entry->time_scan = info->time_scan;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001790 __entry->filled = info->filled;
1791 __entry->noise = info->noise;
1792 ),
1793 TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT
1794 ", channel time: %llu, channel time busy: %llu, "
1795 "channel time extension busy: %llu, channel time rx: %llu, "
Johannes Berg052536a2014-11-14 16:44:11 +01001796 "channel time tx: %llu, scan time: %llu, filled: %u, noise: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001797 WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG,
Johannes Berg4ed20be2014-11-14 16:35:34 +01001798 __entry->time, __entry->time_busy,
1799 __entry->time_ext_busy, __entry->time_rx,
Johannes Berg052536a2014-11-14 16:44:11 +01001800 __entry->time_tx, __entry->time_scan,
1801 __entry->filled, __entry->noise)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001802);
1803
1804TRACE_EVENT(rdev_tdls_oper,
1805 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1806 u8 *peer, enum nl80211_tdls_operation oper),
1807 TP_ARGS(wiphy, netdev, peer, oper),
1808 TP_STRUCT__entry(
1809 WIPHY_ENTRY
1810 NETDEV_ENTRY
1811 MAC_ENTRY(peer)
1812 __field(enum nl80211_tdls_operation, oper)
1813 ),
1814 TP_fast_assign(
1815 WIPHY_ASSIGN;
1816 NETDEV_ASSIGN;
1817 MAC_ASSIGN(peer, peer);
1818 __entry->oper = oper;
1819 ),
Johannes Bergec816082012-11-16 17:22:28 +01001820 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", oper: %d",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001821 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper)
1822);
1823
1824DECLARE_EVENT_CLASS(rdev_pmksa,
1825 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1826 struct cfg80211_pmksa *pmksa),
1827 TP_ARGS(wiphy, netdev, pmksa),
1828 TP_STRUCT__entry(
1829 WIPHY_ENTRY
1830 NETDEV_ENTRY
1831 MAC_ENTRY(bssid)
1832 ),
1833 TP_fast_assign(
1834 WIPHY_ASSIGN;
1835 NETDEV_ASSIGN;
1836 MAC_ASSIGN(bssid, pmksa->bssid);
1837 ),
Johannes Bergec816082012-11-16 17:22:28 +01001838 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001839 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid))
1840);
1841
1842TRACE_EVENT(rdev_probe_client,
1843 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1844 const u8 *peer),
1845 TP_ARGS(wiphy, netdev, peer),
1846 TP_STRUCT__entry(
1847 WIPHY_ENTRY
1848 NETDEV_ENTRY
1849 MAC_ENTRY(peer)
1850 ),
1851 TP_fast_assign(
1852 WIPHY_ASSIGN;
1853 NETDEV_ASSIGN;
1854 MAC_ASSIGN(peer, peer);
1855 ),
Johannes Bergec816082012-11-16 17:22:28 +01001856 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001857 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1858);
1859
1860DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa,
1861 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1862 struct cfg80211_pmksa *pmksa),
1863 TP_ARGS(wiphy, netdev, pmksa)
1864);
1865
1866DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa,
1867 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1868 struct cfg80211_pmksa *pmksa),
1869 TP_ARGS(wiphy, netdev, pmksa)
1870);
1871
1872TRACE_EVENT(rdev_remain_on_channel,
1873 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1874 struct ieee80211_channel *chan,
Johannes Berg42d97a52012-11-08 18:31:02 +01001875 unsigned int duration),
1876 TP_ARGS(wiphy, wdev, chan, duration),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001877 TP_STRUCT__entry(
1878 WIPHY_ENTRY
1879 WDEV_ENTRY
1880 CHAN_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03001881 __field(unsigned int, duration)
1882 ),
1883 TP_fast_assign(
1884 WIPHY_ASSIGN;
1885 WDEV_ASSIGN;
1886 CHAN_ASSIGN(chan);
Beni Lev14e8a3c2012-07-31 18:48:27 +03001887 __entry->duration = duration;
1888 ),
Johannes Bergec816082012-11-16 17:22:28 +01001889 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", duration: %u",
Johannes Berg42d97a52012-11-08 18:31:02 +01001890 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001891);
1892
1893TRACE_EVENT(rdev_return_int_cookie,
1894 TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie),
1895 TP_ARGS(wiphy, ret, cookie),
1896 TP_STRUCT__entry(
1897 WIPHY_ENTRY
1898 __field(int, ret)
1899 __field(u64, cookie)
1900 ),
1901 TP_fast_assign(
1902 WIPHY_ASSIGN;
1903 __entry->ret = ret;
1904 __entry->cookie = cookie;
1905 ),
1906 TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu",
1907 WIPHY_PR_ARG, __entry->ret, __entry->cookie)
1908);
1909
1910TRACE_EVENT(rdev_cancel_remain_on_channel,
1911 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
1912 TP_ARGS(wiphy, wdev, cookie),
1913 TP_STRUCT__entry(
1914 WIPHY_ENTRY
1915 WDEV_ENTRY
1916 __field(u64, cookie)
1917 ),
1918 TP_fast_assign(
1919 WIPHY_ASSIGN;
1920 WDEV_ASSIGN;
1921 __entry->cookie = cookie;
1922 ),
Johannes Bergec816082012-11-16 17:22:28 +01001923 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001924 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1925);
1926
1927TRACE_EVENT(rdev_mgmt_tx,
1928 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
Andrei Otcheretianskib176e622013-11-18 19:06:49 +02001929 struct cfg80211_mgmt_tx_params *params),
1930 TP_ARGS(wiphy, wdev, params),
Beni Lev14e8a3c2012-07-31 18:48:27 +03001931 TP_STRUCT__entry(
1932 WIPHY_ENTRY
1933 WDEV_ENTRY
1934 CHAN_ENTRY
1935 __field(bool, offchan)
Beni Lev14e8a3c2012-07-31 18:48:27 +03001936 __field(unsigned int, wait)
1937 __field(bool, no_cck)
1938 __field(bool, dont_wait_for_ack)
1939 ),
1940 TP_fast_assign(
1941 WIPHY_ASSIGN;
1942 WDEV_ASSIGN;
Andrei Otcheretianskib176e622013-11-18 19:06:49 +02001943 CHAN_ASSIGN(params->chan);
1944 __entry->offchan = params->offchan;
1945 __entry->wait = params->wait;
1946 __entry->no_cck = params->no_cck;
1947 __entry->dont_wait_for_ack = params->dont_wait_for_ack;
Beni Lev14e8a3c2012-07-31 18:48:27 +03001948 ),
Johannes Bergec816082012-11-16 17:22:28 +01001949 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s,"
Johannes Berg42d97a52012-11-08 18:31:02 +01001950 " wait: %u, no cck: %s, dont wait for ack: %s",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001951 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG,
Johannes Berg42d97a52012-11-08 18:31:02 +01001952 BOOL_TO_STR(__entry->offchan), __entry->wait,
Beni Lev14e8a3c2012-07-31 18:48:27 +03001953 BOOL_TO_STR(__entry->no_cck),
1954 BOOL_TO_STR(__entry->dont_wait_for_ack))
1955);
1956
Denis Kenzior2576a9a2018-03-26 12:52:42 -05001957TRACE_EVENT(rdev_tx_control_port,
1958 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
Johannes Berg8d74a622020-02-24 10:19:12 +01001959 const u8 *buf, size_t len, const u8 *dest, __be16 proto,
Denis Kenzior2576a9a2018-03-26 12:52:42 -05001960 bool unencrypted),
Johannes Berg8d74a622020-02-24 10:19:12 +01001961 TP_ARGS(wiphy, netdev, buf, len, dest, proto, unencrypted),
Denis Kenzior2576a9a2018-03-26 12:52:42 -05001962 TP_STRUCT__entry(
1963 WIPHY_ENTRY
1964 NETDEV_ENTRY
1965 MAC_ENTRY(dest)
Johannes Berg8d74a622020-02-24 10:19:12 +01001966 __field(__be16, proto)
Denis Kenzior2576a9a2018-03-26 12:52:42 -05001967 __field(bool, unencrypted)
1968 ),
1969 TP_fast_assign(
1970 WIPHY_ASSIGN;
1971 NETDEV_ASSIGN;
1972 MAC_ASSIGN(dest, dest);
Johannes Berg8d74a622020-02-24 10:19:12 +01001973 __entry->proto = proto;
Denis Kenzior2576a9a2018-03-26 12:52:42 -05001974 __entry->unencrypted = unencrypted;
1975 ),
Johannes Berg8d74a622020-02-24 10:19:12 +01001976 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ","
1977 " proto: 0x%x, unencrypted: %s",
1978 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dest),
1979 be16_to_cpu(__entry->proto),
Denis Kenzior2576a9a2018-03-26 12:52:42 -05001980 BOOL_TO_STR(__entry->unencrypted))
1981);
1982
Beni Lev14e8a3c2012-07-31 18:48:27 +03001983TRACE_EVENT(rdev_set_noack_map,
1984 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1985 u16 noack_map),
1986 TP_ARGS(wiphy, netdev, noack_map),
1987 TP_STRUCT__entry(
1988 WIPHY_ENTRY
1989 NETDEV_ENTRY
1990 __field(u16, noack_map)
1991 ),
1992 TP_fast_assign(
1993 WIPHY_ASSIGN;
1994 NETDEV_ASSIGN;
1995 __entry->noack_map = noack_map;
1996 ),
Johannes Bergec816082012-11-16 17:22:28 +01001997 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", noack_map: %u",
Beni Lev14e8a3c2012-07-31 18:48:27 +03001998 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map)
1999);
2000
Beni Lev14e8a3c2012-07-31 18:48:27 +03002001DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel,
2002 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2003 TP_ARGS(wiphy, wdev)
2004);
2005
Johannes Berg683b6d32012-11-08 21:25:48 +01002006TRACE_EVENT(rdev_return_chandef,
2007 TP_PROTO(struct wiphy *wiphy, int ret,
2008 struct cfg80211_chan_def *chandef),
2009 TP_ARGS(wiphy, ret, chandef),
Beni Lev14e8a3c2012-07-31 18:48:27 +03002010 TP_STRUCT__entry(
2011 WIPHY_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01002012 __field(int, ret)
2013 CHAN_DEF_ENTRY
Beni Lev14e8a3c2012-07-31 18:48:27 +03002014 ),
2015 TP_fast_assign(
2016 WIPHY_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01002017 if (ret == 0)
2018 CHAN_DEF_ASSIGN(chandef);
2019 else
2020 CHAN_DEF_ASSIGN((struct cfg80211_chan_def *)NULL);
2021 __entry->ret = ret;
Beni Lev14e8a3c2012-07-31 18:48:27 +03002022 ),
Johannes Bergec816082012-11-16 17:22:28 +01002023 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", ret: %d",
Johannes Berg683b6d32012-11-08 21:25:48 +01002024 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->ret)
Beni Lev14e8a3c2012-07-31 18:48:27 +03002025);
2026
Johannes Bergeeb126e2012-10-23 15:16:50 +02002027DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device,
2028 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2029 TP_ARGS(wiphy, wdev)
2030);
2031
2032DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device,
2033 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2034 TP_ARGS(wiphy, wdev)
2035);
2036
Ayala Bekercb3b7d82016-09-20 17:31:13 +03002037TRACE_EVENT(rdev_start_nan,
2038 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2039 struct cfg80211_nan_conf *conf),
2040 TP_ARGS(wiphy, wdev, conf),
2041 TP_STRUCT__entry(
2042 WIPHY_ENTRY
2043 WDEV_ENTRY
2044 __field(u8, master_pref)
Peter Zijlstra04ae87a2019-10-24 22:26:59 +02002045 __field(u8, bands)
Ayala Bekercb3b7d82016-09-20 17:31:13 +03002046 ),
2047 TP_fast_assign(
2048 WIPHY_ASSIGN;
2049 WDEV_ASSIGN;
2050 __entry->master_pref = conf->master_pref;
Luca Coelho85859892017-02-08 15:00:34 +02002051 __entry->bands = conf->bands;
Ayala Bekercb3b7d82016-09-20 17:31:13 +03002052 ),
2053 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
Luca Coelho85859892017-02-08 15:00:34 +02002054 ", master preference: %u, bands: 0x%0x",
Ayala Bekercb3b7d82016-09-20 17:31:13 +03002055 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->master_pref,
Luca Coelho85859892017-02-08 15:00:34 +02002056 __entry->bands)
Ayala Bekercb3b7d82016-09-20 17:31:13 +03002057);
2058
Ayala Bekera5a9dcf2016-09-20 17:31:16 +03002059TRACE_EVENT(rdev_nan_change_conf,
2060 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2061 struct cfg80211_nan_conf *conf, u32 changes),
2062 TP_ARGS(wiphy, wdev, conf, changes),
2063 TP_STRUCT__entry(
2064 WIPHY_ENTRY
2065 WDEV_ENTRY
2066 __field(u8, master_pref)
Peter Zijlstra04ae87a2019-10-24 22:26:59 +02002067 __field(u8, bands)
2068 __field(u32, changes)
Ayala Bekera5a9dcf2016-09-20 17:31:16 +03002069 ),
2070 TP_fast_assign(
2071 WIPHY_ASSIGN;
2072 WDEV_ASSIGN;
2073 __entry->master_pref = conf->master_pref;
Luca Coelho85859892017-02-08 15:00:34 +02002074 __entry->bands = conf->bands;
Ayala Bekera5a9dcf2016-09-20 17:31:16 +03002075 __entry->changes = changes;
2076 ),
2077 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
Luca Coelho85859892017-02-08 15:00:34 +02002078 ", master preference: %u, bands: 0x%0x, changes: %x",
Ayala Bekera5a9dcf2016-09-20 17:31:16 +03002079 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->master_pref,
Luca Coelho85859892017-02-08 15:00:34 +02002080 __entry->bands, __entry->changes)
Ayala Bekera5a9dcf2016-09-20 17:31:16 +03002081);
2082
Ayala Bekercb3b7d82016-09-20 17:31:13 +03002083DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_nan,
2084 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2085 TP_ARGS(wiphy, wdev)
2086);
2087
Ayala Bekera442b762016-09-20 17:31:15 +03002088TRACE_EVENT(rdev_add_nan_func,
2089 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2090 const struct cfg80211_nan_func *func),
2091 TP_ARGS(wiphy, wdev, func),
2092 TP_STRUCT__entry(
2093 WIPHY_ENTRY
2094 WDEV_ENTRY
2095 __field(u8, func_type)
2096 __field(u64, cookie)
2097 ),
2098 TP_fast_assign(
2099 WIPHY_ASSIGN;
2100 WDEV_ASSIGN;
2101 __entry->func_type = func->type;
2102 __entry->cookie = func->cookie
2103 ),
2104 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type=%u, cookie=%llu",
2105 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->func_type,
2106 __entry->cookie)
2107);
2108
2109TRACE_EVENT(rdev_del_nan_func,
2110 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2111 u64 cookie),
2112 TP_ARGS(wiphy, wdev, cookie),
2113 TP_STRUCT__entry(
2114 WIPHY_ENTRY
2115 WDEV_ENTRY
2116 __field(u64, cookie)
2117 ),
2118 TP_fast_assign(
2119 WIPHY_ASSIGN;
2120 WDEV_ASSIGN;
2121 __entry->cookie = cookie;
2122 ),
2123 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie=%llu",
2124 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
2125);
2126
Vasanthakumar Thiagarajan77765ea2013-01-18 11:18:45 +05302127TRACE_EVENT(rdev_set_mac_acl,
2128 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2129 struct cfg80211_acl_data *params),
2130 TP_ARGS(wiphy, netdev, params),
2131 TP_STRUCT__entry(
2132 WIPHY_ENTRY
2133 NETDEV_ENTRY
2134 __field(u32, acl_policy)
2135 ),
2136 TP_fast_assign(
2137 WIPHY_ASSIGN;
Vladimir Kondratiev021fcdc2013-03-07 11:08:29 +02002138 NETDEV_ASSIGN;
Vasanthakumar Thiagarajan77765ea2013-01-18 11:18:45 +05302139 __entry->acl_policy = params->acl_policy;
2140 ),
2141 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", acl policy: %d",
2142 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->acl_policy)
2143);
2144
Jouni Malinen355199e2013-02-27 17:14:27 +02002145TRACE_EVENT(rdev_update_ft_ies,
2146 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2147 struct cfg80211_update_ft_ies_params *ftie),
2148 TP_ARGS(wiphy, netdev, ftie),
2149 TP_STRUCT__entry(
2150 WIPHY_ENTRY
2151 NETDEV_ENTRY
2152 __field(u16, md)
2153 __dynamic_array(u8, ie, ftie->ie_len)
2154 ),
2155 TP_fast_assign(
2156 WIPHY_ASSIGN;
2157 NETDEV_ASSIGN;
2158 __entry->md = ftie->md;
2159 memcpy(__get_dynamic_array(ie), ftie->ie, ftie->ie_len);
2160 ),
2161 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", md: 0x%x",
2162 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->md)
2163);
2164
Arend van Spriel5de17982013-04-18 15:49:00 +02002165TRACE_EVENT(rdev_crit_proto_start,
2166 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2167 enum nl80211_crit_proto_id protocol, u16 duration),
2168 TP_ARGS(wiphy, wdev, protocol, duration),
2169 TP_STRUCT__entry(
2170 WIPHY_ENTRY
2171 WDEV_ENTRY
2172 __field(u16, proto)
2173 __field(u16, duration)
2174 ),
2175 TP_fast_assign(
2176 WIPHY_ASSIGN;
2177 WDEV_ASSIGN;
2178 __entry->proto = protocol;
2179 __entry->duration = duration;
2180 ),
2181 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", proto=%x, duration=%u",
2182 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->proto, __entry->duration)
2183);
2184
2185TRACE_EVENT(rdev_crit_proto_stop,
2186 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2187 TP_ARGS(wiphy, wdev),
2188 TP_STRUCT__entry(
2189 WIPHY_ENTRY
2190 WDEV_ENTRY
2191 ),
2192 TP_fast_assign(
2193 WIPHY_ASSIGN;
2194 WDEV_ASSIGN;
2195 ),
2196 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
2197 WIPHY_PR_ARG, WDEV_PR_ARG)
2198);
2199
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02002200TRACE_EVENT(rdev_channel_switch,
2201 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2202 struct cfg80211_csa_settings *params),
2203 TP_ARGS(wiphy, netdev, params),
2204 TP_STRUCT__entry(
2205 WIPHY_ENTRY
2206 NETDEV_ENTRY
2207 CHAN_DEF_ENTRY
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02002208 __field(bool, radar_required)
2209 __field(bool, block_tx)
2210 __field(u8, count)
Andrei Otcheretianski9a774c72014-05-09 14:11:46 +03002211 __dynamic_array(u16, bcn_ofs, params->n_counter_offsets_beacon)
2212 __dynamic_array(u16, pres_ofs, params->n_counter_offsets_presp)
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02002213 ),
2214 TP_fast_assign(
2215 WIPHY_ASSIGN;
2216 NETDEV_ASSIGN;
2217 CHAN_DEF_ASSIGN(&params->chandef);
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02002218 __entry->radar_required = params->radar_required;
2219 __entry->block_tx = params->block_tx;
2220 __entry->count = params->count;
Andrei Otcheretianski9a774c72014-05-09 14:11:46 +03002221 memcpy(__get_dynamic_array(bcn_ofs),
2222 params->counter_offsets_beacon,
2223 params->n_counter_offsets_beacon * sizeof(u16));
2224
2225 /* probe response offsets are optional */
2226 if (params->n_counter_offsets_presp)
2227 memcpy(__get_dynamic_array(pres_ofs),
2228 params->counter_offsets_presp,
2229 params->n_counter_offsets_presp * sizeof(u16));
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02002230 ),
2231 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
Andrei Otcheretianski9a774c72014-05-09 14:11:46 +03002232 ", block_tx: %d, count: %u, radar_required: %d",
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02002233 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
Andrei Otcheretianski9a774c72014-05-09 14:11:46 +03002234 __entry->block_tx, __entry->count, __entry->radar_required)
Simon Wunderlich16ef1fe2013-07-11 16:09:05 +02002235);
2236
Kyeyoon Parkfa9ffc72013-12-16 23:01:30 -08002237TRACE_EVENT(rdev_set_qos_map,
2238 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2239 struct cfg80211_qos_map *qos_map),
2240 TP_ARGS(wiphy, netdev, qos_map),
2241 TP_STRUCT__entry(
2242 WIPHY_ENTRY
2243 NETDEV_ENTRY
2244 QOS_MAP_ENTRY
2245 ),
2246 TP_fast_assign(
2247 WIPHY_ASSIGN;
2248 NETDEV_ASSIGN;
2249 QOS_MAP_ASSIGN(qos_map);
2250 ),
2251 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", num_des: %u",
2252 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->num_des)
2253);
2254
Jouni Malinene16821b2014-04-28 11:22:08 +03002255TRACE_EVENT(rdev_set_ap_chanwidth,
2256 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2257 struct cfg80211_chan_def *chandef),
2258 TP_ARGS(wiphy, netdev, chandef),
2259 TP_STRUCT__entry(
2260 WIPHY_ENTRY
2261 NETDEV_ENTRY
2262 CHAN_DEF_ENTRY
2263 ),
2264 TP_fast_assign(
2265 WIPHY_ASSIGN;
2266 NETDEV_ASSIGN;
2267 CHAN_DEF_ASSIGN(chandef);
2268 ),
2269 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2270 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
2271);
2272
Johannes Berg960d01a2014-09-09 22:55:35 +03002273TRACE_EVENT(rdev_add_tx_ts,
2274 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2275 u8 tsid, const u8 *peer, u8 user_prio, u16 admitted_time),
2276 TP_ARGS(wiphy, netdev, tsid, peer, user_prio, admitted_time),
2277 TP_STRUCT__entry(
2278 WIPHY_ENTRY
2279 NETDEV_ENTRY
2280 MAC_ENTRY(peer)
2281 __field(u8, tsid)
2282 __field(u8, user_prio)
2283 __field(u16, admitted_time)
2284 ),
2285 TP_fast_assign(
2286 WIPHY_ASSIGN;
2287 NETDEV_ASSIGN;
2288 MAC_ASSIGN(peer, peer);
2289 __entry->tsid = tsid;
2290 __entry->user_prio = user_prio;
2291 __entry->admitted_time = admitted_time;
2292 ),
2293 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d, UP %d, time %d",
2294 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
2295 __entry->tsid, __entry->user_prio, __entry->admitted_time)
2296);
2297
2298TRACE_EVENT(rdev_del_tx_ts,
2299 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2300 u8 tsid, const u8 *peer),
2301 TP_ARGS(wiphy, netdev, tsid, peer),
2302 TP_STRUCT__entry(
2303 WIPHY_ENTRY
2304 NETDEV_ENTRY
2305 MAC_ENTRY(peer)
2306 __field(u8, tsid)
2307 ),
2308 TP_fast_assign(
2309 WIPHY_ASSIGN;
2310 NETDEV_ASSIGN;
2311 MAC_ASSIGN(peer, peer);
2312 __entry->tsid = tsid;
2313 ),
2314 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d",
2315 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->tsid)
2316);
2317
Arik Nemtsov1057d352014-11-19 12:54:26 +02002318TRACE_EVENT(rdev_tdls_channel_switch,
2319 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2320 const u8 *addr, u8 oper_class,
2321 struct cfg80211_chan_def *chandef),
2322 TP_ARGS(wiphy, netdev, addr, oper_class, chandef),
2323 TP_STRUCT__entry(
2324 WIPHY_ENTRY
2325 NETDEV_ENTRY
2326 MAC_ENTRY(addr)
2327 __field(u8, oper_class)
2328 CHAN_DEF_ENTRY
2329 ),
2330 TP_fast_assign(
2331 WIPHY_ASSIGN;
2332 NETDEV_ASSIGN;
2333 MAC_ASSIGN(addr, addr);
2334 CHAN_DEF_ASSIGN(chandef);
2335 ),
2336 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT
2337 " oper class %d, " CHAN_DEF_PR_FMT,
2338 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr),
2339 __entry->oper_class, CHAN_DEF_PR_ARG)
2340);
2341
2342TRACE_EVENT(rdev_tdls_cancel_channel_switch,
2343 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2344 const u8 *addr),
2345 TP_ARGS(wiphy, netdev, addr),
2346 TP_STRUCT__entry(
2347 WIPHY_ENTRY
2348 NETDEV_ENTRY
2349 MAC_ENTRY(addr)
2350 ),
2351 TP_fast_assign(
2352 WIPHY_ASSIGN;
2353 NETDEV_ASSIGN;
2354 MAC_ASSIGN(addr, addr);
2355 ),
2356 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
2357 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr))
2358);
2359
Avraham Stern3a00df52017-06-09 13:08:43 +01002360TRACE_EVENT(rdev_set_pmk,
2361 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2362 struct cfg80211_pmk_conf *pmk_conf),
2363
2364 TP_ARGS(wiphy, netdev, pmk_conf),
2365
2366 TP_STRUCT__entry(
2367 WIPHY_ENTRY
2368 NETDEV_ENTRY
2369 MAC_ENTRY(aa)
2370 __field(u8, pmk_len)
2371 __field(u8, pmk_r0_name_len)
2372 __dynamic_array(u8, pmk, pmk_conf->pmk_len)
2373 __dynamic_array(u8, pmk_r0_name, WLAN_PMK_NAME_LEN)
2374 ),
2375
2376 TP_fast_assign(
2377 WIPHY_ASSIGN;
2378 NETDEV_ASSIGN;
2379 MAC_ASSIGN(aa, pmk_conf->aa);
2380 __entry->pmk_len = pmk_conf->pmk_len;
2381 __entry->pmk_r0_name_len =
2382 pmk_conf->pmk_r0_name ? WLAN_PMK_NAME_LEN : 0;
2383 memcpy(__get_dynamic_array(pmk), pmk_conf->pmk,
2384 pmk_conf->pmk_len);
2385 memcpy(__get_dynamic_array(pmk_r0_name), pmk_conf->pmk_r0_name,
2386 pmk_conf->pmk_r0_name ? WLAN_PMK_NAME_LEN : 0);
2387 ),
2388
2389 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT
2390 "pmk_len=%u, pmk: %s pmk_r0_name: %s", WIPHY_PR_ARG,
2391 NETDEV_PR_ARG, MAC_PR_ARG(aa), __entry->pmk_len,
2392 __print_array(__get_dynamic_array(pmk),
2393 __get_dynamic_array_len(pmk), 1),
2394 __entry->pmk_r0_name_len ?
2395 __print_array(__get_dynamic_array(pmk_r0_name),
2396 __get_dynamic_array_len(pmk_r0_name), 1) : "")
2397);
2398
2399TRACE_EVENT(rdev_del_pmk,
2400 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *aa),
2401
2402 TP_ARGS(wiphy, netdev, aa),
2403
2404 TP_STRUCT__entry(
2405 WIPHY_ENTRY
2406 NETDEV_ENTRY
2407 MAC_ENTRY(aa)
2408 ),
2409
2410 TP_fast_assign(
2411 WIPHY_ASSIGN;
2412 NETDEV_ASSIGN;
2413 MAC_ASSIGN(aa, aa);
2414 ),
2415
2416 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
2417 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(aa))
2418);
2419
Srinivas Dasari40cbfa92018-01-25 17:13:38 +02002420TRACE_EVENT(rdev_external_auth,
2421 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2422 struct cfg80211_external_auth_params *params),
2423 TP_ARGS(wiphy, netdev, params),
2424 TP_STRUCT__entry(WIPHY_ENTRY
2425 NETDEV_ENTRY
2426 MAC_ENTRY(bssid)
2427 __array(u8, ssid, IEEE80211_MAX_SSID_LEN + 1)
2428 __field(u16, status)
2429 ),
2430 TP_fast_assign(WIPHY_ASSIGN;
2431 NETDEV_ASSIGN;
2432 MAC_ASSIGN(bssid, params->bssid);
2433 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
2434 memcpy(__entry->ssid, params->ssid.ssid,
2435 params->ssid.ssid_len);
2436 __entry->status = params->status;
2437 ),
2438 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
2439 ", ssid: %s, status: %u", WIPHY_PR_ARG, NETDEV_PR_ARG,
2440 __entry->bssid, __entry->ssid, __entry->status)
2441);
2442
Johannes Berg5207ca52018-10-01 15:29:18 +02002443TRACE_EVENT(rdev_start_radar_detection,
2444 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2445 struct cfg80211_chan_def *chandef,
2446 u32 cac_time_ms),
2447 TP_ARGS(wiphy, netdev, chandef, cac_time_ms),
2448 TP_STRUCT__entry(
2449 WIPHY_ENTRY
2450 NETDEV_ENTRY
2451 CHAN_DEF_ENTRY
2452 __field(u32, cac_time_ms)
2453 ),
2454 TP_fast_assign(
2455 WIPHY_ASSIGN;
2456 NETDEV_ASSIGN;
2457 CHAN_DEF_ASSIGN(chandef);
2458 __entry->cac_time_ms = cac_time_ms;
2459 ),
2460 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
2461 ", cac_time_ms=%u",
2462 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
2463 __entry->cac_time_ms)
2464);
2465
2466TRACE_EVENT(rdev_set_mcast_rate,
2467 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2468 int *mcast_rate),
2469 TP_ARGS(wiphy, netdev, mcast_rate),
2470 TP_STRUCT__entry(
2471 WIPHY_ENTRY
2472 NETDEV_ENTRY
2473 __array(int, mcast_rate, NUM_NL80211_BANDS)
2474 ),
2475 TP_fast_assign(
2476 WIPHY_ASSIGN;
2477 NETDEV_ASSIGN;
2478 memcpy(__entry->mcast_rate, mcast_rate,
2479 sizeof(int) * NUM_NL80211_BANDS);
2480 ),
2481 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", "
Arend van Spriele548a1c2019-08-02 13:31:02 +02002482 "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 6GHz=0x%x, 60GHz=0x%x]",
Johannes Berg5207ca52018-10-01 15:29:18 +02002483 WIPHY_PR_ARG, NETDEV_PR_ARG,
2484 __entry->mcast_rate[NL80211_BAND_2GHZ],
2485 __entry->mcast_rate[NL80211_BAND_5GHZ],
Arend van Spriele548a1c2019-08-02 13:31:02 +02002486 __entry->mcast_rate[NL80211_BAND_6GHZ],
Johannes Berg5207ca52018-10-01 15:29:18 +02002487 __entry->mcast_rate[NL80211_BAND_60GHZ])
2488);
2489
2490TRACE_EVENT(rdev_set_coalesce,
2491 TP_PROTO(struct wiphy *wiphy, struct cfg80211_coalesce *coalesce),
2492 TP_ARGS(wiphy, coalesce),
2493 TP_STRUCT__entry(
2494 WIPHY_ENTRY
2495 __field(int, n_rules)
2496 ),
2497 TP_fast_assign(
2498 WIPHY_ASSIGN;
2499 __entry->n_rules = coalesce ? coalesce->n_rules : 0;
2500 ),
2501 TP_printk(WIPHY_PR_FMT ", n_rules=%d",
2502 WIPHY_PR_ARG, __entry->n_rules)
2503);
2504
2505DEFINE_EVENT(wiphy_wdev_evt, rdev_abort_scan,
2506 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2507 TP_ARGS(wiphy, wdev)
2508);
2509
2510TRACE_EVENT(rdev_set_multicast_to_unicast,
2511 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2512 const bool enabled),
2513 TP_ARGS(wiphy, netdev, enabled),
2514 TP_STRUCT__entry(
2515 WIPHY_ENTRY
2516 NETDEV_ENTRY
2517 __field(bool, enabled)
2518 ),
2519 TP_fast_assign(
2520 WIPHY_ASSIGN;
2521 NETDEV_ASSIGN;
2522 __entry->enabled = enabled;
2523 ),
2524 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", unicast: %s",
2525 WIPHY_PR_ARG, NETDEV_PR_ARG,
2526 BOOL_TO_STR(__entry->enabled))
2527);
2528
2529DEFINE_EVENT(wiphy_wdev_evt, rdev_get_txq_stats,
2530 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2531 TP_ARGS(wiphy, wdev)
2532);
2533
2534TRACE_EVENT(rdev_get_ftm_responder_stats,
2535 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2536 struct cfg80211_ftm_responder_stats *ftm_stats),
2537
2538 TP_ARGS(wiphy, netdev, ftm_stats),
2539
2540 TP_STRUCT__entry(
2541 WIPHY_ENTRY
2542 NETDEV_ENTRY
2543 __field(u64, timestamp)
2544 __field(u32, success_num)
2545 __field(u32, partial_num)
2546 __field(u32, failed_num)
2547 __field(u32, asap_num)
2548 __field(u32, non_asap_num)
2549 __field(u64, duration)
2550 __field(u32, unknown_triggers)
2551 __field(u32, reschedule)
2552 __field(u32, out_of_window)
2553 ),
2554
2555 TP_fast_assign(
2556 WIPHY_ASSIGN;
2557 NETDEV_ASSIGN;
2558 __entry->success_num = ftm_stats->success_num;
2559 __entry->partial_num = ftm_stats->partial_num;
2560 __entry->failed_num = ftm_stats->failed_num;
2561 __entry->asap_num = ftm_stats->asap_num;
2562 __entry->non_asap_num = ftm_stats->non_asap_num;
2563 __entry->duration = ftm_stats->total_duration_ms;
2564 __entry->unknown_triggers = ftm_stats->unknown_triggers_num;
2565 __entry->reschedule = ftm_stats->reschedule_requests_num;
2566 __entry->out_of_window = ftm_stats->out_of_window_triggers_num;
2567 ),
2568
2569 TP_printk(WIPHY_PR_FMT "Ftm responder stats: success %u, partial %u, "
2570 "failed %u, asap %u, non asap %u, total duration %llu, unknown "
2571 "triggers %u, rescheduled %u, out of window %u", WIPHY_PR_ARG,
2572 __entry->success_num, __entry->partial_num, __entry->failed_num,
2573 __entry->asap_num, __entry->non_asap_num, __entry->duration,
2574 __entry->unknown_triggers, __entry->reschedule,
2575 __entry->out_of_window)
2576);
2577
Johannes Berg9bb7e0f2018-09-10 13:29:12 +02002578DEFINE_EVENT(wiphy_wdev_cookie_evt, rdev_start_pmsr,
2579 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
2580 TP_ARGS(wiphy, wdev, cookie)
2581);
2582
2583DEFINE_EVENT(wiphy_wdev_cookie_evt, rdev_abort_pmsr,
2584 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
2585 TP_ARGS(wiphy, wdev, cookie)
2586);
2587
Beni Lev4ee3e062012-08-27 12:49:39 +03002588/*************************************************************
2589 * cfg80211 exported functions traces *
2590 *************************************************************/
2591
2592TRACE_EVENT(cfg80211_return_bool,
2593 TP_PROTO(bool ret),
2594 TP_ARGS(ret),
2595 TP_STRUCT__entry(
2596 __field(bool, ret)
2597 ),
2598 TP_fast_assign(
2599 __entry->ret = ret;
2600 ),
2601 TP_printk("returned %s", BOOL_TO_STR(__entry->ret))
2602);
2603
2604DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt,
2605 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2606 TP_ARGS(netdev, macaddr),
2607 TP_STRUCT__entry(
2608 NETDEV_ENTRY
2609 MAC_ENTRY(macaddr)
2610 ),
2611 TP_fast_assign(
2612 NETDEV_ASSIGN;
2613 MAC_ASSIGN(macaddr, macaddr);
2614 ),
2615 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
2616 NETDEV_PR_ARG, MAC_PR_ARG(macaddr))
2617);
2618
2619DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate,
2620 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2621 TP_ARGS(netdev, macaddr)
2622);
2623
2624DECLARE_EVENT_CLASS(netdev_evt_only,
2625 TP_PROTO(struct net_device *netdev),
2626 TP_ARGS(netdev),
2627 TP_STRUCT__entry(
2628 NETDEV_ENTRY
2629 ),
2630 TP_fast_assign(
2631 NETDEV_ASSIGN;
2632 ),
2633 TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG)
2634);
2635
2636DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth,
2637 TP_PROTO(struct net_device *netdev),
2638 TP_ARGS(netdev)
2639);
2640
2641TRACE_EVENT(cfg80211_send_rx_assoc,
2642 TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss),
2643 TP_ARGS(netdev, bss),
2644 TP_STRUCT__entry(
2645 NETDEV_ENTRY
2646 MAC_ENTRY(bssid)
2647 CHAN_ENTRY
2648 ),
2649 TP_fast_assign(
2650 NETDEV_ASSIGN;
2651 MAC_ASSIGN(bssid, bss->bssid);
2652 CHAN_ASSIGN(bss->channel);
2653 ),
Johannes Bergec816082012-11-16 17:22:28 +01002654 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", " CHAN_PR_FMT,
Beni Lev4ee3e062012-08-27 12:49:39 +03002655 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
2656);
2657
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002658DECLARE_EVENT_CLASS(netdev_frame_event,
2659 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2660 TP_ARGS(netdev, buf, len),
2661 TP_STRUCT__entry(
2662 NETDEV_ENTRY
2663 __dynamic_array(u8, frame, len)
2664 ),
2665 TP_fast_assign(
2666 NETDEV_ASSIGN;
2667 memcpy(__get_dynamic_array(frame), buf, len);
2668 ),
2669 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2670 NETDEV_PR_ARG,
2671 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
Beni Lev4ee3e062012-08-27 12:49:39 +03002672);
2673
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002674DEFINE_EVENT(netdev_frame_event, cfg80211_rx_unprot_mlme_mgmt,
2675 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2676 TP_ARGS(netdev, buf, len)
Beni Lev4ee3e062012-08-27 12:49:39 +03002677);
2678
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002679DEFINE_EVENT(netdev_frame_event, cfg80211_rx_mlme_mgmt,
2680 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2681 TP_ARGS(netdev, buf, len)
Beni Lev4ee3e062012-08-27 12:49:39 +03002682);
2683
Johannes Berg6ff57cf2013-05-16 00:55:00 +02002684TRACE_EVENT(cfg80211_tx_mlme_mgmt,
2685 TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2686 TP_ARGS(netdev, buf, len),
2687 TP_STRUCT__entry(
2688 NETDEV_ENTRY
2689 __dynamic_array(u8, frame, len)
2690 ),
2691 TP_fast_assign(
2692 NETDEV_ASSIGN;
2693 memcpy(__get_dynamic_array(frame), buf, len);
2694 ),
2695 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2696 NETDEV_PR_ARG,
2697 le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
Beni Lev4ee3e062012-08-27 12:49:39 +03002698);
2699
2700DECLARE_EVENT_CLASS(netdev_mac_evt,
2701 TP_PROTO(struct net_device *netdev, const u8 *mac),
2702 TP_ARGS(netdev, mac),
2703 TP_STRUCT__entry(
2704 NETDEV_ENTRY
2705 MAC_ENTRY(mac)
2706 ),
2707 TP_fast_assign(
2708 NETDEV_ASSIGN;
2709 MAC_ASSIGN(mac, mac)
2710 ),
2711 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
2712 NETDEV_PR_ARG, MAC_PR_ARG(mac))
2713);
2714
2715DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout,
2716 TP_PROTO(struct net_device *netdev, const u8 *mac),
2717 TP_ARGS(netdev, mac)
2718);
2719
2720DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout,
2721 TP_PROTO(struct net_device *netdev, const u8 *mac),
2722 TP_ARGS(netdev, mac)
2723);
2724
2725TRACE_EVENT(cfg80211_michael_mic_failure,
2726 TP_PROTO(struct net_device *netdev, const u8 *addr,
2727 enum nl80211_key_type key_type, int key_id, const u8 *tsc),
2728 TP_ARGS(netdev, addr, key_type, key_id, tsc),
2729 TP_STRUCT__entry(
2730 NETDEV_ENTRY
2731 MAC_ENTRY(addr)
2732 __field(enum nl80211_key_type, key_type)
2733 __field(int, key_id)
2734 __array(u8, tsc, 6)
2735 ),
2736 TP_fast_assign(
2737 NETDEV_ASSIGN;
2738 MAC_ASSIGN(addr, addr);
2739 __entry->key_type = key_type;
2740 __entry->key_id = key_id;
Eliad Peller8c26d452014-07-17 15:00:56 +03002741 if (tsc)
2742 memcpy(__entry->tsc, tsc, 6);
Beni Lev4ee3e062012-08-27 12:49:39 +03002743 ),
Johannes Bergec816082012-11-16 17:22:28 +01002744 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm",
Beni Lev4ee3e062012-08-27 12:49:39 +03002745 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type,
2746 __entry->key_id, __entry->tsc)
2747);
2748
2749TRACE_EVENT(cfg80211_ready_on_channel,
2750 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2751 struct ieee80211_channel *chan,
Johannes Berg42d97a52012-11-08 18:31:02 +01002752 unsigned int duration),
2753 TP_ARGS(wdev, cookie, chan, duration),
Beni Lev4ee3e062012-08-27 12:49:39 +03002754 TP_STRUCT__entry(
2755 WDEV_ENTRY
2756 __field(u64, cookie)
2757 CHAN_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002758 __field(unsigned int, duration)
2759 ),
2760 TP_fast_assign(
2761 WDEV_ASSIGN;
2762 __entry->cookie = cookie;
2763 CHAN_ASSIGN(chan);
Beni Lev4ee3e062012-08-27 12:49:39 +03002764 __entry->duration = duration;
2765 ),
Johannes Berg42d97a52012-11-08 18:31:02 +01002766 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u",
Beni Lev4ee3e062012-08-27 12:49:39 +03002767 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG,
Johannes Berg42d97a52012-11-08 18:31:02 +01002768 __entry->duration)
Beni Lev4ee3e062012-08-27 12:49:39 +03002769);
2770
2771TRACE_EVENT(cfg80211_ready_on_channel_expired,
2772 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
Johannes Berg42d97a52012-11-08 18:31:02 +01002773 struct ieee80211_channel *chan),
2774 TP_ARGS(wdev, cookie, chan),
Beni Lev4ee3e062012-08-27 12:49:39 +03002775 TP_STRUCT__entry(
2776 WDEV_ENTRY
2777 __field(u64, cookie)
2778 CHAN_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002779 ),
2780 TP_fast_assign(
2781 WDEV_ASSIGN;
2782 __entry->cookie = cookie;
2783 CHAN_ASSIGN(chan);
Beni Lev4ee3e062012-08-27 12:49:39 +03002784 ),
Johannes Berg42d97a52012-11-08 18:31:02 +01002785 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
2786 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002787);
2788
James Prestwood1c38c7f2019-06-12 12:35:09 -07002789TRACE_EVENT(cfg80211_tx_mgmt_expired,
2790 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2791 struct ieee80211_channel *chan),
2792 TP_ARGS(wdev, cookie, chan),
2793 TP_STRUCT__entry(
2794 WDEV_ENTRY
2795 __field(u64, cookie)
2796 CHAN_ENTRY
2797 ),
2798 TP_fast_assign(
2799 WDEV_ASSIGN;
2800 __entry->cookie = cookie;
2801 CHAN_ASSIGN(chan);
2802 ),
2803 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
2804 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
2805);
2806
Beni Lev4ee3e062012-08-27 12:49:39 +03002807TRACE_EVENT(cfg80211_new_sta,
2808 TP_PROTO(struct net_device *netdev, const u8 *mac_addr,
2809 struct station_info *sinfo),
2810 TP_ARGS(netdev, mac_addr, sinfo),
2811 TP_STRUCT__entry(
2812 NETDEV_ENTRY
2813 MAC_ENTRY(mac_addr)
2814 SINFO_ENTRY
2815 ),
2816 TP_fast_assign(
2817 NETDEV_ASSIGN;
2818 MAC_ASSIGN(mac_addr, mac_addr);
2819 SINFO_ASSIGN;
2820 ),
Johannes Bergec816082012-11-16 17:22:28 +01002821 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT,
Beni Lev4ee3e062012-08-27 12:49:39 +03002822 NETDEV_PR_ARG, MAC_PR_ARG(mac_addr))
2823);
2824
2825DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta,
2826 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2827 TP_ARGS(netdev, macaddr)
2828);
2829
2830TRACE_EVENT(cfg80211_rx_mgmt,
Sergey Matyukevich6c2fb1e2017-11-09 14:46:30 +03002831 TP_PROTO(struct wireless_dev *wdev, int freq, int sig_dbm),
2832 TP_ARGS(wdev, freq, sig_dbm),
Beni Lev4ee3e062012-08-27 12:49:39 +03002833 TP_STRUCT__entry(
2834 WDEV_ENTRY
2835 __field(int, freq)
Sergey Matyukevich6c2fb1e2017-11-09 14:46:30 +03002836 __field(int, sig_dbm)
Beni Lev4ee3e062012-08-27 12:49:39 +03002837 ),
2838 TP_fast_assign(
2839 WDEV_ASSIGN;
2840 __entry->freq = freq;
Sergey Matyukevich6c2fb1e2017-11-09 14:46:30 +03002841 __entry->sig_dbm = sig_dbm;
Beni Lev4ee3e062012-08-27 12:49:39 +03002842 ),
Thomas Pedersene76fede2020-04-30 10:25:50 -07002843 TP_printk(WDEV_PR_FMT ", freq: "KHZ_F", sig dbm: %d",
2844 WDEV_PR_ARG, PR_KHZ(__entry->freq), __entry->sig_dbm)
Beni Lev4ee3e062012-08-27 12:49:39 +03002845);
2846
2847TRACE_EVENT(cfg80211_mgmt_tx_status,
2848 TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
2849 TP_ARGS(wdev, cookie, ack),
2850 TP_STRUCT__entry(
2851 WDEV_ENTRY
2852 __field(u64, cookie)
2853 __field(bool, ack)
2854 ),
2855 TP_fast_assign(
2856 WDEV_ASSIGN;
2857 __entry->cookie = cookie;
2858 __entry->ack = ack;
2859 ),
2860 TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
2861 WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
2862);
2863
Markus Theildca9ca22020-05-08 16:42:00 +02002864TRACE_EVENT(cfg80211_control_port_tx_status,
2865 TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
2866 TP_ARGS(wdev, cookie, ack),
2867 TP_STRUCT__entry(
2868 WDEV_ENTRY
2869 __field(u64, cookie)
2870 __field(bool, ack)
2871 ),
2872 TP_fast_assign(
2873 WDEV_ASSIGN;
2874 __entry->cookie = cookie;
2875 __entry->ack = ack;
2876 ),
2877 TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
2878 WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
2879);
2880
Denis Kenzior6a671a52018-03-26 12:52:41 -05002881TRACE_EVENT(cfg80211_rx_control_port,
Denis Kenziora948f712018-07-03 15:05:48 -05002882 TP_PROTO(struct net_device *netdev, struct sk_buff *skb,
2883 bool unencrypted),
2884 TP_ARGS(netdev, skb, unencrypted),
Denis Kenzior6a671a52018-03-26 12:52:41 -05002885 TP_STRUCT__entry(
2886 NETDEV_ENTRY
Denis Kenziora948f712018-07-03 15:05:48 -05002887 __field(int, len)
2888 MAC_ENTRY(from)
Denis Kenzior6a671a52018-03-26 12:52:41 -05002889 __field(u16, proto)
2890 __field(bool, unencrypted)
2891 ),
2892 TP_fast_assign(
2893 NETDEV_ASSIGN;
Denis Kenziora948f712018-07-03 15:05:48 -05002894 __entry->len = skb->len;
2895 MAC_ASSIGN(from, eth_hdr(skb)->h_source);
2896 __entry->proto = be16_to_cpu(skb->protocol);
Denis Kenzior6a671a52018-03-26 12:52:41 -05002897 __entry->unencrypted = unencrypted;
2898 ),
Johannes Berg8d74a622020-02-24 10:19:12 +01002899 TP_printk(NETDEV_PR_FMT ", len=%d, " MAC_PR_FMT ", proto: 0x%x, unencrypted: %s",
2900 NETDEV_PR_ARG, __entry->len, MAC_PR_ARG(from),
Denis Kenzior6a671a52018-03-26 12:52:41 -05002901 __entry->proto, BOOL_TO_STR(__entry->unencrypted))
2902);
2903
Beni Lev4ee3e062012-08-27 12:49:39 +03002904TRACE_EVENT(cfg80211_cqm_rssi_notify,
2905 TP_PROTO(struct net_device *netdev,
Andrzej Zaborowskibee427b2017-01-25 12:43:41 +01002906 enum nl80211_cqm_rssi_threshold_event rssi_event,
2907 s32 rssi_level),
2908 TP_ARGS(netdev, rssi_event, rssi_level),
Beni Lev4ee3e062012-08-27 12:49:39 +03002909 TP_STRUCT__entry(
2910 NETDEV_ENTRY
2911 __field(enum nl80211_cqm_rssi_threshold_event, rssi_event)
Andrzej Zaborowskibee427b2017-01-25 12:43:41 +01002912 __field(s32, rssi_level)
Beni Lev4ee3e062012-08-27 12:49:39 +03002913 ),
2914 TP_fast_assign(
2915 NETDEV_ASSIGN;
2916 __entry->rssi_event = rssi_event;
Andrzej Zaborowskibee427b2017-01-25 12:43:41 +01002917 __entry->rssi_level = rssi_level;
Beni Lev4ee3e062012-08-27 12:49:39 +03002918 ),
Andrzej Zaborowskibee427b2017-01-25 12:43:41 +01002919 TP_printk(NETDEV_PR_FMT ", rssi event: %d, level: %d",
2920 NETDEV_PR_ARG, __entry->rssi_event, __entry->rssi_level)
Beni Lev4ee3e062012-08-27 12:49:39 +03002921);
2922
Johannes Berg683b6d32012-11-08 21:25:48 +01002923TRACE_EVENT(cfg80211_reg_can_beacon,
Ilan Peer174e0cd2014-02-23 09:13:01 +02002924 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef,
Arik Nemtsov923b3522015-07-08 15:41:44 +03002925 enum nl80211_iftype iftype, bool check_no_ir),
2926 TP_ARGS(wiphy, chandef, iftype, check_no_ir),
Beni Lev4ee3e062012-08-27 12:49:39 +03002927 TP_STRUCT__entry(
2928 WIPHY_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01002929 CHAN_DEF_ENTRY
Ilan Peer174e0cd2014-02-23 09:13:01 +02002930 __field(enum nl80211_iftype, iftype)
Arik Nemtsov923b3522015-07-08 15:41:44 +03002931 __field(bool, check_no_ir)
Beni Lev4ee3e062012-08-27 12:49:39 +03002932 ),
2933 TP_fast_assign(
2934 WIPHY_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01002935 CHAN_DEF_ASSIGN(chandef);
Ilan Peer174e0cd2014-02-23 09:13:01 +02002936 __entry->iftype = iftype;
Arik Nemtsov923b3522015-07-08 15:41:44 +03002937 __entry->check_no_ir = check_no_ir;
Beni Lev4ee3e062012-08-27 12:49:39 +03002938 ),
Arik Nemtsov923b3522015-07-08 15:41:44 +03002939 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", iftype=%d check_no_ir=%s",
2940 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->iftype,
2941 BOOL_TO_STR(__entry->check_no_ir))
Beni Lev4ee3e062012-08-27 12:49:39 +03002942);
2943
Simon Wunderlich04f39042013-02-08 18:16:19 +01002944TRACE_EVENT(cfg80211_chandef_dfs_required,
2945 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2946 TP_ARGS(wiphy, chandef),
2947 TP_STRUCT__entry(
2948 WIPHY_ENTRY
2949 CHAN_DEF_ENTRY
2950 ),
2951 TP_fast_assign(
2952 WIPHY_ASSIGN;
2953 CHAN_DEF_ASSIGN(chandef);
2954 ),
2955 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2956 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2957);
2958
Beni Lev4ee3e062012-08-27 12:49:39 +03002959TRACE_EVENT(cfg80211_ch_switch_notify,
Johannes Berg683b6d32012-11-08 21:25:48 +01002960 TP_PROTO(struct net_device *netdev,
2961 struct cfg80211_chan_def *chandef),
2962 TP_ARGS(netdev, chandef),
Beni Lev4ee3e062012-08-27 12:49:39 +03002963 TP_STRUCT__entry(
2964 NETDEV_ENTRY
Johannes Berg683b6d32012-11-08 21:25:48 +01002965 CHAN_DEF_ENTRY
Beni Lev4ee3e062012-08-27 12:49:39 +03002966 ),
2967 TP_fast_assign(
2968 NETDEV_ASSIGN;
Johannes Berg683b6d32012-11-08 21:25:48 +01002969 CHAN_DEF_ASSIGN(chandef);
Beni Lev4ee3e062012-08-27 12:49:39 +03002970 ),
Johannes Bergec816082012-11-16 17:22:28 +01002971 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
Johannes Berg683b6d32012-11-08 21:25:48 +01002972 NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03002973);
2974
Luciano Coelhof8d75522014-11-07 14:31:35 +02002975TRACE_EVENT(cfg80211_ch_switch_started_notify,
2976 TP_PROTO(struct net_device *netdev,
2977 struct cfg80211_chan_def *chandef),
2978 TP_ARGS(netdev, chandef),
2979 TP_STRUCT__entry(
2980 NETDEV_ENTRY
2981 CHAN_DEF_ENTRY
2982 ),
2983 TP_fast_assign(
2984 NETDEV_ASSIGN;
2985 CHAN_DEF_ASSIGN(chandef);
2986 ),
2987 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2988 NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
2989);
2990
Simon Wunderlich04f39042013-02-08 18:16:19 +01002991TRACE_EVENT(cfg80211_radar_event,
2992 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2993 TP_ARGS(wiphy, chandef),
2994 TP_STRUCT__entry(
2995 WIPHY_ENTRY
2996 CHAN_DEF_ENTRY
2997 ),
2998 TP_fast_assign(
2999 WIPHY_ASSIGN;
3000 CHAN_DEF_ASSIGN(chandef);
3001 ),
3002 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
3003 WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
3004);
3005
3006TRACE_EVENT(cfg80211_cac_event,
3007 TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt),
3008 TP_ARGS(netdev, evt),
3009 TP_STRUCT__entry(
3010 NETDEV_ENTRY
3011 __field(enum nl80211_radar_event, evt)
3012 ),
3013 TP_fast_assign(
3014 NETDEV_ASSIGN;
3015 __entry->evt = evt;
3016 ),
3017 TP_printk(NETDEV_PR_FMT ", event: %d",
3018 NETDEV_PR_ARG, __entry->evt)
3019);
3020
Beni Lev4ee3e062012-08-27 12:49:39 +03003021DECLARE_EVENT_CLASS(cfg80211_rx_evt,
3022 TP_PROTO(struct net_device *netdev, const u8 *addr),
3023 TP_ARGS(netdev, addr),
3024 TP_STRUCT__entry(
3025 NETDEV_ENTRY
3026 MAC_ENTRY(addr)
3027 ),
3028 TP_fast_assign(
3029 NETDEV_ASSIGN;
3030 MAC_ASSIGN(addr, addr);
3031 ),
Johannes Bergec816082012-11-16 17:22:28 +01003032 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr))
Beni Lev4ee3e062012-08-27 12:49:39 +03003033);
3034
Beni Lev4ee3e062012-08-27 12:49:39 +03003035DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame,
3036 TP_PROTO(struct net_device *netdev, const u8 *addr),
3037 TP_ARGS(netdev, addr)
3038);
3039
3040DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame,
3041 TP_PROTO(struct net_device *netdev, const u8 *addr),
3042 TP_ARGS(netdev, addr)
3043);
3044
Antonio Quartullife94f3a2014-01-29 17:53:43 +01003045TRACE_EVENT(cfg80211_ibss_joined,
3046 TP_PROTO(struct net_device *netdev, const u8 *bssid,
3047 struct ieee80211_channel *channel),
3048 TP_ARGS(netdev, bssid, channel),
3049 TP_STRUCT__entry(
3050 NETDEV_ENTRY
3051 MAC_ENTRY(bssid)
3052 CHAN_ENTRY
3053 ),
3054 TP_fast_assign(
3055 NETDEV_ASSIGN;
3056 MAC_ASSIGN(bssid, bssid);
3057 CHAN_ASSIGN(channel);
3058 ),
3059 TP_printk(NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", " CHAN_PR_FMT,
3060 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
3061);
3062
Beni Lev4ee3e062012-08-27 12:49:39 +03003063TRACE_EVENT(cfg80211_probe_status,
3064 TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie,
3065 bool acked),
3066 TP_ARGS(netdev, addr, cookie, acked),
3067 TP_STRUCT__entry(
3068 NETDEV_ENTRY
3069 MAC_ENTRY(addr)
3070 __field(u64, cookie)
3071 __field(bool, acked)
3072 ),
3073 TP_fast_assign(
3074 NETDEV_ASSIGN;
3075 MAC_ASSIGN(addr, addr);
3076 __entry->cookie = cookie;
3077 __entry->acked = acked;
3078 ),
Johannes Bergec816082012-11-16 17:22:28 +01003079 TP_printk(NETDEV_PR_FMT " addr:" MAC_PR_FMT ", cookie: %llu, acked: %s",
Beni Lev4ee3e062012-08-27 12:49:39 +03003080 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie,
3081 BOOL_TO_STR(__entry->acked))
3082);
3083
3084TRACE_EVENT(cfg80211_cqm_pktloss_notify,
3085 TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets),
3086 TP_ARGS(netdev, peer, num_packets),
3087 TP_STRUCT__entry(
3088 NETDEV_ENTRY
3089 MAC_ENTRY(peer)
3090 __field(u32, num_packets)
3091 ),
3092 TP_fast_assign(
3093 NETDEV_ASSIGN;
3094 MAC_ASSIGN(peer, peer);
3095 __entry->num_packets = num_packets;
3096 ),
3097 TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u",
3098 NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets)
3099);
3100
3101DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify,
3102 TP_PROTO(struct net_device *netdev, const u8 *macaddr),
3103 TP_ARGS(netdev, macaddr)
3104);
3105
3106TRACE_EVENT(cfg80211_pmksa_candidate_notify,
3107 TP_PROTO(struct net_device *netdev, int index, const u8 *bssid,
3108 bool preauth),
3109 TP_ARGS(netdev, index, bssid, preauth),
3110 TP_STRUCT__entry(
3111 NETDEV_ENTRY
3112 __field(int, index)
3113 MAC_ENTRY(bssid)
3114 __field(bool, preauth)
3115 ),
3116 TP_fast_assign(
3117 NETDEV_ASSIGN;
3118 __entry->index = index;
3119 MAC_ASSIGN(bssid, bssid);
3120 __entry->preauth = preauth;
3121 ),
3122 TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s",
3123 NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid),
3124 BOOL_TO_STR(__entry->preauth))
3125);
3126
3127TRACE_EVENT(cfg80211_report_obss_beacon,
3128 TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len,
3129 int freq, int sig_dbm),
3130 TP_ARGS(wiphy, frame, len, freq, sig_dbm),
3131 TP_STRUCT__entry(
3132 WIPHY_ENTRY
3133 __field(int, freq)
3134 __field(int, sig_dbm)
3135 ),
3136 TP_fast_assign(
3137 WIPHY_ASSIGN;
3138 __entry->freq = freq;
3139 __entry->sig_dbm = sig_dbm;
3140 ),
Thomas Pedersene76fede2020-04-30 10:25:50 -07003141 TP_printk(WIPHY_PR_FMT ", freq: "KHZ_F", sig_dbm: %d",
3142 WIPHY_PR_ARG, PR_KHZ(__entry->freq), __entry->sig_dbm)
Beni Lev4ee3e062012-08-27 12:49:39 +03003143);
3144
Jouni Malinen3475b092012-11-16 22:49:57 +02003145TRACE_EVENT(cfg80211_tdls_oper_request,
3146 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer,
3147 enum nl80211_tdls_operation oper, u16 reason_code),
3148 TP_ARGS(wiphy, netdev, peer, oper, reason_code),
3149 TP_STRUCT__entry(
3150 WIPHY_ENTRY
3151 NETDEV_ENTRY
3152 MAC_ENTRY(peer)
3153 __field(enum nl80211_tdls_operation, oper)
3154 __field(u16, reason_code)
3155 ),
3156 TP_fast_assign(
3157 WIPHY_ASSIGN;
3158 NETDEV_ASSIGN;
3159 MAC_ASSIGN(peer, peer);
3160 __entry->oper = oper;
3161 __entry->reason_code = reason_code;
3162 ),
3163 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", oper: %d, reason_code %u",
3164 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper,
3165 __entry->reason_code)
3166 );
3167
Beni Lev4ee3e062012-08-27 12:49:39 +03003168TRACE_EVENT(cfg80211_scan_done,
Avraham Stern1d762502016-07-05 17:10:13 +03003169 TP_PROTO(struct cfg80211_scan_request *request,
3170 struct cfg80211_scan_info *info),
3171 TP_ARGS(request, info),
Beni Lev4ee3e062012-08-27 12:49:39 +03003172 TP_STRUCT__entry(
3173 __field(u32, n_channels)
3174 __dynamic_array(u8, ie, request ? request->ie_len : 0)
Johannes Berg57fbcce2016-04-12 15:56:15 +02003175 __array(u32, rates, NUM_NL80211_BANDS)
Beni Lev4ee3e062012-08-27 12:49:39 +03003176 __field(u32, wdev_id)
3177 MAC_ENTRY(wiphy_mac)
3178 __field(bool, no_cck)
3179 __field(bool, aborted)
Avraham Stern1d762502016-07-05 17:10:13 +03003180 __field(u64, scan_start_tsf)
3181 MAC_ENTRY(tsf_bssid)
Beni Lev4ee3e062012-08-27 12:49:39 +03003182 ),
3183 TP_fast_assign(
3184 if (request) {
3185 memcpy(__get_dynamic_array(ie), request->ie,
3186 request->ie_len);
3187 memcpy(__entry->rates, request->rates,
Johannes Berg57fbcce2016-04-12 15:56:15 +02003188 NUM_NL80211_BANDS);
Beni Lev4ee3e062012-08-27 12:49:39 +03003189 __entry->wdev_id = request->wdev ?
3190 request->wdev->identifier : 0;
3191 if (request->wiphy)
3192 MAC_ASSIGN(wiphy_mac,
3193 request->wiphy->perm_addr);
3194 __entry->no_cck = request->no_cck;
3195 }
Avraham Stern1d762502016-07-05 17:10:13 +03003196 if (info) {
3197 __entry->aborted = info->aborted;
3198 __entry->scan_start_tsf = info->scan_start_tsf;
3199 MAC_ASSIGN(tsf_bssid, info->tsf_bssid);
3200 }
Beni Lev4ee3e062012-08-27 12:49:39 +03003201 ),
Avraham Stern1d762502016-07-05 17:10:13 +03003202 TP_printk("aborted: %s, scan start (TSF): %llu, tsf_bssid: " MAC_PR_FMT,
3203 BOOL_TO_STR(__entry->aborted),
3204 (unsigned long long)__entry->scan_start_tsf,
3205 MAC_PR_ARG(tsf_bssid))
Beni Lev4ee3e062012-08-27 12:49:39 +03003206);
3207
Arend Van Sprielb34939b2017-04-28 13:40:28 +01003208DECLARE_EVENT_CLASS(wiphy_id_evt,
3209 TP_PROTO(struct wiphy *wiphy, u64 id),
3210 TP_ARGS(wiphy, id),
3211 TP_STRUCT__entry(
3212 WIPHY_ENTRY
3213 __field(u64, id)
3214 ),
3215 TP_fast_assign(
3216 WIPHY_ASSIGN;
3217 __entry->id = id;
3218 ),
3219 TP_printk(WIPHY_PR_FMT ", id: %llu", WIPHY_PR_ARG, __entry->id)
Beni Lev4ee3e062012-08-27 12:49:39 +03003220);
3221
Arend Van Sprielb34939b2017-04-28 13:40:28 +01003222DEFINE_EVENT(wiphy_id_evt, cfg80211_sched_scan_stopped,
3223 TP_PROTO(struct wiphy *wiphy, u64 id),
3224 TP_ARGS(wiphy, id)
3225);
3226
3227DEFINE_EVENT(wiphy_id_evt, cfg80211_sched_scan_results,
3228 TP_PROTO(struct wiphy *wiphy, u64 id),
3229 TP_ARGS(wiphy, id)
Beni Lev4ee3e062012-08-27 12:49:39 +03003230);
3231
3232TRACE_EVENT(cfg80211_get_bss,
3233 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
3234 const u8 *bssid, const u8 *ssid, size_t ssid_len,
Dedy Lansky6eb18132015-02-08 15:52:03 +02003235 enum ieee80211_bss_type bss_type,
3236 enum ieee80211_privacy privacy),
3237 TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, bss_type, privacy),
Beni Lev4ee3e062012-08-27 12:49:39 +03003238 TP_STRUCT__entry(
3239 WIPHY_ENTRY
3240 CHAN_ENTRY
3241 MAC_ENTRY(bssid)
3242 __dynamic_array(u8, ssid, ssid_len)
Dedy Lansky6eb18132015-02-08 15:52:03 +02003243 __field(enum ieee80211_bss_type, bss_type)
3244 __field(enum ieee80211_privacy, privacy)
Beni Lev4ee3e062012-08-27 12:49:39 +03003245 ),
3246 TP_fast_assign(
3247 WIPHY_ASSIGN;
3248 CHAN_ASSIGN(channel);
3249 MAC_ASSIGN(bssid, bssid);
3250 memcpy(__get_dynamic_array(ssid), ssid, ssid_len);
Dedy Lansky6eb18132015-02-08 15:52:03 +02003251 __entry->bss_type = bss_type;
3252 __entry->privacy = privacy;
Beni Lev4ee3e062012-08-27 12:49:39 +03003253 ),
Dedy Lansky6eb18132015-02-08 15:52:03 +02003254 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT
3255 ", buf: %#.2x, bss_type: %d, privacy: %d",
3256 WIPHY_PR_ARG, CHAN_PR_ARG, MAC_PR_ARG(bssid),
3257 ((u8 *)__get_dynamic_array(ssid))[0], __entry->bss_type,
3258 __entry->privacy)
Beni Lev4ee3e062012-08-27 12:49:39 +03003259);
3260
Dmitry Shmidt6e19bc42015-10-07 11:32:53 +02003261TRACE_EVENT(cfg80211_inform_bss_frame,
3262 TP_PROTO(struct wiphy *wiphy, struct cfg80211_inform_bss *data,
3263 struct ieee80211_mgmt *mgmt, size_t len),
3264 TP_ARGS(wiphy, data, mgmt, len),
Beni Lev4ee3e062012-08-27 12:49:39 +03003265 TP_STRUCT__entry(
3266 WIPHY_ENTRY
3267 CHAN_ENTRY
Simon Wunderlichdcd6eac2013-07-08 16:55:49 +02003268 __field(enum nl80211_bss_scan_width, scan_width)
Beni Lev4ee3e062012-08-27 12:49:39 +03003269 __dynamic_array(u8, mgmt, len)
3270 __field(s32, signal)
Dmitry Shmidt6e19bc42015-10-07 11:32:53 +02003271 __field(u64, ts_boottime)
Avraham Stern1d762502016-07-05 17:10:13 +03003272 __field(u64, parent_tsf)
3273 MAC_ENTRY(parent_bssid)
Beni Lev4ee3e062012-08-27 12:49:39 +03003274 ),
3275 TP_fast_assign(
3276 WIPHY_ASSIGN;
Dmitry Shmidt6e19bc42015-10-07 11:32:53 +02003277 CHAN_ASSIGN(data->chan);
3278 __entry->scan_width = data->scan_width;
Beni Lev4ee3e062012-08-27 12:49:39 +03003279 if (mgmt)
3280 memcpy(__get_dynamic_array(mgmt), mgmt, len);
Dmitry Shmidt6e19bc42015-10-07 11:32:53 +02003281 __entry->signal = data->signal;
3282 __entry->ts_boottime = data->boottime_ns;
Avraham Stern1d762502016-07-05 17:10:13 +03003283 __entry->parent_tsf = data->parent_tsf;
3284 MAC_ASSIGN(parent_bssid, data->parent_bssid);
Beni Lev4ee3e062012-08-27 12:49:39 +03003285 ),
Avraham Stern1d762502016-07-05 17:10:13 +03003286 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT
3287 "(scan_width: %d) signal: %d, tsb:%llu, detect_tsf:%llu, tsf_bssid: "
3288 MAC_PR_FMT, WIPHY_PR_ARG, CHAN_PR_ARG, __entry->scan_width,
3289 __entry->signal, (unsigned long long)__entry->ts_boottime,
3290 (unsigned long long)__entry->parent_tsf,
3291 MAC_PR_ARG(parent_bssid))
Beni Lev4ee3e062012-08-27 12:49:39 +03003292);
3293
3294DECLARE_EVENT_CLASS(cfg80211_bss_evt,
3295 TP_PROTO(struct cfg80211_bss *pub),
3296 TP_ARGS(pub),
3297 TP_STRUCT__entry(
3298 MAC_ENTRY(bssid)
3299 CHAN_ENTRY
3300 ),
3301 TP_fast_assign(
3302 MAC_ASSIGN(bssid, pub->bssid);
3303 CHAN_ASSIGN(pub->channel);
3304 ),
Johannes Bergec816082012-11-16 17:22:28 +01003305 TP_printk(MAC_PR_FMT ", " CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG)
Beni Lev4ee3e062012-08-27 12:49:39 +03003306);
3307
3308DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss,
3309 TP_PROTO(struct cfg80211_bss *pub),
3310 TP_ARGS(pub)
3311);
3312
3313TRACE_EVENT(cfg80211_return_uint,
3314 TP_PROTO(unsigned int ret),
3315 TP_ARGS(ret),
3316 TP_STRUCT__entry(
3317 __field(unsigned int, ret)
3318 ),
3319 TP_fast_assign(
3320 __entry->ret = ret;
3321 ),
3322 TP_printk("ret: %d", __entry->ret)
3323);
3324
3325TRACE_EVENT(cfg80211_return_u32,
3326 TP_PROTO(u32 ret),
3327 TP_ARGS(ret),
3328 TP_STRUCT__entry(
3329 __field(u32, ret)
3330 ),
3331 TP_fast_assign(
3332 __entry->ret = ret;
3333 ),
3334 TP_printk("ret: %u", __entry->ret)
3335);
3336
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01003337TRACE_EVENT(cfg80211_report_wowlan_wakeup,
3338 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
3339 struct cfg80211_wowlan_wakeup *wakeup),
3340 TP_ARGS(wiphy, wdev, wakeup),
3341 TP_STRUCT__entry(
3342 WIPHY_ENTRY
3343 WDEV_ENTRY
Johannes Berga92eecb2013-04-29 12:09:14 +02003344 __field(bool, non_wireless)
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01003345 __field(bool, disconnect)
3346 __field(bool, magic_pkt)
3347 __field(bool, gtk_rekey_failure)
3348 __field(bool, eap_identity_req)
3349 __field(bool, four_way_handshake)
3350 __field(bool, rfkill_release)
3351 __field(s32, pattern_idx)
3352 __field(u32, packet_len)
Johannes Berga92eecb2013-04-29 12:09:14 +02003353 __dynamic_array(u8, packet,
3354 wakeup ? wakeup->packet_present_len : 0)
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01003355 ),
3356 TP_fast_assign(
3357 WIPHY_ASSIGN;
3358 WDEV_ASSIGN;
Johannes Berga92eecb2013-04-29 12:09:14 +02003359 __entry->non_wireless = !wakeup;
3360 __entry->disconnect = wakeup ? wakeup->disconnect : false;
3361 __entry->magic_pkt = wakeup ? wakeup->magic_pkt : false;
3362 __entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false;
3363 __entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false;
3364 __entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false;
3365 __entry->rfkill_release = wakeup ? wakeup->rfkill_release : false;
3366 __entry->pattern_idx = wakeup ? wakeup->pattern_idx : false;
3367 __entry->packet_len = wakeup ? wakeup->packet_len : false;
3368 if (wakeup && wakeup->packet && wakeup->packet_present_len)
Johannes Bergcd8f7cb2013-01-22 12:34:29 +01003369 memcpy(__get_dynamic_array(packet), wakeup->packet,
3370 wakeup->packet_present_len);
3371 ),
3372 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
3373);
3374
Jouni Malinen355199e2013-02-27 17:14:27 +02003375TRACE_EVENT(cfg80211_ft_event,
3376 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3377 struct cfg80211_ft_event_params *ft_event),
3378 TP_ARGS(wiphy, netdev, ft_event),
3379 TP_STRUCT__entry(
3380 WIPHY_ENTRY
3381 NETDEV_ENTRY
3382 __dynamic_array(u8, ies, ft_event->ies_len)
3383 MAC_ENTRY(target_ap)
3384 __dynamic_array(u8, ric_ies, ft_event->ric_ies_len)
3385 ),
3386 TP_fast_assign(
3387 WIPHY_ASSIGN;
3388 NETDEV_ASSIGN;
3389 if (ft_event->ies)
3390 memcpy(__get_dynamic_array(ies), ft_event->ies,
3391 ft_event->ies_len);
3392 MAC_ASSIGN(target_ap, ft_event->target_ap);
3393 if (ft_event->ric_ies)
3394 memcpy(__get_dynamic_array(ric_ies), ft_event->ric_ies,
3395 ft_event->ric_ies_len);
3396 ),
3397 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", target_ap: " MAC_PR_FMT,
3398 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(target_ap))
3399);
3400
Michal Kaziorf04c2202014-04-09 15:11:01 +02003401TRACE_EVENT(cfg80211_stop_iface,
3402 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
3403 TP_ARGS(wiphy, wdev),
3404 TP_STRUCT__entry(
3405 WIPHY_ENTRY
3406 WDEV_ENTRY
3407 ),
3408 TP_fast_assign(
3409 WIPHY_ASSIGN;
3410 WDEV_ASSIGN;
3411 ),
3412 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
3413 WIPHY_PR_ARG, WDEV_PR_ARG)
3414);
Johannes Berg9bb7e0f2018-09-10 13:29:12 +02003415
3416TRACE_EVENT(cfg80211_pmsr_report,
3417 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
3418 u64 cookie, const u8 *addr),
3419 TP_ARGS(wiphy, wdev, cookie, addr),
3420 TP_STRUCT__entry(
3421 WIPHY_ENTRY
3422 WDEV_ENTRY
3423 __field(u64, cookie)
3424 MAC_ENTRY(addr)
3425 ),
3426 TP_fast_assign(
3427 WIPHY_ASSIGN;
3428 WDEV_ASSIGN;
3429 __entry->cookie = cookie;
3430 MAC_ASSIGN(addr, addr);
3431 ),
3432 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie:%lld, " MAC_PR_FMT,
3433 WIPHY_PR_ARG, WDEV_PR_ARG,
3434 (unsigned long long)__entry->cookie,
3435 MAC_PR_ARG(addr))
3436);
3437
3438TRACE_EVENT(cfg80211_pmsr_complete,
3439 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
3440 TP_ARGS(wiphy, wdev, cookie),
3441 TP_STRUCT__entry(
3442 WIPHY_ENTRY
3443 WDEV_ENTRY
3444 __field(u64, cookie)
3445 ),
3446 TP_fast_assign(
3447 WIPHY_ASSIGN;
3448 WDEV_ASSIGN;
3449 __entry->cookie = cookie;
3450 ),
3451 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie:%lld",
3452 WIPHY_PR_ARG, WDEV_PR_ARG,
3453 (unsigned long long)__entry->cookie)
3454);
Sunil Duttcb74e972019-02-20 16:18:07 +05303455
3456TRACE_EVENT(rdev_update_owe_info,
3457 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3458 struct cfg80211_update_owe_info *owe_info),
3459 TP_ARGS(wiphy, netdev, owe_info),
3460 TP_STRUCT__entry(WIPHY_ENTRY
3461 NETDEV_ENTRY
3462 MAC_ENTRY(peer)
3463 __field(u16, status)
3464 __dynamic_array(u8, ie, owe_info->ie_len)),
3465 TP_fast_assign(WIPHY_ASSIGN;
3466 NETDEV_ASSIGN;
3467 MAC_ASSIGN(peer, owe_info->peer);
3468 __entry->status = owe_info->status;
3469 memcpy(__get_dynamic_array(ie),
3470 owe_info->ie, owe_info->ie_len);),
3471 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT
3472 " status %d", WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
3473 __entry->status)
3474);
3475
3476TRACE_EVENT(cfg80211_update_owe_info_event,
3477 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3478 struct cfg80211_update_owe_info *owe_info),
3479 TP_ARGS(wiphy, netdev, owe_info),
3480 TP_STRUCT__entry(WIPHY_ENTRY
3481 NETDEV_ENTRY
3482 MAC_ENTRY(peer)
3483 __dynamic_array(u8, ie, owe_info->ie_len)),
3484 TP_fast_assign(WIPHY_ASSIGN;
3485 NETDEV_ASSIGN;
3486 MAC_ASSIGN(peer, owe_info->peer);
3487 memcpy(__get_dynamic_array(ie), owe_info->ie,
3488 owe_info->ie_len);),
3489 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
3490 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
3491);
3492
Rajkumar Manoharan5ab92e72019-04-11 13:47:24 -07003493TRACE_EVENT(rdev_probe_mesh_link,
3494 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3495 const u8 *dest, const u8 *buf, size_t len),
3496 TP_ARGS(wiphy, netdev, dest, buf, len),
3497 TP_STRUCT__entry(
3498 WIPHY_ENTRY
3499 NETDEV_ENTRY
3500 MAC_ENTRY(dest)
3501 ),
3502 TP_fast_assign(
3503 WIPHY_ASSIGN;
3504 NETDEV_ASSIGN;
3505 MAC_ASSIGN(dest, dest);
3506 ),
3507 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
3508 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dest))
3509);
3510
Tamizh chelvam77f576d2020-01-20 13:21:22 +05303511TRACE_EVENT(rdev_set_tid_config,
3512 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
Johannes Berg3710a8a2020-02-24 11:34:25 +01003513 struct cfg80211_tid_config *tid_conf),
Tamizh chelvam77f576d2020-01-20 13:21:22 +05303514 TP_ARGS(wiphy, netdev, tid_conf),
3515 TP_STRUCT__entry(
3516 WIPHY_ENTRY
3517 NETDEV_ENTRY
3518 MAC_ENTRY(peer)
3519 ),
3520 TP_fast_assign(
3521 WIPHY_ASSIGN;
3522 NETDEV_ASSIGN;
3523 MAC_ASSIGN(peer, tid_conf->peer);
3524 ),
3525 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
3526 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
3527);
3528
3529TRACE_EVENT(rdev_reset_tid_config,
3530 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
Johannes Berg3710a8a2020-02-24 11:34:25 +01003531 const u8 *peer, u8 tids),
3532 TP_ARGS(wiphy, netdev, peer, tids),
Tamizh chelvam77f576d2020-01-20 13:21:22 +05303533 TP_STRUCT__entry(
3534 WIPHY_ENTRY
3535 NETDEV_ENTRY
3536 MAC_ENTRY(peer)
Johannes Berg3710a8a2020-02-24 11:34:25 +01003537 __field(u8, tids)
Tamizh chelvam77f576d2020-01-20 13:21:22 +05303538 ),
3539 TP_fast_assign(
3540 WIPHY_ASSIGN;
3541 NETDEV_ASSIGN;
3542 MAC_ASSIGN(peer, peer);
Johannes Berg3710a8a2020-02-24 11:34:25 +01003543 __entry->tids = tids;
Tamizh chelvam77f576d2020-01-20 13:21:22 +05303544 ),
Johannes Berg3710a8a2020-02-24 11:34:25 +01003545 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", tids: 0x%x",
3546 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->tids)
Tamizh chelvam77f576d2020-01-20 13:21:22 +05303547);
Beni Lev14e8a3c2012-07-31 18:48:27 +03003548#endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
3549
3550#undef TRACE_INCLUDE_PATH
3551#define TRACE_INCLUDE_PATH .
3552#undef TRACE_INCLUDE_FILE
3553#define TRACE_INCLUDE_FILE trace
3554#include <trace/define_trace.h>