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_flush_pmksa, 604 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), 605 TP_ARGS(wiphy, netdev) 606 ); 607 608 DECLARE_EVENT_CLASS(station_add_change, 609 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac, 610 struct station_parameters *params), 611 TP_ARGS(wiphy, netdev, mac, params), 612 TP_STRUCT__entry( 613 WIPHY_ENTRY 614 NETDEV_ENTRY 615 MAC_ENTRY(sta_mac) 616 __field(u32, sta_flags_mask) 617 __field(u32, sta_flags_set) 618 __field(u32, sta_modify_mask) 619 __field(int, listen_interval) 620 __field(u16, aid) 621 __field(u8, plink_action) 622 __field(u8, plink_state) 623 __field(u8, uapsd_queues) 624 __array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap)) 625 ), 626 TP_fast_assign( 627 WIPHY_ASSIGN; 628 NETDEV_ASSIGN; 629 MAC_ASSIGN(sta_mac, mac); 630 __entry->sta_flags_mask = params->sta_flags_mask; 631 __entry->sta_flags_set = params->sta_flags_set; 632 __entry->sta_modify_mask = params->sta_modify_mask; 633 __entry->listen_interval = params->listen_interval; 634 __entry->aid = params->aid; 635 __entry->plink_action = params->plink_action; 636 __entry->plink_state = params->plink_state; 637 __entry->uapsd_queues = params->uapsd_queues; 638 memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap)); 639 if (params->ht_capa) 640 memcpy(__entry->ht_capa, params->ht_capa, 641 sizeof(struct ieee80211_ht_cap)); 642 ), 643 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT 644 ", station flags mask: %u, station flags set: %u, " 645 "station modify mask: %u, listen interval: %d, aid: %u, " 646 "plink action: %u, plink state: %u, uapsd queues: %u", 647 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac), 648 __entry->sta_flags_mask, __entry->sta_flags_set, 649 __entry->sta_modify_mask, __entry->listen_interval, 650 __entry->aid, __entry->plink_action, __entry->plink_state, 651 __entry->uapsd_queues) 652 ); 653 654 DEFINE_EVENT(station_add_change, rdev_add_station, 655 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac, 656 struct station_parameters *params), 657 TP_ARGS(wiphy, netdev, mac, params) 658 ); 659 660 DEFINE_EVENT(station_add_change, rdev_change_station, 661 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac, 662 struct station_parameters *params), 663 TP_ARGS(wiphy, netdev, mac, params) 664 ); 665 666 DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt, 667 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac), 668 TP_ARGS(wiphy, netdev, mac), 669 TP_STRUCT__entry( 670 WIPHY_ENTRY 671 NETDEV_ENTRY 672 MAC_ENTRY(sta_mac) 673 ), 674 TP_fast_assign( 675 WIPHY_ASSIGN; 676 NETDEV_ASSIGN; 677 MAC_ASSIGN(sta_mac, mac); 678 ), 679 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mac: " MAC_PR_FMT, 680 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac)) 681 ); 682 683 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_station, 684 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac), 685 TP_ARGS(wiphy, netdev, mac) 686 ); 687 688 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_station, 689 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac), 690 TP_ARGS(wiphy, netdev, mac) 691 ); 692 693 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath, 694 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac), 695 TP_ARGS(wiphy, netdev, mac) 696 ); 697 698 DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_set_wds_peer, 699 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac), 700 TP_ARGS(wiphy, netdev, mac) 701 ); 702 703 TRACE_EVENT(rdev_dump_station, 704 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx, 705 u8 *mac), 706 TP_ARGS(wiphy, netdev, idx, mac), 707 TP_STRUCT__entry( 708 WIPHY_ENTRY 709 NETDEV_ENTRY 710 MAC_ENTRY(sta_mac) 711 __field(int, idx) 712 ), 713 TP_fast_assign( 714 WIPHY_ASSIGN; 715 NETDEV_ASSIGN; 716 MAC_ASSIGN(sta_mac, mac); 717 __entry->idx = idx; 718 ), 719 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", station mac: " MAC_PR_FMT ", idx: %d", 720 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac), 721 __entry->idx) 722 ); 723 724 TRACE_EVENT(rdev_return_int_station_info, 725 TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo), 726 TP_ARGS(wiphy, ret, sinfo), 727 TP_STRUCT__entry( 728 WIPHY_ENTRY 729 __field(int, ret) 730 SINFO_ENTRY 731 ), 732 TP_fast_assign( 733 WIPHY_ASSIGN; 734 __entry->ret = ret; 735 SINFO_ASSIGN; 736 ), 737 TP_printk(WIPHY_PR_FMT ", returned %d" , 738 WIPHY_PR_ARG, __entry->ret) 739 ); 740 741 DECLARE_EVENT_CLASS(mpath_evt, 742 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst, 743 u8 *next_hop), 744 TP_ARGS(wiphy, netdev, dst, next_hop), 745 TP_STRUCT__entry( 746 WIPHY_ENTRY 747 NETDEV_ENTRY 748 MAC_ENTRY(dst) 749 MAC_ENTRY(next_hop) 750 ), 751 TP_fast_assign( 752 WIPHY_ASSIGN; 753 NETDEV_ASSIGN; 754 MAC_ASSIGN(dst, dst); 755 MAC_ASSIGN(next_hop, next_hop); 756 ), 757 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", destination: " MAC_PR_FMT ", next hop: " MAC_PR_FMT, 758 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dst), 759 MAC_PR_ARG(next_hop)) 760 ); 761 762 DEFINE_EVENT(mpath_evt, rdev_add_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 DEFINE_EVENT(mpath_evt, rdev_change_mpath, 769 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst, 770 u8 *next_hop), 771 TP_ARGS(wiphy, netdev, dst, next_hop) 772 ); 773 774 DEFINE_EVENT(mpath_evt, rdev_get_mpath, 775 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst, 776 u8 *next_hop), 777 TP_ARGS(wiphy, netdev, dst, next_hop) 778 ); 779 780 TRACE_EVENT(rdev_dump_mpath, 781 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx, 782 u8 *dst, u8 *next_hop), 783 TP_ARGS(wiphy, netdev, idx, dst, next_hop), 784 TP_STRUCT__entry( 785 WIPHY_ENTRY 786 NETDEV_ENTRY 787 MAC_ENTRY(dst) 788 MAC_ENTRY(next_hop) 789 __field(int, idx) 790 ), 791 TP_fast_assign( 792 WIPHY_ASSIGN; 793 NETDEV_ASSIGN; 794 MAC_ASSIGN(dst, dst); 795 MAC_ASSIGN(next_hop, next_hop); 796 __entry->idx = idx; 797 ), 798 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d, destination: " 799 MAC_PR_FMT ", next hop: " MAC_PR_FMT, 800 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst), 801 MAC_PR_ARG(next_hop)) 802 ); 803 804 TRACE_EVENT(rdev_return_int_mpath_info, 805 TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo), 806 TP_ARGS(wiphy, ret, pinfo), 807 TP_STRUCT__entry( 808 WIPHY_ENTRY 809 __field(int, ret) 810 __field(int, generation) 811 __field(u32, filled) 812 __field(u32, frame_qlen) 813 __field(u32, sn) 814 __field(u32, metric) 815 __field(u32, exptime) 816 __field(u32, discovery_timeout) 817 __field(u8, discovery_retries) 818 __field(u8, flags) 819 ), 820 TP_fast_assign( 821 WIPHY_ASSIGN; 822 __entry->ret = ret; 823 __entry->generation = pinfo->generation; 824 __entry->filled = pinfo->filled; 825 __entry->frame_qlen = pinfo->frame_qlen; 826 __entry->sn = pinfo->sn; 827 __entry->metric = pinfo->metric; 828 __entry->exptime = pinfo->exptime; 829 __entry->discovery_timeout = pinfo->discovery_timeout; 830 __entry->discovery_retries = pinfo->discovery_retries; 831 __entry->flags = pinfo->flags; 832 ), 833 TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, " 834 "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u," 835 " discovery timeout: %u, discovery retries: %u, flags: %u", 836 WIPHY_PR_ARG, __entry->ret, __entry->generation, 837 __entry->filled, __entry->frame_qlen, __entry->sn, 838 __entry->metric, __entry->exptime, __entry->discovery_timeout, 839 __entry->discovery_retries, __entry->flags) 840 ); 841 842 TRACE_EVENT(rdev_return_int_mesh_config, 843 TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf), 844 TP_ARGS(wiphy, ret, conf), 845 TP_STRUCT__entry( 846 WIPHY_ENTRY 847 MESH_CFG_ENTRY 848 __field(int, ret) 849 ), 850 TP_fast_assign( 851 WIPHY_ASSIGN; 852 MESH_CFG_ASSIGN; 853 __entry->ret = ret; 854 ), 855 TP_printk(WIPHY_PR_FMT ", returned: %d", 856 WIPHY_PR_ARG, __entry->ret) 857 ); 858 859 TRACE_EVENT(rdev_update_mesh_config, 860 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask, 861 const struct mesh_config *conf), 862 TP_ARGS(wiphy, netdev, mask, conf), 863 TP_STRUCT__entry( 864 WIPHY_ENTRY 865 NETDEV_ENTRY 866 MESH_CFG_ENTRY 867 __field(u32, mask) 868 ), 869 TP_fast_assign( 870 WIPHY_ASSIGN; 871 NETDEV_ASSIGN; 872 MESH_CFG_ASSIGN; 873 __entry->mask = mask; 874 ), 875 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", mask: %u", 876 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask) 877 ); 878 879 TRACE_EVENT(rdev_join_mesh, 880 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 881 const struct mesh_config *conf, 882 const struct mesh_setup *setup), 883 TP_ARGS(wiphy, netdev, conf, setup), 884 TP_STRUCT__entry( 885 WIPHY_ENTRY 886 NETDEV_ENTRY 887 MESH_CFG_ENTRY 888 ), 889 TP_fast_assign( 890 WIPHY_ASSIGN; 891 NETDEV_ASSIGN; 892 MESH_CFG_ASSIGN; 893 ), 894 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, 895 WIPHY_PR_ARG, NETDEV_PR_ARG) 896 ); 897 898 TRACE_EVENT(rdev_change_bss, 899 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 900 struct bss_parameters *params), 901 TP_ARGS(wiphy, netdev, params), 902 TP_STRUCT__entry( 903 WIPHY_ENTRY 904 NETDEV_ENTRY 905 __field(int, use_cts_prot) 906 __field(int, use_short_preamble) 907 __field(int, use_short_slot_time) 908 __field(int, ap_isolate) 909 __field(int, ht_opmode) 910 ), 911 TP_fast_assign( 912 WIPHY_ASSIGN; 913 NETDEV_ASSIGN; 914 __entry->use_cts_prot = params->use_cts_prot; 915 __entry->use_short_preamble = params->use_short_preamble; 916 __entry->use_short_slot_time = params->use_short_slot_time; 917 __entry->ap_isolate = params->ap_isolate; 918 __entry->ht_opmode = params->ht_opmode; 919 ), 920 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", use cts prot: %d, " 921 "use short preamble: %d, use short slot time: %d, " 922 "ap isolate: %d, ht opmode: %d", 923 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot, 924 __entry->use_short_preamble, __entry->use_short_slot_time, 925 __entry->ap_isolate, __entry->ht_opmode) 926 ); 927 928 TRACE_EVENT(rdev_set_txq_params, 929 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 930 struct ieee80211_txq_params *params), 931 TP_ARGS(wiphy, netdev, params), 932 TP_STRUCT__entry( 933 WIPHY_ENTRY 934 NETDEV_ENTRY 935 __field(enum nl80211_ac, ac) 936 __field(u16, txop) 937 __field(u16, cwmin) 938 __field(u16, cwmax) 939 __field(u8, aifs) 940 ), 941 TP_fast_assign( 942 WIPHY_ASSIGN; 943 NETDEV_ASSIGN; 944 __entry->ac = params->ac; 945 __entry->txop = params->txop; 946 __entry->cwmin = params->cwmin; 947 __entry->cwmax = params->cwmax; 948 __entry->aifs = params->aifs; 949 ), 950 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", ac: %d, txop: %u, cwmin: %u, cwmax: %u, aifs: %u", 951 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop, 952 __entry->cwmin, __entry->cwmax, __entry->aifs) 953 ); 954 955 TRACE_EVENT(rdev_libertas_set_mesh_channel, 956 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 957 struct ieee80211_channel *chan), 958 TP_ARGS(wiphy, netdev, chan), 959 TP_STRUCT__entry( 960 WIPHY_ENTRY 961 NETDEV_ENTRY 962 CHAN_ENTRY 963 ), 964 TP_fast_assign( 965 WIPHY_ASSIGN; 966 NETDEV_ASSIGN; 967 CHAN_ASSIGN(chan); 968 ), 969 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_PR_FMT, WIPHY_PR_ARG, 970 NETDEV_PR_ARG, CHAN_PR_ARG) 971 ); 972 973 TRACE_EVENT(rdev_set_monitor_channel, 974 TP_PROTO(struct wiphy *wiphy, 975 struct cfg80211_chan_def *chandef), 976 TP_ARGS(wiphy, chandef), 977 TP_STRUCT__entry( 978 WIPHY_ENTRY 979 CHAN_DEF_ENTRY 980 ), 981 TP_fast_assign( 982 WIPHY_ASSIGN; 983 CHAN_DEF_ASSIGN(chandef); 984 ), 985 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT, 986 WIPHY_PR_ARG, CHAN_DEF_PR_ARG) 987 ); 988 989 TRACE_EVENT(rdev_auth, 990 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 991 struct cfg80211_auth_request *req), 992 TP_ARGS(wiphy, netdev, req), 993 TP_STRUCT__entry( 994 WIPHY_ENTRY 995 NETDEV_ENTRY 996 MAC_ENTRY(bssid) 997 __field(enum nl80211_auth_type, auth_type) 998 ), 999 TP_fast_assign( 1000 WIPHY_ASSIGN; 1001 NETDEV_ASSIGN; 1002 if (req->bss) 1003 MAC_ASSIGN(bssid, req->bss->bssid); 1004 else 1005 memset(__entry->bssid, 0, ETH_ALEN); 1006 __entry->auth_type = req->auth_type; 1007 ), 1008 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", auth type: %d, bssid: " MAC_PR_FMT, 1009 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type, 1010 MAC_PR_ARG(bssid)) 1011 ); 1012 1013 TRACE_EVENT(rdev_assoc, 1014 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1015 struct cfg80211_assoc_request *req), 1016 TP_ARGS(wiphy, netdev, req), 1017 TP_STRUCT__entry( 1018 WIPHY_ENTRY 1019 NETDEV_ENTRY 1020 MAC_ENTRY(bssid) 1021 MAC_ENTRY(prev_bssid) 1022 __field(bool, use_mfp) 1023 __field(u32, flags) 1024 ), 1025 TP_fast_assign( 1026 WIPHY_ASSIGN; 1027 NETDEV_ASSIGN; 1028 if (req->bss) 1029 MAC_ASSIGN(bssid, req->bss->bssid); 1030 else 1031 memset(__entry->bssid, 0, ETH_ALEN); 1032 MAC_ASSIGN(prev_bssid, req->prev_bssid); 1033 __entry->use_mfp = req->use_mfp; 1034 __entry->flags = req->flags; 1035 ), 1036 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT 1037 ", previous bssid: " MAC_PR_FMT ", use mfp: %s, flags: %u", 1038 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), 1039 MAC_PR_ARG(prev_bssid), BOOL_TO_STR(__entry->use_mfp), 1040 __entry->flags) 1041 ); 1042 1043 TRACE_EVENT(rdev_deauth, 1044 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1045 struct cfg80211_deauth_request *req), 1046 TP_ARGS(wiphy, netdev, req), 1047 TP_STRUCT__entry( 1048 WIPHY_ENTRY 1049 NETDEV_ENTRY 1050 MAC_ENTRY(bssid) 1051 __field(u16, reason_code) 1052 ), 1053 TP_fast_assign( 1054 WIPHY_ASSIGN; 1055 NETDEV_ASSIGN; 1056 MAC_ASSIGN(bssid, req->bssid); 1057 __entry->reason_code = req->reason_code; 1058 ), 1059 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", reason: %u", 1060 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), 1061 __entry->reason_code) 1062 ); 1063 1064 TRACE_EVENT(rdev_disassoc, 1065 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1066 struct cfg80211_disassoc_request *req), 1067 TP_ARGS(wiphy, netdev, req), 1068 TP_STRUCT__entry( 1069 WIPHY_ENTRY 1070 NETDEV_ENTRY 1071 MAC_ENTRY(bssid) 1072 __field(u16, reason_code) 1073 __field(bool, local_state_change) 1074 ), 1075 TP_fast_assign( 1076 WIPHY_ASSIGN; 1077 NETDEV_ASSIGN; 1078 if (req->bss) 1079 MAC_ASSIGN(bssid, req->bss->bssid); 1080 else 1081 memset(__entry->bssid, 0, ETH_ALEN); 1082 __entry->reason_code = req->reason_code; 1083 __entry->local_state_change = req->local_state_change; 1084 ), 1085 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT 1086 ", reason: %u, local state change: %s", 1087 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), 1088 __entry->reason_code, 1089 BOOL_TO_STR(__entry->local_state_change)) 1090 ); 1091 1092 TRACE_EVENT(rdev_mgmt_tx_cancel_wait, 1093 TP_PROTO(struct wiphy *wiphy, 1094 struct wireless_dev *wdev, u64 cookie), 1095 TP_ARGS(wiphy, wdev, cookie), 1096 TP_STRUCT__entry( 1097 WIPHY_ENTRY 1098 WDEV_ENTRY 1099 __field(u64, cookie) 1100 ), 1101 TP_fast_assign( 1102 WIPHY_ASSIGN; 1103 WDEV_ASSIGN; 1104 __entry->cookie = cookie; 1105 ), 1106 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu ", 1107 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie) 1108 ); 1109 1110 TRACE_EVENT(rdev_set_power_mgmt, 1111 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1112 bool enabled, int timeout), 1113 TP_ARGS(wiphy, netdev, enabled, timeout), 1114 TP_STRUCT__entry( 1115 WIPHY_ENTRY 1116 NETDEV_ENTRY 1117 __field(bool, enabled) 1118 __field(int, timeout) 1119 ), 1120 TP_fast_assign( 1121 WIPHY_ASSIGN; 1122 NETDEV_ASSIGN; 1123 __entry->enabled = enabled; 1124 __entry->timeout = timeout; 1125 ), 1126 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", %senabled, timeout: %d ", 1127 WIPHY_PR_ARG, NETDEV_PR_ARG, 1128 __entry->enabled ? "" : "not ", __entry->timeout) 1129 ); 1130 1131 TRACE_EVENT(rdev_connect, 1132 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1133 struct cfg80211_connect_params *sme), 1134 TP_ARGS(wiphy, netdev, sme), 1135 TP_STRUCT__entry( 1136 WIPHY_ENTRY 1137 NETDEV_ENTRY 1138 MAC_ENTRY(bssid) 1139 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1) 1140 __field(enum nl80211_auth_type, auth_type) 1141 __field(bool, privacy) 1142 __field(u32, wpa_versions) 1143 __field(u32, flags) 1144 ), 1145 TP_fast_assign( 1146 WIPHY_ASSIGN; 1147 NETDEV_ASSIGN; 1148 MAC_ASSIGN(bssid, sme->bssid); 1149 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1); 1150 memcpy(__entry->ssid, sme->ssid, sme->ssid_len); 1151 __entry->auth_type = sme->auth_type; 1152 __entry->privacy = sme->privacy; 1153 __entry->wpa_versions = sme->crypto.wpa_versions; 1154 __entry->flags = sme->flags; 1155 ), 1156 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT 1157 ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, " 1158 "flags: %u", 1159 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid, 1160 __entry->auth_type, BOOL_TO_STR(__entry->privacy), 1161 __entry->wpa_versions, __entry->flags) 1162 ); 1163 1164 TRACE_EVENT(rdev_set_cqm_rssi_config, 1165 TP_PROTO(struct wiphy *wiphy, 1166 struct net_device *netdev, s32 rssi_thold, 1167 u32 rssi_hyst), 1168 TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst), 1169 TP_STRUCT__entry( 1170 WIPHY_ENTRY 1171 NETDEV_ENTRY 1172 __field(s32, rssi_thold) 1173 __field(u32, rssi_hyst) 1174 ), 1175 TP_fast_assign( 1176 WIPHY_ASSIGN; 1177 NETDEV_ASSIGN; 1178 __entry->rssi_thold = rssi_thold; 1179 __entry->rssi_hyst = rssi_hyst; 1180 ), 1181 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT 1182 ", rssi_thold: %d, rssi_hyst: %u ", 1183 WIPHY_PR_ARG, NETDEV_PR_ARG, 1184 __entry->rssi_thold, __entry->rssi_hyst) 1185 ); 1186 1187 TRACE_EVENT(rdev_set_cqm_txe_config, 1188 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate, 1189 u32 pkts, u32 intvl), 1190 TP_ARGS(wiphy, netdev, rate, pkts, intvl), 1191 TP_STRUCT__entry( 1192 WIPHY_ENTRY 1193 NETDEV_ENTRY 1194 __field(u32, rate) 1195 __field(u32, pkts) 1196 __field(u32, intvl) 1197 ), 1198 TP_fast_assign( 1199 WIPHY_ASSIGN; 1200 NETDEV_ASSIGN; 1201 __entry->rate = rate; 1202 __entry->pkts = pkts; 1203 __entry->intvl = intvl; 1204 ), 1205 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u", 1206 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts, 1207 __entry->intvl) 1208 ); 1209 1210 TRACE_EVENT(rdev_disconnect, 1211 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1212 u16 reason_code), 1213 TP_ARGS(wiphy, netdev, reason_code), 1214 TP_STRUCT__entry( 1215 WIPHY_ENTRY 1216 NETDEV_ENTRY 1217 __field(u16, reason_code) 1218 ), 1219 TP_fast_assign( 1220 WIPHY_ASSIGN; 1221 NETDEV_ASSIGN; 1222 __entry->reason_code = reason_code; 1223 ), 1224 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG, 1225 NETDEV_PR_ARG, __entry->reason_code) 1226 ); 1227 1228 TRACE_EVENT(rdev_join_ibss, 1229 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1230 struct cfg80211_ibss_params *params), 1231 TP_ARGS(wiphy, netdev, params), 1232 TP_STRUCT__entry( 1233 WIPHY_ENTRY 1234 NETDEV_ENTRY 1235 MAC_ENTRY(bssid) 1236 __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1) 1237 ), 1238 TP_fast_assign( 1239 WIPHY_ASSIGN; 1240 NETDEV_ASSIGN; 1241 MAC_ASSIGN(bssid, params->bssid); 1242 memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1); 1243 memcpy(__entry->ssid, params->ssid, params->ssid_len); 1244 ), 1245 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s", 1246 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid) 1247 ); 1248 1249 TRACE_EVENT(rdev_set_wiphy_params, 1250 TP_PROTO(struct wiphy *wiphy, u32 changed), 1251 TP_ARGS(wiphy, changed), 1252 TP_STRUCT__entry( 1253 WIPHY_ENTRY 1254 __field(u32, changed) 1255 ), 1256 TP_fast_assign( 1257 WIPHY_ASSIGN; 1258 __entry->changed = changed; 1259 ), 1260 TP_printk(WIPHY_PR_FMT ", changed: %u", 1261 WIPHY_PR_ARG, __entry->changed) 1262 ); 1263 1264 DEFINE_EVENT(wiphy_wdev_evt, rdev_get_tx_power, 1265 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), 1266 TP_ARGS(wiphy, wdev) 1267 ); 1268 1269 TRACE_EVENT(rdev_set_tx_power, 1270 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, 1271 enum nl80211_tx_power_setting type, int mbm), 1272 TP_ARGS(wiphy, wdev, type, mbm), 1273 TP_STRUCT__entry( 1274 WIPHY_ENTRY 1275 WDEV_ENTRY 1276 __field(enum nl80211_tx_power_setting, type) 1277 __field(int, mbm) 1278 ), 1279 TP_fast_assign( 1280 WIPHY_ASSIGN; 1281 WDEV_ASSIGN; 1282 __entry->type = type; 1283 __entry->mbm = mbm; 1284 ), 1285 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type: %u, mbm: %d", 1286 WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm) 1287 ); 1288 1289 TRACE_EVENT(rdev_return_int_int, 1290 TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill), 1291 TP_ARGS(wiphy, func_ret, func_fill), 1292 TP_STRUCT__entry( 1293 WIPHY_ENTRY 1294 __field(int, func_ret) 1295 __field(int, func_fill) 1296 ), 1297 TP_fast_assign( 1298 WIPHY_ASSIGN; 1299 __entry->func_ret = func_ret; 1300 __entry->func_fill = func_fill; 1301 ), 1302 TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d", 1303 WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill) 1304 ); 1305 1306 #ifdef CONFIG_NL80211_TESTMODE 1307 TRACE_EVENT(rdev_testmode_cmd, 1308 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), 1309 TP_ARGS(wiphy, wdev), 1310 TP_STRUCT__entry( 1311 WIPHY_ENTRY 1312 WDEV_ENTRY 1313 ), 1314 TP_fast_assign( 1315 WIPHY_ASSIGN; 1316 WDEV_ASSIGN; 1317 ), 1318 TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG) 1319 ); 1320 1321 TRACE_EVENT(rdev_testmode_dump, 1322 TP_PROTO(struct wiphy *wiphy), 1323 TP_ARGS(wiphy), 1324 TP_STRUCT__entry( 1325 WIPHY_ENTRY 1326 ), 1327 TP_fast_assign( 1328 WIPHY_ASSIGN; 1329 ), 1330 TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG) 1331 ); 1332 #endif /* CONFIG_NL80211_TESTMODE */ 1333 1334 TRACE_EVENT(rdev_set_bitrate_mask, 1335 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1336 const u8 *peer, const struct cfg80211_bitrate_mask *mask), 1337 TP_ARGS(wiphy, netdev, peer, mask), 1338 TP_STRUCT__entry( 1339 WIPHY_ENTRY 1340 NETDEV_ENTRY 1341 MAC_ENTRY(peer) 1342 ), 1343 TP_fast_assign( 1344 WIPHY_ASSIGN; 1345 NETDEV_ASSIGN; 1346 MAC_ASSIGN(peer, peer); 1347 ), 1348 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT, 1349 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer)) 1350 ); 1351 1352 TRACE_EVENT(rdev_mgmt_frame_register, 1353 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, 1354 u16 frame_type, bool reg), 1355 TP_ARGS(wiphy, wdev, frame_type, reg), 1356 TP_STRUCT__entry( 1357 WIPHY_ENTRY 1358 WDEV_ENTRY 1359 __field(u16, frame_type) 1360 __field(bool, reg) 1361 ), 1362 TP_fast_assign( 1363 WIPHY_ASSIGN; 1364 WDEV_ASSIGN; 1365 __entry->frame_type = frame_type; 1366 __entry->reg = reg; 1367 ), 1368 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", frame_type: 0x%.2x, reg: %s ", 1369 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->frame_type, 1370 __entry->reg ? "true" : "false") 1371 ); 1372 1373 TRACE_EVENT(rdev_return_int_tx_rx, 1374 TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx), 1375 TP_ARGS(wiphy, ret, tx, rx), 1376 TP_STRUCT__entry( 1377 WIPHY_ENTRY 1378 __field(int, ret) 1379 __field(u32, tx) 1380 __field(u32, rx) 1381 ), 1382 TP_fast_assign( 1383 WIPHY_ASSIGN; 1384 __entry->ret = ret; 1385 __entry->tx = tx; 1386 __entry->rx = rx; 1387 ), 1388 TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u", 1389 WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx) 1390 ); 1391 1392 TRACE_EVENT(rdev_return_void_tx_rx, 1393 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max, 1394 u32 rx, u32 rx_max), 1395 TP_ARGS(wiphy, tx, tx_max, rx, rx_max), 1396 TP_STRUCT__entry( 1397 WIPHY_ENTRY 1398 __field(u32, tx) 1399 __field(u32, tx_max) 1400 __field(u32, rx) 1401 __field(u32, rx_max) 1402 ), 1403 TP_fast_assign( 1404 WIPHY_ASSIGN; 1405 __entry->tx = tx; 1406 __entry->tx_max = tx_max; 1407 __entry->rx = rx; 1408 __entry->rx_max = rx_max; 1409 ), 1410 TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ", 1411 WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx, 1412 __entry->rx_max) 1413 ); 1414 1415 DECLARE_EVENT_CLASS(tx_rx_evt, 1416 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx), 1417 TP_ARGS(wiphy, rx, tx), 1418 TP_STRUCT__entry( 1419 WIPHY_ENTRY 1420 __field(u32, tx) 1421 __field(u32, rx) 1422 ), 1423 TP_fast_assign( 1424 WIPHY_ASSIGN; 1425 __entry->tx = tx; 1426 __entry->rx = rx; 1427 ), 1428 TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ", 1429 WIPHY_PR_ARG, __entry->tx, __entry->rx) 1430 ); 1431 1432 DEFINE_EVENT(tx_rx_evt, rdev_set_antenna, 1433 TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx), 1434 TP_ARGS(wiphy, rx, tx) 1435 ); 1436 1437 TRACE_EVENT(rdev_sched_scan_start, 1438 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1439 struct cfg80211_sched_scan_request *request), 1440 TP_ARGS(wiphy, netdev, request), 1441 TP_STRUCT__entry( 1442 WIPHY_ENTRY 1443 NETDEV_ENTRY 1444 ), 1445 TP_fast_assign( 1446 WIPHY_ASSIGN; 1447 NETDEV_ASSIGN; 1448 ), 1449 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, 1450 WIPHY_PR_ARG, NETDEV_PR_ARG) 1451 ); 1452 1453 TRACE_EVENT(rdev_tdls_mgmt, 1454 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1455 u8 *peer, u8 action_code, u8 dialog_token, 1456 u16 status_code, u32 peer_capability, 1457 bool initiator, const u8 *buf, size_t len), 1458 TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code, 1459 peer_capability, initiator, buf, len), 1460 TP_STRUCT__entry( 1461 WIPHY_ENTRY 1462 NETDEV_ENTRY 1463 MAC_ENTRY(peer) 1464 __field(u8, action_code) 1465 __field(u8, dialog_token) 1466 __field(u16, status_code) 1467 __field(u32, peer_capability) 1468 __field(bool, initiator) 1469 __dynamic_array(u8, buf, len) 1470 ), 1471 TP_fast_assign( 1472 WIPHY_ASSIGN; 1473 NETDEV_ASSIGN; 1474 MAC_ASSIGN(peer, peer); 1475 __entry->action_code = action_code; 1476 __entry->dialog_token = dialog_token; 1477 __entry->status_code = status_code; 1478 __entry->peer_capability = peer_capability; 1479 __entry->initiator = initiator; 1480 memcpy(__get_dynamic_array(buf), buf, len); 1481 ), 1482 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", action_code: %u, " 1483 "dialog_token: %u, status_code: %u, peer_capability: %u " 1484 "initiator: %s buf: %#.2x ", 1485 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), 1486 __entry->action_code, __entry->dialog_token, 1487 __entry->status_code, __entry->peer_capability, 1488 BOOL_TO_STR(__entry->initiator), 1489 ((u8 *)__get_dynamic_array(buf))[0]) 1490 ); 1491 1492 TRACE_EVENT(rdev_dump_survey, 1493 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx), 1494 TP_ARGS(wiphy, netdev, idx), 1495 TP_STRUCT__entry( 1496 WIPHY_ENTRY 1497 NETDEV_ENTRY 1498 __field(int, idx) 1499 ), 1500 TP_fast_assign( 1501 WIPHY_ASSIGN; 1502 NETDEV_ASSIGN; 1503 __entry->idx = idx; 1504 ), 1505 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", index: %d", 1506 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx) 1507 ); 1508 1509 TRACE_EVENT(rdev_return_int_survey_info, 1510 TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info), 1511 TP_ARGS(wiphy, ret, info), 1512 TP_STRUCT__entry( 1513 WIPHY_ENTRY 1514 CHAN_ENTRY 1515 __field(int, ret) 1516 __field(u64, channel_time) 1517 __field(u64, channel_time_busy) 1518 __field(u64, channel_time_ext_busy) 1519 __field(u64, channel_time_rx) 1520 __field(u64, channel_time_tx) 1521 __field(u32, filled) 1522 __field(s8, noise) 1523 ), 1524 TP_fast_assign( 1525 WIPHY_ASSIGN; 1526 CHAN_ASSIGN(info->channel); 1527 __entry->ret = ret; 1528 __entry->channel_time = info->channel_time; 1529 __entry->channel_time_busy = info->channel_time_busy; 1530 __entry->channel_time_ext_busy = info->channel_time_ext_busy; 1531 __entry->channel_time_rx = info->channel_time_rx; 1532 __entry->channel_time_tx = info->channel_time_tx; 1533 __entry->filled = info->filled; 1534 __entry->noise = info->noise; 1535 ), 1536 TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT 1537 ", channel time: %llu, channel time busy: %llu, " 1538 "channel time extension busy: %llu, channel time rx: %llu, " 1539 "channel time tx: %llu, filled: %u, noise: %d", 1540 WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG, 1541 __entry->channel_time, __entry->channel_time_busy, 1542 __entry->channel_time_ext_busy, __entry->channel_time_rx, 1543 __entry->channel_time_tx, __entry->filled, __entry->noise) 1544 ); 1545 1546 TRACE_EVENT(rdev_tdls_oper, 1547 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1548 u8 *peer, enum nl80211_tdls_operation oper), 1549 TP_ARGS(wiphy, netdev, peer, oper), 1550 TP_STRUCT__entry( 1551 WIPHY_ENTRY 1552 NETDEV_ENTRY 1553 MAC_ENTRY(peer) 1554 __field(enum nl80211_tdls_operation, oper) 1555 ), 1556 TP_fast_assign( 1557 WIPHY_ASSIGN; 1558 NETDEV_ASSIGN; 1559 MAC_ASSIGN(peer, peer); 1560 __entry->oper = oper; 1561 ), 1562 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT ", oper: %d", 1563 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper) 1564 ); 1565 1566 DECLARE_EVENT_CLASS(rdev_pmksa, 1567 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1568 struct cfg80211_pmksa *pmksa), 1569 TP_ARGS(wiphy, netdev, pmksa), 1570 TP_STRUCT__entry( 1571 WIPHY_ENTRY 1572 NETDEV_ENTRY 1573 MAC_ENTRY(bssid) 1574 ), 1575 TP_fast_assign( 1576 WIPHY_ASSIGN; 1577 NETDEV_ASSIGN; 1578 MAC_ASSIGN(bssid, pmksa->bssid); 1579 ), 1580 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT, 1581 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid)) 1582 ); 1583 1584 TRACE_EVENT(rdev_probe_client, 1585 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1586 const u8 *peer), 1587 TP_ARGS(wiphy, netdev, peer), 1588 TP_STRUCT__entry( 1589 WIPHY_ENTRY 1590 NETDEV_ENTRY 1591 MAC_ENTRY(peer) 1592 ), 1593 TP_fast_assign( 1594 WIPHY_ASSIGN; 1595 NETDEV_ASSIGN; 1596 MAC_ASSIGN(peer, peer); 1597 ), 1598 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " MAC_PR_FMT, 1599 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer)) 1600 ); 1601 1602 DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa, 1603 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1604 struct cfg80211_pmksa *pmksa), 1605 TP_ARGS(wiphy, netdev, pmksa) 1606 ); 1607 1608 DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa, 1609 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1610 struct cfg80211_pmksa *pmksa), 1611 TP_ARGS(wiphy, netdev, pmksa) 1612 ); 1613 1614 TRACE_EVENT(rdev_remain_on_channel, 1615 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, 1616 struct ieee80211_channel *chan, 1617 unsigned int duration), 1618 TP_ARGS(wiphy, wdev, chan, duration), 1619 TP_STRUCT__entry( 1620 WIPHY_ENTRY 1621 WDEV_ENTRY 1622 CHAN_ENTRY 1623 __field(unsigned int, duration) 1624 ), 1625 TP_fast_assign( 1626 WIPHY_ASSIGN; 1627 WDEV_ASSIGN; 1628 CHAN_ASSIGN(chan); 1629 __entry->duration = duration; 1630 ), 1631 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", duration: %u", 1632 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration) 1633 ); 1634 1635 TRACE_EVENT(rdev_return_int_cookie, 1636 TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie), 1637 TP_ARGS(wiphy, ret, cookie), 1638 TP_STRUCT__entry( 1639 WIPHY_ENTRY 1640 __field(int, ret) 1641 __field(u64, cookie) 1642 ), 1643 TP_fast_assign( 1644 WIPHY_ASSIGN; 1645 __entry->ret = ret; 1646 __entry->cookie = cookie; 1647 ), 1648 TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu", 1649 WIPHY_PR_ARG, __entry->ret, __entry->cookie) 1650 ); 1651 1652 TRACE_EVENT(rdev_cancel_remain_on_channel, 1653 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie), 1654 TP_ARGS(wiphy, wdev, cookie), 1655 TP_STRUCT__entry( 1656 WIPHY_ENTRY 1657 WDEV_ENTRY 1658 __field(u64, cookie) 1659 ), 1660 TP_fast_assign( 1661 WIPHY_ASSIGN; 1662 WDEV_ASSIGN; 1663 __entry->cookie = cookie; 1664 ), 1665 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu", 1666 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie) 1667 ); 1668 1669 TRACE_EVENT(rdev_mgmt_tx, 1670 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, 1671 struct cfg80211_mgmt_tx_params *params), 1672 TP_ARGS(wiphy, wdev, params), 1673 TP_STRUCT__entry( 1674 WIPHY_ENTRY 1675 WDEV_ENTRY 1676 CHAN_ENTRY 1677 __field(bool, offchan) 1678 __field(unsigned int, wait) 1679 __field(bool, no_cck) 1680 __field(bool, dont_wait_for_ack) 1681 ), 1682 TP_fast_assign( 1683 WIPHY_ASSIGN; 1684 WDEV_ASSIGN; 1685 CHAN_ASSIGN(params->chan); 1686 __entry->offchan = params->offchan; 1687 __entry->wait = params->wait; 1688 __entry->no_cck = params->no_cck; 1689 __entry->dont_wait_for_ack = params->dont_wait_for_ack; 1690 ), 1691 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s," 1692 " wait: %u, no cck: %s, dont wait for ack: %s", 1693 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, 1694 BOOL_TO_STR(__entry->offchan), __entry->wait, 1695 BOOL_TO_STR(__entry->no_cck), 1696 BOOL_TO_STR(__entry->dont_wait_for_ack)) 1697 ); 1698 1699 TRACE_EVENT(rdev_set_noack_map, 1700 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1701 u16 noack_map), 1702 TP_ARGS(wiphy, netdev, noack_map), 1703 TP_STRUCT__entry( 1704 WIPHY_ENTRY 1705 NETDEV_ENTRY 1706 __field(u16, noack_map) 1707 ), 1708 TP_fast_assign( 1709 WIPHY_ASSIGN; 1710 NETDEV_ASSIGN; 1711 __entry->noack_map = noack_map; 1712 ), 1713 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", noack_map: %u", 1714 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map) 1715 ); 1716 1717 DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel, 1718 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), 1719 TP_ARGS(wiphy, wdev) 1720 ); 1721 1722 TRACE_EVENT(rdev_return_chandef, 1723 TP_PROTO(struct wiphy *wiphy, int ret, 1724 struct cfg80211_chan_def *chandef), 1725 TP_ARGS(wiphy, ret, chandef), 1726 TP_STRUCT__entry( 1727 WIPHY_ENTRY 1728 __field(int, ret) 1729 CHAN_DEF_ENTRY 1730 ), 1731 TP_fast_assign( 1732 WIPHY_ASSIGN; 1733 if (ret == 0) 1734 CHAN_DEF_ASSIGN(chandef); 1735 else 1736 CHAN_DEF_ASSIGN((struct cfg80211_chan_def *)NULL); 1737 __entry->ret = ret; 1738 ), 1739 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", ret: %d", 1740 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->ret) 1741 ); 1742 1743 DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device, 1744 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), 1745 TP_ARGS(wiphy, wdev) 1746 ); 1747 1748 DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device, 1749 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), 1750 TP_ARGS(wiphy, wdev) 1751 ); 1752 1753 TRACE_EVENT(rdev_set_mac_acl, 1754 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1755 struct cfg80211_acl_data *params), 1756 TP_ARGS(wiphy, netdev, params), 1757 TP_STRUCT__entry( 1758 WIPHY_ENTRY 1759 NETDEV_ENTRY 1760 __field(u32, acl_policy) 1761 ), 1762 TP_fast_assign( 1763 WIPHY_ASSIGN; 1764 NETDEV_ASSIGN; 1765 __entry->acl_policy = params->acl_policy; 1766 ), 1767 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", acl policy: %d", 1768 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->acl_policy) 1769 ); 1770 1771 TRACE_EVENT(rdev_update_ft_ies, 1772 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1773 struct cfg80211_update_ft_ies_params *ftie), 1774 TP_ARGS(wiphy, netdev, ftie), 1775 TP_STRUCT__entry( 1776 WIPHY_ENTRY 1777 NETDEV_ENTRY 1778 __field(u16, md) 1779 __dynamic_array(u8, ie, ftie->ie_len) 1780 ), 1781 TP_fast_assign( 1782 WIPHY_ASSIGN; 1783 NETDEV_ASSIGN; 1784 __entry->md = ftie->md; 1785 memcpy(__get_dynamic_array(ie), ftie->ie, ftie->ie_len); 1786 ), 1787 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", md: 0x%x", 1788 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->md) 1789 ); 1790 1791 TRACE_EVENT(rdev_crit_proto_start, 1792 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, 1793 enum nl80211_crit_proto_id protocol, u16 duration), 1794 TP_ARGS(wiphy, wdev, protocol, duration), 1795 TP_STRUCT__entry( 1796 WIPHY_ENTRY 1797 WDEV_ENTRY 1798 __field(u16, proto) 1799 __field(u16, duration) 1800 ), 1801 TP_fast_assign( 1802 WIPHY_ASSIGN; 1803 WDEV_ASSIGN; 1804 __entry->proto = protocol; 1805 __entry->duration = duration; 1806 ), 1807 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", proto=%x, duration=%u", 1808 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->proto, __entry->duration) 1809 ); 1810 1811 TRACE_EVENT(rdev_crit_proto_stop, 1812 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), 1813 TP_ARGS(wiphy, wdev), 1814 TP_STRUCT__entry( 1815 WIPHY_ENTRY 1816 WDEV_ENTRY 1817 ), 1818 TP_fast_assign( 1819 WIPHY_ASSIGN; 1820 WDEV_ASSIGN; 1821 ), 1822 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, 1823 WIPHY_PR_ARG, WDEV_PR_ARG) 1824 ); 1825 1826 TRACE_EVENT(rdev_channel_switch, 1827 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1828 struct cfg80211_csa_settings *params), 1829 TP_ARGS(wiphy, netdev, params), 1830 TP_STRUCT__entry( 1831 WIPHY_ENTRY 1832 NETDEV_ENTRY 1833 CHAN_DEF_ENTRY 1834 __field(bool, radar_required) 1835 __field(bool, block_tx) 1836 __field(u8, count) 1837 __dynamic_array(u16, bcn_ofs, params->n_counter_offsets_beacon) 1838 __dynamic_array(u16, pres_ofs, params->n_counter_offsets_presp) 1839 ), 1840 TP_fast_assign( 1841 WIPHY_ASSIGN; 1842 NETDEV_ASSIGN; 1843 CHAN_DEF_ASSIGN(¶ms->chandef); 1844 __entry->radar_required = params->radar_required; 1845 __entry->block_tx = params->block_tx; 1846 __entry->count = params->count; 1847 memcpy(__get_dynamic_array(bcn_ofs), 1848 params->counter_offsets_beacon, 1849 params->n_counter_offsets_beacon * sizeof(u16)); 1850 1851 /* probe response offsets are optional */ 1852 if (params->n_counter_offsets_presp) 1853 memcpy(__get_dynamic_array(pres_ofs), 1854 params->counter_offsets_presp, 1855 params->n_counter_offsets_presp * sizeof(u16)); 1856 ), 1857 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT 1858 ", block_tx: %d, count: %u, radar_required: %d", 1859 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG, 1860 __entry->block_tx, __entry->count, __entry->radar_required) 1861 ); 1862 1863 TRACE_EVENT(rdev_set_qos_map, 1864 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1865 struct cfg80211_qos_map *qos_map), 1866 TP_ARGS(wiphy, netdev, qos_map), 1867 TP_STRUCT__entry( 1868 WIPHY_ENTRY 1869 NETDEV_ENTRY 1870 QOS_MAP_ENTRY 1871 ), 1872 TP_fast_assign( 1873 WIPHY_ASSIGN; 1874 NETDEV_ASSIGN; 1875 QOS_MAP_ASSIGN(qos_map); 1876 ), 1877 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", num_des: %u", 1878 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->num_des) 1879 ); 1880 1881 TRACE_EVENT(rdev_set_ap_chanwidth, 1882 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 1883 struct cfg80211_chan_def *chandef), 1884 TP_ARGS(wiphy, netdev, chandef), 1885 TP_STRUCT__entry( 1886 WIPHY_ENTRY 1887 NETDEV_ENTRY 1888 CHAN_DEF_ENTRY 1889 ), 1890 TP_fast_assign( 1891 WIPHY_ASSIGN; 1892 NETDEV_ASSIGN; 1893 CHAN_DEF_ASSIGN(chandef); 1894 ), 1895 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT, 1896 WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG) 1897 ); 1898 1899 /************************************************************* 1900 * cfg80211 exported functions traces * 1901 *************************************************************/ 1902 1903 TRACE_EVENT(cfg80211_return_bool, 1904 TP_PROTO(bool ret), 1905 TP_ARGS(ret), 1906 TP_STRUCT__entry( 1907 __field(bool, ret) 1908 ), 1909 TP_fast_assign( 1910 __entry->ret = ret; 1911 ), 1912 TP_printk("returned %s", BOOL_TO_STR(__entry->ret)) 1913 ); 1914 1915 DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt, 1916 TP_PROTO(struct net_device *netdev, const u8 *macaddr), 1917 TP_ARGS(netdev, macaddr), 1918 TP_STRUCT__entry( 1919 NETDEV_ENTRY 1920 MAC_ENTRY(macaddr) 1921 ), 1922 TP_fast_assign( 1923 NETDEV_ASSIGN; 1924 MAC_ASSIGN(macaddr, macaddr); 1925 ), 1926 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT, 1927 NETDEV_PR_ARG, MAC_PR_ARG(macaddr)) 1928 ); 1929 1930 DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate, 1931 TP_PROTO(struct net_device *netdev, const u8 *macaddr), 1932 TP_ARGS(netdev, macaddr) 1933 ); 1934 1935 DECLARE_EVENT_CLASS(netdev_evt_only, 1936 TP_PROTO(struct net_device *netdev), 1937 TP_ARGS(netdev), 1938 TP_STRUCT__entry( 1939 NETDEV_ENTRY 1940 ), 1941 TP_fast_assign( 1942 NETDEV_ASSIGN; 1943 ), 1944 TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG) 1945 ); 1946 1947 DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth, 1948 TP_PROTO(struct net_device *netdev), 1949 TP_ARGS(netdev) 1950 ); 1951 1952 TRACE_EVENT(cfg80211_send_rx_assoc, 1953 TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss), 1954 TP_ARGS(netdev, bss), 1955 TP_STRUCT__entry( 1956 NETDEV_ENTRY 1957 MAC_ENTRY(bssid) 1958 CHAN_ENTRY 1959 ), 1960 TP_fast_assign( 1961 NETDEV_ASSIGN; 1962 MAC_ASSIGN(bssid, bss->bssid); 1963 CHAN_ASSIGN(bss->channel); 1964 ), 1965 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", " CHAN_PR_FMT, 1966 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG) 1967 ); 1968 1969 DECLARE_EVENT_CLASS(netdev_frame_event, 1970 TP_PROTO(struct net_device *netdev, const u8 *buf, int len), 1971 TP_ARGS(netdev, buf, len), 1972 TP_STRUCT__entry( 1973 NETDEV_ENTRY 1974 __dynamic_array(u8, frame, len) 1975 ), 1976 TP_fast_assign( 1977 NETDEV_ASSIGN; 1978 memcpy(__get_dynamic_array(frame), buf, len); 1979 ), 1980 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x", 1981 NETDEV_PR_ARG, 1982 le16_to_cpup((__le16 *)__get_dynamic_array(frame))) 1983 ); 1984 1985 DEFINE_EVENT(netdev_frame_event, cfg80211_rx_unprot_mlme_mgmt, 1986 TP_PROTO(struct net_device *netdev, const u8 *buf, int len), 1987 TP_ARGS(netdev, buf, len) 1988 ); 1989 1990 DEFINE_EVENT(netdev_frame_event, cfg80211_rx_mlme_mgmt, 1991 TP_PROTO(struct net_device *netdev, const u8 *buf, int len), 1992 TP_ARGS(netdev, buf, len) 1993 ); 1994 1995 TRACE_EVENT(cfg80211_tx_mlme_mgmt, 1996 TP_PROTO(struct net_device *netdev, const u8 *buf, int len), 1997 TP_ARGS(netdev, buf, len), 1998 TP_STRUCT__entry( 1999 NETDEV_ENTRY 2000 __dynamic_array(u8, frame, len) 2001 ), 2002 TP_fast_assign( 2003 NETDEV_ASSIGN; 2004 memcpy(__get_dynamic_array(frame), buf, len); 2005 ), 2006 TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x", 2007 NETDEV_PR_ARG, 2008 le16_to_cpup((__le16 *)__get_dynamic_array(frame))) 2009 ); 2010 2011 DECLARE_EVENT_CLASS(netdev_mac_evt, 2012 TP_PROTO(struct net_device *netdev, const u8 *mac), 2013 TP_ARGS(netdev, mac), 2014 TP_STRUCT__entry( 2015 NETDEV_ENTRY 2016 MAC_ENTRY(mac) 2017 ), 2018 TP_fast_assign( 2019 NETDEV_ASSIGN; 2020 MAC_ASSIGN(mac, mac) 2021 ), 2022 TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT, 2023 NETDEV_PR_ARG, MAC_PR_ARG(mac)) 2024 ); 2025 2026 DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout, 2027 TP_PROTO(struct net_device *netdev, const u8 *mac), 2028 TP_ARGS(netdev, mac) 2029 ); 2030 2031 DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout, 2032 TP_PROTO(struct net_device *netdev, const u8 *mac), 2033 TP_ARGS(netdev, mac) 2034 ); 2035 2036 TRACE_EVENT(cfg80211_michael_mic_failure, 2037 TP_PROTO(struct net_device *netdev, const u8 *addr, 2038 enum nl80211_key_type key_type, int key_id, const u8 *tsc), 2039 TP_ARGS(netdev, addr, key_type, key_id, tsc), 2040 TP_STRUCT__entry( 2041 NETDEV_ENTRY 2042 MAC_ENTRY(addr) 2043 __field(enum nl80211_key_type, key_type) 2044 __field(int, key_id) 2045 __array(u8, tsc, 6) 2046 ), 2047 TP_fast_assign( 2048 NETDEV_ASSIGN; 2049 MAC_ASSIGN(addr, addr); 2050 __entry->key_type = key_type; 2051 __entry->key_id = key_id; 2052 if (tsc) 2053 memcpy(__entry->tsc, tsc, 6); 2054 ), 2055 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm", 2056 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type, 2057 __entry->key_id, __entry->tsc) 2058 ); 2059 2060 TRACE_EVENT(cfg80211_ready_on_channel, 2061 TP_PROTO(struct wireless_dev *wdev, u64 cookie, 2062 struct ieee80211_channel *chan, 2063 unsigned int duration), 2064 TP_ARGS(wdev, cookie, chan, duration), 2065 TP_STRUCT__entry( 2066 WDEV_ENTRY 2067 __field(u64, cookie) 2068 CHAN_ENTRY 2069 __field(unsigned int, duration) 2070 ), 2071 TP_fast_assign( 2072 WDEV_ASSIGN; 2073 __entry->cookie = cookie; 2074 CHAN_ASSIGN(chan); 2075 __entry->duration = duration; 2076 ), 2077 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u", 2078 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG, 2079 __entry->duration) 2080 ); 2081 2082 TRACE_EVENT(cfg80211_ready_on_channel_expired, 2083 TP_PROTO(struct wireless_dev *wdev, u64 cookie, 2084 struct ieee80211_channel *chan), 2085 TP_ARGS(wdev, cookie, chan), 2086 TP_STRUCT__entry( 2087 WDEV_ENTRY 2088 __field(u64, cookie) 2089 CHAN_ENTRY 2090 ), 2091 TP_fast_assign( 2092 WDEV_ASSIGN; 2093 __entry->cookie = cookie; 2094 CHAN_ASSIGN(chan); 2095 ), 2096 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT, 2097 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG) 2098 ); 2099 2100 TRACE_EVENT(cfg80211_new_sta, 2101 TP_PROTO(struct net_device *netdev, const u8 *mac_addr, 2102 struct station_info *sinfo), 2103 TP_ARGS(netdev, mac_addr, sinfo), 2104 TP_STRUCT__entry( 2105 NETDEV_ENTRY 2106 MAC_ENTRY(mac_addr) 2107 SINFO_ENTRY 2108 ), 2109 TP_fast_assign( 2110 NETDEV_ASSIGN; 2111 MAC_ASSIGN(mac_addr, mac_addr); 2112 SINFO_ASSIGN; 2113 ), 2114 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, 2115 NETDEV_PR_ARG, MAC_PR_ARG(mac_addr)) 2116 ); 2117 2118 DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta, 2119 TP_PROTO(struct net_device *netdev, const u8 *macaddr), 2120 TP_ARGS(netdev, macaddr) 2121 ); 2122 2123 TRACE_EVENT(cfg80211_rx_mgmt, 2124 TP_PROTO(struct wireless_dev *wdev, int freq, int sig_mbm), 2125 TP_ARGS(wdev, freq, sig_mbm), 2126 TP_STRUCT__entry( 2127 WDEV_ENTRY 2128 __field(int, freq) 2129 __field(int, sig_mbm) 2130 ), 2131 TP_fast_assign( 2132 WDEV_ASSIGN; 2133 __entry->freq = freq; 2134 __entry->sig_mbm = sig_mbm; 2135 ), 2136 TP_printk(WDEV_PR_FMT ", freq: %d, sig mbm: %d", 2137 WDEV_PR_ARG, __entry->freq, __entry->sig_mbm) 2138 ); 2139 2140 TRACE_EVENT(cfg80211_mgmt_tx_status, 2141 TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack), 2142 TP_ARGS(wdev, cookie, ack), 2143 TP_STRUCT__entry( 2144 WDEV_ENTRY 2145 __field(u64, cookie) 2146 __field(bool, ack) 2147 ), 2148 TP_fast_assign( 2149 WDEV_ASSIGN; 2150 __entry->cookie = cookie; 2151 __entry->ack = ack; 2152 ), 2153 TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s", 2154 WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack)) 2155 ); 2156 2157 TRACE_EVENT(cfg80211_cqm_rssi_notify, 2158 TP_PROTO(struct net_device *netdev, 2159 enum nl80211_cqm_rssi_threshold_event rssi_event), 2160 TP_ARGS(netdev, rssi_event), 2161 TP_STRUCT__entry( 2162 NETDEV_ENTRY 2163 __field(enum nl80211_cqm_rssi_threshold_event, rssi_event) 2164 ), 2165 TP_fast_assign( 2166 NETDEV_ASSIGN; 2167 __entry->rssi_event = rssi_event; 2168 ), 2169 TP_printk(NETDEV_PR_FMT ", rssi event: %d", 2170 NETDEV_PR_ARG, __entry->rssi_event) 2171 ); 2172 2173 TRACE_EVENT(cfg80211_reg_can_beacon, 2174 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef, 2175 enum nl80211_iftype iftype), 2176 TP_ARGS(wiphy, chandef, iftype), 2177 TP_STRUCT__entry( 2178 WIPHY_ENTRY 2179 CHAN_DEF_ENTRY 2180 __field(enum nl80211_iftype, iftype) 2181 ), 2182 TP_fast_assign( 2183 WIPHY_ASSIGN; 2184 CHAN_DEF_ASSIGN(chandef); 2185 __entry->iftype = iftype; 2186 ), 2187 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", iftype=%d", 2188 WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->iftype) 2189 ); 2190 2191 TRACE_EVENT(cfg80211_chandef_dfs_required, 2192 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef), 2193 TP_ARGS(wiphy, chandef), 2194 TP_STRUCT__entry( 2195 WIPHY_ENTRY 2196 CHAN_DEF_ENTRY 2197 ), 2198 TP_fast_assign( 2199 WIPHY_ASSIGN; 2200 CHAN_DEF_ASSIGN(chandef); 2201 ), 2202 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT, 2203 WIPHY_PR_ARG, CHAN_DEF_PR_ARG) 2204 ); 2205 2206 TRACE_EVENT(cfg80211_ch_switch_notify, 2207 TP_PROTO(struct net_device *netdev, 2208 struct cfg80211_chan_def *chandef), 2209 TP_ARGS(netdev, chandef), 2210 TP_STRUCT__entry( 2211 NETDEV_ENTRY 2212 CHAN_DEF_ENTRY 2213 ), 2214 TP_fast_assign( 2215 NETDEV_ASSIGN; 2216 CHAN_DEF_ASSIGN(chandef); 2217 ), 2218 TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT, 2219 NETDEV_PR_ARG, CHAN_DEF_PR_ARG) 2220 ); 2221 2222 TRACE_EVENT(cfg80211_radar_event, 2223 TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef), 2224 TP_ARGS(wiphy, chandef), 2225 TP_STRUCT__entry( 2226 WIPHY_ENTRY 2227 CHAN_DEF_ENTRY 2228 ), 2229 TP_fast_assign( 2230 WIPHY_ASSIGN; 2231 CHAN_DEF_ASSIGN(chandef); 2232 ), 2233 TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT, 2234 WIPHY_PR_ARG, CHAN_DEF_PR_ARG) 2235 ); 2236 2237 TRACE_EVENT(cfg80211_cac_event, 2238 TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt), 2239 TP_ARGS(netdev, evt), 2240 TP_STRUCT__entry( 2241 NETDEV_ENTRY 2242 __field(enum nl80211_radar_event, evt) 2243 ), 2244 TP_fast_assign( 2245 NETDEV_ASSIGN; 2246 __entry->evt = evt; 2247 ), 2248 TP_printk(NETDEV_PR_FMT ", event: %d", 2249 NETDEV_PR_ARG, __entry->evt) 2250 ); 2251 2252 DECLARE_EVENT_CLASS(cfg80211_rx_evt, 2253 TP_PROTO(struct net_device *netdev, const u8 *addr), 2254 TP_ARGS(netdev, addr), 2255 TP_STRUCT__entry( 2256 NETDEV_ENTRY 2257 MAC_ENTRY(addr) 2258 ), 2259 TP_fast_assign( 2260 NETDEV_ASSIGN; 2261 MAC_ASSIGN(addr, addr); 2262 ), 2263 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr)) 2264 ); 2265 2266 DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame, 2267 TP_PROTO(struct net_device *netdev, const u8 *addr), 2268 TP_ARGS(netdev, addr) 2269 ); 2270 2271 DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame, 2272 TP_PROTO(struct net_device *netdev, const u8 *addr), 2273 TP_ARGS(netdev, addr) 2274 ); 2275 2276 TRACE_EVENT(cfg80211_ibss_joined, 2277 TP_PROTO(struct net_device *netdev, const u8 *bssid, 2278 struct ieee80211_channel *channel), 2279 TP_ARGS(netdev, bssid, channel), 2280 TP_STRUCT__entry( 2281 NETDEV_ENTRY 2282 MAC_ENTRY(bssid) 2283 CHAN_ENTRY 2284 ), 2285 TP_fast_assign( 2286 NETDEV_ASSIGN; 2287 MAC_ASSIGN(bssid, bssid); 2288 CHAN_ASSIGN(channel); 2289 ), 2290 TP_printk(NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", " CHAN_PR_FMT, 2291 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG) 2292 ); 2293 2294 TRACE_EVENT(cfg80211_probe_status, 2295 TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie, 2296 bool acked), 2297 TP_ARGS(netdev, addr, cookie, acked), 2298 TP_STRUCT__entry( 2299 NETDEV_ENTRY 2300 MAC_ENTRY(addr) 2301 __field(u64, cookie) 2302 __field(bool, acked) 2303 ), 2304 TP_fast_assign( 2305 NETDEV_ASSIGN; 2306 MAC_ASSIGN(addr, addr); 2307 __entry->cookie = cookie; 2308 __entry->acked = acked; 2309 ), 2310 TP_printk(NETDEV_PR_FMT " addr:" MAC_PR_FMT ", cookie: %llu, acked: %s", 2311 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie, 2312 BOOL_TO_STR(__entry->acked)) 2313 ); 2314 2315 TRACE_EVENT(cfg80211_cqm_pktloss_notify, 2316 TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets), 2317 TP_ARGS(netdev, peer, num_packets), 2318 TP_STRUCT__entry( 2319 NETDEV_ENTRY 2320 MAC_ENTRY(peer) 2321 __field(u32, num_packets) 2322 ), 2323 TP_fast_assign( 2324 NETDEV_ASSIGN; 2325 MAC_ASSIGN(peer, peer); 2326 __entry->num_packets = num_packets; 2327 ), 2328 TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u", 2329 NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets) 2330 ); 2331 2332 DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify, 2333 TP_PROTO(struct net_device *netdev, const u8 *macaddr), 2334 TP_ARGS(netdev, macaddr) 2335 ); 2336 2337 TRACE_EVENT(cfg80211_pmksa_candidate_notify, 2338 TP_PROTO(struct net_device *netdev, int index, const u8 *bssid, 2339 bool preauth), 2340 TP_ARGS(netdev, index, bssid, preauth), 2341 TP_STRUCT__entry( 2342 NETDEV_ENTRY 2343 __field(int, index) 2344 MAC_ENTRY(bssid) 2345 __field(bool, preauth) 2346 ), 2347 TP_fast_assign( 2348 NETDEV_ASSIGN; 2349 __entry->index = index; 2350 MAC_ASSIGN(bssid, bssid); 2351 __entry->preauth = preauth; 2352 ), 2353 TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s", 2354 NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid), 2355 BOOL_TO_STR(__entry->preauth)) 2356 ); 2357 2358 TRACE_EVENT(cfg80211_report_obss_beacon, 2359 TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len, 2360 int freq, int sig_dbm), 2361 TP_ARGS(wiphy, frame, len, freq, sig_dbm), 2362 TP_STRUCT__entry( 2363 WIPHY_ENTRY 2364 __field(int, freq) 2365 __field(int, sig_dbm) 2366 ), 2367 TP_fast_assign( 2368 WIPHY_ASSIGN; 2369 __entry->freq = freq; 2370 __entry->sig_dbm = sig_dbm; 2371 ), 2372 TP_printk(WIPHY_PR_FMT ", freq: %d, sig_dbm: %d", 2373 WIPHY_PR_ARG, __entry->freq, __entry->sig_dbm) 2374 ); 2375 2376 TRACE_EVENT(cfg80211_tdls_oper_request, 2377 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer, 2378 enum nl80211_tdls_operation oper, u16 reason_code), 2379 TP_ARGS(wiphy, netdev, peer, oper, reason_code), 2380 TP_STRUCT__entry( 2381 WIPHY_ENTRY 2382 NETDEV_ENTRY 2383 MAC_ENTRY(peer) 2384 __field(enum nl80211_tdls_operation, oper) 2385 __field(u16, reason_code) 2386 ), 2387 TP_fast_assign( 2388 WIPHY_ASSIGN; 2389 NETDEV_ASSIGN; 2390 MAC_ASSIGN(peer, peer); 2391 __entry->oper = oper; 2392 __entry->reason_code = reason_code; 2393 ), 2394 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", oper: %d, reason_code %u", 2395 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper, 2396 __entry->reason_code) 2397 ); 2398 2399 TRACE_EVENT(cfg80211_scan_done, 2400 TP_PROTO(struct cfg80211_scan_request *request, bool aborted), 2401 TP_ARGS(request, aborted), 2402 TP_STRUCT__entry( 2403 __field(u32, n_channels) 2404 __dynamic_array(u8, ie, request ? request->ie_len : 0) 2405 __array(u32, rates, IEEE80211_NUM_BANDS) 2406 __field(u32, wdev_id) 2407 MAC_ENTRY(wiphy_mac) 2408 __field(bool, no_cck) 2409 __field(bool, aborted) 2410 ), 2411 TP_fast_assign( 2412 if (request) { 2413 memcpy(__get_dynamic_array(ie), request->ie, 2414 request->ie_len); 2415 memcpy(__entry->rates, request->rates, 2416 IEEE80211_NUM_BANDS); 2417 __entry->wdev_id = request->wdev ? 2418 request->wdev->identifier : 0; 2419 if (request->wiphy) 2420 MAC_ASSIGN(wiphy_mac, 2421 request->wiphy->perm_addr); 2422 __entry->no_cck = request->no_cck; 2423 } 2424 __entry->aborted = aborted; 2425 ), 2426 TP_printk("aborted: %s", BOOL_TO_STR(__entry->aborted)) 2427 ); 2428 2429 DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_results, 2430 TP_PROTO(struct wiphy *wiphy), 2431 TP_ARGS(wiphy) 2432 ); 2433 2434 DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_stopped, 2435 TP_PROTO(struct wiphy *wiphy), 2436 TP_ARGS(wiphy) 2437 ); 2438 2439 TRACE_EVENT(cfg80211_get_bss, 2440 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel, 2441 const u8 *bssid, const u8 *ssid, size_t ssid_len, 2442 u16 capa_mask, u16 capa_val), 2443 TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, capa_mask, capa_val), 2444 TP_STRUCT__entry( 2445 WIPHY_ENTRY 2446 CHAN_ENTRY 2447 MAC_ENTRY(bssid) 2448 __dynamic_array(u8, ssid, ssid_len) 2449 __field(u16, capa_mask) 2450 __field(u16, capa_val) 2451 ), 2452 TP_fast_assign( 2453 WIPHY_ASSIGN; 2454 CHAN_ASSIGN(channel); 2455 MAC_ASSIGN(bssid, bssid); 2456 memcpy(__get_dynamic_array(ssid), ssid, ssid_len); 2457 __entry->capa_mask = capa_mask; 2458 __entry->capa_val = capa_val; 2459 ), 2460 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT ", " MAC_PR_FMT ", buf: %#.2x, " 2461 "capa_mask: %d, capa_val: %u", WIPHY_PR_ARG, CHAN_PR_ARG, 2462 MAC_PR_ARG(bssid), ((u8 *)__get_dynamic_array(ssid))[0], 2463 __entry->capa_mask, __entry->capa_val) 2464 ); 2465 2466 TRACE_EVENT(cfg80211_inform_bss_width_frame, 2467 TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel, 2468 enum nl80211_bss_scan_width scan_width, 2469 struct ieee80211_mgmt *mgmt, size_t len, 2470 s32 signal), 2471 TP_ARGS(wiphy, channel, scan_width, mgmt, len, signal), 2472 TP_STRUCT__entry( 2473 WIPHY_ENTRY 2474 CHAN_ENTRY 2475 __field(enum nl80211_bss_scan_width, scan_width) 2476 __dynamic_array(u8, mgmt, len) 2477 __field(s32, signal) 2478 ), 2479 TP_fast_assign( 2480 WIPHY_ASSIGN; 2481 CHAN_ASSIGN(channel); 2482 __entry->scan_width = scan_width; 2483 if (mgmt) 2484 memcpy(__get_dynamic_array(mgmt), mgmt, len); 2485 __entry->signal = signal; 2486 ), 2487 TP_printk(WIPHY_PR_FMT ", " CHAN_PR_FMT "(scan_width: %d) signal: %d", 2488 WIPHY_PR_ARG, CHAN_PR_ARG, __entry->scan_width, 2489 __entry->signal) 2490 ); 2491 2492 DECLARE_EVENT_CLASS(cfg80211_bss_evt, 2493 TP_PROTO(struct cfg80211_bss *pub), 2494 TP_ARGS(pub), 2495 TP_STRUCT__entry( 2496 MAC_ENTRY(bssid) 2497 CHAN_ENTRY 2498 ), 2499 TP_fast_assign( 2500 MAC_ASSIGN(bssid, pub->bssid); 2501 CHAN_ASSIGN(pub->channel); 2502 ), 2503 TP_printk(MAC_PR_FMT ", " CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG) 2504 ); 2505 2506 DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss, 2507 TP_PROTO(struct cfg80211_bss *pub), 2508 TP_ARGS(pub) 2509 ); 2510 2511 TRACE_EVENT(cfg80211_return_uint, 2512 TP_PROTO(unsigned int ret), 2513 TP_ARGS(ret), 2514 TP_STRUCT__entry( 2515 __field(unsigned int, ret) 2516 ), 2517 TP_fast_assign( 2518 __entry->ret = ret; 2519 ), 2520 TP_printk("ret: %d", __entry->ret) 2521 ); 2522 2523 TRACE_EVENT(cfg80211_return_u32, 2524 TP_PROTO(u32 ret), 2525 TP_ARGS(ret), 2526 TP_STRUCT__entry( 2527 __field(u32, ret) 2528 ), 2529 TP_fast_assign( 2530 __entry->ret = ret; 2531 ), 2532 TP_printk("ret: %u", __entry->ret) 2533 ); 2534 2535 TRACE_EVENT(cfg80211_report_wowlan_wakeup, 2536 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, 2537 struct cfg80211_wowlan_wakeup *wakeup), 2538 TP_ARGS(wiphy, wdev, wakeup), 2539 TP_STRUCT__entry( 2540 WIPHY_ENTRY 2541 WDEV_ENTRY 2542 __field(bool, non_wireless) 2543 __field(bool, disconnect) 2544 __field(bool, magic_pkt) 2545 __field(bool, gtk_rekey_failure) 2546 __field(bool, eap_identity_req) 2547 __field(bool, four_way_handshake) 2548 __field(bool, rfkill_release) 2549 __field(s32, pattern_idx) 2550 __field(u32, packet_len) 2551 __dynamic_array(u8, packet, 2552 wakeup ? wakeup->packet_present_len : 0) 2553 ), 2554 TP_fast_assign( 2555 WIPHY_ASSIGN; 2556 WDEV_ASSIGN; 2557 __entry->non_wireless = !wakeup; 2558 __entry->disconnect = wakeup ? wakeup->disconnect : false; 2559 __entry->magic_pkt = wakeup ? wakeup->magic_pkt : false; 2560 __entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false; 2561 __entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false; 2562 __entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false; 2563 __entry->rfkill_release = wakeup ? wakeup->rfkill_release : false; 2564 __entry->pattern_idx = wakeup ? wakeup->pattern_idx : false; 2565 __entry->packet_len = wakeup ? wakeup->packet_len : false; 2566 if (wakeup && wakeup->packet && wakeup->packet_present_len) 2567 memcpy(__get_dynamic_array(packet), wakeup->packet, 2568 wakeup->packet_present_len); 2569 ), 2570 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG) 2571 ); 2572 2573 TRACE_EVENT(cfg80211_ft_event, 2574 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 2575 struct cfg80211_ft_event_params *ft_event), 2576 TP_ARGS(wiphy, netdev, ft_event), 2577 TP_STRUCT__entry( 2578 WIPHY_ENTRY 2579 NETDEV_ENTRY 2580 __dynamic_array(u8, ies, ft_event->ies_len) 2581 MAC_ENTRY(target_ap) 2582 __dynamic_array(u8, ric_ies, ft_event->ric_ies_len) 2583 ), 2584 TP_fast_assign( 2585 WIPHY_ASSIGN; 2586 NETDEV_ASSIGN; 2587 if (ft_event->ies) 2588 memcpy(__get_dynamic_array(ies), ft_event->ies, 2589 ft_event->ies_len); 2590 MAC_ASSIGN(target_ap, ft_event->target_ap); 2591 if (ft_event->ric_ies) 2592 memcpy(__get_dynamic_array(ric_ies), ft_event->ric_ies, 2593 ft_event->ric_ies_len); 2594 ), 2595 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", target_ap: " MAC_PR_FMT, 2596 WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(target_ap)) 2597 ); 2598 2599 TRACE_EVENT(cfg80211_stop_iface, 2600 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), 2601 TP_ARGS(wiphy, wdev), 2602 TP_STRUCT__entry( 2603 WIPHY_ENTRY 2604 WDEV_ENTRY 2605 ), 2606 TP_fast_assign( 2607 WIPHY_ASSIGN; 2608 WDEV_ASSIGN; 2609 ), 2610 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, 2611 WIPHY_PR_ARG, WDEV_PR_ARG) 2612 ); 2613 2614 #endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */ 2615 2616 #undef TRACE_INCLUDE_PATH 2617 #define TRACE_INCLUDE_PATH . 2618 #undef TRACE_INCLUDE_FILE 2619 #define TRACE_INCLUDE_FILE trace 2620 #include <trace/define_trace.h> 2621