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