root/net/wireless/trace.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /* SPDX-License-Identifier: GPL-2.0 */
   2 #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>
  11 #include <linux/etherdevice.h>
  12 #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                                                         \
  20                 eth_zero_addr(__entry->entry_mac);                   \
  21         } while (0)
  22 #define MAC_PR_FMT "%pM"
  23 #define MAC_PR_ARG(entry_mac) (__entry->entry_mac)
  24 
  25 #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
  30 
  31 #define WDEV_ENTRY      __field(u32, id)
  32 #define WDEV_ASSIGN     (__entry->id) = (!IS_ERR_OR_NULL(wdev)  \
  33                                          ? wdev->identifier : 0)
  34 #define WDEV_PR_FMT     "wdev(%u)"
  35 #define WDEV_PR_ARG     (__entry->id)
  36 
  37 #define NETDEV_ENTRY    __array(char, name, IFNAMSIZ) \
  38                         __field(int, ifindex)
  39 #define NETDEV_ASSIGN                                          \
  40         do {                                                   \
  41                 memcpy(__entry->name, netdev->name, IFNAMSIZ); \
  42                 (__entry->ifindex) = (netdev->ifindex);        \
  43         } while (0)
  44 #define NETDEV_PR_FMT   "netdev:%s(%d)"
  45 #define NETDEV_PR_ARG   __entry->name, __entry->ifindex
  46 
  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 
 114 #define CHAN_ENTRY __field(enum nl80211_band, band) \
 115                    __field(u32, center_freq)
 116 #define CHAN_ASSIGN(chan)                                         \
 117         do {                                                      \
 118                 if (chan) {                                       \
 119                         __entry->band = chan->band;               \
 120                         __entry->center_freq = chan->center_freq; \
 121                 } else {                                          \
 122                         __entry->band = 0;                        \
 123                         __entry->center_freq = 0;                 \
 124                 }                                                 \
 125         } while (0)
 126 #define CHAN_PR_FMT "band: %d, freq: %u"
 127 #define CHAN_PR_ARG __entry->band, __entry->center_freq
 128 
 129 #define CHAN_DEF_ENTRY __field(enum nl80211_band, band)         \
 130                        __field(u32, control_freq)                       \
 131                        __field(u32, width)                              \
 132                        __field(u32, center_freq1)                       \
 133                        __field(u32, center_freq2)
 134 #define CHAN_DEF_ASSIGN(chandef)                                        \
 135         do {                                                            \
 136                 if ((chandef) && (chandef)->chan) {                     \
 137                         __entry->band = (chandef)->chan->band;          \
 138                         __entry->control_freq =                         \
 139                                 (chandef)->chan->center_freq;           \
 140                         __entry->width = (chandef)->width;              \
 141                         __entry->center_freq1 = (chandef)->center_freq1;\
 142                         __entry->center_freq2 = (chandef)->center_freq2;\
 143                 } else {                                                \
 144                         __entry->band = 0;                              \
 145                         __entry->control_freq = 0;                      \
 146                         __entry->width = 0;                             \
 147                         __entry->center_freq1 = 0;                      \
 148                         __entry->center_freq2 = 0;                      \
 149                 }                                                       \
 150         } while (0)
 151 #define CHAN_DEF_PR_FMT                                                 \
 152         "band: %d, control freq: %u, width: %d, cf1: %u, cf2: %u"
 153 #define CHAN_DEF_PR_ARG __entry->band, __entry->control_freq,           \
 154                         __entry->width, __entry->center_freq1,          \
 155                         __entry->center_freq2
 156 
 157 #define SINFO_ENTRY __field(int, generation)        \
 158                     __field(u32, connected_time)    \
 159                     __field(u32, inactive_time)     \
 160                     __field(u32, rx_bytes)          \
 161                     __field(u32, tx_bytes)          \
 162                     __field(u32, rx_packets)        \
 163                     __field(u32, tx_packets)        \
 164                     __field(u32, tx_retries)        \
 165                     __field(u32, tx_failed)         \
 166                     __field(u32, rx_dropped_misc)   \
 167                     __field(u32, beacon_loss_count) \
 168                     __field(u16, llid)              \
 169                     __field(u16, plid)              \
 170                     __field(u8, plink_state)
 171 #define SINFO_ASSIGN                                                   \
 172         do {                                                           \
 173                 __entry->generation = sinfo->generation;               \
 174                 __entry->connected_time = sinfo->connected_time;       \
 175                 __entry->inactive_time = sinfo->inactive_time;         \
 176                 __entry->rx_bytes = sinfo->rx_bytes;                   \
 177                 __entry->tx_bytes = sinfo->tx_bytes;                   \
 178                 __entry->rx_packets = sinfo->rx_packets;               \
 179                 __entry->tx_packets = sinfo->tx_packets;               \
 180                 __entry->tx_retries = sinfo->tx_retries;               \
 181                 __entry->tx_failed = sinfo->tx_failed;                 \
 182                 __entry->rx_dropped_misc = sinfo->rx_dropped_misc;     \
 183                 __entry->beacon_loss_count = sinfo->beacon_loss_count; \
 184                 __entry->llid = sinfo->llid;                           \
 185                 __entry->plid = sinfo->plid;                           \
 186                 __entry->plink_state = sinfo->plink_state;             \
 187         } while (0)
 188 
 189 #define BOOL_TO_STR(bo) (bo) ? "true" : "false"
 190 
 191 #define QOS_MAP_ENTRY __field(u8, num_des)                      \
 192                       __array(u8, dscp_exception,               \
 193                               2 * IEEE80211_QOS_MAP_MAX_EX)     \
 194                       __array(u8, up, IEEE80211_QOS_MAP_LEN_MIN)
 195 #define QOS_MAP_ASSIGN(qos_map)                                 \
 196         do {                                                    \
 197                 if ((qos_map)) {                                \
 198                         __entry->num_des = (qos_map)->num_des;  \
 199                         memcpy(__entry->dscp_exception,         \
 200                                &(qos_map)->dscp_exception,      \
 201                                2 * IEEE80211_QOS_MAP_MAX_EX);   \
 202                         memcpy(__entry->up, &(qos_map)->up,     \
 203                                IEEE80211_QOS_MAP_LEN_MIN);      \
 204                 } else {                                        \
 205                         __entry->num_des = 0;                   \
 206                         memset(__entry->dscp_exception, 0,      \
 207                                2 * IEEE80211_QOS_MAP_MAX_EX);   \
 208                         memset(__entry->up, 0,                  \
 209                                IEEE80211_QOS_MAP_LEN_MIN);      \
 210                 }                                               \
 211         } while (0)
 212 
 213 /*************************************************************
 214  *                      rdev->ops traces                     *
 215  *************************************************************/
 216 
 217 TRACE_EVENT(rdev_suspend,
 218         TP_PROTO(struct wiphy *wiphy, struct cfg80211_wowlan *wow),
 219         TP_ARGS(wiphy, wow),
 220         TP_STRUCT__entry(
 221                 WIPHY_ENTRY
 222                 __field(bool, any)
 223                 __field(bool, disconnect)
 224                 __field(bool, magic_pkt)
 225                 __field(bool, gtk_rekey_failure)
 226                 __field(bool, eap_identity_req)
 227                 __field(bool, four_way_handshake)
 228                 __field(bool, rfkill_release)
 229                 __field(bool, valid_wow)
 230         ),
 231         TP_fast_assign(
 232                 WIPHY_ASSIGN;
 233                 if (wow) {
 234                         __entry->any = wow->any;
 235                         __entry->disconnect = wow->disconnect;
 236                         __entry->magic_pkt = wow->magic_pkt;
 237                         __entry->gtk_rekey_failure = wow->gtk_rekey_failure;
 238                         __entry->eap_identity_req = wow->eap_identity_req;
 239                         __entry->four_way_handshake = wow->four_way_handshake;
 240                         __entry->rfkill_release = wow->rfkill_release;
 241                         __entry->valid_wow = true;
 242                 } else {
 243                         __entry->valid_wow = false;
 244                 }
 245         ),
 246         TP_printk(WIPHY_PR_FMT ", wow%s - any: %d, disconnect: %d, "
 247                   "magic pkt: %d, gtk rekey failure: %d, eap identify req: %d, "
 248                   "four way handshake: %d, rfkill release: %d.",
 249                   WIPHY_PR_ARG, __entry->valid_wow ? "" : "(Not configured!)",
 250                   __entry->any, __entry->disconnect, __entry->magic_pkt,
 251                   __entry->gtk_rekey_failure, __entry->eap_identity_req,
 252                   __entry->four_way_handshake, __entry->rfkill_release)
 253 );
 254 
 255 TRACE_EVENT(rdev_return_int,
 256         TP_PROTO(struct wiphy *wiphy, int ret),
 257         TP_ARGS(wiphy, ret),
 258         TP_STRUCT__entry(
 259                 WIPHY_ENTRY
 260                 __field(int, ret)
 261         ),
 262         TP_fast_assign(
 263                 WIPHY_ASSIGN;
 264                 __entry->ret = ret;
 265         ),
 266         TP_printk(WIPHY_PR_FMT ", returned: %d", WIPHY_PR_ARG, __entry->ret)
 267 );
 268 
 269 TRACE_EVENT(rdev_scan,
 270         TP_PROTO(struct wiphy *wiphy, struct cfg80211_scan_request *request),
 271         TP_ARGS(wiphy, request),
 272         TP_STRUCT__entry(
 273                 WIPHY_ENTRY
 274         ),
 275         TP_fast_assign(
 276                 WIPHY_ASSIGN;
 277         ),
 278         TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
 279 );
 280 
 281 DECLARE_EVENT_CLASS(wiphy_only_evt,
 282         TP_PROTO(struct wiphy *wiphy),
 283         TP_ARGS(wiphy),
 284         TP_STRUCT__entry(
 285                 WIPHY_ENTRY
 286         ),
 287         TP_fast_assign(
 288                 WIPHY_ASSIGN;
 289         ),
 290         TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
 291 );
 292 
 293 DEFINE_EVENT(wiphy_only_evt, rdev_resume,
 294         TP_PROTO(struct wiphy *wiphy),
 295         TP_ARGS(wiphy)
 296 );
 297 
 298 DEFINE_EVENT(wiphy_only_evt, rdev_return_void,
 299         TP_PROTO(struct wiphy *wiphy),
 300         TP_ARGS(wiphy)
 301 );
 302 
 303 DEFINE_EVENT(wiphy_only_evt, rdev_get_antenna,
 304         TP_PROTO(struct wiphy *wiphy),
 305         TP_ARGS(wiphy)
 306 );
 307 
 308 DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll,
 309         TP_PROTO(struct wiphy *wiphy),
 310         TP_ARGS(wiphy)
 311 );
 312 
 313 DECLARE_EVENT_CLASS(wiphy_enabled_evt,
 314         TP_PROTO(struct wiphy *wiphy, bool enabled),
 315         TP_ARGS(wiphy, enabled),
 316         TP_STRUCT__entry(
 317                 WIPHY_ENTRY
 318                 __field(bool, enabled)
 319         ),
 320         TP_fast_assign(
 321                 WIPHY_ASSIGN;
 322                 __entry->enabled = enabled;
 323         ),
 324         TP_printk(WIPHY_PR_FMT ", %senabled ",
 325                   WIPHY_PR_ARG, __entry->enabled ? "" : "not ")
 326 );
 327 
 328 DEFINE_EVENT(wiphy_enabled_evt, rdev_set_wakeup,
 329         TP_PROTO(struct wiphy *wiphy, bool enabled),
 330         TP_ARGS(wiphy, enabled)
 331 );
 332 
 333 TRACE_EVENT(rdev_add_virtual_intf,
 334         TP_PROTO(struct wiphy *wiphy, char *name, enum nl80211_iftype type),
 335         TP_ARGS(wiphy, name, type),
 336         TP_STRUCT__entry(
 337                 WIPHY_ENTRY
 338                 __string(vir_intf_name, name ? name : "<noname>")
 339                 __field(enum nl80211_iftype, type)
 340         ),
 341         TP_fast_assign(
 342                 WIPHY_ASSIGN;
 343                 __assign_str(vir_intf_name, name ? name : "<noname>");
 344                 __entry->type = type;
 345         ),
 346         TP_printk(WIPHY_PR_FMT ", virtual intf name: %s, type: %d",
 347                   WIPHY_PR_ARG, __get_str(vir_intf_name), __entry->type)
 348 );
 349 
 350 DECLARE_EVENT_CLASS(wiphy_wdev_evt,
 351         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
 352         TP_ARGS(wiphy, wdev),
 353         TP_STRUCT__entry(
 354                 WIPHY_ENTRY
 355                 WDEV_ENTRY
 356         ),
 357         TP_fast_assign(
 358                 WIPHY_ASSIGN;
 359                 WDEV_ASSIGN;
 360         ),
 361         TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
 362 );
 363 
 364 DECLARE_EVENT_CLASS(wiphy_wdev_cookie_evt,
 365         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
 366         TP_ARGS(wiphy, wdev, cookie),
 367         TP_STRUCT__entry(
 368                 WIPHY_ENTRY
 369                 WDEV_ENTRY
 370                 __field(u64, cookie)
 371         ),
 372         TP_fast_assign(
 373                 WIPHY_ASSIGN;
 374                 WDEV_ASSIGN;
 375                 __entry->cookie = cookie;
 376         ),
 377         TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %lld",
 378                   WIPHY_PR_ARG, WDEV_PR_ARG,
 379                   (unsigned long long)__entry->cookie)
 380 );
 381 
 382 DEFINE_EVENT(wiphy_wdev_evt, rdev_return_wdev,
 383         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
 384         TP_ARGS(wiphy, wdev)
 385 );
 386 
 387 DEFINE_EVENT(wiphy_wdev_evt, rdev_del_virtual_intf,
 388         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
 389         TP_ARGS(wiphy, wdev)
 390 );
 391 
 392 TRACE_EVENT(rdev_change_virtual_intf,
 393         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
 394                  enum nl80211_iftype type),
 395         TP_ARGS(wiphy, netdev, type),
 396         TP_STRUCT__entry(
 397                 WIPHY_ENTRY
 398                 NETDEV_ENTRY
 399                 __field(enum nl80211_iftype, type)
 400         ),
 401         TP_fast_assign(
 402                 WIPHY_ASSIGN;
 403                 NETDEV_ASSIGN;
 404                 __entry->type = type;
 405         ),
 406         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", type: %d",
 407                   WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->type)
 408 );
 409 
 410 DECLARE_EVENT_CLASS(key_handle,
 411         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
 412                  bool pairwise, const u8 *mac_addr),
 413         TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr),
 414         TP_STRUCT__entry(
 415                 WIPHY_ENTRY
 416                 NETDEV_ENTRY
 417                 MAC_ENTRY(mac_addr)
 418                 __field(u8, key_index)
 419                 __field(bool, pairwise)
 420         ),
 421         TP_fast_assign(
 422                 WIPHY_ASSIGN;
 423                 NETDEV_ASSIGN;
 424                 MAC_ASSIGN(mac_addr, mac_addr);
 425                 __entry->key_index = key_index;
 426                 __entry->pairwise = pairwise;
 427         ),
 428         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key_index: %u, pairwise: %s, mac addr: " MAC_PR_FMT,
 429                   WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
 430                   BOOL_TO_STR(__entry->pairwise), MAC_PR_ARG(mac_addr))
 431 );
 432 
 433 DEFINE_EVENT(key_handle, rdev_get_key,
 434         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
 435                  bool pairwise, const u8 *mac_addr),
 436         TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
 437 );
 438 
 439 DEFINE_EVENT(key_handle, rdev_del_key,
 440         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
 441                  bool pairwise, const u8 *mac_addr),
 442         TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr)
 443 );
 444 
 445 TRACE_EVENT(rdev_add_key,
 446         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
 447                  bool pairwise, const u8 *mac_addr, u8 mode),
 448         TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr, mode),
 449         TP_STRUCT__entry(
 450                 WIPHY_ENTRY
 451                 NETDEV_ENTRY
 452                 MAC_ENTRY(mac_addr)
 453                 __field(u8, key_index)
 454                 __field(bool, pairwise)
 455                 __field(u8, mode)
 456         ),
 457         TP_fast_assign(
 458                 WIPHY_ASSIGN;
 459                 NETDEV_ASSIGN;
 460                 MAC_ASSIGN(mac_addr, mac_addr);
 461                 __entry->key_index = key_index;
 462                 __entry->pairwise = pairwise;
 463                 __entry->mode = mode;
 464         ),
 465         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key_index: %u, "
 466                   "mode: %u, pairwise: %s, mac addr: " MAC_PR_FMT,
 467                   WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
 468                   __entry->mode, BOOL_TO_STR(__entry->pairwise),
 469                   MAC_PR_ARG(mac_addr))
 470 );
 471 
 472 TRACE_EVENT(rdev_set_default_key,
 473         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
 474                  bool unicast, bool multicast),
 475         TP_ARGS(wiphy, netdev, key_index, unicast, multicast),
 476         TP_STRUCT__entry(
 477                 WIPHY_ENTRY
 478                 NETDEV_ENTRY
 479                 __field(u8, key_index)
 480                 __field(bool, unicast)
 481                 __field(bool, multicast)
 482         ),
 483         TP_fast_assign(
 484                 WIPHY_ASSIGN;
 485                 NETDEV_ASSIGN;
 486                 __entry->key_index = key_index;
 487                 __entry->unicast = unicast;
 488                 __entry->multicast = multicast;
 489         ),
 490         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u, unicast: %s, multicast: %s",
 491                   WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index,
 492                   BOOL_TO_STR(__entry->unicast),
 493                   BOOL_TO_STR(__entry->multicast))
 494 );
 495 
 496 TRACE_EVENT(rdev_set_default_mgmt_key,
 497         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index),
 498         TP_ARGS(wiphy, netdev, key_index),
 499         TP_STRUCT__entry(
 500                 WIPHY_ENTRY
 501                 NETDEV_ENTRY
 502                 __field(u8, key_index)
 503         ),
 504         TP_fast_assign(
 505                 WIPHY_ASSIGN;
 506                 NETDEV_ASSIGN;
 507                 __entry->key_index = key_index;
 508         ),
 509         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u",
 510                   WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index)
 511 );
 512 
 513 TRACE_EVENT(rdev_start_ap,
 514         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
 515                  struct cfg80211_ap_settings *settings),
 516         TP_ARGS(wiphy, netdev, settings),
 517         TP_STRUCT__entry(
 518                 WIPHY_ENTRY
 519                 NETDEV_ENTRY
 520                 CHAN_DEF_ENTRY
 521                 __field(int, beacon_interval)
 522                 __field(int, dtim_period)
 523                 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
 524                 __field(enum nl80211_hidden_ssid, hidden_ssid)
 525                 __field(u32, wpa_ver)
 526                 __field(bool, privacy)
 527                 __field(enum nl80211_auth_type, auth_type)
 528                 __field(int, inactivity_timeout)
 529         ),
 530         TP_fast_assign(
 531                 WIPHY_ASSIGN;
 532                 NETDEV_ASSIGN;
 533                 CHAN_DEF_ASSIGN(&settings->chandef);
 534                 __entry->beacon_interval = settings->beacon_interval;
 535                 __entry->dtim_period = settings->dtim_period;
 536                 __entry->hidden_ssid = settings->hidden_ssid;
 537                 __entry->wpa_ver = settings->crypto.wpa_versions;
 538                 __entry->privacy = settings->privacy;
 539                 __entry->auth_type = settings->auth_type;
 540                 __entry->inactivity_timeout = settings->inactivity_timeout;
 541                 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
 542                 memcpy(__entry->ssid, settings->ssid, settings->ssid_len);
 543         ),
 544         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", AP settings - ssid: %s, "
 545                   CHAN_DEF_PR_FMT ", beacon interval: %d, dtim period: %d, "
 546                   "hidden ssid: %d, wpa versions: %u, privacy: %s, "
 547                   "auth type: %d, inactivity timeout: %d",
 548                   WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ssid, CHAN_DEF_PR_ARG,
 549                   __entry->beacon_interval, __entry->dtim_period,
 550                   __entry->hidden_ssid, __entry->wpa_ver,
 551                   BOOL_TO_STR(__entry->privacy), __entry->auth_type,
 552                   __entry->inactivity_timeout)
 553 );
 554 
 555 TRACE_EVENT(rdev_change_beacon,
 556         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
 557                  struct cfg80211_beacon_data *info),
 558         TP_ARGS(wiphy, netdev, info),
 559         TP_STRUCT__entry(
 560                 WIPHY_ENTRY
 561                 NETDEV_ENTRY
 562                 __dynamic_array(u8, head, info ? info->head_len : 0)
 563                 __dynamic_array(u8, tail, info ? info->tail_len : 0)
 564                 __dynamic_array(u8, beacon_ies, info ? info->beacon_ies_len : 0)
 565                 __dynamic_array(u8, proberesp_ies,
 566                                 info ? info->proberesp_ies_len : 0)
 567                 __dynamic_array(u8, assocresp_ies,
 568                                 info ? info->assocresp_ies_len : 0)
 569                 __dynamic_array(u8, probe_resp, info ? info->probe_resp_len : 0)
 570         ),
 571         TP_fast_assign(
 572                 WIPHY_ASSIGN;
 573                 NETDEV_ASSIGN;
 574                 if (info) {
 575                         if (info->head)
 576                                 memcpy(__get_dynamic_array(head), info->head,
 577                                        info->head_len);
 578                         if (info->tail)
 579                                 memcpy(__get_dynamic_array(tail), info->tail,
 580                                        info->tail_len);
 581                         if (info->beacon_ies)
 582                                 memcpy(__get_dynamic_array(beacon_ies),
 583                                        info->beacon_ies, info->beacon_ies_len);
 584                         if (info->proberesp_ies)
 585                                 memcpy(__get_dynamic_array(proberesp_ies),
 586                                        info->proberesp_ies,
 587                                        info->proberesp_ies_len);
 588                         if (info->assocresp_ies)
 589                                 memcpy(__get_dynamic_array(assocresp_ies),
 590                                        info->assocresp_ies,
 591                                        info->assocresp_ies_len);
 592                         if (info->probe_resp)
 593                                 memcpy(__get_dynamic_array(probe_resp),
 594                                        info->probe_resp, info->probe_resp_len);
 595                 }
 596         ),
 597         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
 598 );
 599 
 600 DECLARE_EVENT_CLASS(wiphy_netdev_evt,
 601         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
 602         TP_ARGS(wiphy, netdev),
 603         TP_STRUCT__entry(
 604                 WIPHY_ENTRY
 605                 NETDEV_ENTRY
 606         ),
 607         TP_fast_assign(
 608                 WIPHY_ASSIGN;
 609                 NETDEV_ASSIGN;
 610         ),
 611         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG)
 612 );
 613 
 614 DEFINE_EVENT(wiphy_netdev_evt, rdev_stop_ap,
 615         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
 616         TP_ARGS(wiphy, netdev)
 617 );
 618 
 619 DEFINE_EVENT(wiphy_netdev_evt, rdev_set_rekey_data,
 620         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
 621         TP_ARGS(wiphy, netdev)
 622 );
 623 
 624 DEFINE_EVENT(wiphy_netdev_evt, rdev_get_mesh_config,
 625         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
 626         TP_ARGS(wiphy, netdev)
 627 );
 628 
 629 DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_mesh,
 630         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
 631         TP_ARGS(wiphy, netdev)
 632 );
 633 
 634 DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ibss,
 635         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
 636         TP_ARGS(wiphy, netdev)
 637 );
 638 
 639 DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ocb,
 640         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
 641         TP_ARGS(wiphy, netdev)
 642 );
 643 
 644 DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa,
 645         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
 646         TP_ARGS(wiphy, netdev)
 647 );
 648 
 649 DEFINE_EVENT(wiphy_netdev_evt, rdev_end_cac,
 650              TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
 651              TP_ARGS(wiphy, netdev)
 652 );
 653 
 654 DECLARE_EVENT_CLASS(station_add_change,
 655         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
 656                  struct station_parameters *params),
 657         TP_ARGS(wiphy, netdev, mac, params),
 658         TP_STRUCT__entry(
 659                 WIPHY_ENTRY
 660                 NETDEV_ENTRY
 661                 MAC_ENTRY(sta_mac)
 662                 __field(u32, sta_flags_mask)
 663                 __field(u32, sta_flags_set)
 664                 __field(u32, sta_modify_mask)
 665                 __field(int, listen_interval)
 666                 __field(u16, capability)
 667                 __field(u16, aid)
 668                 __field(u8, plink_action)
 669                 __field(u8, plink_state)
 670                 __field(u8, uapsd_queues)
 671                 __field(u8, max_sp)
 672                 __field(u8, opmode_notif)
 673                 __field(bool, opmode_notif_used)
 674                 __array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap))
 675                 __array(u8, vht_capa, (int)sizeof(struct ieee80211_vht_cap))
 676                 __array(char, vlan, IFNAMSIZ)
 677                 __dynamic_array(u8, supported_rates,
 678                                 params->supported_rates_len)
 679                 __dynamic_array(u8, ext_capab, params->ext_capab_len)
 680                 __dynamic_array(u8, supported_channels,
 681                                 params->supported_channels_len)
 682                 __dynamic_array(u8, supported_oper_classes,
 683                                 params->supported_oper_classes_len)
 684         ),
 685         TP_fast_assign(
 686                 WIPHY_ASSIGN;
 687                 NETDEV_ASSIGN;
 688                 MAC_ASSIGN(sta_mac, mac);
 689                 __entry->sta_flags_mask = params->sta_flags_mask;
 690                 __entry->sta_flags_set = params->sta_flags_set;
 691                 __entry->sta_modify_mask = params->sta_modify_mask;
 692                 __entry->listen_interval = params->listen_interval;
 693                 __entry->aid = params->aid;
 694                 __entry->plink_action = params->plink_action;
 695                 __entry->plink_state = params->plink_state;
 696                 __entry->uapsd_queues = params->uapsd_queues;
 697                 memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap));
 698                 if (params->ht_capa)
 699                         memcpy(__entry->ht_capa, params->ht_capa,
 700                                sizeof(struct ieee80211_ht_cap));
 701                 memset(__entry->vht_capa, 0, sizeof(struct ieee80211_vht_cap));
 702                 if (params->vht_capa)
 703                         memcpy(__entry->vht_capa, params->vht_capa,
 704                                sizeof(struct ieee80211_vht_cap));
 705                 memset(__entry->vlan, 0, sizeof(__entry->vlan));
 706                 if (params->vlan)
 707                         memcpy(__entry->vlan, params->vlan->name, IFNAMSIZ);
 708                 if (params->supported_rates && params->supported_rates_len)
 709                         memcpy(__get_dynamic_array(supported_rates),
 710                                params->supported_rates,
 711                                params->supported_rates_len);
 712                 if (params->ext_capab && params->ext_capab_len)
 713                         memcpy(__get_dynamic_array(ext_capab),
 714                                params->ext_capab,
 715                                params->ext_capab_len);
 716                 if (params->supported_channels &&
 717                     params->supported_channels_len)
 718                         memcpy(__get_dynamic_array(supported_channels),
 719                                params->supported_channels,
 720                                params->supported_channels_len);
 721                 if (params->supported_oper_classes &&
 722                     params->supported_oper_classes_len)
 723                         memcpy(__get_dynamic_array(supported_oper_classes),
 724                                params->supported_oper_classes,
 725                                params->supported_oper_classes_len);
 726                 __entry->max_sp = params->max_sp;
 727                 __entry->capability = params->capability;
 728                 __entry->opmode_notif = params->opmode_notif;
 729                 __entry->opmode_notif_used = params->opmode_notif_used;
 730         ),
 731         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
 732                   ", station flags mask: %u, station flags set: %u, "
 733                   "station modify mask: %u, listen interval: %d, aid: %u, "
 734                   "plink action: %u, plink state: %u, uapsd queues: %u, vlan:%s",
 735                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
 736                   __entry->sta_flags_mask, __entry->sta_flags_set,
 737                   __entry->sta_modify_mask, __entry->listen_interval,
 738                   __entry->aid, __entry->plink_action, __entry->plink_state,
 739                   __entry->uapsd_queues, __entry->vlan)
 740 );
 741 
 742 DEFINE_EVENT(station_add_change, rdev_add_station,
 743         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
 744                  struct station_parameters *params),
 745         TP_ARGS(wiphy, netdev, mac, params)
 746 );
 747 
 748 DEFINE_EVENT(station_add_change, rdev_change_station,
 749         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
 750                  struct station_parameters *params),
 751         TP_ARGS(wiphy, netdev, mac, params)
 752 );
 753 
 754 DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt,
 755         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
 756         TP_ARGS(wiphy, netdev, mac),
 757         TP_STRUCT__entry(
 758                 WIPHY_ENTRY
 759                 NETDEV_ENTRY
 760                 MAC_ENTRY(sta_mac)
 761         ),
 762         TP_fast_assign(
 763                 WIPHY_ASSIGN;
 764                 NETDEV_ASSIGN;
 765                 MAC_ASSIGN(sta_mac, mac);
 766         ),
 767         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
 768                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac))
 769 );
 770 
 771 DECLARE_EVENT_CLASS(station_del,
 772         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
 773                  struct station_del_parameters *params),
 774         TP_ARGS(wiphy, netdev, params),
 775         TP_STRUCT__entry(
 776                 WIPHY_ENTRY
 777                 NETDEV_ENTRY
 778                 MAC_ENTRY(sta_mac)
 779                 __field(u8, subtype)
 780                 __field(u16, reason_code)
 781         ),
 782         TP_fast_assign(
 783                 WIPHY_ASSIGN;
 784                 NETDEV_ASSIGN;
 785                 MAC_ASSIGN(sta_mac, params->mac);
 786                 __entry->subtype = params->subtype;
 787                 __entry->reason_code = params->reason_code;
 788         ),
 789         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT
 790                   ", subtype: %u, reason_code: %u",
 791                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
 792                   __entry->subtype, __entry->reason_code)
 793 );
 794 
 795 DEFINE_EVENT(station_del, rdev_del_station,
 796         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
 797                  struct station_del_parameters *params),
 798         TP_ARGS(wiphy, netdev, params)
 799 );
 800 
 801 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_station,
 802         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
 803         TP_ARGS(wiphy, netdev, mac)
 804 );
 805 
 806 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath,
 807         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
 808         TP_ARGS(wiphy, netdev, mac)
 809 );
 810 
 811 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_set_wds_peer,
 812         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac),
 813         TP_ARGS(wiphy, netdev, mac)
 814 );
 815 
 816 TRACE_EVENT(rdev_dump_station,
 817         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
 818                  u8 *mac),
 819         TP_ARGS(wiphy, netdev, _idx, mac),
 820         TP_STRUCT__entry(
 821                 WIPHY_ENTRY
 822                 NETDEV_ENTRY
 823                 MAC_ENTRY(sta_mac)
 824                 __field(int, idx)
 825         ),
 826         TP_fast_assign(
 827                 WIPHY_ASSIGN;
 828                 NETDEV_ASSIGN;
 829                 MAC_ASSIGN(sta_mac, mac);
 830                 __entry->idx = _idx;
 831         ),
 832         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT ", idx: %d",
 833                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac),
 834                   __entry->idx)
 835 );
 836 
 837 TRACE_EVENT(rdev_return_int_station_info,
 838         TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo),
 839         TP_ARGS(wiphy, ret, sinfo),
 840         TP_STRUCT__entry(
 841                 WIPHY_ENTRY
 842                 __field(int, ret)
 843                 SINFO_ENTRY
 844         ),
 845         TP_fast_assign(
 846                 WIPHY_ASSIGN;
 847                 __entry->ret = ret;
 848                 SINFO_ASSIGN;
 849         ),
 850         TP_printk(WIPHY_PR_FMT ", returned %d" ,
 851                   WIPHY_PR_ARG, __entry->ret)
 852 );
 853 
 854 DECLARE_EVENT_CLASS(mpath_evt,
 855         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
 856                  u8 *next_hop),
 857         TP_ARGS(wiphy, netdev, dst, next_hop),
 858         TP_STRUCT__entry(
 859                 WIPHY_ENTRY
 860                 NETDEV_ENTRY
 861                 MAC_ENTRY(dst)
 862                 MAC_ENTRY(next_hop)
 863         ),
 864         TP_fast_assign(
 865                 WIPHY_ASSIGN;
 866                 NETDEV_ASSIGN;
 867                 MAC_ASSIGN(dst, dst);
 868                 MAC_ASSIGN(next_hop, next_hop);
 869         ),
 870         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT ", next hop: " MAC_PR_FMT,
 871                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dst),
 872                   MAC_PR_ARG(next_hop))
 873 );
 874 
 875 DEFINE_EVENT(mpath_evt, rdev_add_mpath,
 876         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
 877                  u8 *next_hop),
 878         TP_ARGS(wiphy, netdev, dst, next_hop)
 879 );
 880 
 881 DEFINE_EVENT(mpath_evt, rdev_change_mpath,
 882         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
 883                  u8 *next_hop),
 884         TP_ARGS(wiphy, netdev, dst, next_hop)
 885 );
 886 
 887 DEFINE_EVENT(mpath_evt, rdev_get_mpath,
 888         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst,
 889                  u8 *next_hop),
 890         TP_ARGS(wiphy, netdev, dst, next_hop)
 891 );
 892 
 893 TRACE_EVENT(rdev_dump_mpath,
 894         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
 895                  u8 *dst, u8 *next_hop),
 896         TP_ARGS(wiphy, netdev, _idx, dst, next_hop),
 897         TP_STRUCT__entry(
 898                 WIPHY_ENTRY
 899                 NETDEV_ENTRY
 900                 MAC_ENTRY(dst)
 901                 MAC_ENTRY(next_hop)
 902                 __field(int, idx)
 903         ),
 904         TP_fast_assign(
 905                 WIPHY_ASSIGN;
 906                 NETDEV_ASSIGN;
 907                 MAC_ASSIGN(dst, dst);
 908                 MAC_ASSIGN(next_hop, next_hop);
 909                 __entry->idx = _idx;
 910         ),
 911         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
 912                   MAC_PR_FMT ", next hop: " MAC_PR_FMT,
 913                   WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
 914                   MAC_PR_ARG(next_hop))
 915 );
 916 
 917 TRACE_EVENT(rdev_get_mpp,
 918         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
 919                  u8 *dst, u8 *mpp),
 920         TP_ARGS(wiphy, netdev, dst, mpp),
 921         TP_STRUCT__entry(
 922                 WIPHY_ENTRY
 923                 NETDEV_ENTRY
 924                 MAC_ENTRY(dst)
 925                 MAC_ENTRY(mpp)
 926         ),
 927         TP_fast_assign(
 928                 WIPHY_ASSIGN;
 929                 NETDEV_ASSIGN;
 930                 MAC_ASSIGN(dst, dst);
 931                 MAC_ASSIGN(mpp, mpp);
 932         ),
 933         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT
 934                   ", mpp: " MAC_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG,
 935                   MAC_PR_ARG(dst), MAC_PR_ARG(mpp))
 936 );
 937 
 938 TRACE_EVENT(rdev_dump_mpp,
 939         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
 940                  u8 *dst, u8 *mpp),
 941         TP_ARGS(wiphy, netdev, _idx, mpp, dst),
 942         TP_STRUCT__entry(
 943                 WIPHY_ENTRY
 944                 NETDEV_ENTRY
 945                 MAC_ENTRY(dst)
 946                 MAC_ENTRY(mpp)
 947                 __field(int, idx)
 948         ),
 949         TP_fast_assign(
 950                 WIPHY_ASSIGN;
 951                 NETDEV_ASSIGN;
 952                 MAC_ASSIGN(dst, dst);
 953                 MAC_ASSIGN(mpp, mpp);
 954                 __entry->idx = _idx;
 955         ),
 956         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: "
 957                   MAC_PR_FMT ", mpp: " MAC_PR_FMT,
 958                   WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst),
 959                   MAC_PR_ARG(mpp))
 960 );
 961 
 962 TRACE_EVENT(rdev_return_int_mpath_info,
 963         TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo),
 964         TP_ARGS(wiphy, ret, pinfo),
 965         TP_STRUCT__entry(
 966                 WIPHY_ENTRY
 967                 __field(int, ret)
 968                 __field(int, generation)
 969                 __field(u32, filled)
 970                 __field(u32, frame_qlen)
 971                 __field(u32, sn)
 972                 __field(u32, metric)
 973                 __field(u32, exptime)
 974                 __field(u32, discovery_timeout)
 975                 __field(u8, discovery_retries)
 976                 __field(u8, flags)
 977         ),
 978         TP_fast_assign(
 979                 WIPHY_ASSIGN;
 980                 __entry->ret = ret;
 981                 __entry->generation = pinfo->generation;
 982                 __entry->filled = pinfo->filled;
 983                 __entry->frame_qlen = pinfo->frame_qlen;
 984                 __entry->sn = pinfo->sn;
 985                 __entry->metric = pinfo->metric;
 986                 __entry->exptime = pinfo->exptime;
 987                 __entry->discovery_timeout = pinfo->discovery_timeout;
 988                 __entry->discovery_retries = pinfo->discovery_retries;
 989                 __entry->flags = pinfo->flags;
 990         ),
 991         TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, "
 992                   "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u,"
 993                   " discovery timeout: %u, discovery retries: %u, flags: %u",
 994                   WIPHY_PR_ARG, __entry->ret, __entry->generation,
 995                   __entry->filled, __entry->frame_qlen, __entry->sn,
 996                   __entry->metric, __entry->exptime, __entry->discovery_timeout,
 997                   __entry->discovery_retries, __entry->flags)
 998 );
 999 
