1 #undef TRACE_SYSTEM 2 #define TRACE_SYSTEM cfg80211 3 4 #if !defined(__RDEV_OPS_TRACE) || defined(TRACE_HEADER_MULTI_READ) 5 #define __RDEV_OPS_TRACE 6 7 #include <linux/tracepoint.h> 8 9 #include <linux/rtnetlink.h> 10 #include <net/cfg80211.h> 11 #include "core.h" 12 13 #define MAC_ENTRY(entry_mac) __array(u8, entry_mac, ETH_ALEN) 14 #define MAC_ASSIGN(entry_mac, given_mac) do { \ 15 if (given_mac) \ 16 memcpy(__entry->entry_mac, given_mac, ETH_ALEN); \ 17 else \ 18 memset(__entry->entry_mac, 0, ETH_ALEN); \ 19 } while (0) 20 #define MAC_PR_FMT "%pM" 21 #define MAC_PR_ARG(entry_mac) (__entry->entry_mac) 22 23 #define MAXNAME 32 24 #define WIPHY_ENTRY __array(char, wiphy_name, 32) 25 #define WIPHY_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(wiphy), MAXNAME) 26 #define WIPHY_PR_FMT "%s" 27 #define WIPHY_PR_ARG __entry->wiphy_name 28 29 #define WDEV_ENTRY __field(u32, id) 30 #define WDEV_ASSIGN (__entry->id) = (wdev ? wdev->identifier : 0) 31 #define WDEV_PR_FMT "wdev(%u)" 32 #define WDEV_PR_ARG (__entry->id) 33 34 #define NETDEV_ENTRY __array(char, name, IFNAMSIZ) \ 35 __field(int, ifindex) 36 #define NETDEV_ASSIGN \ 37 do { \ 38 memcpy(__entry->name, netdev->name, IFNAMSIZ); \ 39 (__entry->ifindex) = (netdev->ifindex); \ 40 } while (0) 41 #define NETDEV_PR_FMT "netdev:%s(%d)" 42 #define NETDEV_PR_ARG __entry->name, __entry->ifindex 43 44 #define MESH_CFG_ENTRY __field(u16, dot11MeshRetryTimeout) \ 45 __field(u16, dot11MeshConfirmTimeout) \ 46 __field(u16, dot11MeshHoldingTimeout) \ 47 __field(u16, dot11MeshMaxPeerLinks) \ 48 __field(u8, dot11MeshMaxRetries) \ 49 __field(u8, dot11MeshTTL) \ 50 __field(u8, element_ttl) \ 51 __field(bool, auto_open_plinks) \ 52 __field(u32, dot11MeshNbrOffsetMaxNeighbor) \ 53 __field(u8, dot11MeshHWMPmaxPREQretries) \ 54 __field(u32, path_refresh_time) \ 55 __field(u32, dot11MeshHWMPactivePathTimeout) \ 56 __field(u16, min_discovery_timeout) \ 57 __field(u16, dot11MeshHWMPpreqMinInterval) \ 58 __field(u16, dot11MeshHWMPperrMinInterval) \ 59 __field(u16, dot11MeshHWMPnetDiameterTraversalTime) \ 60 __field(u8, dot11MeshHWMPRootMode) \ 61 __field(u16, dot11MeshHWMPRannInterval) \ 62 __field(bool, dot11MeshGateAnnouncementProtocol) \ 63 __field(bool, dot11MeshForwarding) \ 64 __field(s32, rssi_threshold) \ 65 __field(u16, ht_opmode) \ 66 __field(u32, dot11MeshHWMPactivePathToRootTimeout) \ 67 __field(u16, dot11MeshHWMProotInterval) \ 68 __field(u16, dot11MeshHWMPconfirmationInterval) 69 #define MESH_CFG_ASSIGN \ 70 do { \ 71 __entry->dot11MeshRetryTimeout = conf->dot11MeshRetryTimeout; \ 72 __entry->dot11MeshConfirmTimeout = \ 73 conf->dot11MeshConfirmTimeout; \ 74 __entry->dot11MeshHoldingTimeout = \ 75 conf->dot11MeshHoldingTimeout; \ 76 __entry->dot11MeshMaxPeerLinks = conf->dot11MeshMaxPeerLinks; \ 77 __entry->dot11MeshMaxRetries = conf->dot11MeshMaxRetries; \ 78 __entry->dot11MeshTTL = conf->dot11MeshTTL; \ 79 __entry->element_ttl = conf->element_ttl; \ 80 __entry->auto_open_plinks = conf->auto_open_plinks; \ 81 __entry->dot11MeshNbrOffsetMaxNeighbor = \ 82 conf->dot11MeshNbrOffsetMaxNeighbor; \ 83 __entry->dot11MeshHWMPmaxPREQretries = \ 84 conf->dot11MeshHWMPmaxPREQretries; \ 85 __entry->path_refresh_time = conf->path_refresh_time; \ 86 __entry->dot11MeshHWMPactivePathTimeout = \ 87 conf->dot11MeshHWMPactivePathTimeout; \ 88 __entry->min_discovery_timeout = conf->min_discovery_timeout; \ 89 __entry->dot11MeshHWMPpreqMinInterval = \ 90 conf->dot11MeshHWMPpreqMinInterval; \ 91 __entry->dot11MeshHWMPperrMinInterval = \ 92 conf->dot11MeshHWMPperrMinInterval; \ 93 __entry->dot11MeshHWMPnetDiameterTraversalTime = \ 94 conf->dot11MeshHWMPnetDiameterTraversalTime; \ 95 __entry->dot11MeshHWMPRootMode = conf->dot11MeshHWMPRootMode; \ 96 __entry->dot11MeshHWMPRannInterval = \ 97 conf->dot11MeshHWMPRannInterval; \ 98 __entry->dot11MeshGateAnnouncementProtocol = \ 99 conf->dot11MeshGateAnnouncementProtocol; \ 100 __entry->dot11MeshForwarding = conf->dot11MeshForwarding; \ 101 __entry->rssi_threshold = conf->rssi_threshold; \ 102 __entry->ht_opmode = conf->ht_opmode; \ 103 __entry->dot11MeshHWMPactivePathToRootTimeout = \ 104 conf->dot11MeshHWMPactivePathToRootTimeout; \ 105 __entry->dot11MeshHWMProotInterval = \ 106 conf->dot11MeshHWMProotInterval; \ 107 __entry->dot11MeshHWMPconfirmationInterval = \ 108 conf->dot11MeshHWMPconfirmationInterval; \ 109 } while (0) 110 111 #define CHAN_ENTRY __field(enum ieee80211_band, band) \ 112 __field(u16, center_freq) 113 #define CHAN_ASSIGN(chan) \ 114 do { \ 115 if (chan) { \ 116 __entry->band = chan->band; \ 117 __entry->center_freq = chan->center_freq; \ 118 } else { \ 119 __entry->band = 0; \ 120 __entry->center_freq = 0; \ 121 } \ 122 } while (0) 123 #define CHAN_PR_FMT "band: %d, freq: %u" 124 #define CHAN_PR_ARG __entry->band, __entry->center_freq 125 126 #define CHAN_DEF_ENTRY __field(enum ieee80211_band, band) \ 127 __field(u32, control_freq) \ 128 __field(u32, width) \ 129 __field(u32, center_freq1) \ 130 __field(u32, center_freq2) 131 #define CHAN_DEF_ASSIGN(chandef) \ 132 do { \ 133 if ((chandef) && (chandef)->chan) { \ 134 __entry->band = (chandef)->chan->band; \ 135 __entry->control_freq = \ 136 (chandef)->chan->center_freq; \ 137 __entry->width = (chandef)->width; \ 138 __entry->center_freq1 = (chandef)->center_freq1;\ 139 __entry->center_freq2 = (chandef)->center_freq2;\ 140 } else { \ 141 __entry->band = 0; \ 142 __entry->control_freq = 0; \ 143 __entry->width = 0; \ 144 __entry->center_freq1 = 0; \ 145 __entry->center_freq2 = 0; \ 146 } \ 147 } while (0) 148 #define CHAN_DEF_PR_FMT \ 149 "band: %d, control freq: %u, width: %d, cf1: %u, cf2: %u" 150 #define CHAN_DEF_PR_ARG __entry->band, __entry->control_freq, \ 151 __entry->width, __entry->center_freq1, \ 152 __entry->center_freq2 153 154 #define SINFO_ENTRY __field(int, generation) \ 155 __field(u32, connected_time) \ 156 __field(u32, inactive_time) \ 157 __field(u32, rx_bytes) \ 158 __field(u32, tx_bytes) \ 159 __field(u32, rx_packets) \ 160 __field(u32, tx_packets) \ 161 __field(u32, tx_retries) \ 162 __field(u32, tx_failed) \ 163 __field(u32, rx_dropped_misc) \ 164 __field(u32, beacon_loss_count) \ 165 __field(u16, llid) \ 166 __field(u16, plid) \ 167 __field(u8, plink_state) 168 #define SINFO_ASSIGN \ 169 do { \ 170 __entry->generation = sinfo->generation; \ 171 __entry->connected_time = sinfo->connected_time; \ 172 __entry->inactive_time = sinfo->inactive_time; \ 173 __entry->rx_bytes = sinfo->rx_bytes; \ 174 __entry->tx_bytes = sinfo->tx_bytes; \ 175 __entry->rx_packets = sinfo->rx_packets; \ 176 __entry->tx_packets = sinfo->tx_packets; \ 177 __entry->tx_retries = sinfo->tx_retries; \ 178 __entry->tx_failed = sinfo->tx_failed; \ 179 __entry->rx_dropped_misc = sinfo->rx_dropped_misc; \ 180 __entry->beacon_loss_count = sinfo->beacon_loss_count; \ 181 __entry->llid = sinfo->llid; \ 182 __entry->plid = sinfo->plid; \ 183 __entry->plink_state = sinfo->plink_state; \ 184 } while (0) 185 186 #define BOOL_TO_STR(bo) (bo) ? "true" : "false" 187 188 /************************************************************* 189 * rdev->ops traces * 190 *************************************************************/ 191 192 TRACE_EVENT(rdev_suspend, 193 TP_PROTO(struct wiphy *wiphy, struct cfg80211_wowlan *wow), 194 TP_ARGS(wiphy, wow), 195 TP_STRUCT__entry( 196 WIPHY_ENTRY 197 __field(bool, any) 198 __field(bool, disconnect) 199 __field(bool, magic_pkt) 200 __field(bool, gtk_rekey_failure) 201 __field(bool, eap_identity_req) 202 __field(bool, four_way_handshake) 203 __field(bool, rfkill_release) 204 __field(bool, valid_wow) 205 ), 206 TP_fast_assign( 207 WIPHY_ASSIGN; 208 if (wow) { 209 __entry->any = wow->any; 210 __entry->disconnect = wow->disconnect; 211 __entry->magic_pkt = wow->magic_pkt; 212 __entry->gtk_rekey_failure = wow->gtk_rekey_failure; 213 __entry->eap_identity_req = wow->eap_identity_req; 214 __entry->four_way_handshake = wow->four_way_handshake; 215 __entry->rfkill_release = wow->rfkill_release; 216 __entry->valid_wow = true; 217 } else { 218 __entry->valid_wow = false; 219 } 220 ), 221 TP_printk(WIPHY_PR_FMT ", wow%s - any: %d, disconnect: %d, " 222 "magic pkt: %d, gtk rekey failure: %d, eap identify req: %d, " 223 "four way handshake: %d, rfkill release: %d.", 224 WIPHY_PR_ARG, __entry->valid_wow ? "" : "(Not configured!)", 225 __entry->any, __entry->disconnect, __entry->magic_pkt, 226 __entry->gtk_rekey_failure, __entry->eap_identity_req, 227 __entry->four_way_handshake, __entry->rfkill_release) 228 ); 229 230 TRACE_EVENT(rdev_return_int, 231 TP_PROTO(struct wiphy *wiphy, int ret), 232 TP_ARGS(wiphy, ret), 233 TP_STRUCT__entry( 234 WIPHY_ENTRY 235 __field(int, ret) 236 ), 237 TP_fast_assign( 238 WIPHY_ASSIGN; 239 __entry->ret = ret; 240 ), 241 TP_printk(WIPHY_PR_FMT ", returned: %d", WIPHY_PR_ARG, __entry->ret) 242 ); 243 244 TRACE_EVENT(rdev_scan, 245 TP_PROTO(struct wiphy *wiphy, struct cfg80211_scan_request *request), 246 TP_ARGS(wiphy, request), 247 TP_STRUCT__entry( 248 WIPHY_ENTRY 249 ), 250 TP_fast_assign( 251 WIPHY_ASSIGN; 252 ), 253 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG) 254 ); 255 256 DECLARE_EVENT_CLASS(wiphy_only_evt, 257 TP_PROTO(struct wiphy *wiphy), 258 TP_ARGS(wiphy), 259 TP_STRUCT__entry( 260 WIPHY_ENTRY 261 ), 262 TP_fast_assign( 263 WIPHY_ASSIGN; 264 ), 265 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG) 266 ); 267 268 DEFINE_EVENT(wiphy_only_evt, rdev_resume, 269 TP_PROTO(struct wiphy *wiphy), 270 TP_ARGS(wiphy) 271 ); 272 273 DEFINE_EVENT(wiphy_only_evt, rdev_return_void, 274 TP_PROTO(struct wiphy *wiphy), 275 TP_ARGS(wiphy) 276 ); 277 278 DEFINE_EVENT(wiphy_only_evt, rdev_get_ringparam, 279 TP_PROTO(struct wiphy *wiphy), 280 TP_ARGS(wiphy) 281 ); 282 283 DEFINE_EVENT(wiphy_only_evt, rdev_get_antenna, 284 TP_PROTO(struct wiphy *wiphy), 285 TP_ARGS(wiphy) 286 ); 287 288 DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll, 289 TP_PROTO(struct wiphy *wiphy), 290 TP_ARGS(wiphy) 291 ); 292 293 DECLARE_EVENT_CLASS(wiphy_enabled_evt, 294 TP_PROTO(struct wiphy *wiphy, bool enabled), 295 TP_ARGS(wiphy, enabled), 296 TP_STRUCT__entry( 297 WIPHY_ENTRY 298 __field(bool, enabled) 299 ), 300 TP_fast_assign( 301 WIPHY_ASSIGN; 302 __entry->enabled = enabled; 303 ), 304 TP_printk(WIPHY_PR_FMT ", %senabled ", 305 WIPHY_PR_ARG, __entry->enabled ? "" : "not ") 306 ); 307 308 DEFINE_EVENT(wiphy_enabled_evt, rdev_set_wakeup, 309 TP_PROTO(struct wiphy *wiphy, bool enabled), 310 TP_ARGS(wiphy, enabled) 311 ); 312 313 TRACE_EVENT(rdev_add_virtual_intf, 314 TP_PROTO(struct wiphy *wiphy, char *name, enum nl80211_iftype type), 315 TP_ARGS(wiphy, name, type), 316 TP_STRUCT__entry( 317 WIPHY_ENTRY 318 __string(vir_intf_name, name ? name : "<noname>") 319 __field(enum nl80211_iftype, type) 320 ), 321 TP_fast_assign( 322 WIPHY_ASSIGN; 323 __assign_str(vir_intf_name, name ? name : "<noname>"); 324 __entry->type = type; 325 ), 326 TP_printk(WIPHY_PR_FMT ", virtual intf name: %s, type: %d", 327 WIPHY_PR_ARG, __get_str(vir_intf_name), __entry->type) 328 ); 329 330 DECLARE_EVENT_CLASS(wiphy_wdev_evt, 331 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), 332 TP_ARGS(wiphy, wdev), 333 TP_STRUCT__entry( 334 WIPHY_ENTRY 335 WDEV_ENTRY 336 ), 337 TP_fast_assign( 338 WIPHY_ASSIGN; 339 WDEV_ASSIGN; 340 ), 341 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG) 342 ); 343 344 DEFINE_EVENT(wiphy_wdev_evt, rdev_return_wdev, 345 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), 346 TP_ARGS(wiphy, wdev) 347 ); 348 349 DEFINE_EVENT(wiphy_wdev_evt, rdev_del_virtual_intf, 350 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), 351 TP_ARGS(wiphy, wdev) 352 ); 353 354 TRACE_EVENT(rdev_change_virtual_intf, 355 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 356 enum nl80211_iftype type), 357 TP_ARGS(wiphy, netdev, type), 358 TP_STRUCT__entry( 359 WIPHY_ENTRY 360 NETDEV_ENTRY 361 __field(enum nl80211_iftype, type) 362 ), 363 TP_fast_assign( 364 WIPHY_ASSIGN; 365 NETDEV_ASSIGN; 366 __entry->type = type; 367 ), 368 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", type: %d", 369 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->type) 370 ); 371 372 DECLARE_EVENT_CLASS(key_handle, 373 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, 374 bool pairwise, const u8 *mac_addr), 375 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr), 376 TP_STRUCT__entry( 377 WIPHY_ENTRY 378 NETDEV_ENTRY 379 MAC_ENTRY(mac_addr) 380 __field(u8, key_index) 381 __field(bool, pairwise) 382 ), 383 TP_fast_assign( 384 WIPHY_ASSIGN; 385 NETDEV_ASSIGN; 386 MAC_ASSIGN(mac_addr, mac_addr); 387 __entry->key_index = key_index; 388 __entry->pairwise = pairwise; 389 ), 390 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key_index: %u, pairwise: %s, mac addr: " MAC_PR_FMT, 391 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index, 392 BOOL_TO_STR(__entry->pairwise), MAC_PR_ARG(mac_addr)) 393 ); 394 395 DEFINE_EVENT(key_handle, rdev_add_key, 396 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, 397 bool pairwise, const u8 *mac_addr), 398 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr) 399 ); 400 401 DEFINE_EVENT(key_handle, rdev_get_key, 402 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, 403 bool pairwise, const u8 *mac_addr), 404 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr) 405 ); 406 407 DEFINE_EVENT(key_handle, rdev_del_key, 408 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, 409 bool pairwise, const u8 *mac_addr), 410 TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr) 411 ); 412 413 TRACE_EVENT(rdev_set_default_key, 414 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, 415 bool unicast, bool multicast), 416 TP_ARGS(wiphy, netdev, key_index, unicast, multicast), 417 TP_STRUCT__entry( 418 WIPHY_ENTRY 419 NETDEV_ENTRY 420 __field(u8, key_index) 421 __field(bool, unicast) 422 __field(bool, multicast) 423 ), 424 TP_fast_assign( 425 WIPHY_ASSIGN; 426 NETDEV_ASSIGN; 427 __entry->key_index = key_index; 428 __entry->unicast = unicast; 429 __entry->multicast = multicast; 430 ), 431 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u, unicast: %s, multicast: %s", 432 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index, 433 BOOL_TO_STR(__entry->unicast), 434 BOOL_TO_STR(__entry->multicast)) 435 ); 436 437 TRACE_EVENT(rdev_set_default_mgmt_key, 438 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index), 439 TP_ARGS(wiphy, netdev, key_index), 440 TP_STRUCT__entry( 441 WIPHY_ENTRY 442 NETDEV_ENTRY 443 __field(u8, key_index) 444 ), 445 TP_fast_assign( 446 WIPHY_ASSIGN; 447 NETDEV_ASSIGN; 448 __entry->key_index = key_index; 449 ), 450 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", key index: %u", 451 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index) 452 ); 453 454 TRACE_EVENT(rdev_start_ap, 455 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 456 struct cfg80211_ap_settings *settings), 457 TP_ARGS(wiphy, netdev, settings), 458 TP_STRUCT__entry( 459 WIPHY_ENTRY 460 NETDEV_ENTRY 461 CHAN_DEF_ENTRY 462 __field(int, beacon_interval) 463 __field(int, dtim_period) 464 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1) 465 __field(enum nl80211_hidden_ssid, hidden_ssid) 466 __field(u32, wpa_ver) 467 __field(bool, privacy) 468 __field(enum nl80211_auth_type, auth_type) 469 __field(int, inactivity_timeout) 470 ), 471 TP_fast_assign( 472 WIPHY_ASSIGN; 473 NETDEV_ASSIGN; 474 CHAN_DEF_ASSIGN(&settings->chandef); 475 __entry->beacon_interval = settings->beacon_interval; 476 __entry->dtim_period = settings->dtim_period; 477 __entry->hidden_ssid = settings->hidden_ssid; 478 __entry->wpa_ver = settings->crypto.wpa_versions; 479 __entry->privacy = settings->privacy; 480 __entry->auth_type = settings->auth_type; 481 __entry->inactivity_timeout = settings->inactivity_timeout; 482 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1); 483 memcpy(__entry->ssid, settings->ssid, settings->ssid_len); 484 ), 485 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", AP settings - ssid: %s, " 486 CHAN_DEF_PR_FMT ", beacon interval: %d, dtim period: %d, " 487 "hidden ssid: %d, wpa versions: %u, privacy: %s, " 488 "auth type: %d, inactivity timeout: %d", 489 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ssid, CHAN_DEF_PR_ARG, 490 __entry->beacon_interval, __entry->dtim_period, 491 __entry->hidden_ssid, __entry->wpa_ver, 492 BOOL_TO_STR(__entry->privacy), __entry->auth_type, 493 __entry->inactivity_timeout) 494 ); 495 496 TRACE_EVENT(rdev_change_beacon, 497 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 498 struct cfg80211_beacon_data *info), 499 TP_ARGS(wiphy, netdev, info), 500 TP_STRUCT__entry( 501 WIPHY_ENTRY 502 NETDEV_ENTRY 503 __dynamic_array(u8, head, info ? info->head_len : 0) 504 __dynamic_array(u8, tail, info ? info->tail_len : 0) 505 __dynamic_array(u8, beacon_ies, info ? info->beacon_ies_len : 0) 506 __dynamic_array(u8, proberesp_ies, 507 info ? info->proberesp_ies_len : 0) 508 __dynamic_array(u8, assocresp_ies, 509 info ? info->assocresp_ies_len : 0) 510 __dynamic_array(u8, probe_resp, info ? info->probe_resp_len : 0) 511 ), 512 TP_fast_assign( 513 WIPHY_ASSIGN; 514 NETDEV_ASSIGN; 515 if (info) { 516 if (info->head) 517 memcpy(__get_dynamic_array(head), info->head, 518 info->head_len); 519 if (info->tail) 520 memcpy(__get_dynamic_array(tail), info->tail, 521 info->tail_len); 522 if (info->beacon_ies) 523 memcpy(__get_dynamic_array(beacon_ies), 524 info->beacon_ies, info->beacon_ies_len); 525 if (info->proberesp_ies) 526 memcpy(__get_dynamic_array(proberesp_ies), 527 info->proberesp_ies, 528 info->proberesp_ies_len); 529 if (info->assocresp_ies) 530 memcpy(__get_dynamic_array(assocresp_ies), 531 info->assocresp_ies, 532 info->assocresp_ies_len); 533 if (info->probe_resp) 534 memcpy(__get_dynamic_array(probe_resp), 535 info->probe_resp, info->probe_resp_len); 536 } 537 ), 538 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG) 539 ); 540 541 DECLARE_EVENT_CLASS(wiphy_netdev_evt, 542 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), 543 TP_ARGS(wiphy, netdev), 544 TP_STRUCT__entry( 545 WIPHY_ENTRY 546 NETDEV_ENTRY 547 ), 548 TP_fast_assign( 549 WIPHY_ASSIGN; 550 NETDEV_ASSIGN; 551 ), 552 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG) 553 ); 554 555 DEFINE_EVENT(wiphy_netdev_evt, rdev_stop_ap, 556 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), 557 TP_ARGS(wiphy, netdev) 558 ); 559 560 DEFINE_EVENT(wiphy_netdev_evt, rdev_get_et_stats, 561 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), 562 TP_ARGS(wiphy, netdev) 563 ); 564 565 DEFINE_EVENT(wiphy_netdev_evt, rdev_sched_scan_stop, 566 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), 567 TP_ARGS(wiphy, netdev) 568 ); 569 570 DEFINE_EVENT(wiphy_netdev_evt, rdev_set_rekey_data, 571 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), 572 TP_ARGS(wiphy, netdev) 573 ); 574 575 DEFINE_EVENT(wiphy_netdev_evt, rdev_get_mesh_config, 576 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), 577 TP_ARGS(wiphy, netdev) 578 ); 579 580 DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_mesh, 581 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), 582 TP_ARGS(wiphy, netdev) 583 ); 584 585 DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ibss, 586 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), 587 TP_ARGS(wiphy, netdev) 588 ); 589 590 DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa, 591 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), 592 TP_ARGS(wiphy, netdev) 593 ); 594 595 DECLARE_EVENT_CLASS(station_add_change, 596 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac, 597 struct station_parameters *params), 598 TP_ARGS(wiphy, netdev, mac, params), 599 TP_STRUCT__entry( 600 WIPHY_ENTRY 601 NETDEV_ENTRY 602 MAC_ENTRY(sta_mac) 603 __field(u32, sta_flags_mask) 604 __field(u32, sta_flags_set) 605 __field(u32, sta_modify_mask) 606 __field(int, listen_interval) 607 __field(u16, aid) 608 __field(u8, plink_action) 609 __field(u8, plink_state) 610 __field(u8, uapsd_queues) 611 __array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap)) 612 ), 613 TP_fast_assign( 614 WIPHY_ASSIGN; 615 NETDEV_ASSIGN; 616 MAC_ASSIGN(sta_mac, mac); 617 __entry->sta_flags_mask = params->sta_flags_mask; 618 __entry->sta_flags_set = params->sta_flags_set; 619 __entry->sta_modify_mask = params->sta_modify_mask; 620 __entry->listen_interval = params->listen_interval; 621 __entry->aid = params->aid; 622 __entry->plink_action = params->plink_action; 623 __entry->plink_state = params->plink_state; 624 __entry->uapsd_queues = params->uapsd_queues; 625 memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap)); 626 if (params->ht_capa) 627 memcpy(__entry->ht_capa, params->ht_capa, 628 sizeof(struct ieee80211_ht_cap)); 629 ), 630 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT 631 ", station flags mask: %u, station flags set: %u, " 632 "station modify mask: %u, listen interval: %d, aid: %u, " 633 "plink action: %u, plink state: %u, uapsd queues: %u", 634 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac), 635 __entry->sta_flags_mask, __entry->sta_flags_set, 636 __entry->sta_modify_mask, __entry->listen_interval, 637 __entry->aid, __entry->plink_action, __entry->plink_state, 638 __entry->uapsd_queues) 639 ); 640 641 DEFINE_EVENT(station_add_change, rdev_add_station, 642 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac, 643 struct station_parameters *params), 644 TP_ARGS(wiphy, netdev, mac, params) 645 ); 646 647 DEFINE_EVENT(station_add_change, rdev_change_station, 648 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac, 649 struct station_parameters *params), 650 TP_ARGS(wiphy, netdev, mac, params) 651 ); 652 653 DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt, 654 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac), 655 TP_ARGS(wiphy, netdev, mac), 656 TP_STRUCT__entry( 657 WIPHY_ENTRY 658 NETDEV_ENTRY 659 MAC_ENTRY(sta_mac) 660 ), 661 TP_fast_assign( 662 WIPHY_ASSIGN; 663 NETDEV_ASSIGN; 664 MAC_ASSIGN(sta_mac, mac); 665 ), 666 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mac: " MAC_PR_FMT, 667 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac)) 668 ); 669 670 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_station, 671 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac), 672 TP_ARGS(wiphy, netdev, mac) 673 ); 674 675 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_station, 676 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac), 677 TP_ARGS(wiphy, netdev, mac) 678 ); 679 680 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath, 681 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac), 682 TP_ARGS(wiphy, netdev, mac) 683 ); 684 685 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_set_wds_peer, 686 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac), 687 TP_ARGS(wiphy, netdev, mac) 688 ); 689 690 TRACE_EVENT(rdev_dump_station, 691 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx, 692 u8 *mac), 693 TP_ARGS(wiphy, netdev, idx, mac), 694 TP_STRUCT__entry( 695 WIPHY_ENTRY 696 NETDEV_ENTRY 697 MAC_ENTRY(sta_mac) 698 __field(int, idx) 699 ), 700 TP_fast_assign( 701 WIPHY_ASSIGN; 702 NETDEV_ASSIGN; 703 MAC_ASSIGN(sta_mac, mac); 704 __entry->idx = idx; 705 ), 706 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT ", idx: %d", 707 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac), 708 __entry->idx) 709 ); 710 711 TRACE_EVENT(rdev_return_int_station_info, 712 TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo), 713 TP_ARGS(wiphy, ret, sinfo), 714 TP_STRUCT__entry( 715 WIPHY_ENTRY 716 __field(int, ret) 717 SINFO_ENTRY 718 ), 719 TP_fast_assign( 720 WIPHY_ASSIGN; 721 __entry->ret = ret; 722 SINFO_ASSIGN; 723 ), 724 TP_printk(WIPHY_PR_FMT ", returned %d" , 725 WIPHY_PR_ARG, __entry->ret) 726 ); 727 728 DECLARE_EVENT_CLASS(mpath_evt, 729 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst, 730 u8 *next_hop), 731 TP_ARGS(wiphy, netdev, dst, next_hop), 732 TP_STRUCT__entry( 733 WIPHY_ENTRY 734 NETDEV_ENTRY 735 MAC_ENTRY(dst) 736 MAC_ENTRY(next_hop) 737 ), 738 TP_fast_assign( 739 WIPHY_ASSIGN; 740 NETDEV_ASSIGN; 741 MAC_ASSIGN(dst, dst); 742 MAC_ASSIGN(next_hop, next_hop); 743 ), 744 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT ", next hop: " MAC_PR_FMT, 745 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dst), 746 MAC_PR_ARG(next_hop)) 747 ); 748 749 DEFINE_EVENT(mpath_evt, rdev_add_mpath, 750 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst, 751 u8 *next_hop), 752 TP_ARGS(wiphy, netdev, dst, next_hop) 753 ); 754 755 DEFINE_EVENT(mpath_evt, rdev_change_mpath, 756 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst, 757 u8 *next_hop), 758 TP_ARGS(wiphy, netdev, dst, next_hop) 759 ); 760 761 DEFINE_EVENT(mpath_evt, rdev_get_mpath, 762 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst, 763 u8 *next_hop), 764 TP_ARGS(wiphy, netdev, dst, next_hop) 765 ); 766 767 TRACE_EVENT(rdev_dump_mpath, 768 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx, 769 u8 *dst, u8 *next_hop), 770 TP_ARGS(wiphy, netdev, idx, dst, next_hop), 771 TP_STRUCT__entry( 772 WIPHY_ENTRY 773 NETDEV_ENTRY 774 MAC_ENTRY(dst) 775 MAC_ENTRY(next_hop) 776 __field(int, idx) 777 ), 778 TP_fast_assign( 779 WIPHY_ASSIGN; 780 NETDEV_ASSIGN; 781 MAC_ASSIGN(dst, dst); 782 MAC_ASSIGN(next_hop, next_hop); 783 __entry->idx = idx; 784 ), 785 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: " 786 MAC_PR_FMT ", next hop: " MAC_PR_FMT, 787 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst), 788 MAC_PR_ARG(next_hop)) 789 ); 790 791 TRACE_EVENT(rdev_return_int_mpath_info, 792 TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo), 793 TP_ARGS(wiphy, ret, pinfo), 794 TP_STRUCT__entry( 795 WIPHY_ENTRY 796 __field(int, ret) 797 __field(int, generation) 798 __field(u32, filled) 799 __field(u32, frame_qlen) 800 __field(u32, sn) 801 __field(u32, metric) 802 __field(u32, exptime) 803 __field(u32, discovery_timeout) 804 __field(u8, discovery_retries) 805 __field(u8, flags) 806 ), 807 TP_fast_assign( 808 WIPHY_ASSIGN; 809 __entry->ret = ret; 810 __entry->generation = pinfo->generation; 811 __entry->filled = pinfo->filled; 812 __entry->frame_qlen = pinfo->frame_qlen; 813 __entry->sn = pinfo->sn; 814 __entry->metric = pinfo->metric; 815 __entry->exptime = pinfo->exptime; 816 __entry->discovery_timeout = pinfo->discovery_timeout; 817 __entry->discovery_retries = pinfo->discovery_retries; 818 __entry->flags = pinfo->flags; 819 ), 820 TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, " 821 "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u," 822 " discovery timeout: %u, discovery retries: %u, flags: %u", 823 WIPHY_PR_ARG, __entry->ret, __entry->generation, 824 __entry->filled, __entry->frame_qlen, __entry->sn, 825 __entry->metric, __entry->exptime, __entry->discovery_timeout, 826 __entry->discovery_retries, __entry->flags) 827 ); 828 829 TRACE_EVENT(rdev_return_int_mesh_config, 830 TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf), 831 TP_ARGS(wiphy, ret, conf), 832 TP_STRUCT__entry( 833 WIPHY_ENTRY 834 MESH_CFG_ENTRY 835 __field(int, ret) 836 ), 837 TP_fast_assign( 838 WIPHY_ASSIGN; 839 MESH_CFG_ASSIGN; 840 __entry->ret = ret; 841 ), 842 TP_printk(WIPHY_PR_FMT ", returned: %d", 843 WIPHY_PR_ARG, __entry->ret) 844 ); 845 846 TRACE_EVENT(rdev_update_mesh_config, 847 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask, 848 const struct mesh_config *conf), 849 TP_ARGS(wiphy, netdev, mask, conf), 850 TP_STRUCT__entry( 851 WIPHY_ENTRY 852 NETDEV_ENTRY 853 MESH_CFG_ENTRY 854 __field(u32, mask) 855 ), 856 TP_fast_assign( 857 WIPHY_ASSIGN; 858 NETDEV_ASSIGN; 859 MESH_CFG_ASSIGN; 860 __entry->mask = mask; 861 ), 862 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mask: %u", 863 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask) 864 ); 865 866 TRACE_EVENT(rdev_join_mesh, 867 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 868 const struct mesh_config *conf, 869 const struct mesh_setup *setup), 870 TP_ARGS(wiphy, netdev, conf, setup), 871 TP_STRUCT__entry( 872 WIPHY_ENTRY 873 NETDEV_ENTRY 874 MESH_CFG_ENTRY 875 ), 876 TP_fast_assign( 877 WIPHY_ASSIGN; 878 NETDEV_ASSIGN; 879 MESH_CFG_ASSIGN; 880 ), 881 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, 882 WIPHY_PR_ARG, NETDEV_PR_ARG) 883 ); 884 885 TRACE_EVENT(rdev_change_bss, 886 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 887 struct bss_parameters *params), 888 TP_ARGS(wiphy, netdev, params), 889 TP_STRUCT__entry( 890 WIPHY_ENTRY 891 NETDEV_ENTRY 892 __field(int, use_cts_prot) 893 __field(int, use_short_preamble) 894 __field(int, use_short_slot_time) 895 __field(int, ap_isolate) 896 __field(int, ht_opmode) 897 ), 898 TP_fast_assign( 899 WIPHY_ASSIGN; 900 NETDEV_ASSIGN; 901 __entry->use_cts_prot = params->use_cts_prot; 902 __entry->use_short_preamble = params->use_short_preamble; 903 __entry->use_short_slot_time = params->use_short_slot_time; 904 __entry->ap_isolate = params->ap_isolate; 905 __entry->ht_opmode = params->ht_opmode; 906 ), 907 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", use cts prot: %d, " 908 "use short preamble: %d, use short slot time: %d, " 909 "ap isolate: %d, ht opmode: %d", 910 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot, 911 __entry->use_short_preamble, __entry->use_short_slot_time, 912 __entry->ap_isolate, __entry->ht_opmode) 913 ); 914 915 TRACE_EVENT(rdev_set_txq_params, 916 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 917 struct ieee80211_txq_params *params), 918 TP_ARGS(wiphy, netdev, params), 919 TP_STRUCT__entry( 920 WIPHY_ENTRY 921 NETDEV_ENTRY 922 __field(enum nl80211_ac, ac) 923 __field(u16, txop) 924 __field(u16, cwmin) 925 __field(u16, cwmax) 926 __field(u8, aifs) 927 ), 928 TP_fast_assign( 929 WIPHY_ASSIGN; 930 NETDEV_ASSIGN; 931 __entry->ac = params->ac; 932 __entry->txop = params->txop; 933 __entry->cwmin = params->cwmin; 934 __entry->cwmax = params->cwmax; 935 __entry->aifs = params->aifs; 936 ), 937 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", ac: %d, txop: %u, cwmin: %u, cwmax: %u, aifs: %u", 938 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop, 939 __entry->cwmin, __entry->cwmax, __entry->aifs) 940 ); 941 942 TRACE_EVENT(rdev_libertas_set_mesh_channel, 943 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 944 struct ieee80211_channel *chan), 945 TP_ARGS(wiphy, netdev, chan), 946 TP_STRUCT__entry( 947 WIPHY_ENTRY 948 NETDEV_ENTRY 949 CHAN_ENTRY 950 ), 951 TP_fast_assign( 952 WIPHY_ASSIGN; 953 NETDEV_ASSIGN; 954 CHAN_ASSIGN(chan); 955 ), 956 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_PR_FMT, WIPHY_PR_ARG, 957 NETDEV_PR_ARG, CHAN_PR_ARG) 958 ); 959 960 TRACE_EVENT(rdev_set_monitor_channel, 961 TP_PROTO(struct wiphy *wiphy, 962 struct cfg80211_chan_def *chandef), 963 TP_ARGS(wiphy, chandef), 964 TP_STRUCT__entry( 965 WIPHY_ENTRY 966 CHAN_DEF_ENTRY 967 ), 968 TP_fast_assign( 969 WIPHY_ASSIGN; 970 CHAN_DEF_ASSIGN(chandef); 971 ), 972 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT, 973 WIPHY_PR_ARG, CHAN_DEF_PR_ARG) 974 ); 975 976 TRACE_EVENT(rdev_auth, 977 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 978 struct cfg80211_auth_request *req), 979 TP_ARGS(wiphy, netdev, req), 980 TP_STRUCT__entry( 981 WIPHY_ENTRY 982 NETDEV_ENTRY 983 MAC_ENTRY(bssid) 984 __field(enum nl80211_auth_type, auth_type) 985 ), 986 TP_fast_assign( 987 WIPHY_ASSIGN; 988 NETDEV_ASSIGN; 989 if (req->bss) 990 MAC_ASSIGN(bssid, req->bss->bssid); 991 else 992 memset(__entry->bssid, 0, ETH_ALEN); 993 __entry->auth_type = req->auth_type; 994 ), 995 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", auth type: %d, bssid: " MAC_PR_FMT, 996 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type, 997 MAC_PR_ARG(bssid)) 998 ); 999 1000 TRACE_EVENT(rdev_assoc, 1001 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1002 struct cfg80211_assoc_request *req), 1003 TP_ARGS(wiphy, netdev, req), 1004 TP_STRUCT__entry( 1005 WIPHY_ENTRY 1006 NETDEV_ENTRY 1007 MAC_ENTRY(bssid) 1008 MAC_ENTRY(prev_bssid) 1009 __field(bool, use_mfp) 1010 __field(u32, flags) 1011 ), 1012 TP_fast_assign( 1013 WIPHY_ASSIGN; 1014 NETDEV_ASSIGN; 1015 if (req->bss) 1016 MAC_ASSIGN(bssid, req->bss->bssid); 1017 else 1018 memset(__entry->bssid, 0, ETH_ALEN); 1019 MAC_ASSIGN(prev_bssid, req->prev_bssid); 1020 __entry->use_mfp = req->use_mfp; 1021 __entry->flags = req->flags; 1022 ), 1023 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT 1024 ", previous bssid: " MAC_PR_FMT ", use mfp: %s, flags: %u", 1025 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), 1026 MAC_PR_ARG(prev_bssid), BOOL_TO_STR(__entry->use_mfp), 1027 __entry->flags) 1028 ); 1029 1030 TRACE_EVENT(rdev_deauth, 1031 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1032 struct cfg80211_deauth_request *req), 1033 TP_ARGS(wiphy, netdev, req), 1034 TP_STRUCT__entry( 1035 WIPHY_ENTRY 1036 NETDEV_ENTRY 1037 MAC_ENTRY(bssid) 1038 __field(u16, reason_code) 1039 ), 1040 TP_fast_assign( 1041 WIPHY_ASSIGN; 1042 NETDEV_ASSIGN; 1043 MAC_ASSIGN(bssid, req->bssid); 1044 __entry->reason_code = req->reason_code; 1045 ), 1046 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", reason: %u", 1047 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), 1048 __entry->reason_code) 1049 ); 1050 1051 TRACE_EVENT(rdev_disassoc, 1052 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1053 struct cfg80211_disassoc_request *req), 1054 TP_ARGS(wiphy, netdev, req), 1055 TP_STRUCT__entry( 1056 WIPHY_ENTRY 1057 NETDEV_ENTRY 1058 MAC_ENTRY(bssid) 1059 __field(u16, reason_code) 1060 __field(bool, local_state_change) 1061 ), 1062 TP_fast_assign( 1063 WIPHY_ASSIGN; 1064 NETDEV_ASSIGN; 1065 if (req->bss) 1066 MAC_ASSIGN(bssid, req->bss->bssid); 1067 else 1068 memset(__entry->bssid, 0, ETH_ALEN); 1069 __entry->reason_code = req->reason_code; 1070 __entry->local_state_change = req->local_state_change; 1071 ), 1072 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT 1073 ", reason: %u, local state change: %s", 1074 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), 1075 __entry->reason_code, 1076 BOOL_TO_STR(__entry->local_state_change)) 1077 ); 1078 1079 TRACE_EVENT(rdev_mgmt_tx_cancel_wait, 1080 TP_PROTO(struct wiphy *wiphy, 1081 struct wireless_dev *wdev, u64 cookie), 1082 TP_ARGS(wiphy, wdev, cookie), 1083 TP_STRUCT__entry( 1084 WIPHY_ENTRY 1085 WDEV_ENTRY 1086 __field(u64, cookie) 1087 ), 1088 TP_fast_assign( 1089 WIPHY_ASSIGN; 1090 WDEV_ASSIGN; 1091 __entry->cookie = cookie; 1092 ), 1093 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu ", 1094 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie) 1095 ); 1096 1097 TRACE_EVENT(rdev_set_power_mgmt, 1098 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1099 bool enabled, int timeout), 1100 TP_ARGS(wiphy, netdev, enabled, timeout), 1101 TP_STRUCT__entry( 1102 WIPHY_ENTRY 1103 NETDEV_ENTRY 1104 __field(bool, enabled) 1105 __field(int, timeout) 1106 ), 1107 TP_fast_assign( 1108 WIPHY_ASSIGN; 1109 NETDEV_ASSIGN; 1110 __entry->enabled = enabled; 1111 __entry->timeout = timeout; 1112 ), 1113 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %senabled, timeout: %d ", 1114 WIPHY_PR_ARG, NETDEV_PR_ARG, 1115 __entry->enabled ? "" : "not ", __entry->timeout) 1116 ); 1117 1118 TRACE_EVENT(rdev_connect, 1119 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1120 struct cfg80211_connect_params *sme), 1121 TP_ARGS(wiphy, netdev, sme), 1122 TP_STRUCT__entry( 1123 WIPHY_ENTRY 1124 NETDEV_ENTRY 1125 MAC_ENTRY(bssid) 1126 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1) 1127 __field(enum nl80211_auth_type, auth_type) 1128 __field(bool, privacy) 1129 __field(u32, wpa_versions) 1130 __field(u32, flags) 1131 ), 1132 TP_fast_assign( 1133 WIPHY_ASSIGN; 1134 NETDEV_ASSIGN; 1135 MAC_ASSIGN(bssid, sme->bssid); 1136 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1); 1137 memcpy(__entry->ssid, sme->ssid, sme->ssid_len); 1138 __entry->auth_type = sme->auth_type; 1139 __entry->privacy = sme->privacy; 1140 __entry->wpa_versions = sme->crypto.wpa_versions; 1141 __entry->flags = sme->flags; 1142 ), 1143 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT 1144 ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, " 1145 "flags: %u", 1146 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid, 1147 __entry->auth_type, BOOL_TO_STR(__entry->privacy), 1148 __entry->wpa_versions, __entry->flags) 1149 ); 1150 1151 TRACE_EVENT(rdev_set_cqm_rssi_config, 1152 TP_PROTO(struct wiphy *wiphy, 1153 struct net_device *netdev, s32 rssi_thold, 1154 u32 rssi_hyst), 1155 TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst), 1156 TP_STRUCT__entry( 1157 WIPHY_ENTRY 1158 NETDEV_ENTRY 1159 __field(s32, rssi_thold) 1160 __field(u32, rssi_hyst) 1161 ), 1162 TP_fast_assign( 1163 WIPHY_ASSIGN; 1164 NETDEV_ASSIGN; 1165 __entry->rssi_thold = rssi_thold; 1166 __entry->rssi_hyst = rssi_hyst; 1167 ), 1168 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT 1169 ", rssi_thold: %d, rssi_hyst: %u ", 1170 WIPHY_PR_ARG, NETDEV_PR_ARG, 1171 __entry->rssi_thold, __entry->rssi_hyst) 1172 ); 1173 1174 TRACE_EVENT(rdev_set_cqm_txe_config, 1175 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate, 1176 u32 pkts, u32 intvl), 1177 TP_ARGS(wiphy, netdev, rate, pkts, intvl), 1178 TP_STRUCT__entry( 1179 WIPHY_ENTRY 1180 NETDEV_ENTRY 1181 __field(u32, rate) 1182 __field(u32, pkts) 1183 __field(u32, intvl) 1184 ), 1185 TP_fast_assign( 1186 WIPHY_ASSIGN; 1187 NETDEV_ASSIGN; 1188 __entry->rate = rate; 1189 __entry->pkts = pkts; 1190 __entry->intvl = intvl; 1191 ), 1192 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u", 1193 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts, 1194 __entry->intvl) 1195 ); 1196 1197 TRACE_EVENT(rdev_disconnect, 1198 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1199 u16 reason_code), 1200 TP_ARGS(wiphy, netdev, reason_code), 1201 TP_STRUCT__entry( 1202 WIPHY_ENTRY 1203 NETDEV_ENTRY 1204 __field(u16, reason_code) 1205 ), 1206 TP_fast_assign( 1207 WIPHY_ASSIGN; 1208 NETDEV_ASSIGN; 1209 __entry->reason_code = reason_code; 1210 ), 1211 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG, 1212 NETDEV_PR_ARG, __entry->reason_code) 1213 ); 1214 1215 TRACE_EVENT(rdev_join_ibss, 1216 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1217 struct cfg80211_ibss_params *params), 1218 TP_ARGS(wiphy, netdev, params), 1219 TP_STRUCT__entry( 1220 WIPHY_ENTRY 1221 NETDEV_ENTRY 1222 MAC_ENTRY(bssid) 1223 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1) 1224 ), 1225 TP_fast_assign( 1226 WIPHY_ASSIGN; 1227 NETDEV_ASSIGN; 1228 MAC_ASSIGN(bssid, params->bssid); 1229 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1); 1230 memcpy(__entry->ssid, params->ssid, params->ssid_len); 1231 ), 1232 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s", 1233 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid) 1234 ); 1235 1236 TRACE_EVENT(rdev_set_wiphy_params, 1237 TP_PROTO(struct wiphy *wiphy, u32 changed), 1238 TP_ARGS(wiphy, changed), 1239 TP_STRUCT__entry( 1240 WIPHY_ENTRY 1241 __field(u32, changed) 1242 ), 1243 TP_fast_assign( 1244 WIPHY_ASSIGN; 1245 __entry->changed = changed; 1246 ), 1247 TP_printk(WIPHY_PR_FMT ", changed: %u", 1248 WIPHY_PR_ARG, __entry->changed) 1249 ); 1250 1251 DEFINE_EVENT(wiphy_wdev_evt, rdev_get_tx_power, 1252 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), 1253 TP_ARGS(wiphy, wdev) 1254 ); 1255 1256 TRACE_EVENT(rdev_set_tx_power, 1257 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, 1258 enum nl80211_tx_power_setting type, int mbm), 1259 TP_ARGS(wiphy, wdev, type, mbm), 1260 TP_STRUCT__entry( 1261 WIPHY_ENTRY 1262 WDEV_ENTRY 1263 __field(enum nl80211_tx_power_setting, type) 1264 __field(int, mbm) 1265 ), 1266 TP_fast_assign( 1267 WIPHY_ASSIGN; 1268 WDEV_ASSIGN; 1269 __entry->type = type; 1270 __entry->mbm = mbm; 1271 ), 1272 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d", 1273 WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm) 1274 ); 1275 1276 TRACE_EVENT(rdev_return_int_int, 1277 TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill), 1278 TP_ARGS(wiphy, func_ret, func_fill), 1279 TP_STRUCT__entry( 1280 WIPHY_ENTRY 1281 __field(int, func_ret) 1282 __field(int, func_fill) 1283 ), 1284 TP_fast_assign( 1285 WIPHY_ASSIGN; 1286 __entry->func_ret = func_ret; 1287 __entry->func_fill = func_fill; 1288 ), 1289 TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d", 1290 WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill) 1291 ); 1292 1293 #ifdef CONFIG_NL80211_TESTMODE 1294 TRACE_EVENT(rdev_testmode_cmd, 1295 TP_PROTO(struct wiphy *wiphy), 1296 TP_ARGS(wiphy), 1297 TP_STRUCT__entry( 1298 WIPHY_ENTRY 1299 ), 1300 TP_fast_assign( 1301 WIPHY_ASSIGN; 1302 ), 1303 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG) 1304 ); 1305 1306 TRACE_EVENT(rdev_testmode_dump, 1307 TP_PROTO(struct wiphy *wiphy), 1308 TP_ARGS(wiphy), 1309 TP_STRUCT__entry( 1310 WIPHY_ENTRY 1311 ), 1312 TP_fast_assign( 1313 WIPHY_ASSIGN; 1314 ), 1315 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG) 1316 ); 1317 #endif /* CONFIG_NL80211_TESTMODE */ 1318 1319 TRACE_EVENT(rdev_set_bitrate_mask, 1320 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1321 const u8 *peer, const struct cfg80211_bitrate_mask *mask), 1322 TP_ARGS(wiphy, netdev, peer, mask), 1323 TP_STRUCT__entry( 1324 WIPHY_ENTRY 1325 NETDEV_ENTRY 1326 MAC_ENTRY(peer) 1327 ), 1328 TP_fast_assign( 1329 WIPHY_ASSIGN; 1330 NETDEV_ASSIGN; 1331 MAC_ASSIGN(peer, peer); 1332 ), 1333 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT, 1334 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer)) 1335 ); 1336 1337 TRACE_EVENT(rdev_mgmt_frame_register, 1338 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, 1339 u16 frame_type, bool reg), 1340 TP_ARGS(wiphy, wdev, frame_type, reg), 1341 TP_STRUCT__entry( 1342 WIPHY_ENTRY 1343 WDEV_ENTRY 1344 __field(u16, frame_type) 1345 __field(bool, reg) 1346 ), 1347 TP_fast_assign( 1348 WIPHY_ASSIGN; 1349 WDEV_ASSIGN; 1350 __entry->frame_type = frame_type; 1351 __entry->reg = reg; 1352 ), 1353 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", frame_type: 0x%.2x, reg: %s ", 1354 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->frame_type, 1355 __entry->reg ? "true" : "false") 1356 ); 1357 1358 TRACE_EVENT(rdev_return_int_tx_rx, 1359 TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx), 1360 TP_ARGS(wiphy, ret, tx, rx), 1361 TP_STRUCT__entry( 1362 WIPHY_ENTRY 1363 __field(int, ret) 1364 __field(u32, tx) 1365 __field(u32, rx) 1366 ), 1367 TP_fast_assign( 1368 WIPHY_ASSIGN; 1369 __entry->ret = ret; 1370 __entry->tx = tx; 1371 __entry->rx = rx; 1372 ), 1373 TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u", 1374 WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx) 1375 ); 1376 1377 TRACE_EVENT(rdev_return_void_tx_rx, 1378 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max, 1379 u32 rx, u32 rx_max), 1380 TP_ARGS(wiphy, tx, tx_max, rx, rx_max), 1381 TP_STRUCT__entry( 1382 WIPHY_ENTRY 1383 __field(u32, tx) 1384 __field(u32, tx_max) 1385 __field(u32, rx) 1386 __field(u32, rx_max) 1387 ), 1388 TP_fast_assign( 1389 WIPHY_ASSIGN; 1390 __entry->tx = tx; 1391 __entry->tx_max = tx_max; 1392 __entry->rx = rx; 1393 __entry->rx_max = rx_max; 1394 ), 1395 TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ", 1396 WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx, 1397 __entry->rx_max) 1398 ); 1399 1400 DECLARE_EVENT_CLASS(tx_rx_evt, 1401 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx), 1402 TP_ARGS(wiphy, rx, tx), 1403 TP_STRUCT__entry( 1404 WIPHY_ENTRY 1405 __field(u32, tx) 1406 __field(u32, rx) 1407 ), 1408 TP_fast_assign( 1409 WIPHY_ASSIGN; 1410 __entry->tx = tx; 1411 __entry->rx = rx; 1412 ), 1413 TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ", 1414 WIPHY_PR_ARG, __entry->tx, __entry->rx) 1415 ); 1416 1417 DEFINE_EVENT(tx_rx_evt, rdev_set_ringparam, 1418 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx), 1419 TP_ARGS(wiphy, rx, tx) 1420 ); 1421 1422 DEFINE_EVENT(tx_rx_evt, rdev_set_antenna, 1423 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx), 1424 TP_ARGS(wiphy, rx, tx) 1425 ); 1426 1427 TRACE_EVENT(rdev_sched_scan_start, 1428 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1429 struct cfg80211_sched_scan_request *request), 1430 TP_ARGS(wiphy, netdev, request), 1431 TP_STRUCT__entry( 1432 WIPHY_ENTRY 1433 NETDEV_ENTRY 1434 ), 1435 TP_fast_assign( 1436 WIPHY_ASSIGN; 1437 NETDEV_ASSIGN; 1438 ), 1439 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, 1440 WIPHY_PR_ARG, NETDEV_PR_ARG) 1441 ); 1442 1443 TRACE_EVENT(rdev_tdls_mgmt, 1444 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1445 u8 *peer, u8 action_code, u8 dialog_token, 1446 u16 status_code, const u8 *buf, size_t len), 1447 TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code, 1448 buf, len), 1449 TP_STRUCT__entry( 1450 WIPHY_ENTRY 1451 NETDEV_ENTRY 1452 MAC_ENTRY(peer) 1453 __field(u8, action_code) 1454 __field(u8, dialog_token) 1455 __field(u16, status_code) 1456 __dynamic_array(u8, buf, len) 1457 ), 1458 TP_fast_assign( 1459 WIPHY_ASSIGN; 1460 NETDEV_ASSIGN; 1461 MAC_ASSIGN(peer, peer); 1462 __entry->action_code = action_code; 1463 __entry->dialog_token = dialog_token; 1464 __entry->status_code = status_code; 1465 memcpy(__get_dynamic_array(buf), buf, len); 1466 ), 1467 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", action_code: %u, " 1468 "dialog_token: %u, status_code: %u, buf: %#.2x ", 1469 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), 1470 __entry->action_code, __entry->dialog_token, 1471 __entry->status_code, ((u8 *)__get_dynamic_array(buf))[0]) 1472 ); 1473 1474 TRACE_EVENT(rdev_dump_survey, 1475 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx), 1476 TP_ARGS(wiphy, netdev, idx), 1477 TP_STRUCT__entry( 1478 WIPHY_ENTRY 1479 NETDEV_ENTRY 1480 __field(int, idx) 1481 ), 1482 TP_fast_assign( 1483 WIPHY_ASSIGN; 1484 NETDEV_ASSIGN; 1485 __entry->idx = idx; 1486 ), 1487 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d", 1488 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx) 1489 ); 1490 1491 TRACE_EVENT(rdev_return_int_survey_info, 1492 TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info), 1493 TP_ARGS(wiphy, ret, info), 1494 TP_STRUCT__entry( 1495 WIPHY_ENTRY 1496 CHAN_ENTRY 1497 __field(int, ret) 1498 __field(u64, channel_time) 1499 __field(u64, channel_time_busy) 1500 __field(u64, channel_time_ext_busy) 1501 __field(u64, channel_time_rx) 1502 __field(u64, channel_time_tx) 1503 __field(u32, filled) 1504 __field(s8, noise) 1505 ), 1506 TP_fast_assign( 1507 WIPHY_ASSIGN; 1508 CHAN_ASSIGN(info->channel); 1509 __entry->ret = ret; 1510 __entry->channel_time = info->channel_time; 1511 __entry->channel_time_busy = info->channel_time_busy; 1512 __entry->channel_time_ext_busy = info->channel_time_ext_busy; 1513 __entry->channel_time_rx = info->channel_time_rx; 1514 __entry->channel_time_tx = info->channel_time_tx; 1515 __entry->filled = info->filled; 1516 __entry->noise = info->noise; 1517 ), 1518 TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT 1519 ", channel time: %llu, channel time busy: %llu, " 1520 "channel time extension busy: %llu, channel time rx: %llu, " 1521 "channel time tx: %llu, filled: %u, noise: %d", 1522 WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG, 1523 __entry->channel_time, __entry->channel_time_busy, 1524 __entry->channel_time_ext_busy, __entry->channel_time_rx, 1525 __entry->channel_time_tx, __entry->filled, __entry->noise) 1526 ); 1527 1528 TRACE_EVENT(rdev_tdls_oper, 1529 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1530 u8 *peer, enum nl80211_tdls_operation oper), 1531 TP_ARGS(wiphy, netdev, peer, oper), 1532 TP_STRUCT__entry( 1533 WIPHY_ENTRY 1534 NETDEV_ENTRY 1535 MAC_ENTRY(peer) 1536 __field(enum nl80211_tdls_operation, oper) 1537 ), 1538 TP_fast_assign( 1539 WIPHY_ASSIGN; 1540 NETDEV_ASSIGN; 1541 MAC_ASSIGN(peer, peer); 1542 __entry->oper = oper; 1543 ), 1544 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", oper: %d", 1545 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper) 1546 ); 1547 1548 DECLARE_EVENT_CLASS(rdev_pmksa, 1549 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1550 struct cfg80211_pmksa *pmksa), 1551 TP_ARGS(wiphy, netdev, pmksa), 1552 TP_STRUCT__entry( 1553 WIPHY_ENTRY 1554 NETDEV_ENTRY 1555 MAC_ENTRY(bssid) 1556 ), 1557 TP_fast_assign( 1558 WIPHY_ASSIGN; 1559 NETDEV_ASSIGN; 1560 MAC_ASSIGN(bssid, pmksa->bssid); 1561 ), 1562 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT, 1563 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid)) 1564 ); 1565 1566 TRACE_EVENT(rdev_probe_client, 1567 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1568 const u8 *peer), 1569 TP_ARGS(wiphy, netdev, peer), 1570 TP_STRUCT__entry( 1571 WIPHY_ENTRY 1572 NETDEV_ENTRY 1573 MAC_ENTRY(peer) 1574 ), 1575 TP_fast_assign( 1576 WIPHY_ASSIGN; 1577 NETDEV_ASSIGN; 1578 MAC_ASSIGN(peer, peer); 1579 ), 1580 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT, 1581 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer)) 1582 ); 1583 1584 DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa, 1585 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1586 struct cfg80211_pmksa *pmksa), 1587 TP_ARGS(wiphy, netdev, pmksa) 1588 ); 1589 1590 DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa, 1591 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1592 struct cfg80211_pmksa *pmksa), 1593 TP_ARGS(wiphy, netdev, pmksa) 1594 ); 1595 1596 TRACE_EVENT(rdev_remain_on_channel, 1597 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, 1598 struct ieee80211_channel *chan, 1599 unsigned int duration), 1600 TP_ARGS(wiphy, wdev, chan, duration), 1601 TP_STRUCT__entry( 1602 WIPHY_ENTRY 1603 WDEV_ENTRY 1604 CHAN_ENTRY 1605 __field(unsigned int, duration) 1606 ), 1607 TP_fast_assign( 1608 WIPHY_ASSIGN; 1609 WDEV_ASSIGN; 1610 CHAN_ASSIGN(chan); 1611 __entry->duration = duration; 1612 ), 1613 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", duration: %u", 1614 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration) 1615 ); 1616 1617 TRACE_EVENT(rdev_return_int_cookie, 1618 TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie), 1619 TP_ARGS(wiphy, ret, cookie), 1620 TP_STRUCT__entry( 1621 WIPHY_ENTRY 1622 __field(int, ret) 1623 __field(u64, cookie) 1624 ), 1625 TP_fast_assign( 1626 WIPHY_ASSIGN; 1627 __entry->ret = ret; 1628 __entry->cookie = cookie; 1629 ), 1630 TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu", 1631 WIPHY_PR_ARG, __entry->ret, __entry->cookie) 1632 ); 1633 1634 TRACE_EVENT(rdev_cancel_remain_on_channel, 1635 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie), 1636 TP_ARGS(wiphy, wdev, cookie), 1637 TP_STRUCT__entry( 1638 WIPHY_ENTRY 1639 WDEV_ENTRY 1640 __field(u64, cookie) 1641 ), 1642 TP_fast_assign( 1643 WIPHY_ASSIGN; 1644 WDEV_ASSIGN; 1645 __entry->cookie = cookie; 1646 ), 1647 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu", 1648 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie) 1649 ); 1650 1651 TRACE_EVENT(rdev_mgmt_tx, 1652 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, 1653 struct ieee80211_channel *chan, bool offchan, 1654 unsigned int wait, bool no_cck, bool dont_wait_for_ack), 1655 TP_ARGS(wiphy, wdev, chan, offchan, wait, no_cck, dont_wait_for_ack), 1656 TP_STRUCT__entry( 1657 WIPHY_ENTRY 1658 WDEV_ENTRY 1659 CHAN_ENTRY 1660 __field(bool, offchan) 1661 __field(unsigned int, wait) 1662 __field(bool, no_cck) 1663 __field(bool, dont_wait_for_ack) 1664 ), 1665 TP_fast_assign( 1666 WIPHY_ASSIGN; 1667 WDEV_ASSIGN; 1668 CHAN_ASSIGN(chan); 1669 __entry->offchan = offchan; 1670 __entry->wait = wait; 1671 __entry->no_cck = no_cck; 1672 __entry->dont_wait_for_ack = dont_wait_for_ack; 1673 ), 1674 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s," 1675 " wait: %u, no cck: %s, dont wait for ack: %s", 1676 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, 1677 BOOL_TO_STR(__entry->offchan), __entry->wait, 1678 BOOL_TO_STR(__entry->no_cck), 1679 BOOL_TO_STR(__entry->dont_wait_for_ack)) 1680 ); 1681 1682 TRACE_EVENT(rdev_set_noack_map, 1683 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1684 u16 noack_map), 1685 TP_ARGS(wiphy, netdev, noack_map), 1686 TP_STRUCT__entry( 1687 WIPHY_ENTRY 1688 NETDEV_ENTRY 1689 __field(u16, noack_map) 1690 ), 1691 TP_fast_assign( 1692 WIPHY_ASSIGN; 1693 NETDEV_ASSIGN; 1694 __entry->noack_map = noack_map; 1695 ), 1696 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", noack_map: %u", 1697 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map) 1698 ); 1699 1700 TRACE_EVENT(rdev_get_et_sset_count, 1701 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int sset), 1702 TP_ARGS(wiphy, netdev, sset), 1703 TP_STRUCT__entry( 1704 WIPHY_ENTRY 1705 NETDEV_ENTRY 1706 __field(int, sset) 1707 ), 1708 TP_fast_assign( 1709 WIPHY_ASSIGN; 1710 NETDEV_ASSIGN; 1711 __entry->sset = sset; 1712 ), 1713 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", sset: %d", 1714 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sset) 1715 ); 1716 1717 TRACE_EVENT(rdev_get_et_strings, 1718 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 sset), 1719 TP_ARGS(wiphy, netdev, sset), 1720 TP_STRUCT__entry( 1721 WIPHY_ENTRY 1722 NETDEV_ENTRY 1723 __field(u32, sset) 1724 ), 1725 TP_fast_assign( 1726 WIPHY_ASSIGN; 1727 NETDEV_ASSIGN; 1728 __entry->sset = sset; 1729 ), 1730 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", sset: %u", 1731 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sset) 1732 ); 1733 1734 DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel, 1735 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), 1736 TP_ARGS(wiphy, wdev) 1737 ); 1738 1739 TRACE_EVENT(rdev_return_chandef, 1740 TP_PROTO(struct wiphy *wiphy, int ret, 1741 struct cfg80211_chan_def *chandef), 1742 TP_ARGS(wiphy, ret, chandef), 1743 TP_STRUCT__entry( 1744 WIPHY_ENTRY 1745 __field(int, ret) 1746 CHAN_DEF_ENTRY 1747 ), 1748 TP_fast_assign( 1749 WIPHY_ASSIGN; 1750 if (ret == 0) 1751 CHAN_DEF_ASSIGN(chandef); 1752 else 1753 CHAN_DEF_ASSIGN((struct cfg80211_chan_def *)NULL); 1754 __entry->ret = ret; 1755 ), 1756 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", ret: %d", 1757 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->ret) 1758 ); 1759 1760 DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device, 1761 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), 1762 TP_ARGS(wiphy, wdev) 1763 ); 1764 1765 DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device, 1766 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), 1767 TP_ARGS(wiphy, wdev) 1768 ); 1769 1770 TRACE_EVENT(rdev_set_mac_acl, 1771 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1772 struct cfg80211_acl_data *params), 1773 TP_ARGS(wiphy, netdev, params), 1774 TP_STRUCT__entry( 1775 WIPHY_ENTRY 1776 NETDEV_ENTRY 1777 __field(u32, acl_policy) 1778 ), 1779 TP_fast_assign( 1780 WIPHY_ASSIGN; 1781 WIPHY_ASSIGN; 1782 __entry->acl_policy = params->acl_policy; 1783 ), 1784 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", acl policy: %d", 1785 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->acl_policy) 1786 ); 1787 1788 /************************************************************* 1789 * cfg80211 exported functions traces * 1790 *************************************************************/ 1791 1792 TRACE_EVENT(cfg80211_return_bool, 1793 TP_PROTO(bool ret), 1794 TP_ARGS(ret), 1795 TP_STRUCT__entry( 1796 __field(bool, ret) 1797 ), 1798 TP_fast_assign( 1799 __entry->ret = ret; 1800 ), 1801 TP_printk("returned %s", BOOL_TO_STR(__entry->ret)) 1802 ); 1803 1804 DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt, 1805 TP_PROTO(struct net_device *netdev, const u8 *macaddr), 1806 TP_ARGS(netdev, macaddr), 1807 TP_STRUCT__entry( 1808 NETDEV_ENTRY 1809 MAC_ENTRY(macaddr) 1810 ), 1811 TP_fast_assign( 1812 NETDEV_ASSIGN; 1813 MAC_ASSIGN(macaddr, macaddr); 1814 ), 1815 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT, 1816 NETDEV_PR_ARG, MAC_PR_ARG(macaddr)) 1817 ); 1818 1819 DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate, 1820 TP_PROTO(struct net_device *netdev, const u8 *macaddr), 1821 TP_ARGS(netdev, macaddr) 1822 ); 1823 1824 DECLARE_EVENT_CLASS(netdev_evt_only, 1825 TP_PROTO(struct net_device *netdev), 1826 TP_ARGS(netdev), 1827 TP_STRUCT__entry( 1828 NETDEV_ENTRY 1829 ), 1830 TP_fast_assign( 1831 NETDEV_ASSIGN; 1832 ), 1833 TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG) 1834 ); 1835 1836 DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth, 1837 TP_PROTO(struct net_device *netdev), 1838 TP_ARGS(netdev) 1839 ); 1840 1841 TRACE_EVENT(cfg80211_send_rx_assoc, 1842 TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss), 1843 TP_ARGS(netdev, bss), 1844 TP_STRUCT__entry( 1845 NETDEV_ENTRY 1846 MAC_ENTRY(bssid) 1847 CHAN_ENTRY 1848 ), 1849 TP_fast_assign( 1850 NETDEV_ASSIGN; 1851 MAC_ASSIGN(bssid, bss->bssid); 1852 CHAN_ASSIGN(bss->channel); 1853 ), 1854 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", " CHAN_PR_FMT, 1855 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG) 1856 ); 1857 1858 DEFINE_EVENT(netdev_evt_only, __cfg80211_send_deauth, 1859 TP_PROTO(struct net_device *netdev), 1860 TP_ARGS(netdev) 1861 ); 1862 1863 DEFINE_EVENT(netdev_evt_only, __cfg80211_send_disassoc, 1864 TP_PROTO(struct net_device *netdev), 1865 TP_ARGS(netdev) 1866 ); 1867 1868 DEFINE_EVENT(netdev_evt_only, cfg80211_send_unprot_deauth, 1869 TP_PROTO(struct net_device *netdev), 1870 TP_ARGS(netdev) 1871 ); 1872 1873 DEFINE_EVENT(netdev_evt_only, cfg80211_send_unprot_disassoc, 1874 TP_PROTO(struct net_device *netdev), 1875 TP_ARGS(netdev) 1876 ); 1877 1878 DECLARE_EVENT_CLASS(netdev_mac_evt, 1879 TP_PROTO(struct net_device *netdev, const u8 *mac), 1880 TP_ARGS(netdev, mac), 1881 TP_STRUCT__entry( 1882 NETDEV_ENTRY 1883 MAC_ENTRY(mac) 1884 ), 1885 TP_fast_assign( 1886 NETDEV_ASSIGN; 1887 MAC_ASSIGN(mac, mac) 1888 ), 1889 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT, 1890 NETDEV_PR_ARG, MAC_PR_ARG(mac)) 1891 ); 1892 1893 DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout, 1894 TP_PROTO(struct net_device *netdev, const u8 *mac), 1895 TP_ARGS(netdev, mac) 1896 ); 1897 1898 DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout, 1899 TP_PROTO(struct net_device *netdev, const u8 *mac), 1900 TP_ARGS(netdev, mac) 1901 ); 1902 1903 TRACE_EVENT(cfg80211_michael_mic_failure, 1904 TP_PROTO(struct net_device *netdev, const u8 *addr, 1905 enum nl80211_key_type key_type, int key_id, const u8 *tsc), 1906 TP_ARGS(netdev, addr, key_type, key_id, tsc), 1907 TP_STRUCT__entry( 1908 NETDEV_ENTRY 1909 MAC_ENTRY(addr) 1910 __field(enum nl80211_key_type, key_type) 1911 __field(int, key_id) 1912 __array(u8, tsc, 6) 1913 ), 1914 TP_fast_assign( 1915 NETDEV_ASSIGN; 1916 MAC_ASSIGN(addr, addr); 1917 __entry->key_type = key_type; 1918 __entry->key_id = key_id; 1919 memcpy(__entry->tsc, tsc, 6); 1920 ), 1921 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm", 1922 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type, 1923 __entry->key_id, __entry->tsc) 1924 ); 1925 1926 TRACE_EVENT(cfg80211_ready_on_channel, 1927 TP_PROTO(struct wireless_dev *wdev, u64 cookie, 1928 struct ieee80211_channel *chan, 1929 unsigned int duration), 1930 TP_ARGS(wdev, cookie, chan, duration), 1931 TP_STRUCT__entry( 1932 WDEV_ENTRY 1933 __field(u64, cookie) 1934 CHAN_ENTRY 1935 __field(unsigned int, duration) 1936 ), 1937 TP_fast_assign( 1938 WDEV_ASSIGN; 1939 __entry->cookie = cookie; 1940 CHAN_ASSIGN(chan); 1941 __entry->duration = duration; 1942 ), 1943 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u", 1944 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG, 1945 __entry->duration) 1946 ); 1947 1948 TRACE_EVENT(cfg80211_ready_on_channel_expired, 1949 TP_PROTO(struct wireless_dev *wdev, u64 cookie, 1950 struct ieee80211_channel *chan), 1951 TP_ARGS(wdev, cookie, chan), 1952 TP_STRUCT__entry( 1953 WDEV_ENTRY 1954 __field(u64, cookie) 1955 CHAN_ENTRY 1956 ), 1957 TP_fast_assign( 1958 WDEV_ASSIGN; 1959 __entry->cookie = cookie; 1960 CHAN_ASSIGN(chan); 1961 ), 1962 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT, 1963 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG) 1964 ); 1965 1966 TRACE_EVENT(cfg80211_new_sta, 1967 TP_PROTO(struct net_device *netdev, const u8 *mac_addr, 1968 struct station_info *sinfo), 1969 TP_ARGS(netdev, mac_addr, sinfo), 1970 TP_STRUCT__entry( 1971 NETDEV_ENTRY 1972 MAC_ENTRY(mac_addr) 1973 SINFO_ENTRY 1974 ), 1975 TP_fast_assign( 1976 NETDEV_ASSIGN; 1977 MAC_ASSIGN(mac_addr, mac_addr); 1978 SINFO_ASSIGN; 1979 ), 1980 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, 1981 NETDEV_PR_ARG, MAC_PR_ARG(mac_addr)) 1982 ); 1983 1984 DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta, 1985 TP_PROTO(struct net_device *netdev, const u8 *macaddr), 1986 TP_ARGS(netdev, macaddr) 1987 ); 1988 1989 TRACE_EVENT(cfg80211_rx_mgmt, 1990 TP_PROTO(struct wireless_dev *wdev, int freq, int sig_mbm), 1991 TP_ARGS(wdev, freq, sig_mbm), 1992 TP_STRUCT__entry( 1993 WDEV_ENTRY 1994 __field(int, freq) 1995 __field(int, sig_mbm) 1996 ), 1997 TP_fast_assign( 1998 WDEV_ASSIGN; 1999 __entry->freq = freq; 2000 __entry->sig_mbm = sig_mbm; 2001 ), 2002 TP_printk(WDEV_PR_FMT ", freq: %d, sig mbm: %d", 2003 WDEV_PR_ARG, __entry->freq, __entry->sig_mbm) 2004 ); 2005 2006 TRACE_EVENT(cfg80211_mgmt_tx_status, 2007 TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack), 2008 TP_ARGS(wdev, cookie, ack), 2009 TP_STRUCT__entry( 2010 WDEV_ENTRY 2011 __field(u64, cookie) 2012 __field(bool, ack) 2013 ), 2014 TP_fast_assign( 2015 WDEV_ASSIGN; 2016 __entry->cookie = cookie; 2017 __entry->ack = ack; 2018 ), 2019 TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s", 2020 WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack)) 2021 ); 2022 2023 TRACE_EVENT(cfg80211_cqm_rssi_notify, 2024 TP_PROTO(struct net_device *netdev, 2025 enum nl80211_cqm_rssi_threshold_event rssi_event), 2026 TP_ARGS(netdev, rssi_event), 2027 TP_STRUCT__entry( 2028 NETDEV_ENTRY 2029 __field(enum nl80211_cqm_rssi_threshold_event, rssi_event) 2030 ), 2031 TP_fast_assign( 2032 NETDEV_ASSIGN; 2033 __entry->rssi_event = rssi_event; 2034 ), 2035 TP_printk(NETDEV_PR_FMT ", rssi event: %d", 2036 NETDEV_PR_ARG, __entry->rssi_event) 2037 ); 2038 2039 TRACE_EVENT(cfg80211_reg_can_beacon, 2040 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef), 2041 TP_ARGS(wiphy, chandef), 2042 TP_STRUCT__entry( 2043 WIPHY_ENTRY 2044 CHAN_DEF_ENTRY 2045 ), 2046 TP_fast_assign( 2047 WIPHY_ASSIGN; 2048 CHAN_DEF_ASSIGN(chandef); 2049 ), 2050 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT, 2051 WIPHY_PR_ARG, CHAN_DEF_PR_ARG) 2052 ); 2053 2054 TRACE_EVENT(cfg80211_chandef_dfs_required, 2055 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef), 2056 TP_ARGS(wiphy, chandef), 2057 TP_STRUCT__entry( 2058 WIPHY_ENTRY 2059 CHAN_DEF_ENTRY 2060 ), 2061 TP_fast_assign( 2062 WIPHY_ASSIGN; 2063 CHAN_DEF_ASSIGN(chandef); 2064 ), 2065 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT, 2066 WIPHY_PR_ARG, CHAN_DEF_PR_ARG) 2067 ); 2068 2069 TRACE_EVENT(cfg80211_ch_switch_notify, 2070 TP_PROTO(struct net_device *netdev, 2071 struct cfg80211_chan_def *chandef), 2072 TP_ARGS(netdev, chandef), 2073 TP_STRUCT__entry( 2074 NETDEV_ENTRY 2075 CHAN_DEF_ENTRY 2076 ), 2077 TP_fast_assign( 2078 NETDEV_ASSIGN; 2079 CHAN_DEF_ASSIGN(chandef); 2080 ), 2081 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT, 2082 NETDEV_PR_ARG, CHAN_DEF_PR_ARG) 2083 ); 2084 2085 TRACE_EVENT(cfg80211_radar_event, 2086 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef), 2087 TP_ARGS(wiphy, chandef), 2088 TP_STRUCT__entry( 2089 WIPHY_ENTRY 2090 CHAN_DEF_ENTRY 2091 ), 2092 TP_fast_assign( 2093 WIPHY_ASSIGN; 2094 CHAN_DEF_ASSIGN(chandef); 2095 ), 2096 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT, 2097 WIPHY_PR_ARG, CHAN_DEF_PR_ARG) 2098 ); 2099 2100 TRACE_EVENT(cfg80211_cac_event, 2101 TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt), 2102 TP_ARGS(netdev, evt), 2103 TP_STRUCT__entry( 2104 NETDEV_ENTRY 2105 __field(enum nl80211_radar_event, evt) 2106 ), 2107 TP_fast_assign( 2108 NETDEV_ASSIGN; 2109 __entry->evt = evt; 2110 ), 2111 TP_printk(NETDEV_PR_FMT ", event: %d", 2112 NETDEV_PR_ARG, __entry->evt) 2113 ); 2114 2115 DECLARE_EVENT_CLASS(cfg80211_rx_evt, 2116 TP_PROTO(struct net_device *netdev, const u8 *addr), 2117 TP_ARGS(netdev, addr), 2118 TP_STRUCT__entry( 2119 NETDEV_ENTRY 2120 MAC_ENTRY(addr) 2121 ), 2122 TP_fast_assign( 2123 NETDEV_ASSIGN; 2124 MAC_ASSIGN(addr, addr); 2125 ), 2126 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr)) 2127 ); 2128 2129 DEFINE_EVENT(cfg80211_rx_evt, cfg80211_ibss_joined, 2130 TP_PROTO(struct net_device *netdev, const u8 *addr), 2131 TP_ARGS(netdev, addr) 2132 ); 2133 2134 DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame, 2135 TP_PROTO(struct net_device *netdev, const u8 *addr), 2136 TP_ARGS(netdev, addr) 2137 ); 2138 2139 DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame, 2140 TP_PROTO(struct net_device *netdev, const u8 *addr), 2141 TP_ARGS(netdev, addr) 2142 ); 2143 2144 TRACE_EVENT(cfg80211_probe_status, 2145 TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie, 2146 bool acked), 2147 TP_ARGS(netdev, addr, cookie, acked), 2148 TP_STRUCT__entry( 2149 NETDEV_ENTRY 2150 MAC_ENTRY(addr) 2151 __field(u64, cookie) 2152 __field(bool, acked) 2153 ), 2154 TP_fast_assign( 2155 NETDEV_ASSIGN; 2156 MAC_ASSIGN(addr, addr); 2157 __entry->cookie = cookie; 2158 __entry->acked = acked; 2159 ), 2160 TP_printk(NETDEV_PR_FMT " addr:" MAC_PR_FMT ", cookie: %llu, acked: %s", 2161 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie, 2162 BOOL_TO_STR(__entry->acked)) 2163 ); 2164 2165 TRACE_EVENT(cfg80211_cqm_pktloss_notify, 2166 TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets), 2167 TP_ARGS(netdev, peer, num_packets), 2168 TP_STRUCT__entry( 2169 NETDEV_ENTRY 2170 MAC_ENTRY(peer) 2171 __field(u32, num_packets) 2172 ), 2173 TP_fast_assign( 2174 NETDEV_ASSIGN; 2175 MAC_ASSIGN(peer, peer); 2176 __entry->num_packets = num_packets; 2177 ), 2178 TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u", 2179 NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets) 2180 ); 2181 2182 DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify, 2183 TP_PROTO(struct net_device *netdev, const u8 *macaddr), 2184 TP_ARGS(netdev, macaddr) 2185 ); 2186 2187 TRACE_EVENT(cfg80211_pmksa_candidate_notify, 2188 TP_PROTO(struct net_device *netdev, int index, const u8 *bssid, 2189 bool preauth), 2190 TP_ARGS(netdev, index, bssid, preauth), 2191 TP_STRUCT__entry( 2192 NETDEV_ENTRY 2193 __field(int, index) 2194 MAC_ENTRY(bssid) 2195 __field(bool, preauth) 2196 ), 2197 TP_fast_assign( 2198 NETDEV_ASSIGN; 2199 __entry->index = index; 2200 MAC_ASSIGN(bssid, bssid); 2201 __entry->preauth = preauth; 2202 ), 2203 TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s", 2204 NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid), 2205 BOOL_TO_STR(__entry->preauth)) 2206 ); 2207 2208 TRACE_EVENT(cfg80211_report_obss_beacon, 2209 TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len, 2210 int freq, int sig_dbm), 2211 TP_ARGS(wiphy, frame, len, freq, sig_dbm), 2212 TP_STRUCT__entry( 2213 WIPHY_ENTRY 2214 __field(int, freq) 2215 __field(int, sig_dbm) 2216 ), 2217 TP_fast_assign( 2218 WIPHY_ASSIGN; 2219 __entry->freq = freq; 2220 __entry->sig_dbm = sig_dbm; 2221 ), 2222 TP_printk(WIPHY_PR_FMT ", freq: %d, sig_dbm: %d", 2223 WIPHY_PR_ARG, __entry->freq, __entry->sig_dbm) 2224 ); 2225 2226 TRACE_EVENT(cfg80211_tdls_oper_request, 2227 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer, 2228 enum nl80211_tdls_operation oper, u16 reason_code), 2229 TP_ARGS(wiphy, netdev, peer, oper, reason_code), 2230 TP_STRUCT__entry( 2231 WIPHY_ENTRY 2232 NETDEV_ENTRY 2233 MAC_ENTRY(peer) 2234 __field(enum nl80211_tdls_operation, oper) 2235 __field(u16, reason_code) 2236 ), 2237 TP_fast_assign( 2238 WIPHY_ASSIGN; 2239 NETDEV_ASSIGN; 2240 MAC_ASSIGN(peer, peer); 2241 __entry->oper = oper; 2242 __entry->reason_code = reason_code; 2243 ), 2244 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", oper: %d, reason_code %u", 2245 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper, 2246 __entry->reason_code) 2247 ); 2248 2249 TRACE_EVENT(cfg80211_scan_done, 2250 TP_PROTO(struct cfg80211_scan_request *request, bool aborted), 2251 TP_ARGS(request, aborted), 2252 TP_STRUCT__entry( 2253 __field(u32, n_channels) 2254 __dynamic_array(u8, ie, request ? request->ie_len : 0) 2255 __array(u32, rates, IEEE80211_NUM_BANDS) 2256 __field(u32, wdev_id) 2257 MAC_ENTRY(wiphy_mac) 2258 __field(bool, no_cck) 2259 __field(bool, aborted) 2260 ), 2261 TP_fast_assign( 2262 if (request) { 2263 memcpy(__get_dynamic_array(ie), request->ie, 2264 request->ie_len); 2265 memcpy(__entry->rates, request->rates, 2266 IEEE80211_NUM_BANDS); 2267 __entry->wdev_id = request->wdev ? 2268 request->wdev->identifier : 0; 2269 if (request->wiphy) 2270 MAC_ASSIGN(wiphy_mac, 2271 request->wiphy->perm_addr); 2272 __entry->no_cck = request->no_cck; 2273 } 2274 __entry->aborted = aborted; 2275 ), 2276 TP_printk("aborted: %s", BOOL_TO_STR(__entry->aborted)) 2277 ); 2278 2279 DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_results, 2280 TP_PROTO(struct wiphy *wiphy), 2281 TP_ARGS(wiphy) 2282 ); 2283 2284 DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_stopped, 2285 TP_PROTO(struct wiphy *wiphy), 2286 TP_ARGS(wiphy) 2287 ); 2288 2289 TRACE_EVENT(cfg80211_get_bss, 2290 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel, 2291 const u8 *bssid, const u8 *ssid, size_t ssid_len, 2292 u16 capa_mask, u16 capa_val), 2293 TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, capa_mask, capa_val), 2294 TP_STRUCT__entry( 2295 WIPHY_ENTRY 2296 CHAN_ENTRY 2297 MAC_ENTRY(bssid) 2298 __dynamic_array(u8, ssid, ssid_len) 2299 __field(u16, capa_mask) 2300 __field(u16, capa_val) 2301 ), 2302 TP_fast_assign( 2303 WIPHY_ASSIGN; 2304 CHAN_ASSIGN(channel); 2305 MAC_ASSIGN(bssid, bssid); 2306 memcpy(__get_dynamic_array(ssid), ssid, ssid_len); 2307 __entry->capa_mask = capa_mask; 2308 __entry->capa_val = capa_val; 2309 ), 2310 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT ", buf: %#.2x, " 2311 "capa_mask: %d, capa_val: %u", WIPHY_PR_ARG, CHAN_PR_ARG, 2312 MAC_PR_ARG(bssid), ((u8 *)__get_dynamic_array(ssid))[0], 2313 __entry->capa_mask, __entry->capa_val) 2314 ); 2315 2316 TRACE_EVENT(cfg80211_inform_bss_frame, 2317 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel, 2318 struct ieee80211_mgmt *mgmt, size_t len, 2319 s32 signal), 2320 TP_ARGS(wiphy, channel, mgmt, len, signal), 2321 TP_STRUCT__entry( 2322 WIPHY_ENTRY 2323 CHAN_ENTRY 2324 __dynamic_array(u8, mgmt, len) 2325 __field(s32, signal) 2326 ), 2327 TP_fast_assign( 2328 WIPHY_ASSIGN; 2329 CHAN_ASSIGN(channel); 2330 if (mgmt) 2331 memcpy(__get_dynamic_array(mgmt), mgmt, len); 2332 __entry->signal = signal; 2333 ), 2334 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT "signal: %d", 2335 WIPHY_PR_ARG, CHAN_PR_ARG, __entry->signal) 2336 ); 2337 2338 DECLARE_EVENT_CLASS(cfg80211_bss_evt, 2339 TP_PROTO(struct cfg80211_bss *pub), 2340 TP_ARGS(pub), 2341 TP_STRUCT__entry( 2342 MAC_ENTRY(bssid) 2343 CHAN_ENTRY 2344 ), 2345 TP_fast_assign( 2346 MAC_ASSIGN(bssid, pub->bssid); 2347 CHAN_ASSIGN(pub->channel); 2348 ), 2349 TP_printk(MAC_PR_FMT ", " CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG) 2350 ); 2351 2352 DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss, 2353 TP_PROTO(struct cfg80211_bss *pub), 2354 TP_ARGS(pub) 2355 ); 2356 2357 TRACE_EVENT(cfg80211_return_uint, 2358 TP_PROTO(unsigned int ret), 2359 TP_ARGS(ret), 2360 TP_STRUCT__entry( 2361 __field(unsigned int, ret) 2362 ), 2363 TP_fast_assign( 2364 __entry->ret = ret; 2365 ), 2366 TP_printk("ret: %d", __entry->ret) 2367 ); 2368 2369 TRACE_EVENT(cfg80211_return_u32, 2370 TP_PROTO(u32 ret), 2371 TP_ARGS(ret), 2372 TP_STRUCT__entry( 2373 __field(u32, ret) 2374 ), 2375 TP_fast_assign( 2376 __entry->ret = ret; 2377 ), 2378 TP_printk("ret: %u", __entry->ret) 2379 ); 2380 2381 TRACE_EVENT(cfg80211_report_wowlan_wakeup, 2382 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, 2383 struct cfg80211_wowlan_wakeup *wakeup), 2384 TP_ARGS(wiphy, wdev, wakeup), 2385 TP_STRUCT__entry( 2386 WIPHY_ENTRY 2387 WDEV_ENTRY 2388 __field(bool, disconnect) 2389 __field(bool, magic_pkt) 2390 __field(bool, gtk_rekey_failure) 2391 __field(bool, eap_identity_req) 2392 __field(bool, four_way_handshake) 2393 __field(bool, rfkill_release) 2394 __field(s32, pattern_idx) 2395 __field(u32, packet_len) 2396 __dynamic_array(u8, packet, wakeup->packet_present_len) 2397 ), 2398 TP_fast_assign( 2399 WIPHY_ASSIGN; 2400 WDEV_ASSIGN; 2401 __entry->disconnect = wakeup->disconnect; 2402 __entry->magic_pkt = wakeup->magic_pkt; 2403 __entry->gtk_rekey_failure = wakeup->gtk_rekey_failure; 2404 __entry->eap_identity_req = wakeup->eap_identity_req; 2405 __entry->four_way_handshake = wakeup->four_way_handshake; 2406 __entry->rfkill_release = wakeup->rfkill_release; 2407 __entry->pattern_idx = wakeup->pattern_idx; 2408 __entry->packet_len = wakeup->packet_len; 2409 if (wakeup->packet && wakeup->packet_present_len) 2410 memcpy(__get_dynamic_array(packet), wakeup->packet, 2411 wakeup->packet_present_len); 2412 ), 2413 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG) 2414 ); 2415 2416 #endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */ 2417 2418 #undef TRACE_INCLUDE_PATH 2419 #define TRACE_INCLUDE_PATH . 2420 #undef TRACE_INCLUDE_FILE 2421 #define TRACE_INCLUDE_FILE trace 2422 #include <trace/define_trace.h> 2423