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