1000 TRACE_EVENT(rdev_return_int_mesh_config,
1001         TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf),
1002         TP_ARGS(wiphy, ret, conf),
1003         TP_STRUCT__entry(
1004                 WIPHY_ENTRY
1005                 MESH_CFG_ENTRY
1006                 __field(int, ret)
1007         ),
1008         TP_fast_assign(
1009                 WIPHY_ASSIGN;
1010                 MESH_CFG_ASSIGN;
1011                 __entry->ret = ret;
1012         ),
1013         TP_printk(WIPHY_PR_FMT ", returned: %d",
1014                   WIPHY_PR_ARG, __entry->ret)
1015 );
1016 
1017 TRACE_EVENT(rdev_update_mesh_config,
1018         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask,
1019                  const struct mesh_config *conf),
1020         TP_ARGS(wiphy, netdev, mask, conf),
1021         TP_STRUCT__entry(
1022                 WIPHY_ENTRY
1023                 NETDEV_ENTRY
1024                 MESH_CFG_ENTRY
1025                 __field(u32, mask)
1026         ),
1027         TP_fast_assign(
1028                 WIPHY_ASSIGN;
1029                 NETDEV_ASSIGN;
1030                 MESH_CFG_ASSIGN;
1031                 __entry->mask = mask;
1032         ),
1033         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mask: %u",
1034                   WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask)
1035 );
1036 
1037 TRACE_EVENT(rdev_join_mesh,
1038         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1039                  const struct mesh_config *conf,
1040                  const struct mesh_setup *setup),
1041         TP_ARGS(wiphy, netdev, conf, setup),
1042         TP_STRUCT__entry(
1043                 WIPHY_ENTRY
1044                 NETDEV_ENTRY
1045                 MESH_CFG_ENTRY
1046         ),
1047         TP_fast_assign(
1048                 WIPHY_ASSIGN;
1049                 NETDEV_ASSIGN;
1050                 MESH_CFG_ASSIGN;
1051         ),
1052         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
1053                   WIPHY_PR_ARG, NETDEV_PR_ARG)
1054 );
1055 
1056 TRACE_EVENT(rdev_change_bss,
1057         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1058                  struct bss_parameters *params),
1059         TP_ARGS(wiphy, netdev, params),
1060         TP_STRUCT__entry(
1061                 WIPHY_ENTRY
1062                 NETDEV_ENTRY
1063                 __field(int, use_cts_prot)
1064                 __field(int, use_short_preamble)
1065                 __field(int, use_short_slot_time)
1066                 __field(int, ap_isolate)
1067                 __field(int, ht_opmode)
1068         ),
1069         TP_fast_assign(
1070                 WIPHY_ASSIGN;
1071                 NETDEV_ASSIGN;
1072                 __entry->use_cts_prot = params->use_cts_prot;
1073                 __entry->use_short_preamble = params->use_short_preamble;
1074                 __entry->use_short_slot_time = params->use_short_slot_time;
1075                 __entry->ap_isolate = params->ap_isolate;
1076                 __entry->ht_opmode = params->ht_opmode;
1077         ),
1078         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", use cts prot: %d, "
1079                   "use short preamble: %d, use short slot time: %d, "
1080                   "ap isolate: %d, ht opmode: %d",
1081                   WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot,
1082                   __entry->use_short_preamble, __entry->use_short_slot_time,
1083                   __entry->ap_isolate, __entry->ht_opmode)
1084 );
1085 
1086 TRACE_EVENT(rdev_set_txq_params,
1087         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1088                  struct ieee80211_txq_params *params),
1089         TP_ARGS(wiphy, netdev, params),
1090         TP_STRUCT__entry(
1091                 WIPHY_ENTRY
1092                 NETDEV_ENTRY
1093                 __field(enum nl80211_ac, ac)
1094                 __field(u16, txop)
1095                 __field(u16, cwmin)
1096                 __field(u16, cwmax)
1097                 __field(u8, aifs)
1098         ),
1099         TP_fast_assign(
1100                 WIPHY_ASSIGN;
1101                 NETDEV_ASSIGN;
1102                 __entry->ac = params->ac;
1103                 __entry->txop = params->txop;
1104                 __entry->cwmin = params->cwmin;
1105                 __entry->cwmax = params->cwmax;
1106                 __entry->aifs = params->aifs;
1107         ),
1108         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", ac: %d, txop: %u, cwmin: %u, cwmax: %u, aifs: %u",
1109                   WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop,
1110                   __entry->cwmin, __entry->cwmax, __entry->aifs)
1111 );
1112 
1113 TRACE_EVENT(rdev_libertas_set_mesh_channel,
1114         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1115                  struct ieee80211_channel *chan),
1116         TP_ARGS(wiphy, netdev, chan),
1117         TP_STRUCT__entry(
1118                 WIPHY_ENTRY
1119                 NETDEV_ENTRY
1120                 CHAN_ENTRY
1121         ),
1122         TP_fast_assign(
1123                 WIPHY_ASSIGN;
1124                 NETDEV_ASSIGN;
1125                 CHAN_ASSIGN(chan);
1126         ),
1127         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_PR_FMT, WIPHY_PR_ARG,
1128                   NETDEV_PR_ARG, CHAN_PR_ARG)
1129 );
1130 
1131 TRACE_EVENT(rdev_set_monitor_channel,
1132         TP_PROTO(struct wiphy *wiphy,
1133                  struct cfg80211_chan_def *chandef),
1134         TP_ARGS(wiphy, chandef),
1135         TP_STRUCT__entry(
1136                 WIPHY_ENTRY
1137                 CHAN_DEF_ENTRY
1138         ),
1139         TP_fast_assign(
1140                 WIPHY_ASSIGN;
1141                 CHAN_DEF_ASSIGN(chandef);
1142         ),
1143         TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
1144                   WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
1145 );
1146 
1147 TRACE_EVENT(rdev_auth,
1148         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1149                  struct cfg80211_auth_request *req),
1150         TP_ARGS(wiphy, netdev, req),
1151         TP_STRUCT__entry(
1152                 WIPHY_ENTRY
1153                 NETDEV_ENTRY
1154                 MAC_ENTRY(bssid)
1155                 __field(enum nl80211_auth_type, auth_type)
1156         ),
1157         TP_fast_assign(
1158                 WIPHY_ASSIGN;
1159                 NETDEV_ASSIGN;
1160                 if (req->bss)
1161                         MAC_ASSIGN(bssid, req->bss->bssid);
1162                 else
1163                         eth_zero_addr(__entry->bssid);
1164                 __entry->auth_type = req->auth_type;
1165         ),
1166         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", auth type: %d, bssid: " MAC_PR_FMT,
1167                   WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type,
1168                   MAC_PR_ARG(bssid))
1169 );
1170 
1171 TRACE_EVENT(rdev_assoc,
1172         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1173                  struct cfg80211_assoc_request *req),
1174         TP_ARGS(wiphy, netdev, req),
1175         TP_STRUCT__entry(
1176                 WIPHY_ENTRY
1177                 NETDEV_ENTRY
1178                 MAC_ENTRY(bssid)
1179                 MAC_ENTRY(prev_bssid)
1180                 __field(bool, use_mfp)
1181                 __field(u32, flags)
1182         ),
1183         TP_fast_assign(
1184                 WIPHY_ASSIGN;
1185                 NETDEV_ASSIGN;
1186                 if (req->bss)
1187                         MAC_ASSIGN(bssid, req->bss->bssid);
1188                 else
1189                         eth_zero_addr(__entry->bssid);
1190                 MAC_ASSIGN(prev_bssid, req->prev_bssid);
1191                 __entry->use_mfp = req->use_mfp;
1192                 __entry->flags = req->flags;
1193         ),
1194         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
1195                   ", previous bssid: " MAC_PR_FMT ", use mfp: %s, flags: %u",
1196                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1197                   MAC_PR_ARG(prev_bssid), BOOL_TO_STR(__entry->use_mfp),
1198                   __entry->flags)
1199 );
1200 
1201 TRACE_EVENT(rdev_deauth,
1202         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1203                  struct cfg80211_deauth_request *req),
1204         TP_ARGS(wiphy, netdev, req),
1205         TP_STRUCT__entry(
1206                 WIPHY_ENTRY
1207                 NETDEV_ENTRY
1208                 MAC_ENTRY(bssid)
1209                 __field(u16, reason_code)
1210         ),
1211         TP_fast_assign(
1212                 WIPHY_ASSIGN;
1213                 NETDEV_ASSIGN;
1214                 MAC_ASSIGN(bssid, req->bssid);
1215                 __entry->reason_code = req->reason_code;
1216         ),
1217         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", reason: %u",
1218                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1219                   __entry->reason_code)
1220 );
1221 
1222 TRACE_EVENT(rdev_disassoc,
1223         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1224                  struct cfg80211_disassoc_request *req),
1225         TP_ARGS(wiphy, netdev, req),
1226         TP_STRUCT__entry(
1227                 WIPHY_ENTRY
1228                 NETDEV_ENTRY
1229                 MAC_ENTRY(bssid)
1230                 __field(u16, reason_code)
1231                 __field(bool, local_state_change)
1232         ),
1233         TP_fast_assign(
1234                 WIPHY_ASSIGN;
1235                 NETDEV_ASSIGN;
1236                 if (req->bss)
1237                         MAC_ASSIGN(bssid, req->bss->bssid);
1238                 else
1239                         eth_zero_addr(__entry->bssid);
1240                 __entry->reason_code = req->reason_code;
1241                 __entry->local_state_change = req->local_state_change;
1242         ),
1243         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
1244                   ", reason: %u, local state change: %s",
1245                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid),
1246                   __entry->reason_code,
1247                   BOOL_TO_STR(__entry->local_state_change))
1248 );
1249 
1250 TRACE_EVENT(rdev_mgmt_tx_cancel_wait,
1251         TP_PROTO(struct wiphy *wiphy,
1252                  struct wireless_dev *wdev, u64 cookie),
1253         TP_ARGS(wiphy, wdev, cookie),
1254         TP_STRUCT__entry(
1255                 WIPHY_ENTRY
1256                 WDEV_ENTRY
1257                 __field(u64, cookie)
1258         ),
1259         TP_fast_assign(
1260                 WIPHY_ASSIGN;
1261                 WDEV_ASSIGN;
1262                 __entry->cookie = cookie;
1263         ),
1264         TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu ",
1265                   WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1266 );
1267 
1268 TRACE_EVENT(rdev_set_power_mgmt,
1269         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1270                  bool enabled, int timeout),
1271         TP_ARGS(wiphy, netdev, enabled, timeout),
1272         TP_STRUCT__entry(
1273                 WIPHY_ENTRY
1274                 NETDEV_ENTRY
1275                 __field(bool, enabled)
1276                 __field(int, timeout)
1277         ),
1278         TP_fast_assign(
1279                 WIPHY_ASSIGN;
1280                 NETDEV_ASSIGN;
1281                 __entry->enabled = enabled;
1282                 __entry->timeout = timeout;
1283         ),
1284         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %senabled, timeout: %d ",
1285                   WIPHY_PR_ARG, NETDEV_PR_ARG,
1286                   __entry->enabled ? "" : "not ", __entry->timeout)
1287 );
1288 
1289 TRACE_EVENT(rdev_connect,
1290         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1291                  struct cfg80211_connect_params *sme),
1292         TP_ARGS(wiphy, netdev, sme),
1293         TP_STRUCT__entry(
1294                 WIPHY_ENTRY
1295                 NETDEV_ENTRY
1296                 MAC_ENTRY(bssid)
1297                 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1298                 __field(enum nl80211_auth_type, auth_type)
1299                 __field(bool, privacy)
1300                 __field(u32, wpa_versions)
1301                 __field(u32, flags)
1302                 MAC_ENTRY(prev_bssid)
1303         ),
1304         TP_fast_assign(
1305                 WIPHY_ASSIGN;
1306                 NETDEV_ASSIGN;
1307                 MAC_ASSIGN(bssid, sme->bssid);
1308                 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1309                 memcpy(__entry->ssid, sme->ssid, sme->ssid_len);
1310                 __entry->auth_type = sme->auth_type;
1311                 __entry->privacy = sme->privacy;
1312                 __entry->wpa_versions = sme->crypto.wpa_versions;
1313                 __entry->flags = sme->flags;
1314                 MAC_ASSIGN(prev_bssid, sme->prev_bssid);
1315         ),
1316         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
1317                   ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, "
1318                   "flags: %u, previous bssid: " MAC_PR_FMT,
1319                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid,
1320                   __entry->auth_type, BOOL_TO_STR(__entry->privacy),
1321                   __entry->wpa_versions, __entry->flags, MAC_PR_ARG(prev_bssid))
1322 );
1323 
1324 TRACE_EVENT(rdev_update_connect_params,
1325         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1326                  struct cfg80211_connect_params *sme, u32 changed),
1327         TP_ARGS(wiphy, netdev, sme, changed),
1328         TP_STRUCT__entry(
1329                 WIPHY_ENTRY
1330                 NETDEV_ENTRY
1331                 __field(u32, changed)
1332         ),
1333         TP_fast_assign(
1334                 WIPHY_ASSIGN;
1335                 NETDEV_ASSIGN;
1336                 __entry->changed = changed;
1337         ),
1338         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", parameters changed: %u",
1339                   WIPHY_PR_ARG, NETDEV_PR_ARG,  __entry->changed)
1340 );
1341 
1342 TRACE_EVENT(rdev_set_cqm_rssi_config,
1343         TP_PROTO(struct wiphy *wiphy,
1344                  struct net_device *netdev, s32 rssi_thold,
1345                  u32 rssi_hyst),
1346         TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst),
1347         TP_STRUCT__entry(
1348                 WIPHY_ENTRY
1349                 NETDEV_ENTRY
1350                 __field(s32, rssi_thold)
1351                 __field(u32, rssi_hyst)
1352         ),
1353         TP_fast_assign(
1354                 WIPHY_ASSIGN;
1355                 NETDEV_ASSIGN;
1356                 __entry->rssi_thold = rssi_thold;
1357                 __entry->rssi_hyst = rssi_hyst;
1358         ),
1359         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
1360                   ", rssi_thold: %d, rssi_hyst: %u ",
1361                   WIPHY_PR_ARG, NETDEV_PR_ARG,
1362                  __entry->rssi_thold, __entry->rssi_hyst)
1363 );
1364 
1365 TRACE_EVENT(rdev_set_cqm_rssi_range_config,
1366         TP_PROTO(struct wiphy *wiphy,
1367                  struct net_device *netdev, s32 low, s32 high),
1368         TP_ARGS(wiphy, netdev, low, high),
1369         TP_STRUCT__entry(
1370                 WIPHY_ENTRY
1371                 NETDEV_ENTRY
1372                 __field(s32, rssi_low)
1373                 __field(s32, rssi_high)
1374         ),
1375         TP_fast_assign(
1376                 WIPHY_ASSIGN;
1377                 NETDEV_ASSIGN;
1378                 __entry->rssi_low = low;
1379                 __entry->rssi_high = high;
1380         ),
1381         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT
1382                   ", range: %d - %d ",
1383                   WIPHY_PR_ARG, NETDEV_PR_ARG,
1384                   __entry->rssi_low, __entry->rssi_high)
1385 );
1386 
1387 TRACE_EVENT(rdev_set_cqm_txe_config,
1388         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate,
1389                  u32 pkts, u32 intvl),
1390         TP_ARGS(wiphy, netdev, rate, pkts, intvl),
1391         TP_STRUCT__entry(
1392                 WIPHY_ENTRY
1393                 NETDEV_ENTRY
1394                 __field(u32, rate)
1395                 __field(u32, pkts)
1396                 __field(u32, intvl)
1397         ),
1398         TP_fast_assign(
1399                 WIPHY_ASSIGN;
1400                 NETDEV_ASSIGN;
1401                 __entry->rate = rate;
1402                 __entry->pkts = pkts;
1403                 __entry->intvl = intvl;
1404         ),
1405         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u",
1406                   WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts,
1407                   __entry->intvl)
1408 );
1409 
1410 TRACE_EVENT(rdev_disconnect,
1411         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1412                  u16 reason_code),
1413         TP_ARGS(wiphy, netdev, reason_code),
1414         TP_STRUCT__entry(
1415                 WIPHY_ENTRY
1416                 NETDEV_ENTRY
1417                 __field(u16, reason_code)
1418         ),
1419         TP_fast_assign(
1420                 WIPHY_ASSIGN;
1421                 NETDEV_ASSIGN;
1422                 __entry->reason_code = reason_code;
1423         ),
1424         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG,
1425                   NETDEV_PR_ARG, __entry->reason_code)
1426 );
1427 
1428 TRACE_EVENT(rdev_join_ibss,
1429         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1430                  struct cfg80211_ibss_params *params),
1431         TP_ARGS(wiphy, netdev, params),
1432         TP_STRUCT__entry(
1433                 WIPHY_ENTRY
1434                 NETDEV_ENTRY
1435                 MAC_ENTRY(bssid)
1436                 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1)
1437         ),
1438         TP_fast_assign(
1439                 WIPHY_ASSIGN;
1440                 NETDEV_ASSIGN;
1441                 MAC_ASSIGN(bssid, params->bssid);
1442                 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
1443                 memcpy(__entry->ssid, params->ssid, params->ssid_len);
1444         ),
1445         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s",
1446                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid)
1447 );
1448 
1449 TRACE_EVENT(rdev_join_ocb,
1450         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1451                  const struct ocb_setup *setup),
1452         TP_ARGS(wiphy, netdev, setup),
1453         TP_STRUCT__entry(
1454                 WIPHY_ENTRY
1455                 NETDEV_ENTRY
1456         ),
1457         TP_fast_assign(
1458                 WIPHY_ASSIGN;
1459                 NETDEV_ASSIGN;
1460         ),
1461         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT,
1462                   WIPHY_PR_ARG, NETDEV_PR_ARG)
1463 );
1464 
1465 TRACE_EVENT(rdev_set_wiphy_params,
1466         TP_PROTO(struct wiphy *wiphy, u32 changed),
1467         TP_ARGS(wiphy, changed),
1468         TP_STRUCT__entry(
1469                 WIPHY_ENTRY
1470                 __field(u32, changed)
1471         ),
1472         TP_fast_assign(
1473                 WIPHY_ASSIGN;
1474                 __entry->changed = changed;
1475         ),
1476         TP_printk(WIPHY_PR_FMT ", changed: %u",
1477                   WIPHY_PR_ARG, __entry->changed)
1478 );
1479 
1480 DEFINE_EVENT(wiphy_wdev_evt, rdev_get_tx_power,
1481         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1482         TP_ARGS(wiphy, wdev)
1483 );
1484 
1485 TRACE_EVENT(rdev_set_tx_power,
1486         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1487                  enum nl80211_tx_power_setting type, int mbm),
1488         TP_ARGS(wiphy, wdev, type, mbm),
1489         TP_STRUCT__entry(
1490                 WIPHY_ENTRY
1491                 WDEV_ENTRY
1492                 __field(enum nl80211_tx_power_setting, type)
1493                 __field(int, mbm)
1494         ),
1495         TP_fast_assign(
1496                 WIPHY_ASSIGN;
1497                 WDEV_ASSIGN;
1498                 __entry->type = type;
1499                 __entry->mbm = mbm;
1500         ),
1501         TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d",
1502                   WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm)
1503 );
1504 
1505 TRACE_EVENT(rdev_return_int_int,
1506         TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill),
1507         TP_ARGS(wiphy, func_ret, func_fill),
1508         TP_STRUCT__entry(
1509                 WIPHY_ENTRY
1510                 __field(int, func_ret)
1511                 __field(int, func_fill)
1512         ),
1513         TP_fast_assign(
1514                 WIPHY_ASSIGN;
1515                 __entry->func_ret = func_ret;
1516                 __entry->func_fill = func_fill;
1517         ),
1518         TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d",
1519                   WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill)
1520 );
1521 
1522 #ifdef CONFIG_NL80211_TESTMODE
1523 TRACE_EVENT(rdev_testmode_cmd,
1524         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1525         TP_ARGS(wiphy, wdev),
1526         TP_STRUCT__entry(
1527                 WIPHY_ENTRY
1528                 WDEV_ENTRY
1529         ),
1530         TP_fast_assign(
1531                 WIPHY_ASSIGN;
1532                 WDEV_ASSIGN;
1533         ),
1534         TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
1535 );
1536 
1537 TRACE_EVENT(rdev_testmode_dump,
1538         TP_PROTO(struct wiphy *wiphy),
1539         TP_ARGS(wiphy),
1540         TP_STRUCT__entry(
1541                 WIPHY_ENTRY
1542         ),
1543         TP_fast_assign(
1544                 WIPHY_ASSIGN;
1545         ),
1546         TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
1547 );
1548 #endif /* CONFIG_NL80211_TESTMODE */
1549 
1550 TRACE_EVENT(rdev_set_bitrate_mask,
1551         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1552                  const u8 *peer, const struct cfg80211_bitrate_mask *mask),
1553         TP_ARGS(wiphy, netdev, peer, mask),
1554         TP_STRUCT__entry(
1555                 WIPHY_ENTRY
1556                 NETDEV_ENTRY
1557                 MAC_ENTRY(peer)
1558         ),
1559         TP_fast_assign(
1560                 WIPHY_ASSIGN;
1561                 NETDEV_ASSIGN;
1562                 MAC_ASSIGN(peer, peer);
1563         ),
1564         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
1565                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1566 );
1567 
1568 TRACE_EVENT(rdev_mgmt_frame_register,
1569         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1570                  u16 frame_type, bool reg),
1571         TP_ARGS(wiphy, wdev, frame_type, reg),
1572         TP_STRUCT__entry(
1573                 WIPHY_ENTRY
1574                 WDEV_ENTRY
1575                 __field(u16, frame_type)
1576                 __field(bool, reg)
1577         ),
1578         TP_fast_assign(
1579                 WIPHY_ASSIGN;
1580                 WDEV_ASSIGN;
1581                 __entry->frame_type = frame_type;
1582                 __entry->reg = reg;
1583         ),
1584         TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", frame_type: 0x%.2x, reg: %s ",
1585                   WIPHY_PR_ARG, WDEV_PR_ARG, __entry->frame_type,
1586                   __entry->reg ? "true" : "false")
1587 );
1588 
1589 TRACE_EVENT(rdev_return_int_tx_rx,
1590         TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx),
1591         TP_ARGS(wiphy, ret, tx, rx),
1592         TP_STRUCT__entry(
1593                 WIPHY_ENTRY
1594                 __field(int, ret)
1595                 __field(u32, tx)
1596                 __field(u32, rx)
1597         ),
1598         TP_fast_assign(
1599                 WIPHY_ASSIGN;
1600                 __entry->ret = ret;
1601                 __entry->tx = tx;
1602                 __entry->rx = rx;
1603         ),
1604         TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u",
1605                   WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx)
1606 );
1607 
1608 TRACE_EVENT(rdev_return_void_tx_rx,
1609         TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max,
1610                  u32 rx, u32 rx_max),
1611         TP_ARGS(wiphy, tx, tx_max, rx, rx_max),
1612         TP_STRUCT__entry(
1613                 WIPHY_ENTRY
1614                 __field(u32, tx)
1615                 __field(u32, tx_max)
1616                 __field(u32, rx)
1617                 __field(u32, rx_max)
1618         ),
1619         TP_fast_assign(
1620                 WIPHY_ASSIGN;
1621                 __entry->tx = tx;
1622                 __entry->tx_max = tx_max;
1623                 __entry->rx = rx;
1624                 __entry->rx_max = rx_max;
1625         ),
1626         TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ",
1627                   WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx,
1628                   __entry->rx_max)
1629 );
1630 
1631 DECLARE_EVENT_CLASS(tx_rx_evt,
1632         TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1633         TP_ARGS(wiphy, rx, tx),
1634         TP_STRUCT__entry(
1635                 WIPHY_ENTRY
1636                 __field(u32, tx)
1637                 __field(u32, rx)
1638         ),
1639         TP_fast_assign(
1640                 WIPHY_ASSIGN;
1641                 __entry->tx = tx;
1642                 __entry->rx = rx;
1643         ),
1644         TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ",
1645                   WIPHY_PR_ARG, __entry->tx, __entry->rx)
1646 );
1647 
1648 DEFINE_EVENT(tx_rx_evt, rdev_set_antenna,
1649         TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx),
1650         TP_ARGS(wiphy, rx, tx)
1651 );
1652 
1653 DECLARE_EVENT_CLASS(wiphy_netdev_id_evt,
1654         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 id),
1655         TP_ARGS(wiphy, netdev, id),
1656         TP_STRUCT__entry(
1657                 WIPHY_ENTRY
1658                 NETDEV_ENTRY
1659                 __field(u64, id)
1660         ),
1661         TP_fast_assign(
1662                 WIPHY_ASSIGN;
1663                 NETDEV_ASSIGN;
1664                 __entry->id = id;
1665         ),
1666         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", id: %llu",
1667                   WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->id)
1668 );
1669 
1670 DEFINE_EVENT(wiphy_netdev_id_evt, rdev_sched_scan_start,
1671         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 id),
1672         TP_ARGS(wiphy, netdev, id)
1673 );
1674 
1675 DEFINE_EVENT(wiphy_netdev_id_evt, rdev_sched_scan_stop,
1676         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u64 id),
1677         TP_ARGS(wiphy, netdev, id)
1678 );
1679 
1680 TRACE_EVENT(rdev_tdls_mgmt,
1681         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1682                  u8 *peer, u8 action_code, u8 dialog_token,
1683                  u16 status_code, u32 peer_capability,
1684                  bool initiator, const u8 *buf, size_t len),
1685         TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code,
1686                 peer_capability, initiator, buf, len),
1687         TP_STRUCT__entry(
1688                 WIPHY_ENTRY
1689                 NETDEV_ENTRY
1690                 MAC_ENTRY(peer)
1691                 __field(u8, action_code)
1692                 __field(u8, dialog_token)
1693                 __field(u16, status_code)
1694                 __field(u32, peer_capability)
1695                 __field(bool, initiator)
1696                 __dynamic_array(u8, buf, len)
1697         ),
1698         TP_fast_assign(
1699                 WIPHY_ASSIGN;
1700                 NETDEV_ASSIGN;
1701                 MAC_ASSIGN(peer, peer);
1702                 __entry->action_code = action_code;
1703                 __entry->dialog_token = dialog_token;
1704                 __entry->status_code = status_code;
1705                 __entry->peer_capability = peer_capability;
1706                 __entry->initiator = initiator;
1707                 memcpy(__get_dynamic_array(buf), buf, len);
1708         ),
1709         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", action_code: %u, "
1710                   "dialog_token: %u, status_code: %u, peer_capability: %u "
1711                   "initiator: %s buf: %#.2x ",
1712                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
1713                   __entry->action_code, __entry->dialog_token,
1714                   __entry->status_code, __entry->peer_capability,
1715                   BOOL_TO_STR(__entry->initiator),
1716                   ((u8 *)__get_dynamic_array(buf))[0])
1717 );
1718 
1719 TRACE_EVENT(rdev_dump_survey,
1720         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx),
1721         TP_ARGS(wiphy, netdev, _idx),
1722         TP_STRUCT__entry(
1723                 WIPHY_ENTRY
1724                 NETDEV_ENTRY
1725                 __field(int, idx)
1726         ),
1727         TP_fast_assign(
1728                 WIPHY_ASSIGN;
1729                 NETDEV_ASSIGN;
1730                 __entry->idx = _idx;
1731         ),
1732         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d",
1733                   WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx)
1734 );
1735 
1736 TRACE_EVENT(rdev_return_int_survey_info,
1737         TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info),
1738         TP_ARGS(wiphy, ret, info),
1739         TP_STRUCT__entry(
1740                 WIPHY_ENTRY
1741                 CHAN_ENTRY
1742                 __field(int, ret)
1743                 __field(u64, time)
1744                 __field(u64, time_busy)
1745                 __field(u64, time_ext_busy)
1746                 __field(u64, time_rx)
1747                 __field(u64, time_tx)
1748                 __field(u64, time_scan)
1749                 __field(u32, filled)
1750                 __field(s8, noise)
1751         ),
1752         TP_fast_assign(
1753                 WIPHY_ASSIGN;
1754                 CHAN_ASSIGN(info->channel);
1755                 __entry->ret = ret;
1756                 __entry->time = info->time;
1757                 __entry->time_busy = info->time_busy;
1758                 __entry->time_ext_busy = info->time_ext_busy;
1759                 __entry->time_rx = info->time_rx;
1760                 __entry->time_tx = info->time_tx;
1761                 __entry->time_scan = info->time_scan;
1762                 __entry->filled = info->filled;
1763                 __entry->noise = info->noise;
1764         ),
1765         TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT
1766                   ", channel time: %llu, channel time busy: %llu, "
1767                   "channel time extension busy: %llu, channel time rx: %llu, "
1768                   "channel time tx: %llu, scan time: %llu, filled: %u, noise: %d",
1769                   WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG,
1770                   __entry->time, __entry->time_busy,
1771                   __entry->time_ext_busy, __entry->time_rx,
1772                   __entry->time_tx, __entry->time_scan,
1773                   __entry->filled, __entry->noise)
1774 );
1775 
1776 TRACE_EVENT(rdev_tdls_oper,
1777         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1778                  u8 *peer, enum nl80211_tdls_operation oper),
1779         TP_ARGS(wiphy, netdev, peer, oper),
1780         TP_STRUCT__entry(
1781                 WIPHY_ENTRY
1782                 NETDEV_ENTRY
1783                 MAC_ENTRY(peer)
1784                 __field(enum nl80211_tdls_operation, oper)
1785         ),
1786         TP_fast_assign(
1787                 WIPHY_ASSIGN;
1788                 NETDEV_ASSIGN;
1789                 MAC_ASSIGN(peer, peer);
1790                 __entry->oper = oper;
1791         ),
1792         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", oper: %d",
1793                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper)
1794 );
1795 
1796 DECLARE_EVENT_CLASS(rdev_pmksa,
1797         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1798                  struct cfg80211_pmksa *pmksa),
1799         TP_ARGS(wiphy, netdev, pmksa),
1800         TP_STRUCT__entry(
1801                 WIPHY_ENTRY
1802                 NETDEV_ENTRY
1803                 MAC_ENTRY(bssid)
1804         ),
1805         TP_fast_assign(
1806                 WIPHY_ASSIGN;
1807                 NETDEV_ASSIGN;
1808                 MAC_ASSIGN(bssid, pmksa->bssid);
1809         ),
1810         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT,
1811                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid))
1812 );
1813 
1814 TRACE_EVENT(rdev_probe_client,
1815         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1816                  const u8 *peer),
1817         TP_ARGS(wiphy, netdev, peer),
1818         TP_STRUCT__entry(
1819                 WIPHY_ENTRY
1820                 NETDEV_ENTRY
1821                 MAC_ENTRY(peer)
1822         ),
1823         TP_fast_assign(
1824                 WIPHY_ASSIGN;
1825                 NETDEV_ASSIGN;
1826                 MAC_ASSIGN(peer, peer);
1827         ),
1828         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
1829                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
1830 );
1831 
1832 DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa,
1833         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1834                  struct cfg80211_pmksa *pmksa),
1835         TP_ARGS(wiphy, netdev, pmksa)
1836 );
1837 
1838 DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa,
1839         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1840                  struct cfg80211_pmksa *pmksa),
1841         TP_ARGS(wiphy, netdev, pmksa)
1842 );
1843 
1844 TRACE_EVENT(rdev_remain_on_channel,
1845         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1846                  struct ieee80211_channel *chan,
1847                  unsigned int duration),
1848         TP_ARGS(wiphy, wdev, chan, duration),
1849         TP_STRUCT__entry(
1850                 WIPHY_ENTRY
1851                 WDEV_ENTRY
1852                 CHAN_ENTRY
1853                 __field(unsigned int, duration)
1854         ),
1855         TP_fast_assign(
1856                 WIPHY_ASSIGN;
1857                 WDEV_ASSIGN;
1858                 CHAN_ASSIGN(chan);
1859                 __entry->duration = duration;
1860         ),
1861         TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", duration: %u",
1862                   WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration)
1863 );
1864 
1865 TRACE_EVENT(rdev_return_int_cookie,
1866         TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie),
1867         TP_ARGS(wiphy, ret, cookie),
1868         TP_STRUCT__entry(
1869                 WIPHY_ENTRY
1870                 __field(int, ret)
1871                 __field(u64, cookie)
1872         ),
1873         TP_fast_assign(
1874                 WIPHY_ASSIGN;
1875                 __entry->ret = ret;
1876                 __entry->cookie = cookie;
1877         ),
1878         TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu",
1879                   WIPHY_PR_ARG, __entry->ret, __entry->cookie)
1880 );
1881 
1882 TRACE_EVENT(rdev_cancel_remain_on_channel,
1883         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
1884         TP_ARGS(wiphy, wdev, cookie),
1885         TP_STRUCT__entry(
1886                 WIPHY_ENTRY
1887                 WDEV_ENTRY
1888                 __field(u64, cookie)
1889         ),
1890         TP_fast_assign(
1891                 WIPHY_ASSIGN;
1892                 WDEV_ASSIGN;
1893                 __entry->cookie = cookie;
1894         ),
1895         TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu",
1896                   WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1897 );
1898 
1899 TRACE_EVENT(rdev_mgmt_tx,
1900         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1901                  struct cfg80211_mgmt_tx_params *params),
1902         TP_ARGS(wiphy, wdev, params),
1903         TP_STRUCT__entry(
1904                 WIPHY_ENTRY
1905                 WDEV_ENTRY
1906                 CHAN_ENTRY
1907                 __field(bool, offchan)
1908                 __field(unsigned int, wait)
1909                 __field(bool, no_cck)
1910                 __field(bool, dont_wait_for_ack)
1911         ),
1912         TP_fast_assign(
1913                 WIPHY_ASSIGN;
1914                 WDEV_ASSIGN;
1915                 CHAN_ASSIGN(params->chan);
1916                 __entry->offchan = params->offchan;
1917                 __entry->wait = params->wait;
1918                 __entry->no_cck = params->no_cck;
1919                 __entry->dont_wait_for_ack = params->dont_wait_for_ack;
1920         ),
1921         TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s,"
1922                   " wait: %u, no cck: %s, dont wait for ack: %s",
1923                   WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG,
1924                   BOOL_TO_STR(__entry->offchan), __entry->wait,
1925                   BOOL_TO_STR(__entry->no_cck),
1926                   BOOL_TO_STR(__entry->dont_wait_for_ack))
1927 );
1928 
1929 TRACE_EVENT(rdev_tx_control_port,
1930         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1931                  const u8 *buf, size_t len, const u8 *dest, __be16 proto,
1932                  bool unencrypted),
1933         TP_ARGS(wiphy, netdev, buf, len, dest, proto, unencrypted),
1934         TP_STRUCT__entry(
1935                 WIPHY_ENTRY
1936                 NETDEV_ENTRY
1937                 MAC_ENTRY(dest)
1938                 __field(__be16, proto)
1939                 __field(bool, unencrypted)
1940         ),
1941         TP_fast_assign(
1942                 WIPHY_ASSIGN;
1943                 NETDEV_ASSIGN;
1944                 MAC_ASSIGN(dest, dest);
1945                 __entry->proto = proto;
1946                 __entry->unencrypted = unencrypted;
1947         ),
1948         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ","
1949                   " proto: 0x%x, unencrypted: %s",
1950                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dest),
1951                   be16_to_cpu(__entry->proto),
1952                   BOOL_TO_STR(__entry->unencrypted))
1953 );
1954 
1955 TRACE_EVENT(rdev_set_noack_map,
1956         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
1957                  u16 noack_map),
1958         TP_ARGS(wiphy, netdev, noack_map),
1959         TP_STRUCT__entry(
1960                 WIPHY_ENTRY
1961                 NETDEV_ENTRY
1962                 __field(u16, noack_map)
1963         ),
1964         TP_fast_assign(
1965                 WIPHY_ASSIGN;
1966                 NETDEV_ASSIGN;
1967                 __entry->noack_map = noack_map;
1968         ),
1969         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", noack_map: %u",
1970                   WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map)
1971 );
1972 
1973 DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel,
1974         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
1975         TP_ARGS(wiphy, wdev)
1976 );
1977 
1978 TRACE_EVENT(rdev_return_chandef,
1979         TP_PROTO(struct wiphy *wiphy, int ret,
1980                  struct cfg80211_chan_def *chandef),
1981         TP_ARGS(wiphy, ret, chandef),
1982         TP_STRUCT__entry(
1983                 WIPHY_ENTRY
1984                 __field(int, ret)
1985                 CHAN_DEF_ENTRY
1986         ),
1987         TP_fast_assign(
1988                 WIPHY_ASSIGN;
1989                 if (ret == 0)
1990                         CHAN_DEF_ASSIGN(chandef);
1991                 else
1992                         CHAN_DEF_ASSIGN((struct cfg80211_chan_def *)NULL);
1993                 __entry->ret = ret;
1994         ),
1995         TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", ret: %d",
1996                   WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->ret)
1997 );
1998 
1999 DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device,
2000         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2001         TP_ARGS(wiphy, wdev)
2002 );
2003 
2004 DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device,
2005         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2006         TP_ARGS(wiphy, wdev)
2007 );
2008 
2009 TRACE_EVENT(rdev_start_nan,
2010         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2011                  struct cfg80211_nan_conf *conf),
2012         TP_ARGS(wiphy, wdev, conf),
2013         TP_STRUCT__entry(
2014                 WIPHY_ENTRY
2015                 WDEV_ENTRY
2016                 __field(u8, master_pref)
2017                 __field(u8, bands);
2018         ),
2019         TP_fast_assign(
2020                 WIPHY_ASSIGN;
2021                 WDEV_ASSIGN;
2022                 __entry->master_pref = conf->master_pref;
2023                 __entry->bands = conf->bands;
2024         ),
2025         TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
2026                   ", master preference: %u, bands: 0x%0x",
2027                   WIPHY_PR_ARG, WDEV_PR_ARG, __entry->master_pref,
2028                   __entry->bands)
2029 );
2030 
2031 TRACE_EVENT(rdev_nan_change_conf,
2032         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2033                  struct cfg80211_nan_conf *conf, u32 changes),
2034         TP_ARGS(wiphy, wdev, conf, changes),
2035         TP_STRUCT__entry(
2036                 WIPHY_ENTRY
2037                 WDEV_ENTRY
2038                 __field(u8, master_pref)
2039                 __field(u8, bands);
2040                 __field(u32, changes);
2041         ),
2042         TP_fast_assign(
2043                 WIPHY_ASSIGN;
2044                 WDEV_ASSIGN;
2045                 __entry->master_pref = conf->master_pref;
2046                 __entry->bands = conf->bands;
2047                 __entry->changes = changes;
2048         ),
2049         TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT
2050                   ", master preference: %u, bands: 0x%0x, changes: %x",
2051                   WIPHY_PR_ARG, WDEV_PR_ARG, __entry->master_pref,
2052                   __entry->bands, __entry->changes)
2053 );
2054 
2055 DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_nan,
2056         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2057         TP_ARGS(wiphy, wdev)
2058 );
2059 
2060 TRACE_EVENT(rdev_add_nan_func,
2061         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2062                  const struct cfg80211_nan_func *func),
2063         TP_ARGS(wiphy, wdev, func),
2064         TP_STRUCT__entry(
2065                 WIPHY_ENTRY
2066                 WDEV_ENTRY
2067                 __field(u8, func_type)
2068                 __field(u64, cookie)
2069         ),
2070         TP_fast_assign(
2071                 WIPHY_ASSIGN;
2072                 WDEV_ASSIGN;
2073                 __entry->func_type = func->type;
2074                 __entry->cookie = func->cookie
2075         ),
2076         TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type=%u, cookie=%llu",
2077                   WIPHY_PR_ARG, WDEV_PR_ARG, __entry->func_type,
2078                   __entry->cookie)
2079 );
2080 
2081 TRACE_EVENT(rdev_del_nan_func,
2082         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2083                  u64 cookie),
2084         TP_ARGS(wiphy, wdev, cookie),
2085         TP_STRUCT__entry(
2086                 WIPHY_ENTRY
2087                 WDEV_ENTRY
2088                 __field(u64, cookie)
2089         ),
2090         TP_fast_assign(
2091                 WIPHY_ASSIGN;
2092                 WDEV_ASSIGN;
2093                 __entry->cookie = cookie;
2094         ),
2095         TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie=%llu",
2096                   WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
2097 );
2098 
2099 TRACE_EVENT(rdev_set_mac_acl,
2100         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2101                  struct cfg80211_acl_data *params),
2102         TP_ARGS(wiphy, netdev, params),
2103         TP_STRUCT__entry(
2104                 WIPHY_ENTRY
2105                 NETDEV_ENTRY
2106                 __field(u32, acl_policy)
2107         ),
2108         TP_fast_assign(
2109                 WIPHY_ASSIGN;
2110                 NETDEV_ASSIGN;
2111                 __entry->acl_policy = params->acl_policy;
2112         ),
2113         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", acl policy: %d",
2114                   WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->acl_policy)
2115 );
2116 
2117 TRACE_EVENT(rdev_update_ft_ies,
2118         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2119                  struct cfg80211_update_ft_ies_params *ftie),
2120         TP_ARGS(wiphy, netdev, ftie),
2121         TP_STRUCT__entry(
2122                 WIPHY_ENTRY
2123                 NETDEV_ENTRY
2124                 __field(u16, md)
2125                 __dynamic_array(u8, ie, ftie->ie_len)
2126         ),
2127         TP_fast_assign(
2128                 WIPHY_ASSIGN;
2129                 NETDEV_ASSIGN;
2130                 __entry->md = ftie->md;
2131                 memcpy(__get_dynamic_array(ie), ftie->ie, ftie->ie_len);
2132         ),
2133         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", md: 0x%x",
2134                   WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->md)
2135 );
2136 
2137 TRACE_EVENT(rdev_crit_proto_start,
2138         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
2139                  enum nl80211_crit_proto_id protocol, u16 duration),
2140         TP_ARGS(wiphy, wdev, protocol, duration),
2141         TP_STRUCT__entry(
2142                 WIPHY_ENTRY
2143                 WDEV_ENTRY
2144                 __field(u16, proto)
2145                 __field(u16, duration)
2146         ),
2147         TP_fast_assign(
2148                 WIPHY_ASSIGN;
2149                 WDEV_ASSIGN;
2150                 __entry->proto = protocol;
2151                 __entry->duration = duration;
2152         ),
2153         TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", proto=%x, duration=%u",
2154                   WIPHY_PR_ARG, WDEV_PR_ARG, __entry->proto, __entry->duration)
2155 );
2156 
2157 TRACE_EVENT(rdev_crit_proto_stop,
2158         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2159         TP_ARGS(wiphy, wdev),
2160         TP_STRUCT__entry(
2161                 WIPHY_ENTRY
2162                 WDEV_ENTRY
2163         ),
2164         TP_fast_assign(
2165                 WIPHY_ASSIGN;
2166                 WDEV_ASSIGN;
2167         ),
2168         TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
2169                   WIPHY_PR_ARG, WDEV_PR_ARG)
2170 );
2171 
2172 TRACE_EVENT(rdev_channel_switch,
2173         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2174                  struct cfg80211_csa_settings *params),
2175         TP_ARGS(wiphy, netdev, params),
2176         TP_STRUCT__entry(
2177                 WIPHY_ENTRY
2178                 NETDEV_ENTRY
2179                 CHAN_DEF_ENTRY
2180                 __field(bool, radar_required)
2181                 __field(bool, block_tx)
2182                 __field(u8, count)
2183                 __dynamic_array(u16, bcn_ofs, params->n_counter_offsets_beacon)
2184                 __dynamic_array(u16, pres_ofs, params->n_counter_offsets_presp)
2185         ),
2186         TP_fast_assign(
2187                 WIPHY_ASSIGN;
2188                 NETDEV_ASSIGN;
2189                 CHAN_DEF_ASSIGN(&params->chandef);
2190                 __entry->radar_required = params->radar_required;
2191                 __entry->block_tx = params->block_tx;
2192                 __entry->count = params->count;
2193                 memcpy(__get_dynamic_array(bcn_ofs),
2194                        params->counter_offsets_beacon,
2195                        params->n_counter_offsets_beacon * sizeof(u16));
2196 
2197                 /* probe response offsets are optional */
2198                 if (params->n_counter_offsets_presp)
2199                         memcpy(__get_dynamic_array(pres_ofs),
2200                                params->counter_offsets_presp,
2201                                params->n_counter_offsets_presp * sizeof(u16));
2202         ),
2203         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
2204                   ", block_tx: %d, count: %u, radar_required: %d",
2205                   WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
2206                   __entry->block_tx, __entry->count, __entry->radar_required)
2207 );
2208 
2209 TRACE_EVENT(rdev_set_qos_map,
2210         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2211                  struct cfg80211_qos_map *qos_map),
2212         TP_ARGS(wiphy, netdev, qos_map),
2213         TP_STRUCT__entry(
2214                 WIPHY_ENTRY
2215                 NETDEV_ENTRY
2216                 QOS_MAP_ENTRY
2217         ),
2218         TP_fast_assign(
2219                 WIPHY_ASSIGN;
2220                 NETDEV_ASSIGN;
2221                 QOS_MAP_ASSIGN(qos_map);
2222         ),
2223         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", num_des: %u",
2224                   WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->num_des)
2225 );
2226 
2227 TRACE_EVENT(rdev_set_ap_chanwidth,
2228         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2229                  struct cfg80211_chan_def *chandef),
2230         TP_ARGS(wiphy, netdev, chandef),
2231         TP_STRUCT__entry(
2232                 WIPHY_ENTRY
2233                 NETDEV_ENTRY
2234                 CHAN_DEF_ENTRY
2235         ),
2236         TP_fast_assign(
2237                 WIPHY_ASSIGN;
2238                 NETDEV_ASSIGN;
2239                 CHAN_DEF_ASSIGN(chandef);
2240         ),
2241         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2242                   WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
2243 );
2244 
2245 TRACE_EVENT(rdev_add_tx_ts,
2246         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2247                  u8 tsid, const u8 *peer, u8 user_prio, u16 admitted_time),
2248         TP_ARGS(wiphy, netdev, tsid, peer, user_prio, admitted_time),
2249         TP_STRUCT__entry(
2250                 WIPHY_ENTRY
2251                 NETDEV_ENTRY
2252                 MAC_ENTRY(peer)
2253                 __field(u8, tsid)
2254                 __field(u8, user_prio)
2255                 __field(u16, admitted_time)
2256         ),
2257         TP_fast_assign(
2258                 WIPHY_ASSIGN;
2259                 NETDEV_ASSIGN;
2260                 MAC_ASSIGN(peer, peer);
2261                 __entry->tsid = tsid;
2262                 __entry->user_prio = user_prio;
2263                 __entry->admitted_time = admitted_time;
2264         ),
2265         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d, UP %d, time %d",
2266                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
2267                   __entry->tsid, __entry->user_prio, __entry->admitted_time)
2268 );
2269 
2270 TRACE_EVENT(rdev_del_tx_ts,
2271         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2272                  u8 tsid, const u8 *peer),
2273         TP_ARGS(wiphy, netdev, tsid, peer),
2274         TP_STRUCT__entry(
2275                 WIPHY_ENTRY
2276                 NETDEV_ENTRY
2277                 MAC_ENTRY(peer)
2278                 __field(u8, tsid)
2279         ),
2280         TP_fast_assign(
2281                 WIPHY_ASSIGN;
2282                 NETDEV_ASSIGN;
2283                 MAC_ASSIGN(peer, peer);
2284                 __entry->tsid = tsid;
2285         ),
2286         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", TSID %d",
2287                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->tsid)
2288 );
2289 
2290 TRACE_EVENT(rdev_tdls_channel_switch,
2291         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2292                  const u8 *addr, u8 oper_class,
2293                  struct cfg80211_chan_def *chandef),
2294         TP_ARGS(wiphy, netdev, addr, oper_class, chandef),
2295         TP_STRUCT__entry(
2296                 WIPHY_ENTRY
2297                 NETDEV_ENTRY
2298                 MAC_ENTRY(addr)
2299                 __field(u8, oper_class)
2300                 CHAN_DEF_ENTRY
2301         ),
2302         TP_fast_assign(
2303                 WIPHY_ASSIGN;
2304                 NETDEV_ASSIGN;
2305                 MAC_ASSIGN(addr, addr);
2306                 CHAN_DEF_ASSIGN(chandef);
2307         ),
2308         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT
2309                   " oper class %d, " CHAN_DEF_PR_FMT,
2310                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr),
2311                   __entry->oper_class, CHAN_DEF_PR_ARG)
2312 );
2313 
2314 TRACE_EVENT(rdev_tdls_cancel_channel_switch,
2315         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2316                  const u8 *addr),
2317         TP_ARGS(wiphy, netdev, addr),
2318         TP_STRUCT__entry(
2319                 WIPHY_ENTRY
2320                 NETDEV_ENTRY
2321                 MAC_ENTRY(addr)
2322         ),
2323         TP_fast_assign(
2324                 WIPHY_ASSIGN;
2325                 NETDEV_ASSIGN;
2326                 MAC_ASSIGN(addr, addr);
2327         ),
2328         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
2329                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(addr))
2330 );
2331 
2332 TRACE_EVENT(rdev_set_pmk,
2333         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2334                  struct cfg80211_pmk_conf *pmk_conf),
2335 
2336         TP_ARGS(wiphy, netdev, pmk_conf),
2337 
2338         TP_STRUCT__entry(
2339                 WIPHY_ENTRY
2340                 NETDEV_ENTRY
2341                 MAC_ENTRY(aa)
2342                 __field(u8, pmk_len)
2343                 __field(u8, pmk_r0_name_len)
2344                 __dynamic_array(u8, pmk, pmk_conf->pmk_len)
2345                 __dynamic_array(u8, pmk_r0_name, WLAN_PMK_NAME_LEN)
2346         ),
2347 
2348         TP_fast_assign(
2349                 WIPHY_ASSIGN;
2350                 NETDEV_ASSIGN;
2351                 MAC_ASSIGN(aa, pmk_conf->aa);
2352                 __entry->pmk_len = pmk_conf->pmk_len;
2353                 __entry->pmk_r0_name_len =
2354                 pmk_conf->pmk_r0_name ? WLAN_PMK_NAME_LEN : 0;
2355                 memcpy(__get_dynamic_array(pmk), pmk_conf->pmk,
2356                        pmk_conf->pmk_len);
2357                 memcpy(__get_dynamic_array(pmk_r0_name), pmk_conf->pmk_r0_name,
2358                        pmk_conf->pmk_r0_name ? WLAN_PMK_NAME_LEN : 0);
2359         ),
2360 
2361         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT
2362                   "pmk_len=%u, pmk: %s pmk_r0_name: %s", WIPHY_PR_ARG,
2363                   NETDEV_PR_ARG, MAC_PR_ARG(aa), __entry->pmk_len,
2364                   __print_array(__get_dynamic_array(pmk),
2365                                 __get_dynamic_array_len(pmk), 1),
2366                   __entry->pmk_r0_name_len ?
2367                   __print_array(__get_dynamic_array(pmk_r0_name),
2368                                 __get_dynamic_array_len(pmk_r0_name), 1) : "")
2369 );
2370 
2371 TRACE_EVENT(rdev_del_pmk,
2372         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *aa),
2373 
2374         TP_ARGS(wiphy, netdev, aa),
2375 
2376         TP_STRUCT__entry(
2377                 WIPHY_ENTRY
2378                 NETDEV_ENTRY
2379                 MAC_ENTRY(aa)
2380         ),
2381 
2382         TP_fast_assign(
2383                 WIPHY_ASSIGN;
2384                 NETDEV_ASSIGN;
2385                 MAC_ASSIGN(aa, aa);
2386         ),
2387 
2388         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
2389                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(aa))
2390 );
2391 
2392 TRACE_EVENT(rdev_external_auth,
2393             TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2394                      struct cfg80211_external_auth_params *params),
2395             TP_ARGS(wiphy, netdev, params),
2396             TP_STRUCT__entry(WIPHY_ENTRY
2397                              NETDEV_ENTRY
2398                              MAC_ENTRY(bssid)
2399                              __array(u8, ssid, IEEE80211_MAX_SSID_LEN + 1)
2400                              __field(u16, status)
2401             ),
2402             TP_fast_assign(WIPHY_ASSIGN;
2403                            NETDEV_ASSIGN;
2404                            MAC_ASSIGN(bssid, params->bssid);
2405                            memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
2406                            memcpy(__entry->ssid, params->ssid.ssid,
2407                                   params->ssid.ssid_len);
2408                            __entry->status = params->status;
2409             ),
2410             TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
2411                       ", ssid: %s, status: %u", WIPHY_PR_ARG, NETDEV_PR_ARG,
2412                       __entry->bssid, __entry->ssid, __entry->status)
2413 );
2414 
2415 TRACE_EVENT(rdev_start_radar_detection,
2416         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2417                  struct cfg80211_chan_def *chandef,
2418                  u32 cac_time_ms),
2419         TP_ARGS(wiphy, netdev, chandef, cac_time_ms),
2420         TP_STRUCT__entry(
2421                 WIPHY_ENTRY
2422                 NETDEV_ENTRY
2423                 CHAN_DEF_ENTRY
2424                 __field(u32, cac_time_ms)
2425         ),
2426         TP_fast_assign(
2427                 WIPHY_ASSIGN;
2428                 NETDEV_ASSIGN;
2429                 CHAN_DEF_ASSIGN(chandef);
2430                 __entry->cac_time_ms = cac_time_ms;
2431         ),
2432         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT
2433                   ", cac_time_ms=%u",
2434                   WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG,
2435                   __entry->cac_time_ms)
2436 );
2437 
2438 TRACE_EVENT(rdev_set_mcast_rate,
2439         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2440                  int *mcast_rate),
2441         TP_ARGS(wiphy, netdev, mcast_rate),
2442         TP_STRUCT__entry(
2443                 WIPHY_ENTRY
2444                 NETDEV_ENTRY
2445                 __array(int, mcast_rate, NUM_NL80211_BANDS)
2446         ),
2447         TP_fast_assign(
2448                 WIPHY_ASSIGN;
2449                 NETDEV_ASSIGN;
2450                 memcpy(__entry->mcast_rate, mcast_rate,
2451                        sizeof(int) * NUM_NL80211_BANDS);
2452         ),
2453         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", "
2454                   "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 6GHz=0x%x, 60GHz=0x%x]",
2455                   WIPHY_PR_ARG, NETDEV_PR_ARG,
2456                   __entry->mcast_rate[NL80211_BAND_2GHZ],
2457                   __entry->mcast_rate[NL80211_BAND_5GHZ],
2458                   __entry->mcast_rate[NL80211_BAND_6GHZ],
2459                   __entry->mcast_rate[NL80211_BAND_60GHZ])
2460 );
2461 
2462 TRACE_EVENT(rdev_set_coalesce,
2463         TP_PROTO(struct wiphy *wiphy, struct cfg80211_coalesce *coalesce),
2464         TP_ARGS(wiphy, coalesce),
2465         TP_STRUCT__entry(
2466                 WIPHY_ENTRY
2467                 __field(int, n_rules)
2468         ),
2469         TP_fast_assign(
2470                 WIPHY_ASSIGN;
2471                 __entry->n_rules = coalesce ? coalesce->n_rules : 0;
2472         ),
2473         TP_printk(WIPHY_PR_FMT ", n_rules=%d",
2474                   WIPHY_PR_ARG, __entry->n_rules)
2475 );
2476 
2477 DEFINE_EVENT(wiphy_wdev_evt, rdev_abort_scan,
2478         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2479         TP_ARGS(wiphy, wdev)
2480 );
2481 
2482 TRACE_EVENT(rdev_set_multicast_to_unicast,
2483         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2484                  const bool enabled),
2485         TP_ARGS(wiphy, netdev, enabled),
2486         TP_STRUCT__entry(
2487                 WIPHY_ENTRY
2488                 NETDEV_ENTRY
2489                 __field(bool, enabled)
2490         ),
2491         TP_fast_assign(
2492                 WIPHY_ASSIGN;
2493                 NETDEV_ASSIGN;
2494                 __entry->enabled = enabled;
2495         ),
2496         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", unicast: %s",
2497                   WIPHY_PR_ARG, NETDEV_PR_ARG,
2498                   BOOL_TO_STR(__entry->enabled))
2499 );
2500 
2501 DEFINE_EVENT(wiphy_wdev_evt, rdev_get_txq_stats,
2502         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
2503         TP_ARGS(wiphy, wdev)
2504 );
2505 
2506 TRACE_EVENT(rdev_get_ftm_responder_stats,
2507         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2508                  struct cfg80211_ftm_responder_stats *ftm_stats),
2509 
2510         TP_ARGS(wiphy, netdev, ftm_stats),
2511 
2512         TP_STRUCT__entry(
2513                 WIPHY_ENTRY
2514                 NETDEV_ENTRY
2515                 __field(u64, timestamp)
2516                 __field(u32, success_num)
2517                 __field(u32, partial_num)
2518                 __field(u32, failed_num)
2519                 __field(u32, asap_num)
2520                 __field(u32, non_asap_num)
2521                 __field(u64, duration)
2522                 __field(u32, unknown_triggers)
2523                 __field(u32, reschedule)
2524                 __field(u32, out_of_window)
2525         ),
2526 
2527         TP_fast_assign(
2528                 WIPHY_ASSIGN;
2529                 NETDEV_ASSIGN;
2530                 __entry->success_num = ftm_stats->success_num;
2531                 __entry->partial_num = ftm_stats->partial_num;
2532                 __entry->failed_num = ftm_stats->failed_num;
2533                 __entry->asap_num = ftm_stats->asap_num;
2534                 __entry->non_asap_num = ftm_stats->non_asap_num;
2535                 __entry->duration = ftm_stats->total_duration_ms;
2536                 __entry->unknown_triggers = ftm_stats->unknown_triggers_num;
2537                 __entry->reschedule = ftm_stats->reschedule_requests_num;
2538                 __entry->out_of_window = ftm_stats->out_of_window_triggers_num;
2539         ),
2540 
2541         TP_printk(WIPHY_PR_FMT "Ftm responder stats: success %u, partial %u, "
2542                 "failed %u, asap %u, non asap %u, total duration %llu, unknown "
2543                 "triggers %u, rescheduled %u, out of window %u", WIPHY_PR_ARG,
2544                 __entry->success_num, __entry->partial_num, __entry->failed_num,
2545                 __entry->asap_num, __entry->non_asap_num, __entry->duration,
2546                 __entry->unknown_triggers, __entry->reschedule,
2547                 __entry->out_of_window)
2548 );
2549 
2550 DEFINE_EVENT(wiphy_wdev_cookie_evt, rdev_start_pmsr,
2551         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
2552         TP_ARGS(wiphy, wdev, cookie)
2553 );
2554 
2555 DEFINE_EVENT(wiphy_wdev_cookie_evt, rdev_abort_pmsr,
2556         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
2557         TP_ARGS(wiphy, wdev, cookie)
2558 );
2559 
2560 /*************************************************************
2561  *           cfg80211 exported functions traces              *
2562  *************************************************************/
2563 
2564 TRACE_EVENT(cfg80211_return_bool,
2565         TP_PROTO(bool ret),
2566         TP_ARGS(ret),
2567         TP_STRUCT__entry(
2568                 __field(bool, ret)
2569         ),
2570         TP_fast_assign(
2571                 __entry->ret = ret;
2572         ),
2573         TP_printk("returned %s", BOOL_TO_STR(__entry->ret))
2574 );
2575 
2576 DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt,
2577         TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2578         TP_ARGS(netdev, macaddr),
2579         TP_STRUCT__entry(
2580                 NETDEV_ENTRY
2581                 MAC_ENTRY(macaddr)
2582         ),
2583         TP_fast_assign(
2584                 NETDEV_ASSIGN;
2585                 MAC_ASSIGN(macaddr, macaddr);
2586         ),
2587         TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
2588                   NETDEV_PR_ARG, MAC_PR_ARG(macaddr))
2589 );
2590 
2591 DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate,
2592         TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2593         TP_ARGS(netdev, macaddr)
2594 );
2595 
2596 DECLARE_EVENT_CLASS(netdev_evt_only,
2597         TP_PROTO(struct net_device *netdev),
2598         TP_ARGS(netdev),
2599         TP_STRUCT__entry(
2600                 NETDEV_ENTRY
2601         ),
2602         TP_fast_assign(
2603                 NETDEV_ASSIGN;
2604         ),
2605         TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG)
2606 );
2607 
2608 DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth,
2609         TP_PROTO(struct net_device *netdev),
2610         TP_ARGS(netdev)
2611 );
2612 
2613 TRACE_EVENT(cfg80211_send_rx_assoc,
2614         TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss),
2615         TP_ARGS(netdev, bss),
2616         TP_STRUCT__entry(
2617                 NETDEV_ENTRY
2618                 MAC_ENTRY(bssid)
2619                 CHAN_ENTRY
2620         ),
2621         TP_fast_assign(
2622                 NETDEV_ASSIGN;
2623                 MAC_ASSIGN(bssid, bss->bssid);
2624                 CHAN_ASSIGN(bss->channel);
2625         ),
2626         TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", " CHAN_PR_FMT,
2627                   NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
2628 );
2629 
2630 DECLARE_EVENT_CLASS(netdev_frame_event,
2631         TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2632         TP_ARGS(netdev, buf, len),
2633         TP_STRUCT__entry(
2634                 NETDEV_ENTRY
2635                 __dynamic_array(u8, frame, len)
2636         ),
2637         TP_fast_assign(
2638                 NETDEV_ASSIGN;
2639                 memcpy(__get_dynamic_array(frame), buf, len);
2640         ),
2641         TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2642                   NETDEV_PR_ARG,
2643                   le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
2644 );
2645 
2646 DEFINE_EVENT(netdev_frame_event, cfg80211_rx_unprot_mlme_mgmt,
2647         TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2648         TP_ARGS(netdev, buf, len)
2649 );
2650 
2651 DEFINE_EVENT(netdev_frame_event, cfg80211_rx_mlme_mgmt,
2652         TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2653         TP_ARGS(netdev, buf, len)
2654 );
2655 
2656 TRACE_EVENT(cfg80211_tx_mlme_mgmt,
2657         TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
2658         TP_ARGS(netdev, buf, len),
2659         TP_STRUCT__entry(
2660                 NETDEV_ENTRY
2661                 __dynamic_array(u8, frame, len)
2662         ),
2663         TP_fast_assign(
2664                 NETDEV_ASSIGN;
2665                 memcpy(__get_dynamic_array(frame), buf, len);
2666         ),
2667         TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
2668                   NETDEV_PR_ARG,
2669                   le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
2670 );
2671 
2672 DECLARE_EVENT_CLASS(netdev_mac_evt,
2673         TP_PROTO(struct net_device *netdev, const u8 *mac),
2674         TP_ARGS(netdev, mac),
2675         TP_STRUCT__entry(
2676                 NETDEV_ENTRY
2677                 MAC_ENTRY(mac)
2678         ),
2679         TP_fast_assign(
2680                 NETDEV_ASSIGN;
2681                 MAC_ASSIGN(mac, mac)
2682         ),
2683         TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT,
2684                   NETDEV_PR_ARG, MAC_PR_ARG(mac))
2685 );
2686 
2687 DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout,
2688         TP_PROTO(struct net_device *netdev, const u8 *mac),
2689         TP_ARGS(netdev, mac)
2690 );
2691 
2692 DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout,
2693         TP_PROTO(struct net_device *netdev, const u8 *mac),
2694         TP_ARGS(netdev, mac)
2695 );
2696 
2697 TRACE_EVENT(cfg80211_michael_mic_failure,
2698         TP_PROTO(struct net_device *netdev, const u8 *addr,
2699                  enum nl80211_key_type key_type, int key_id, const u8 *tsc),
2700         TP_ARGS(netdev, addr, key_type, key_id, tsc),
2701         TP_STRUCT__entry(
2702                 NETDEV_ENTRY
2703                 MAC_ENTRY(addr)
2704                 __field(enum nl80211_key_type, key_type)
2705                 __field(int, key_id)
2706                 __array(u8, tsc, 6)
2707         ),
2708         TP_fast_assign(
2709                 NETDEV_ASSIGN;
2710                 MAC_ASSIGN(addr, addr);
2711                 __entry->key_type = key_type;
2712                 __entry->key_id = key_id;
2713                 if (tsc)
2714                         memcpy(__entry->tsc, tsc, 6);
2715         ),
2716         TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm",
2717                   NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type,
2718                   __entry->key_id, __entry->tsc)
2719 );
2720 
2721 TRACE_EVENT(cfg80211_ready_on_channel,
2722         TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2723                  struct ieee80211_channel *chan,
2724                  unsigned int duration),
2725         TP_ARGS(wdev, cookie, chan, duration),
2726         TP_STRUCT__entry(
2727                 WDEV_ENTRY
2728                 __field(u64, cookie)
2729                 CHAN_ENTRY
2730                 __field(unsigned int, duration)
2731         ),
2732         TP_fast_assign(
2733                 WDEV_ASSIGN;
2734                 __entry->cookie = cookie;
2735                 CHAN_ASSIGN(chan);
2736                 __entry->duration = duration;
2737         ),
2738         TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u",
2739                   WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG,
2740                   __entry->duration)
2741 );
2742 
2743 TRACE_EVENT(cfg80211_ready_on_channel_expired,
2744         TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2745                  struct ieee80211_channel *chan),
2746         TP_ARGS(wdev, cookie, chan),
2747         TP_STRUCT__entry(
2748                 WDEV_ENTRY
2749                 __field(u64, cookie)
2750                 CHAN_ENTRY
2751         ),
2752         TP_fast_assign(
2753                 WDEV_ASSIGN;
2754                 __entry->cookie = cookie;
2755                 CHAN_ASSIGN(chan);
2756         ),
2757         TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
2758                   WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
2759 );
2760 
2761 TRACE_EVENT(cfg80211_tx_mgmt_expired,
2762         TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2763                  struct ieee80211_channel *chan),
2764         TP_ARGS(wdev, cookie, chan),
2765         TP_STRUCT__entry(
2766                 WDEV_ENTRY
2767                 __field(u64, cookie)
2768                 CHAN_ENTRY
2769         ),
2770         TP_fast_assign(
2771                 WDEV_ASSIGN;
2772                 __entry->cookie = cookie;
2773                 CHAN_ASSIGN(chan);
2774         ),
2775         TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
2776                   WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
2777 );
2778 
2779 TRACE_EVENT(cfg80211_new_sta,
2780         TP_PROTO(struct net_device *netdev, const u8 *mac_addr,
2781                  struct station_info *sinfo),
2782         TP_ARGS(netdev, mac_addr, sinfo),
2783         TP_STRUCT__entry(
2784                 NETDEV_ENTRY
2785                 MAC_ENTRY(mac_addr)
2786                 SINFO_ENTRY
2787         ),
2788         TP_fast_assign(
2789                 NETDEV_ASSIGN;
2790                 MAC_ASSIGN(mac_addr, mac_addr);
2791                 SINFO_ASSIGN;
2792         ),
2793         TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT,
2794                   NETDEV_PR_ARG, MAC_PR_ARG(mac_addr))
2795 );
2796 
2797 DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta,
2798         TP_PROTO(struct net_device *netdev, const u8 *macaddr),
2799         TP_ARGS(netdev, macaddr)
2800 );
2801 
2802 TRACE_EVENT(cfg80211_rx_mgmt,
2803         TP_PROTO(struct wireless_dev *wdev, int freq, int sig_dbm),
2804         TP_ARGS(wdev, freq, sig_dbm),
2805         TP_STRUCT__entry(
2806                 WDEV_ENTRY
2807                 __field(int, freq)
2808                 __field(int, sig_dbm)
2809         ),
2810         TP_fast_assign(
2811                 WDEV_ASSIGN;
2812                 __entry->freq = freq;
2813                 __entry->sig_dbm = sig_dbm;
2814         ),
2815         TP_printk(WDEV_PR_FMT ", freq: %d, sig dbm: %d",
2816                   WDEV_PR_ARG, __entry->freq, __entry->sig_dbm)
2817 );
2818 
2819 TRACE_EVENT(cfg80211_mgmt_tx_status,
2820         TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
2821         TP_ARGS(wdev, cookie, ack),
2822         TP_STRUCT__entry(
2823                 WDEV_ENTRY
2824                 __field(u64, cookie)
2825                 __field(bool, ack)
2826         ),
2827         TP_fast_assign(
2828                 WDEV_ASSIGN;
2829                 __entry->cookie = cookie;
2830                 __entry->ack = ack;
2831         ),
2832         TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
2833                   WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
2834 );
2835 
2836 TRACE_EVENT(cfg80211_rx_control_port,
2837         TP_PROTO(struct net_device *netdev, struct sk_buff *skb,
2838                  bool unencrypted),
2839         TP_ARGS(netdev, skb, unencrypted),
2840         TP_STRUCT__entry(
2841                 NETDEV_ENTRY
2842                 __field(int, len)
2843                 MAC_ENTRY(from)
2844                 __field(u16, proto)
2845                 __field(bool, unencrypted)
2846         ),
2847         TP_fast_assign(
2848                 NETDEV_ASSIGN;
2849                 __entry->len = skb->len;
2850                 MAC_ASSIGN(from, eth_hdr(skb)->h_source);
2851                 __entry->proto = be16_to_cpu(skb->protocol);
2852                 __entry->unencrypted = unencrypted;
2853         ),
2854         TP_printk(NETDEV_PR_FMT ", len=%d, " MAC_PR_FMT ", proto: 0x%x, unencrypted: %s",
2855                   NETDEV_PR_ARG, __entry->len, MAC_PR_ARG(from),
2856                   __entry->proto, BOOL_TO_STR(__entry->unencrypted))
2857 );
2858 
2859 TRACE_EVENT(cfg80211_cqm_rssi_notify,
2860         TP_PROTO(struct net_device *netdev,
2861                  enum nl80211_cqm_rssi_threshold_event rssi_event,
2862                  s32 rssi_level),
2863         TP_ARGS(netdev, rssi_event, rssi_level),
2864         TP_STRUCT__entry(
2865                 NETDEV_ENTRY
2866                 __field(enum nl80211_cqm_rssi_threshold_event, rssi_event)
2867                 __field(s32, rssi_level)
2868         ),
2869         TP_fast_assign(
2870                 NETDEV_ASSIGN;
2871                 __entry->rssi_event = rssi_event;
2872                 __entry->rssi_level = rssi_level;
2873         ),
2874         TP_printk(NETDEV_PR_FMT ", rssi event: %d, level: %d",
2875                   NETDEV_PR_ARG, __entry->rssi_event, __entry->rssi_level)
2876 );
2877 
2878 TRACE_EVENT(cfg80211_reg_can_beacon,
2879         TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef,
2880                  enum nl80211_iftype iftype, bool check_no_ir),
2881         TP_ARGS(wiphy, chandef, iftype, check_no_ir),
2882         TP_STRUCT__entry(
2883                 WIPHY_ENTRY
2884                 CHAN_DEF_ENTRY
2885                 __field(enum nl80211_iftype, iftype)
2886                 __field(bool, check_no_ir)
2887         ),
2888         TP_fast_assign(
2889                 WIPHY_ASSIGN;
2890                 CHAN_DEF_ASSIGN(chandef);
2891                 __entry->iftype = iftype;
2892                 __entry->check_no_ir = check_no_ir;
2893         ),
2894         TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", iftype=%d check_no_ir=%s",
2895                   WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->iftype,
2896                   BOOL_TO_STR(__entry->check_no_ir))
2897 );
2898 
2899 TRACE_EVENT(cfg80211_chandef_dfs_required,
2900         TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2901         TP_ARGS(wiphy, chandef),
2902         TP_STRUCT__entry(
2903                 WIPHY_ENTRY
2904                 CHAN_DEF_ENTRY
2905         ),
2906         TP_fast_assign(
2907                 WIPHY_ASSIGN;
2908                 CHAN_DEF_ASSIGN(chandef);
2909         ),
2910         TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2911                   WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2912 );
2913 
2914 TRACE_EVENT(cfg80211_ch_switch_notify,
2915         TP_PROTO(struct net_device *netdev,
2916                  struct cfg80211_chan_def *chandef),
2917         TP_ARGS(netdev, chandef),
2918         TP_STRUCT__entry(
2919                 NETDEV_ENTRY
2920                 CHAN_DEF_ENTRY
2921         ),
2922         TP_fast_assign(
2923                 NETDEV_ASSIGN;
2924                 CHAN_DEF_ASSIGN(chandef);
2925         ),
2926         TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2927                   NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
2928 );
2929 
2930 TRACE_EVENT(cfg80211_ch_switch_started_notify,
2931         TP_PROTO(struct net_device *netdev,
2932                  struct cfg80211_chan_def *chandef),
2933         TP_ARGS(netdev, chandef),
2934         TP_STRUCT__entry(
2935                 NETDEV_ENTRY
2936                 CHAN_DEF_ENTRY
2937         ),
2938         TP_fast_assign(
2939                 NETDEV_ASSIGN;
2940                 CHAN_DEF_ASSIGN(chandef);
2941         ),
2942         TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT,
2943                   NETDEV_PR_ARG, CHAN_DEF_PR_ARG)
2944 );
2945 
2946 TRACE_EVENT(cfg80211_radar_event,
2947         TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
2948         TP_ARGS(wiphy, chandef),
2949         TP_STRUCT__entry(
2950                 WIPHY_ENTRY
2951                 CHAN_DEF_ENTRY
2952         ),
2953         TP_fast_assign(
2954                 WIPHY_ASSIGN;
2955                 CHAN_DEF_ASSIGN(chandef);
2956         ),
2957         TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
2958                   WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
2959 );
2960 
2961 TRACE_EVENT(cfg80211_cac_event,
2962         TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt),
2963         TP_ARGS(netdev, evt),
2964         TP_STRUCT__entry(
2965                 NETDEV_ENTRY
2966                 __field(enum nl80211_radar_event, evt)
2967         ),
2968         TP_fast_assign(
2969                 NETDEV_ASSIGN;
2970                 __entry->evt = evt;
2971         ),
2972         TP_printk(NETDEV_PR_FMT ",  event: %d",
2973                   NETDEV_PR_ARG, __entry->evt)
2974 );
2975 
2976 DECLARE_EVENT_CLASS(cfg80211_rx_evt,
2977         TP_PROTO(struct net_device *netdev, const u8 *addr),
2978         TP_ARGS(netdev, addr),
2979         TP_STRUCT__entry(
2980                 NETDEV_ENTRY
2981                 MAC_ENTRY(addr)
2982         ),
2983         TP_fast_assign(
2984                 NETDEV_ASSIGN;
2985                 MAC_ASSIGN(addr, addr);
2986         ),
2987         TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr))
2988 );
2989 
2990 DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame,
2991         TP_PROTO(struct net_device *netdev, const u8 *addr),
2992         TP_ARGS(netdev, addr)
2993 );
2994 
2995 DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame,
2996         TP_PROTO(struct net_device *netdev, const u8 *addr),
2997         TP_ARGS(netdev, addr)
2998 );
2999 
3000 TRACE_EVENT(cfg80211_ibss_joined,
3001         TP_PROTO(struct net_device *netdev, const u8 *bssid,
3002                  struct ieee80211_channel *channel),
3003         TP_ARGS(netdev, bssid, channel),
3004         TP_STRUCT__entry(
3005                 NETDEV_ENTRY
3006                 MAC_ENTRY(bssid)
3007                 CHAN_ENTRY
3008         ),
3009         TP_fast_assign(
3010                 NETDEV_ASSIGN;
3011                 MAC_ASSIGN(bssid, bssid);
3012                 CHAN_ASSIGN(channel);
3013         ),
3014         TP_printk(NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", " CHAN_PR_FMT,
3015                   NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
3016 );
3017 
3018 TRACE_EVENT(cfg80211_probe_status,
3019         TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie,
3020                  bool acked),
3021         TP_ARGS(netdev, addr, cookie, acked),
3022         TP_STRUCT__entry(
3023                 NETDEV_ENTRY
3024                 MAC_ENTRY(addr)
3025                 __field(u64, cookie)
3026                 __field(bool, acked)
3027         ),
3028         TP_fast_assign(
3029                 NETDEV_ASSIGN;
3030                 MAC_ASSIGN(addr, addr);
3031                 __entry->cookie = cookie;
3032                 __entry->acked = acked;
3033         ),
3034         TP_printk(NETDEV_PR_FMT " addr:" MAC_PR_FMT ", cookie: %llu, acked: %s",
3035                   NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie,
3036                   BOOL_TO_STR(__entry->acked))
3037 );
3038 
3039 TRACE_EVENT(cfg80211_cqm_pktloss_notify,
3040         TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets),
3041         TP_ARGS(netdev, peer, num_packets),
3042         TP_STRUCT__entry(
3043                 NETDEV_ENTRY
3044                 MAC_ENTRY(peer)
3045                 __field(u32, num_packets)
3046         ),
3047         TP_fast_assign(
3048                 NETDEV_ASSIGN;
3049                 MAC_ASSIGN(peer, peer);
3050                 __entry->num_packets = num_packets;
3051         ),
3052         TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u",
3053                   NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets)
3054 );
3055 
3056 DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify,
3057         TP_PROTO(struct net_device *netdev, const u8 *macaddr),
3058         TP_ARGS(netdev, macaddr)
3059 );
3060 
3061 TRACE_EVENT(cfg80211_pmksa_candidate_notify,
3062         TP_PROTO(struct net_device *netdev, int index, const u8 *bssid,
3063                  bool preauth),
3064         TP_ARGS(netdev, index, bssid, preauth),
3065         TP_STRUCT__entry(
3066                 NETDEV_ENTRY
3067                 __field(int, index)
3068                 MAC_ENTRY(bssid)
3069                 __field(bool, preauth)
3070         ),
3071         TP_fast_assign(
3072                 NETDEV_ASSIGN;
3073                 __entry->index = index;
3074                 MAC_ASSIGN(bssid, bssid);
3075                 __entry->preauth = preauth;
3076         ),
3077         TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s",
3078                   NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid),
3079                   BOOL_TO_STR(__entry->preauth))
3080 );
3081 
3082 TRACE_EVENT(cfg80211_report_obss_beacon,
3083         TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len,
3084                  int freq, int sig_dbm),
3085         TP_ARGS(wiphy, frame, len, freq, sig_dbm),
3086         TP_STRUCT__entry(
3087                 WIPHY_ENTRY
3088                 __field(int, freq)
3089                 __field(int, sig_dbm)
3090         ),
3091         TP_fast_assign(
3092                 WIPHY_ASSIGN;
3093                 __entry->freq = freq;
3094                 __entry->sig_dbm = sig_dbm;
3095         ),
3096         TP_printk(WIPHY_PR_FMT ", freq: %d, sig_dbm: %d",
3097                   WIPHY_PR_ARG, __entry->freq, __entry->sig_dbm)
3098 );
3099 
3100 TRACE_EVENT(cfg80211_tdls_oper_request,
3101         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer,
3102                  enum nl80211_tdls_operation oper, u16 reason_code),
3103         TP_ARGS(wiphy, netdev, peer, oper, reason_code),
3104         TP_STRUCT__entry(
3105                 WIPHY_ENTRY
3106                 NETDEV_ENTRY
3107                 MAC_ENTRY(peer)
3108                 __field(enum nl80211_tdls_operation, oper)
3109                 __field(u16, reason_code)
3110         ),
3111         TP_fast_assign(
3112                 WIPHY_ASSIGN;
3113                 NETDEV_ASSIGN;
3114                 MAC_ASSIGN(peer, peer);
3115                 __entry->oper = oper;
3116                 __entry->reason_code = reason_code;
3117         ),
3118         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", oper: %d, reason_code %u",
3119                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper,
3120                   __entry->reason_code)
3121         );
3122 
3123 TRACE_EVENT(cfg80211_scan_done,
3124         TP_PROTO(struct cfg80211_scan_request *request,
3125                  struct cfg80211_scan_info *info),
3126         TP_ARGS(request, info),
3127         TP_STRUCT__entry(
3128                 __field(u32, n_channels)
3129                 __dynamic_array(u8, ie, request ? request->ie_len : 0)
3130                 __array(u32, rates, NUM_NL80211_BANDS)
3131                 __field(u32, wdev_id)
3132                 MAC_ENTRY(wiphy_mac)
3133                 __field(bool, no_cck)
3134                 __field(bool, aborted)
3135                 __field(u64, scan_start_tsf)
3136                 MAC_ENTRY(tsf_bssid)
3137         ),
3138         TP_fast_assign(
3139                 if (request) {
3140                         memcpy(__get_dynamic_array(ie), request->ie,
3141                                request->ie_len);
3142                         memcpy(__entry->rates, request->rates,
3143                                NUM_NL80211_BANDS);
3144                         __entry->wdev_id = request->wdev ?
3145                                         request->wdev->identifier : 0;
3146                         if (request->wiphy)
3147                                 MAC_ASSIGN(wiphy_mac,
3148                                            request->wiphy->perm_addr);
3149                         __entry->no_cck = request->no_cck;
3150                 }
3151                 if (info) {
3152                         __entry->aborted = info->aborted;
3153                         __entry->scan_start_tsf = info->scan_start_tsf;
3154                         MAC_ASSIGN(tsf_bssid, info->tsf_bssid);
3155                 }
3156         ),
3157         TP_printk("aborted: %s, scan start (TSF): %llu, tsf_bssid: " MAC_PR_FMT,
3158                   BOOL_TO_STR(__entry->aborted),
3159                   (unsigned long long)__entry->scan_start_tsf,
3160                   MAC_PR_ARG(tsf_bssid))
3161 );
3162 
3163 DECLARE_EVENT_CLASS(wiphy_id_evt,
3164         TP_PROTO(struct wiphy *wiphy, u64 id),
3165         TP_ARGS(wiphy, id),
3166         TP_STRUCT__entry(
3167                 WIPHY_ENTRY
3168                 __field(u64, id)
3169         ),
3170         TP_fast_assign(
3171                 WIPHY_ASSIGN;
3172                 __entry->id = id;
3173         ),
3174         TP_printk(WIPHY_PR_FMT ", id: %llu", WIPHY_PR_ARG, __entry->id)
3175 );
3176 
3177 DEFINE_EVENT(wiphy_id_evt, cfg80211_sched_scan_stopped,
3178         TP_PROTO(struct wiphy *wiphy, u64 id),
3179         TP_ARGS(wiphy, id)
3180 );
3181 
3182 DEFINE_EVENT(wiphy_id_evt, cfg80211_sched_scan_results,
3183         TP_PROTO(struct wiphy *wiphy, u64 id),
3184         TP_ARGS(wiphy, id)
3185 );
3186 
3187 TRACE_EVENT(cfg80211_get_bss,
3188         TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
3189                  const u8 *bssid, const u8 *ssid, size_t ssid_len,
3190                  enum ieee80211_bss_type bss_type,
3191                  enum ieee80211_privacy privacy),
3192         TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, bss_type, privacy),
3193         TP_STRUCT__entry(
3194                 WIPHY_ENTRY
3195                 CHAN_ENTRY
3196                 MAC_ENTRY(bssid)
3197                 __dynamic_array(u8, ssid, ssid_len)
3198                 __field(enum ieee80211_bss_type, bss_type)
3199                 __field(enum ieee80211_privacy, privacy)
3200         ),
3201         TP_fast_assign(
3202                 WIPHY_ASSIGN;
3203                 CHAN_ASSIGN(channel);
3204                 MAC_ASSIGN(bssid, bssid);
3205                 memcpy(__get_dynamic_array(ssid), ssid, ssid_len);
3206                 __entry->bss_type = bss_type;
3207                 __entry->privacy = privacy;
3208         ),
3209         TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT
3210                   ", buf: %#.2x, bss_type: %d, privacy: %d",
3211                   WIPHY_PR_ARG, CHAN_PR_ARG, MAC_PR_ARG(bssid),
3212                   ((u8 *)__get_dynamic_array(ssid))[0], __entry->bss_type,
3213                   __entry->privacy)
3214 );
3215 
3216 TRACE_EVENT(cfg80211_inform_bss_frame,
3217         TP_PROTO(struct wiphy *wiphy, struct cfg80211_inform_bss *data,
3218                  struct ieee80211_mgmt *mgmt, size_t len),
3219         TP_ARGS(wiphy, data, mgmt, len),
3220         TP_STRUCT__entry(
3221                 WIPHY_ENTRY
3222                 CHAN_ENTRY
3223                 __field(enum nl80211_bss_scan_width, scan_width)
3224                 __dynamic_array(u8, mgmt, len)
3225                 __field(s32, signal)
3226                 __field(u64, ts_boottime)
3227                 __field(u64, parent_tsf)
3228                 MAC_ENTRY(parent_bssid)
3229         ),
3230         TP_fast_assign(
3231                 WIPHY_ASSIGN;
3232                 CHAN_ASSIGN(data->chan);
3233                 __entry->scan_width = data->scan_width;
3234                 if (mgmt)
3235                         memcpy(__get_dynamic_array(mgmt), mgmt, len);
3236                 __entry->signal = data->signal;
3237                 __entry->ts_boottime = data->boottime_ns;
3238                 __entry->parent_tsf = data->parent_tsf;
3239                 MAC_ASSIGN(parent_bssid, data->parent_bssid);
3240         ),
3241         TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT
3242                   "(scan_width: %d) signal: %d, tsb:%llu, detect_tsf:%llu, tsf_bssid: "
3243                   MAC_PR_FMT, WIPHY_PR_ARG, CHAN_PR_ARG, __entry->scan_width,
3244                   __entry->signal, (unsigned long long)__entry->ts_boottime,
3245                   (unsigned long long)__entry->parent_tsf,
3246                   MAC_PR_ARG(parent_bssid))
3247 );
3248 
3249 DECLARE_EVENT_CLASS(cfg80211_bss_evt,
3250         TP_PROTO(struct cfg80211_bss *pub),
3251         TP_ARGS(pub),
3252         TP_STRUCT__entry(
3253                 MAC_ENTRY(bssid)
3254                 CHAN_ENTRY
3255         ),
3256         TP_fast_assign(
3257                 MAC_ASSIGN(bssid, pub->bssid);
3258                 CHAN_ASSIGN(pub->channel);
3259         ),
3260         TP_printk(MAC_PR_FMT ", " CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG)
3261 );
3262 
3263 DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss,
3264         TP_PROTO(struct cfg80211_bss *pub),
3265         TP_ARGS(pub)
3266 );
3267 
3268 TRACE_EVENT(cfg80211_return_uint,
3269         TP_PROTO(unsigned int ret),
3270         TP_ARGS(ret),
3271         TP_STRUCT__entry(
3272                 __field(unsigned int, ret)
3273         ),
3274         TP_fast_assign(
3275                 __entry->ret = ret;
3276         ),
3277         TP_printk("ret: %d", __entry->ret)
3278 );
3279 
3280 TRACE_EVENT(cfg80211_return_u32,
3281         TP_PROTO(u32 ret),
3282         TP_ARGS(ret),
3283         TP_STRUCT__entry(
3284                 __field(u32, ret)
3285         ),
3286         TP_fast_assign(
3287                 __entry->ret = ret;
3288         ),
3289         TP_printk("ret: %u", __entry->ret)
3290 );
3291 
3292 TRACE_EVENT(cfg80211_report_wowlan_wakeup,
3293         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
3294                  struct cfg80211_wowlan_wakeup *wakeup),
3295         TP_ARGS(wiphy, wdev, wakeup),
3296         TP_STRUCT__entry(
3297                 WIPHY_ENTRY
3298                 WDEV_ENTRY
3299                 __field(bool, non_wireless)
3300                 __field(bool, disconnect)
3301                 __field(bool, magic_pkt)
3302                 __field(bool, gtk_rekey_failure)
3303                 __field(bool, eap_identity_req)
3304                 __field(bool, four_way_handshake)
3305                 __field(bool, rfkill_release)
3306                 __field(s32, pattern_idx)
3307                 __field(u32, packet_len)
3308                 __dynamic_array(u8, packet,
3309                                 wakeup ? wakeup->packet_present_len : 0)
3310         ),
3311         TP_fast_assign(
3312                 WIPHY_ASSIGN;
3313                 WDEV_ASSIGN;
3314                 __entry->non_wireless = !wakeup;
3315                 __entry->disconnect = wakeup ? wakeup->disconnect : false;
3316                 __entry->magic_pkt = wakeup ? wakeup->magic_pkt : false;
3317                 __entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false;
3318                 __entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false;
3319                 __entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false;
3320                 __entry->rfkill_release = wakeup ? wakeup->rfkill_release : false;
3321                 __entry->pattern_idx = wakeup ? wakeup->pattern_idx : false;
3322                 __entry->packet_len = wakeup ? wakeup->packet_len : false;
3323                 if (wakeup && wakeup->packet && wakeup->packet_present_len)
3324                         memcpy(__get_dynamic_array(packet), wakeup->packet,
3325                                wakeup->packet_present_len);
3326         ),
3327         TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
3328 );
3329 
3330 TRACE_EVENT(cfg80211_ft_event,
3331         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3332                  struct cfg80211_ft_event_params *ft_event),
3333         TP_ARGS(wiphy, netdev, ft_event),
3334         TP_STRUCT__entry(
3335                 WIPHY_ENTRY
3336                 NETDEV_ENTRY
3337                 __dynamic_array(u8, ies, ft_event->ies_len)
3338                 MAC_ENTRY(target_ap)
3339                 __dynamic_array(u8, ric_ies, ft_event->ric_ies_len)
3340         ),
3341         TP_fast_assign(
3342                 WIPHY_ASSIGN;
3343                 NETDEV_ASSIGN;
3344                 if (ft_event->ies)
3345                         memcpy(__get_dynamic_array(ies), ft_event->ies,
3346                                ft_event->ies_len);
3347                 MAC_ASSIGN(target_ap, ft_event->target_ap);
3348                 if (ft_event->ric_ies)
3349                         memcpy(__get_dynamic_array(ric_ies), ft_event->ric_ies,
3350                                ft_event->ric_ies_len);
3351         ),
3352         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", target_ap: " MAC_PR_FMT,
3353                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(target_ap))
3354 );
3355 
3356 TRACE_EVENT(cfg80211_stop_iface,
3357         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
3358         TP_ARGS(wiphy, wdev),
3359         TP_STRUCT__entry(
3360                 WIPHY_ENTRY
3361                 WDEV_ENTRY
3362         ),
3363         TP_fast_assign(
3364                 WIPHY_ASSIGN;
3365                 WDEV_ASSIGN;
3366         ),
3367         TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT,
3368                   WIPHY_PR_ARG, WDEV_PR_ARG)
3369 );
3370 
3371 TRACE_EVENT(cfg80211_pmsr_report,
3372         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
3373                  u64 cookie, const u8 *addr),
3374         TP_ARGS(wiphy, wdev, cookie, addr),
3375         TP_STRUCT__entry(
3376                 WIPHY_ENTRY
3377                 WDEV_ENTRY
3378                 __field(u64, cookie)
3379                 MAC_ENTRY(addr)
3380         ),
3381         TP_fast_assign(
3382                 WIPHY_ASSIGN;
3383                 WDEV_ASSIGN;
3384                 __entry->cookie = cookie;
3385                 MAC_ASSIGN(addr, addr);
3386         ),
3387         TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie:%lld, " MAC_PR_FMT,
3388                   WIPHY_PR_ARG, WDEV_PR_ARG,
3389                   (unsigned long long)__entry->cookie,
3390                   MAC_PR_ARG(addr))
3391 );
3392 
3393 TRACE_EVENT(cfg80211_pmsr_complete,
3394         TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
3395         TP_ARGS(wiphy, wdev, cookie),
3396         TP_STRUCT__entry(
3397                 WIPHY_ENTRY
3398                 WDEV_ENTRY
3399                 __field(u64, cookie)
3400         ),
3401         TP_fast_assign(
3402                 WIPHY_ASSIGN;
3403                 WDEV_ASSIGN;
3404                 __entry->cookie = cookie;
3405         ),
3406         TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie:%lld",
3407                   WIPHY_PR_ARG, WDEV_PR_ARG,
3408                   (unsigned long long)__entry->cookie)
3409 );
3410 
3411 TRACE_EVENT(rdev_update_owe_info,
3412             TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3413                      struct cfg80211_update_owe_info *owe_info),
3414             TP_ARGS(wiphy, netdev, owe_info),
3415             TP_STRUCT__entry(WIPHY_ENTRY
3416                              NETDEV_ENTRY
3417                              MAC_ENTRY(peer)
3418                              __field(u16, status)
3419                              __dynamic_array(u8, ie, owe_info->ie_len)),
3420             TP_fast_assign(WIPHY_ASSIGN;
3421                            NETDEV_ASSIGN;
3422                            MAC_ASSIGN(peer, owe_info->peer);
3423                            __entry->status = owe_info->status;
3424                            memcpy(__get_dynamic_array(ie),
3425                                   owe_info->ie, owe_info->ie_len);),
3426             TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT
3427                   " status %d", WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer),
3428                   __entry->status)
3429 );
3430 
3431 TRACE_EVENT(cfg80211_update_owe_info_event,
3432             TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3433                      struct cfg80211_update_owe_info *owe_info),
3434             TP_ARGS(wiphy, netdev, owe_info),
3435             TP_STRUCT__entry(WIPHY_ENTRY
3436                              NETDEV_ENTRY
3437                              MAC_ENTRY(peer)
3438                              __dynamic_array(u8, ie, owe_info->ie_len)),
3439             TP_fast_assign(WIPHY_ASSIGN;
3440                            NETDEV_ASSIGN;
3441                            MAC_ASSIGN(peer, owe_info->peer);
3442                            memcpy(__get_dynamic_array(ie), owe_info->ie,
3443                                   owe_info->ie_len);),
3444             TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT,
3445                       WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer))
3446 );
3447 
3448 TRACE_EVENT(rdev_probe_mesh_link,
3449         TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
3450                  const u8 *dest, const u8 *buf, size_t len),
3451         TP_ARGS(wiphy, netdev, dest, buf, len),
3452         TP_STRUCT__entry(
3453                 WIPHY_ENTRY
3454                 NETDEV_ENTRY
3455                 MAC_ENTRY(dest)
3456         ),
3457         TP_fast_assign(
3458                 WIPHY_ASSIGN;
3459                 NETDEV_ASSIGN;
3460                 MAC_ASSIGN(dest, dest);
3461         ),
3462         TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT,
3463                   WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dest))
3464 );
3465 
3466 #endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
3467 
3468 #undef TRACE_INCLUDE_PATH
3469 #define TRACE_INCLUDE_PATH .
3470 #undef TRACE_INCLUDE_FILE
3471 #define TRACE_INCLUDE_FILE trace
3472 #include <trace/define_trace.h>

/* [<][>][^][v][top][bottom][index][help] */