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