1 /* 2 * Portions of this file 3 * Copyright(c) 2016 Intel Deutschland GmbH 4 */ 5 6 #if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ) 7 #define __MAC80211_DRIVER_TRACE 8 9 #include <linux/tracepoint.h> 10 #include <net/mac80211.h> 11 #include "ieee80211_i.h" 12 13 #undef TRACE_SYSTEM 14 #define TRACE_SYSTEM mac80211 15 16 #define MAXNAME 32 17 #define LOCAL_ENTRY __array(char, wiphy_name, 32) 18 #define LOCAL_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME) 19 #define LOCAL_PR_FMT "%s" 20 #define LOCAL_PR_ARG __entry->wiphy_name 21 22 #define STA_ENTRY __array(char, sta_addr, ETH_ALEN) 23 #define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN)) 24 #define STA_NAMED_ASSIGN(s) memcpy(__entry->sta_addr, (s)->addr, ETH_ALEN) 25 #define STA_PR_FMT " sta:%pM" 26 #define STA_PR_ARG __entry->sta_addr 27 28 #define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \ 29 __field(bool, p2p) \ 30 __string(vif_name, sdata->name) 31 #define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \ 32 __entry->p2p = sdata->vif.p2p; \ 33 __assign_str(vif_name, sdata->name) 34 #define VIF_PR_FMT " vif:%s(%d%s)" 35 #define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : "" 36 37 #define CHANDEF_ENTRY __field(u32, control_freq) \ 38 __field(u32, chan_width) \ 39 __field(u32, center_freq1) \ 40 __field(u32, center_freq2) 41 #define CHANDEF_ASSIGN(c) \ 42 __entry->control_freq = (c) ? ((c)->chan ? (c)->chan->center_freq : 0) : 0; \ 43 __entry->chan_width = (c) ? (c)->width : 0; \ 44 __entry->center_freq1 = (c) ? (c)->center_freq1 : 0; \ 45 __entry->center_freq2 = (c) ? (c)->center_freq2 : 0; 46 #define CHANDEF_PR_FMT " control:%d MHz width:%d center: %d/%d MHz" 47 #define CHANDEF_PR_ARG __entry->control_freq, __entry->chan_width, \ 48 __entry->center_freq1, __entry->center_freq2 49 50 #define MIN_CHANDEF_ENTRY \ 51 __field(u32, min_control_freq) \ 52 __field(u32, min_chan_width) \ 53 __field(u32, min_center_freq1) \ 54 __field(u32, min_center_freq2) 55 56 #define MIN_CHANDEF_ASSIGN(c) \ 57 __entry->min_control_freq = (c)->chan ? (c)->chan->center_freq : 0; \ 58 __entry->min_chan_width = (c)->width; \ 59 __entry->min_center_freq1 = (c)->center_freq1; \ 60 __entry->min_center_freq2 = (c)->center_freq2; 61 #define MIN_CHANDEF_PR_FMT " min_control:%d MHz min_width:%d min_center: %d/%d MHz" 62 #define MIN_CHANDEF_PR_ARG __entry->min_control_freq, __entry->min_chan_width, \ 63 __entry->min_center_freq1, __entry->min_center_freq2 64 65 #define CHANCTX_ENTRY CHANDEF_ENTRY \ 66 MIN_CHANDEF_ENTRY \ 67 __field(u8, rx_chains_static) \ 68 __field(u8, rx_chains_dynamic) 69 #define CHANCTX_ASSIGN CHANDEF_ASSIGN(&ctx->conf.def) \ 70 MIN_CHANDEF_ASSIGN(&ctx->conf.min_def) \ 71 __entry->rx_chains_static = ctx->conf.rx_chains_static; \ 72 __entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic 73 #define CHANCTX_PR_FMT CHANDEF_PR_FMT MIN_CHANDEF_PR_FMT " chains:%d/%d" 74 #define CHANCTX_PR_ARG CHANDEF_PR_ARG, MIN_CHANDEF_PR_ARG, \ 75 __entry->rx_chains_static, __entry->rx_chains_dynamic 76 77 #define KEY_ENTRY __field(u32, cipher) \ 78 __field(u8, hw_key_idx) \ 79 __field(u8, flags) \ 80 __field(s8, keyidx) 81 #define KEY_ASSIGN(k) __entry->cipher = (k)->cipher; \ 82 __entry->flags = (k)->flags; \ 83 __entry->keyidx = (k)->keyidx; \ 84 __entry->hw_key_idx = (k)->hw_key_idx; 85 #define KEY_PR_FMT " cipher:0x%x, flags=%#x, keyidx=%d, hw_key_idx=%d" 86 #define KEY_PR_ARG __entry->cipher, __entry->flags, __entry->keyidx, __entry->hw_key_idx 87 88 #define AMPDU_ACTION_ENTRY __field(enum ieee80211_ampdu_mlme_action, \ 89 ieee80211_ampdu_mlme_action) \ 90 STA_ENTRY \ 91 __field(u16, tid) \ 92 __field(u16, ssn) \ 93 __field(u8, buf_size) \ 94 __field(bool, amsdu) \ 95 __field(u16, timeout) \ 96 __field(u16, action) 97 #define AMPDU_ACTION_ASSIGN STA_NAMED_ASSIGN(params->sta); \ 98 __entry->tid = params->tid; \ 99 __entry->ssn = params->ssn; \ 100 __entry->buf_size = params->buf_size; \ 101 __entry->amsdu = params->amsdu; \ 102 __entry->timeout = params->timeout; \ 103 __entry->action = params->action; 104 #define AMPDU_ACTION_PR_FMT STA_PR_FMT " tid %d, ssn %d, buf_size %u, amsdu %d, timeout %d action %d" 105 #define AMPDU_ACTION_PR_ARG STA_PR_ARG, __entry->tid, __entry->ssn, \ 106 __entry->buf_size, __entry->amsdu, __entry->timeout, \ 107 __entry->action 108 109 /* 110 * Tracing for driver callbacks. 111 */ 112 113 DECLARE_EVENT_CLASS(local_only_evt, 114 TP_PROTO(struct ieee80211_local *local), 115 TP_ARGS(local), 116 TP_STRUCT__entry( 117 LOCAL_ENTRY 118 ), 119 TP_fast_assign( 120 LOCAL_ASSIGN; 121 ), 122 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG) 123 ); 124 125 DECLARE_EVENT_CLASS(local_sdata_addr_evt, 126 TP_PROTO(struct ieee80211_local *local, 127 struct ieee80211_sub_if_data *sdata), 128 TP_ARGS(local, sdata), 129 130 TP_STRUCT__entry( 131 LOCAL_ENTRY 132 VIF_ENTRY 133 __array(char, addr, ETH_ALEN) 134 ), 135 136 TP_fast_assign( 137 LOCAL_ASSIGN; 138 VIF_ASSIGN; 139 memcpy(__entry->addr, sdata->vif.addr, ETH_ALEN); 140 ), 141 142 TP_printk( 143 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM", 144 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr 145 ) 146 ); 147 148 DECLARE_EVENT_CLASS(local_u32_evt, 149 TP_PROTO(struct ieee80211_local *local, u32 value), 150 TP_ARGS(local, value), 151 152 TP_STRUCT__entry( 153 LOCAL_ENTRY 154 __field(u32, value) 155 ), 156 157 TP_fast_assign( 158 LOCAL_ASSIGN; 159 __entry->value = value; 160 ), 161 162 TP_printk( 163 LOCAL_PR_FMT " value:%d", 164 LOCAL_PR_ARG, __entry->value 165 ) 166 ); 167 168 DECLARE_EVENT_CLASS(local_sdata_evt, 169 TP_PROTO(struct ieee80211_local *local, 170 struct ieee80211_sub_if_data *sdata), 171 TP_ARGS(local, sdata), 172 173 TP_STRUCT__entry( 174 LOCAL_ENTRY 175 VIF_ENTRY 176 ), 177 178 TP_fast_assign( 179 LOCAL_ASSIGN; 180 VIF_ASSIGN; 181 ), 182 183 TP_printk( 184 LOCAL_PR_FMT VIF_PR_FMT, 185 LOCAL_PR_ARG, VIF_PR_ARG 186 ) 187 ); 188 189 DEFINE_EVENT(local_only_evt, drv_return_void, 190 TP_PROTO(struct ieee80211_local *local), 191 TP_ARGS(local) 192 ); 193 194 TRACE_EVENT(drv_return_int, 195 TP_PROTO(struct ieee80211_local *local, int ret), 196 TP_ARGS(local, ret), 197 TP_STRUCT__entry( 198 LOCAL_ENTRY 199 __field(int, ret) 200 ), 201 TP_fast_assign( 202 LOCAL_ASSIGN; 203 __entry->ret = ret; 204 ), 205 TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret) 206 ); 207 208 TRACE_EVENT(drv_return_bool, 209 TP_PROTO(struct ieee80211_local *local, bool ret), 210 TP_ARGS(local, ret), 211 TP_STRUCT__entry( 212 LOCAL_ENTRY 213 __field(bool, ret) 214 ), 215 TP_fast_assign( 216 LOCAL_ASSIGN; 217 __entry->ret = ret; 218 ), 219 TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ? 220 "true" : "false") 221 ); 222 223 TRACE_EVENT(drv_return_u32, 224 TP_PROTO(struct ieee80211_local *local, u32 ret), 225 TP_ARGS(local, ret), 226 TP_STRUCT__entry( 227 LOCAL_ENTRY 228 __field(u32, ret) 229 ), 230 TP_fast_assign( 231 LOCAL_ASSIGN; 232 __entry->ret = ret; 233 ), 234 TP_printk(LOCAL_PR_FMT " - %u", LOCAL_PR_ARG, __entry->ret) 235 ); 236 237 TRACE_EVENT(drv_return_u64, 238 TP_PROTO(struct ieee80211_local *local, u64 ret), 239 TP_ARGS(local, ret), 240 TP_STRUCT__entry( 241 LOCAL_ENTRY 242 __field(u64, ret) 243 ), 244 TP_fast_assign( 245 LOCAL_ASSIGN; 246 __entry->ret = ret; 247 ), 248 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret) 249 ); 250 251 DEFINE_EVENT(local_only_evt, drv_start, 252 TP_PROTO(struct ieee80211_local *local), 253 TP_ARGS(local) 254 ); 255 256 DEFINE_EVENT(local_u32_evt, drv_get_et_strings, 257 TP_PROTO(struct ieee80211_local *local, u32 sset), 258 TP_ARGS(local, sset) 259 ); 260 261 DEFINE_EVENT(local_u32_evt, drv_get_et_sset_count, 262 TP_PROTO(struct ieee80211_local *local, u32 sset), 263 TP_ARGS(local, sset) 264 ); 265 266 DEFINE_EVENT(local_only_evt, drv_get_et_stats, 267 TP_PROTO(struct ieee80211_local *local), 268 TP_ARGS(local) 269 ); 270 271 DEFINE_EVENT(local_only_evt, drv_suspend, 272 TP_PROTO(struct ieee80211_local *local), 273 TP_ARGS(local) 274 ); 275 276 DEFINE_EVENT(local_only_evt, drv_resume, 277 TP_PROTO(struct ieee80211_local *local), 278 TP_ARGS(local) 279 ); 280 281 TRACE_EVENT(drv_set_wakeup, 282 TP_PROTO(struct ieee80211_local *local, bool enabled), 283 TP_ARGS(local, enabled), 284 TP_STRUCT__entry( 285 LOCAL_ENTRY 286 __field(bool, enabled) 287 ), 288 TP_fast_assign( 289 LOCAL_ASSIGN; 290 __entry->enabled = enabled; 291 ), 292 TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled) 293 ); 294 295 DEFINE_EVENT(local_only_evt, drv_stop, 296 TP_PROTO(struct ieee80211_local *local), 297 TP_ARGS(local) 298 ); 299 300 DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface, 301 TP_PROTO(struct ieee80211_local *local, 302 struct ieee80211_sub_if_data *sdata), 303 TP_ARGS(local, sdata) 304 ); 305 306 TRACE_EVENT(drv_change_interface, 307 TP_PROTO(struct ieee80211_local *local, 308 struct ieee80211_sub_if_data *sdata, 309 enum nl80211_iftype type, bool p2p), 310 311 TP_ARGS(local, sdata, type, p2p), 312 313 TP_STRUCT__entry( 314 LOCAL_ENTRY 315 VIF_ENTRY 316 __field(u32, new_type) 317 __field(bool, new_p2p) 318 ), 319 320 TP_fast_assign( 321 LOCAL_ASSIGN; 322 VIF_ASSIGN; 323 __entry->new_type = type; 324 __entry->new_p2p = p2p; 325 ), 326 327 TP_printk( 328 LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s", 329 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type, 330 __entry->new_p2p ? "/p2p" : "" 331 ) 332 ); 333 334 DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface, 335 TP_PROTO(struct ieee80211_local *local, 336 struct ieee80211_sub_if_data *sdata), 337 TP_ARGS(local, sdata) 338 ); 339 340 TRACE_EVENT(drv_config, 341 TP_PROTO(struct ieee80211_local *local, 342 u32 changed), 343 344 TP_ARGS(local, changed), 345 346 TP_STRUCT__entry( 347 LOCAL_ENTRY 348 __field(u32, changed) 349 __field(u32, flags) 350 __field(int, power_level) 351 __field(int, dynamic_ps_timeout) 352 __field(u16, listen_interval) 353 __field(u8, long_frame_max_tx_count) 354 __field(u8, short_frame_max_tx_count) 355 CHANDEF_ENTRY 356 __field(int, smps) 357 ), 358 359 TP_fast_assign( 360 LOCAL_ASSIGN; 361 __entry->changed = changed; 362 __entry->flags = local->hw.conf.flags; 363 __entry->power_level = local->hw.conf.power_level; 364 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout; 365 __entry->listen_interval = local->hw.conf.listen_interval; 366 __entry->long_frame_max_tx_count = 367 local->hw.conf.long_frame_max_tx_count; 368 __entry->short_frame_max_tx_count = 369 local->hw.conf.short_frame_max_tx_count; 370 CHANDEF_ASSIGN(&local->hw.conf.chandef) 371 __entry->smps = local->hw.conf.smps_mode; 372 ), 373 374 TP_printk( 375 LOCAL_PR_FMT " ch:%#x" CHANDEF_PR_FMT, 376 LOCAL_PR_ARG, __entry->changed, CHANDEF_PR_ARG 377 ) 378 ); 379 380 TRACE_EVENT(drv_bss_info_changed, 381 TP_PROTO(struct ieee80211_local *local, 382 struct ieee80211_sub_if_data *sdata, 383 struct ieee80211_bss_conf *info, 384 u32 changed), 385 386 TP_ARGS(local, sdata, info, changed), 387 388 TP_STRUCT__entry( 389 LOCAL_ENTRY 390 VIF_ENTRY 391 __field(u32, changed) 392 __field(bool, assoc) 393 __field(bool, ibss_joined) 394 __field(bool, ibss_creator) 395 __field(u16, aid) 396 __field(bool, cts) 397 __field(bool, shortpre) 398 __field(bool, shortslot) 399 __field(bool, enable_beacon) 400 __field(u8, dtimper) 401 __field(u16, bcnint) 402 __field(u16, assoc_cap) 403 __field(u64, sync_tsf) 404 __field(u32, sync_device_ts) 405 __field(u8, sync_dtim_count) 406 __field(u32, basic_rates) 407 __array(int, mcast_rate, NUM_NL80211_BANDS) 408 __field(u16, ht_operation_mode) 409 __field(s32, cqm_rssi_thold); 410 __field(s32, cqm_rssi_hyst); 411 __field(u32, channel_width); 412 __field(u32, channel_cfreq1); 413 __dynamic_array(u32, arp_addr_list, 414 info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ? 415 IEEE80211_BSS_ARP_ADDR_LIST_LEN : 416 info->arp_addr_cnt); 417 __field(int, arp_addr_cnt); 418 __field(bool, qos); 419 __field(bool, idle); 420 __field(bool, ps); 421 __dynamic_array(u8, ssid, info->ssid_len); 422 __field(bool, hidden_ssid); 423 __field(int, txpower) 424 __field(u8, p2p_oppps_ctwindow) 425 ), 426 427 TP_fast_assign( 428 LOCAL_ASSIGN; 429 VIF_ASSIGN; 430 __entry->changed = changed; 431 __entry->aid = info->aid; 432 __entry->assoc = info->assoc; 433 __entry->ibss_joined = info->ibss_joined; 434 __entry->ibss_creator = info->ibss_creator; 435 __entry->shortpre = info->use_short_preamble; 436 __entry->cts = info->use_cts_prot; 437 __entry->shortslot = info->use_short_slot; 438 __entry->enable_beacon = info->enable_beacon; 439 __entry->dtimper = info->dtim_period; 440 __entry->bcnint = info->beacon_int; 441 __entry->assoc_cap = info->assoc_capability; 442 __entry->sync_tsf = info->sync_tsf; 443 __entry->sync_device_ts = info->sync_device_ts; 444 __entry->sync_dtim_count = info->sync_dtim_count; 445 __entry->basic_rates = info->basic_rates; 446 memcpy(__entry->mcast_rate, info->mcast_rate, 447 sizeof(__entry->mcast_rate)); 448 __entry->ht_operation_mode = info->ht_operation_mode; 449 __entry->cqm_rssi_thold = info->cqm_rssi_thold; 450 __entry->cqm_rssi_hyst = info->cqm_rssi_hyst; 451 __entry->channel_width = info->chandef.width; 452 __entry->channel_cfreq1 = info->chandef.center_freq1; 453 __entry->arp_addr_cnt = info->arp_addr_cnt; 454 memcpy(__get_dynamic_array(arp_addr_list), info->arp_addr_list, 455 sizeof(u32) * (info->arp_addr_cnt > IEEE80211_BSS_ARP_ADDR_LIST_LEN ? 456 IEEE80211_BSS_ARP_ADDR_LIST_LEN : 457 info->arp_addr_cnt)); 458 __entry->qos = info->qos; 459 __entry->idle = info->idle; 460 __entry->ps = info->ps; 461 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len); 462 __entry->hidden_ssid = info->hidden_ssid; 463 __entry->txpower = info->txpower; 464 __entry->p2p_oppps_ctwindow = info->p2p_noa_attr.oppps_ctwindow; 465 ), 466 467 TP_printk( 468 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x", 469 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed 470 ) 471 ); 472 473 TRACE_EVENT(drv_prepare_multicast, 474 TP_PROTO(struct ieee80211_local *local, int mc_count), 475 476 TP_ARGS(local, mc_count), 477 478 TP_STRUCT__entry( 479 LOCAL_ENTRY 480 __field(int, mc_count) 481 ), 482 483 TP_fast_assign( 484 LOCAL_ASSIGN; 485 __entry->mc_count = mc_count; 486 ), 487 488 TP_printk( 489 LOCAL_PR_FMT " prepare mc (%d)", 490 LOCAL_PR_ARG, __entry->mc_count 491 ) 492 ); 493 494 TRACE_EVENT(drv_configure_filter, 495 TP_PROTO(struct ieee80211_local *local, 496 unsigned int changed_flags, 497 unsigned int *total_flags, 498 u64 multicast), 499 500 TP_ARGS(local, changed_flags, total_flags, multicast), 501 502 TP_STRUCT__entry( 503 LOCAL_ENTRY 504 __field(unsigned int, changed) 505 __field(unsigned int, total) 506 __field(u64, multicast) 507 ), 508 509 TP_fast_assign( 510 LOCAL_ASSIGN; 511 __entry->changed = changed_flags; 512 __entry->total = *total_flags; 513 __entry->multicast = multicast; 514 ), 515 516 TP_printk( 517 LOCAL_PR_FMT " changed:%#x total:%#x", 518 LOCAL_PR_ARG, __entry->changed, __entry->total 519 ) 520 ); 521 522 TRACE_EVENT(drv_config_iface_filter, 523 TP_PROTO(struct ieee80211_local *local, 524 struct ieee80211_sub_if_data *sdata, 525 unsigned int filter_flags, 526 unsigned int changed_flags), 527 528 TP_ARGS(local, sdata, filter_flags, changed_flags), 529 530 TP_STRUCT__entry( 531 LOCAL_ENTRY 532 VIF_ENTRY 533 __field(unsigned int, filter_flags) 534 __field(unsigned int, changed_flags) 535 ), 536 537 TP_fast_assign( 538 LOCAL_ASSIGN; 539 VIF_ASSIGN; 540 __entry->filter_flags = filter_flags; 541 __entry->changed_flags = changed_flags; 542 ), 543 544 TP_printk( 545 LOCAL_PR_FMT VIF_PR_FMT 546 " filter_flags: %#x changed_flags: %#x", 547 LOCAL_PR_ARG, VIF_PR_ARG, __entry->filter_flags, 548 __entry->changed_flags 549 ) 550 ); 551 552 TRACE_EVENT(drv_set_tim, 553 TP_PROTO(struct ieee80211_local *local, 554 struct ieee80211_sta *sta, bool set), 555 556 TP_ARGS(local, sta, set), 557 558 TP_STRUCT__entry( 559 LOCAL_ENTRY 560 STA_ENTRY 561 __field(bool, set) 562 ), 563 564 TP_fast_assign( 565 LOCAL_ASSIGN; 566 STA_ASSIGN; 567 __entry->set = set; 568 ), 569 570 TP_printk( 571 LOCAL_PR_FMT STA_PR_FMT " set:%d", 572 LOCAL_PR_ARG, STA_PR_ARG, __entry->set 573 ) 574 ); 575 576 TRACE_EVENT(drv_set_key, 577 TP_PROTO(struct ieee80211_local *local, 578 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata, 579 struct ieee80211_sta *sta, 580 struct ieee80211_key_conf *key), 581 582 TP_ARGS(local, cmd, sdata, sta, key), 583 584 TP_STRUCT__entry( 585 LOCAL_ENTRY 586 VIF_ENTRY 587 STA_ENTRY 588 KEY_ENTRY 589 ), 590 591 TP_fast_assign( 592 LOCAL_ASSIGN; 593 VIF_ASSIGN; 594 STA_ASSIGN; 595 KEY_ASSIGN(key); 596 ), 597 598 TP_printk( 599 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT KEY_PR_FMT, 600 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, KEY_PR_ARG 601 ) 602 ); 603 604 TRACE_EVENT(drv_update_tkip_key, 605 TP_PROTO(struct ieee80211_local *local, 606 struct ieee80211_sub_if_data *sdata, 607 struct ieee80211_key_conf *conf, 608 struct ieee80211_sta *sta, u32 iv32), 609 610 TP_ARGS(local, sdata, conf, sta, iv32), 611 612 TP_STRUCT__entry( 613 LOCAL_ENTRY 614 VIF_ENTRY 615 STA_ENTRY 616 __field(u32, iv32) 617 ), 618 619 TP_fast_assign( 620 LOCAL_ASSIGN; 621 VIF_ASSIGN; 622 STA_ASSIGN; 623 __entry->iv32 = iv32; 624 ), 625 626 TP_printk( 627 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x", 628 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->iv32 629 ) 630 ); 631 632 DEFINE_EVENT(local_sdata_evt, drv_hw_scan, 633 TP_PROTO(struct ieee80211_local *local, 634 struct ieee80211_sub_if_data *sdata), 635 TP_ARGS(local, sdata) 636 ); 637 638 DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan, 639 TP_PROTO(struct ieee80211_local *local, 640 struct ieee80211_sub_if_data *sdata), 641 TP_ARGS(local, sdata) 642 ); 643 644 DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start, 645 TP_PROTO(struct ieee80211_local *local, 646 struct ieee80211_sub_if_data *sdata), 647 TP_ARGS(local, sdata) 648 ); 649 650 DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop, 651 TP_PROTO(struct ieee80211_local *local, 652 struct ieee80211_sub_if_data *sdata), 653 TP_ARGS(local, sdata) 654 ); 655 656 TRACE_EVENT(drv_sw_scan_start, 657 TP_PROTO(struct ieee80211_local *local, 658 struct ieee80211_sub_if_data *sdata, 659 const u8 *mac_addr), 660 661 TP_ARGS(local, sdata, mac_addr), 662 663 TP_STRUCT__entry( 664 LOCAL_ENTRY 665 VIF_ENTRY 666 __array(char, mac_addr, ETH_ALEN) 667 ), 668 669 TP_fast_assign( 670 LOCAL_ASSIGN; 671 VIF_ASSIGN; 672 memcpy(__entry->mac_addr, mac_addr, ETH_ALEN); 673 ), 674 675 TP_printk(LOCAL_PR_FMT ", " VIF_PR_FMT ", addr:%pM", 676 LOCAL_PR_ARG, VIF_PR_ARG, __entry->mac_addr) 677 ); 678 679 DEFINE_EVENT(local_sdata_evt, drv_sw_scan_complete, 680 TP_PROTO(struct ieee80211_local *local, 681 struct ieee80211_sub_if_data *sdata), 682 TP_ARGS(local, sdata) 683 ); 684 685 TRACE_EVENT(drv_get_stats, 686 TP_PROTO(struct ieee80211_local *local, 687 struct ieee80211_low_level_stats *stats, 688 int ret), 689 690 TP_ARGS(local, stats, ret), 691 692 TP_STRUCT__entry( 693 LOCAL_ENTRY 694 __field(int, ret) 695 __field(unsigned int, ackfail) 696 __field(unsigned int, rtsfail) 697 __field(unsigned int, fcserr) 698 __field(unsigned int, rtssucc) 699 ), 700 701 TP_fast_assign( 702 LOCAL_ASSIGN; 703 __entry->ret = ret; 704 __entry->ackfail = stats->dot11ACKFailureCount; 705 __entry->rtsfail = stats->dot11RTSFailureCount; 706 __entry->fcserr = stats->dot11FCSErrorCount; 707 __entry->rtssucc = stats->dot11RTSSuccessCount; 708 ), 709 710 TP_printk( 711 LOCAL_PR_FMT " ret:%d", 712 LOCAL_PR_ARG, __entry->ret 713 ) 714 ); 715 716 TRACE_EVENT(drv_get_key_seq, 717 TP_PROTO(struct ieee80211_local *local, 718 struct ieee80211_key_conf *key), 719 720 TP_ARGS(local, key), 721 722 TP_STRUCT__entry( 723 LOCAL_ENTRY 724 KEY_ENTRY 725 ), 726 727 TP_fast_assign( 728 LOCAL_ASSIGN; 729 KEY_ASSIGN(key); 730 ), 731 732 TP_printk( 733 LOCAL_PR_FMT KEY_PR_FMT, 734 LOCAL_PR_ARG, KEY_PR_ARG 735 ) 736 ); 737 738 DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold, 739 TP_PROTO(struct ieee80211_local *local, u32 value), 740 TP_ARGS(local, value) 741 ); 742 743 DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold, 744 TP_PROTO(struct ieee80211_local *local, u32 value), 745 TP_ARGS(local, value) 746 ); 747 748 TRACE_EVENT(drv_set_coverage_class, 749 TP_PROTO(struct ieee80211_local *local, s16 value), 750 751 TP_ARGS(local, value), 752 753 TP_STRUCT__entry( 754 LOCAL_ENTRY 755 __field(s16, value) 756 ), 757 758 TP_fast_assign( 759 LOCAL_ASSIGN; 760 __entry->value = value; 761 ), 762 763 TP_printk( 764 LOCAL_PR_FMT " value:%d", 765 LOCAL_PR_ARG, __entry->value 766 ) 767 ); 768 769 TRACE_EVENT(drv_sta_notify, 770 TP_PROTO(struct ieee80211_local *local, 771 struct ieee80211_sub_if_data *sdata, 772 enum sta_notify_cmd cmd, 773 struct ieee80211_sta *sta), 774 775 TP_ARGS(local, sdata, cmd, sta), 776 777 TP_STRUCT__entry( 778 LOCAL_ENTRY 779 VIF_ENTRY 780 STA_ENTRY 781 __field(u32, cmd) 782 ), 783 784 TP_fast_assign( 785 LOCAL_ASSIGN; 786 VIF_ASSIGN; 787 STA_ASSIGN; 788 __entry->cmd = cmd; 789 ), 790 791 TP_printk( 792 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d", 793 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd 794 ) 795 ); 796 797 TRACE_EVENT(drv_sta_state, 798 TP_PROTO(struct ieee80211_local *local, 799 struct ieee80211_sub_if_data *sdata, 800 struct ieee80211_sta *sta, 801 enum ieee80211_sta_state old_state, 802 enum ieee80211_sta_state new_state), 803 804 TP_ARGS(local, sdata, sta, old_state, new_state), 805 806 TP_STRUCT__entry( 807 LOCAL_ENTRY 808 VIF_ENTRY 809 STA_ENTRY 810 __field(u32, old_state) 811 __field(u32, new_state) 812 ), 813 814 TP_fast_assign( 815 LOCAL_ASSIGN; 816 VIF_ASSIGN; 817 STA_ASSIGN; 818 __entry->old_state = old_state; 819 __entry->new_state = new_state; 820 ), 821 822 TP_printk( 823 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d", 824 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, 825 __entry->old_state, __entry->new_state 826 ) 827 ); 828 829 TRACE_EVENT(drv_sta_rc_update, 830 TP_PROTO(struct ieee80211_local *local, 831 struct ieee80211_sub_if_data *sdata, 832 struct ieee80211_sta *sta, 833 u32 changed), 834 835 TP_ARGS(local, sdata, sta, changed), 836 837 TP_STRUCT__entry( 838 LOCAL_ENTRY 839 VIF_ENTRY 840 STA_ENTRY 841 __field(u32, changed) 842 ), 843 844 TP_fast_assign( 845 LOCAL_ASSIGN; 846 VIF_ASSIGN; 847 STA_ASSIGN; 848 __entry->changed = changed; 849 ), 850 851 TP_printk( 852 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x", 853 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed 854 ) 855 ); 856 857 DECLARE_EVENT_CLASS(sta_event, 858 TP_PROTO(struct ieee80211_local *local, 859 struct ieee80211_sub_if_data *sdata, 860 struct ieee80211_sta *sta), 861 862 TP_ARGS(local, sdata, sta), 863 864 TP_STRUCT__entry( 865 LOCAL_ENTRY 866 VIF_ENTRY 867 STA_ENTRY 868 ), 869 870 TP_fast_assign( 871 LOCAL_ASSIGN; 872 VIF_ASSIGN; 873 STA_ASSIGN; 874 ), 875 876 TP_printk( 877 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT, 878 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG 879 ) 880 ); 881 882 DEFINE_EVENT(sta_event, drv_sta_statistics, 883 TP_PROTO(struct ieee80211_local *local, 884 struct ieee80211_sub_if_data *sdata, 885 struct ieee80211_sta *sta), 886 TP_ARGS(local, sdata, sta) 887 ); 888 889 DEFINE_EVENT(sta_event, drv_sta_add, 890 TP_PROTO(struct ieee80211_local *local, 891 struct ieee80211_sub_if_data *sdata, 892 struct ieee80211_sta *sta), 893 TP_ARGS(local, sdata, sta) 894 ); 895 896 DEFINE_EVENT(sta_event, drv_sta_remove, 897 TP_PROTO(struct ieee80211_local *local, 898 struct ieee80211_sub_if_data *sdata, 899 struct ieee80211_sta *sta), 900 TP_ARGS(local, sdata, sta) 901 ); 902 903 DEFINE_EVENT(sta_event, drv_sta_pre_rcu_remove, 904 TP_PROTO(struct ieee80211_local *local, 905 struct ieee80211_sub_if_data *sdata, 906 struct ieee80211_sta *sta), 907 TP_ARGS(local, sdata, sta) 908 ); 909 910 DEFINE_EVENT(sta_event, drv_sync_rx_queues, 911 TP_PROTO(struct ieee80211_local *local, 912 struct ieee80211_sub_if_data *sdata, 913 struct ieee80211_sta *sta), 914 TP_ARGS(local, sdata, sta) 915 ); 916 917 DEFINE_EVENT(sta_event, drv_sta_rate_tbl_update, 918 TP_PROTO(struct ieee80211_local *local, 919 struct ieee80211_sub_if_data *sdata, 920 struct ieee80211_sta *sta), 921 TP_ARGS(local, sdata, sta) 922 ); 923 924 TRACE_EVENT(drv_conf_tx, 925 TP_PROTO(struct ieee80211_local *local, 926 struct ieee80211_sub_if_data *sdata, 927 u16 ac, const struct ieee80211_tx_queue_params *params), 928 929 TP_ARGS(local, sdata, ac, params), 930 931 TP_STRUCT__entry( 932 LOCAL_ENTRY 933 VIF_ENTRY 934 __field(u16, ac) 935 __field(u16, txop) 936 __field(u16, cw_min) 937 __field(u16, cw_max) 938 __field(u8, aifs) 939 __field(bool, uapsd) 940 ), 941 942 TP_fast_assign( 943 LOCAL_ASSIGN; 944 VIF_ASSIGN; 945 __entry->ac = ac; 946 __entry->txop = params->txop; 947 __entry->cw_max = params->cw_max; 948 __entry->cw_min = params->cw_min; 949 __entry->aifs = params->aifs; 950 __entry->uapsd = params->uapsd; 951 ), 952 953 TP_printk( 954 LOCAL_PR_FMT VIF_PR_FMT " AC:%d", 955 LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac 956 ) 957 ); 958 959 DEFINE_EVENT(local_sdata_evt, drv_get_tsf, 960 TP_PROTO(struct ieee80211_local *local, 961 struct ieee80211_sub_if_data *sdata), 962 TP_ARGS(local, sdata) 963 ); 964 965 TRACE_EVENT(drv_set_tsf, 966 TP_PROTO(struct ieee80211_local *local, 967 struct ieee80211_sub_if_data *sdata, 968 u64 tsf), 969 970 TP_ARGS(local, sdata, tsf), 971 972 TP_STRUCT__entry( 973 LOCAL_ENTRY 974 VIF_ENTRY 975 __field(u64, tsf) 976 ), 977 978 TP_fast_assign( 979 LOCAL_ASSIGN; 980 VIF_ASSIGN; 981 __entry->tsf = tsf; 982 ), 983 984 TP_printk( 985 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu", 986 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf 987 ) 988 ); 989 990 TRACE_EVENT(drv_offset_tsf, 991 TP_PROTO(struct ieee80211_local *local, 992 struct ieee80211_sub_if_data *sdata, 993 s64 offset), 994 995 TP_ARGS(local, sdata, offset), 996 997 TP_STRUCT__entry( 998 LOCAL_ENTRY 999 VIF_ENTRY 1000 __field(s64, tsf_offset) 1001 ), 1002 1003 TP_fast_assign( 1004 LOCAL_ASSIGN; 1005 VIF_ASSIGN; 1006 __entry->tsf_offset = offset; 1007 ), 1008 1009 TP_printk( 1010 LOCAL_PR_FMT VIF_PR_FMT " tsf offset:%lld", 1011 LOCAL_PR_ARG, VIF_PR_ARG, 1012 (unsigned long long)__entry->tsf_offset 1013 ) 1014 ); 1015 1016 DEFINE_EVENT(local_sdata_evt, drv_reset_tsf, 1017 TP_PROTO(struct ieee80211_local *local, 1018 struct ieee80211_sub_if_data *sdata), 1019 TP_ARGS(local, sdata) 1020 ); 1021 1022 DEFINE_EVENT(local_only_evt, drv_tx_last_beacon, 1023 TP_PROTO(struct ieee80211_local *local), 1024 TP_ARGS(local) 1025 ); 1026 1027 TRACE_EVENT(drv_ampdu_action, 1028 TP_PROTO(struct ieee80211_local *local, 1029 struct ieee80211_sub_if_data *sdata, 1030 struct ieee80211_ampdu_params *params), 1031 1032 TP_ARGS(local, sdata, params), 1033 1034 TP_STRUCT__entry( 1035 LOCAL_ENTRY 1036 VIF_ENTRY 1037 AMPDU_ACTION_ENTRY 1038 ), 1039 1040 TP_fast_assign( 1041 LOCAL_ASSIGN; 1042 VIF_ASSIGN; 1043 AMPDU_ACTION_ASSIGN; 1044 ), 1045 1046 TP_printk( 1047 LOCAL_PR_FMT VIF_PR_FMT AMPDU_ACTION_PR_FMT, 1048 LOCAL_PR_ARG, VIF_PR_ARG, AMPDU_ACTION_PR_ARG 1049 ) 1050 ); 1051 1052 TRACE_EVENT(drv_get_survey, 1053 TP_PROTO(struct ieee80211_local *local, int idx, 1054 struct survey_info *survey), 1055 1056 TP_ARGS(local, idx, survey), 1057 1058 TP_STRUCT__entry( 1059 LOCAL_ENTRY 1060 __field(int, idx) 1061 ), 1062 1063 TP_fast_assign( 1064 LOCAL_ASSIGN; 1065 __entry->idx = idx; 1066 ), 1067 1068 TP_printk( 1069 LOCAL_PR_FMT " idx:%d", 1070 LOCAL_PR_ARG, __entry->idx 1071 ) 1072 ); 1073 1074 TRACE_EVENT(drv_flush, 1075 TP_PROTO(struct ieee80211_local *local, 1076 u32 queues, bool drop), 1077 1078 TP_ARGS(local, queues, drop), 1079 1080 TP_STRUCT__entry( 1081 LOCAL_ENTRY 1082 __field(bool, drop) 1083 __field(u32, queues) 1084 ), 1085 1086 TP_fast_assign( 1087 LOCAL_ASSIGN; 1088 __entry->drop = drop; 1089 __entry->queues = queues; 1090 ), 1091 1092 TP_printk( 1093 LOCAL_PR_FMT " queues:0x%x drop:%d", 1094 LOCAL_PR_ARG, __entry->queues, __entry->drop 1095 ) 1096 ); 1097 1098 TRACE_EVENT(drv_channel_switch, 1099 TP_PROTO(struct ieee80211_local *local, 1100 struct ieee80211_sub_if_data *sdata, 1101 struct ieee80211_channel_switch *ch_switch), 1102 1103 TP_ARGS(local, sdata, ch_switch), 1104 1105 TP_STRUCT__entry( 1106 LOCAL_ENTRY 1107 VIF_ENTRY 1108 CHANDEF_ENTRY 1109 __field(u64, timestamp) 1110 __field(u32, device_timestamp) 1111 __field(bool, block_tx) 1112 __field(u8, count) 1113 ), 1114 1115 TP_fast_assign( 1116 LOCAL_ASSIGN; 1117 VIF_ASSIGN; 1118 CHANDEF_ASSIGN(&ch_switch->chandef) 1119 __entry->timestamp = ch_switch->timestamp; 1120 __entry->device_timestamp = ch_switch->device_timestamp; 1121 __entry->block_tx = ch_switch->block_tx; 1122 __entry->count = ch_switch->count; 1123 ), 1124 1125 TP_printk( 1126 LOCAL_PR_FMT VIF_PR_FMT " new " CHANDEF_PR_FMT " count:%d", 1127 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count 1128 ) 1129 ); 1130 1131 TRACE_EVENT(drv_set_antenna, 1132 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret), 1133 1134 TP_ARGS(local, tx_ant, rx_ant, ret), 1135 1136 TP_STRUCT__entry( 1137 LOCAL_ENTRY 1138 __field(u32, tx_ant) 1139 __field(u32, rx_ant) 1140 __field(int, ret) 1141 ), 1142 1143 TP_fast_assign( 1144 LOCAL_ASSIGN; 1145 __entry->tx_ant = tx_ant; 1146 __entry->rx_ant = rx_ant; 1147 __entry->ret = ret; 1148 ), 1149 1150 TP_printk( 1151 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d", 1152 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret 1153 ) 1154 ); 1155 1156 TRACE_EVENT(drv_get_antenna, 1157 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret), 1158 1159 TP_ARGS(local, tx_ant, rx_ant, ret), 1160 1161 TP_STRUCT__entry( 1162 LOCAL_ENTRY 1163 __field(u32, tx_ant) 1164 __field(u32, rx_ant) 1165 __field(int, ret) 1166 ), 1167 1168 TP_fast_assign( 1169 LOCAL_ASSIGN; 1170 __entry->tx_ant = tx_ant; 1171 __entry->rx_ant = rx_ant; 1172 __entry->ret = ret; 1173 ), 1174 1175 TP_printk( 1176 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d", 1177 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret 1178 ) 1179 ); 1180 1181 TRACE_EVENT(drv_remain_on_channel, 1182 TP_PROTO(struct ieee80211_local *local, 1183 struct ieee80211_sub_if_data *sdata, 1184 struct ieee80211_channel *chan, 1185 unsigned int duration, 1186 enum ieee80211_roc_type type), 1187 1188 TP_ARGS(local, sdata, chan, duration, type), 1189 1190 TP_STRUCT__entry( 1191 LOCAL_ENTRY 1192 VIF_ENTRY 1193 __field(int, center_freq) 1194 __field(unsigned int, duration) 1195 __field(u32, type) 1196 ), 1197 1198 TP_fast_assign( 1199 LOCAL_ASSIGN; 1200 VIF_ASSIGN; 1201 __entry->center_freq = chan->center_freq; 1202 __entry->duration = duration; 1203 __entry->type = type; 1204 ), 1205 1206 TP_printk( 1207 LOCAL_PR_FMT VIF_PR_FMT " freq:%dMHz duration:%dms type=%d", 1208 LOCAL_PR_ARG, VIF_PR_ARG, 1209 __entry->center_freq, __entry->duration, __entry->type 1210 ) 1211 ); 1212 1213 DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel, 1214 TP_PROTO(struct ieee80211_local *local), 1215 TP_ARGS(local) 1216 ); 1217 1218 TRACE_EVENT(drv_set_ringparam, 1219 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx), 1220 1221 TP_ARGS(local, tx, rx), 1222 1223 TP_STRUCT__entry( 1224 LOCAL_ENTRY 1225 __field(u32, tx) 1226 __field(u32, rx) 1227 ), 1228 1229 TP_fast_assign( 1230 LOCAL_ASSIGN; 1231 __entry->tx = tx; 1232 __entry->rx = rx; 1233 ), 1234 1235 TP_printk( 1236 LOCAL_PR_FMT " tx:%d rx %d", 1237 LOCAL_PR_ARG, __entry->tx, __entry->rx 1238 ) 1239 ); 1240 1241 TRACE_EVENT(drv_get_ringparam, 1242 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max, 1243 u32 *rx, u32 *rx_max), 1244 1245 TP_ARGS(local, tx, tx_max, rx, rx_max), 1246 1247 TP_STRUCT__entry( 1248 LOCAL_ENTRY 1249 __field(u32, tx) 1250 __field(u32, tx_max) 1251 __field(u32, rx) 1252 __field(u32, rx_max) 1253 ), 1254 1255 TP_fast_assign( 1256 LOCAL_ASSIGN; 1257 __entry->tx = *tx; 1258 __entry->tx_max = *tx_max; 1259 __entry->rx = *rx; 1260 __entry->rx_max = *rx_max; 1261 ), 1262 1263 TP_printk( 1264 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d", 1265 LOCAL_PR_ARG, 1266 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max 1267 ) 1268 ); 1269 1270 DEFINE_EVENT(local_only_evt, drv_tx_frames_pending, 1271 TP_PROTO(struct ieee80211_local *local), 1272 TP_ARGS(local) 1273 ); 1274 1275 DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait, 1276 TP_PROTO(struct ieee80211_local *local), 1277 TP_ARGS(local) 1278 ); 1279 1280 TRACE_EVENT(drv_set_bitrate_mask, 1281 TP_PROTO(struct ieee80211_local *local, 1282 struct ieee80211_sub_if_data *sdata, 1283 const struct cfg80211_bitrate_mask *mask), 1284 1285 TP_ARGS(local, sdata, mask), 1286 1287 TP_STRUCT__entry( 1288 LOCAL_ENTRY 1289 VIF_ENTRY 1290 __field(u32, legacy_2g) 1291 __field(u32, legacy_5g) 1292 ), 1293 1294 TP_fast_assign( 1295 LOCAL_ASSIGN; 1296 VIF_ASSIGN; 1297 __entry->legacy_2g = mask->control[NL80211_BAND_2GHZ].legacy; 1298 __entry->legacy_5g = mask->control[NL80211_BAND_5GHZ].legacy; 1299 ), 1300 1301 TP_printk( 1302 LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x", 1303 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g 1304 ) 1305 ); 1306 1307 TRACE_EVENT(drv_set_rekey_data, 1308 TP_PROTO(struct ieee80211_local *local, 1309 struct ieee80211_sub_if_data *sdata, 1310 struct cfg80211_gtk_rekey_data *data), 1311 1312 TP_ARGS(local, sdata, data), 1313 1314 TP_STRUCT__entry( 1315 LOCAL_ENTRY 1316 VIF_ENTRY 1317 __array(u8, kek, NL80211_KEK_LEN) 1318 __array(u8, kck, NL80211_KCK_LEN) 1319 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN) 1320 ), 1321 1322 TP_fast_assign( 1323 LOCAL_ASSIGN; 1324 VIF_ASSIGN; 1325 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN); 1326 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN); 1327 memcpy(__entry->replay_ctr, data->replay_ctr, 1328 NL80211_REPLAY_CTR_LEN); 1329 ), 1330 1331 TP_printk(LOCAL_PR_FMT VIF_PR_FMT, 1332 LOCAL_PR_ARG, VIF_PR_ARG) 1333 ); 1334 1335 TRACE_EVENT(drv_event_callback, 1336 TP_PROTO(struct ieee80211_local *local, 1337 struct ieee80211_sub_if_data *sdata, 1338 const struct ieee80211_event *_event), 1339 1340 TP_ARGS(local, sdata, _event), 1341 1342 TP_STRUCT__entry( 1343 LOCAL_ENTRY 1344 VIF_ENTRY 1345 __field(u32, type) 1346 ), 1347 1348 TP_fast_assign( 1349 LOCAL_ASSIGN; 1350 VIF_ASSIGN; 1351 __entry->type = _event->type; 1352 ), 1353 1354 TP_printk( 1355 LOCAL_PR_FMT VIF_PR_FMT " event:%d", 1356 LOCAL_PR_ARG, VIF_PR_ARG, __entry->type 1357 ) 1358 ); 1359 1360 DECLARE_EVENT_CLASS(release_evt, 1361 TP_PROTO(struct ieee80211_local *local, 1362 struct ieee80211_sta *sta, 1363 u16 tids, int num_frames, 1364 enum ieee80211_frame_release_type reason, 1365 bool more_data), 1366 1367 TP_ARGS(local, sta, tids, num_frames, reason, more_data), 1368 1369 TP_STRUCT__entry( 1370 LOCAL_ENTRY 1371 STA_ENTRY 1372 __field(u16, tids) 1373 __field(int, num_frames) 1374 __field(int, reason) 1375 __field(bool, more_data) 1376 ), 1377 1378 TP_fast_assign( 1379 LOCAL_ASSIGN; 1380 STA_ASSIGN; 1381 __entry->tids = tids; 1382 __entry->num_frames = num_frames; 1383 __entry->reason = reason; 1384 __entry->more_data = more_data; 1385 ), 1386 1387 TP_printk( 1388 LOCAL_PR_FMT STA_PR_FMT 1389 " TIDs:0x%.4x frames:%d reason:%d more:%d", 1390 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames, 1391 __entry->reason, __entry->more_data 1392 ) 1393 ); 1394 1395 DEFINE_EVENT(release_evt, drv_release_buffered_frames, 1396 TP_PROTO(struct ieee80211_local *local, 1397 struct ieee80211_sta *sta, 1398 u16 tids, int num_frames, 1399 enum ieee80211_frame_release_type reason, 1400 bool more_data), 1401 1402 TP_ARGS(local, sta, tids, num_frames, reason, more_data) 1403 ); 1404 1405 DEFINE_EVENT(release_evt, drv_allow_buffered_frames, 1406 TP_PROTO(struct ieee80211_local *local, 1407 struct ieee80211_sta *sta, 1408 u16 tids, int num_frames, 1409 enum ieee80211_frame_release_type reason, 1410 bool more_data), 1411 1412 TP_ARGS(local, sta, tids, num_frames, reason, more_data) 1413 ); 1414 1415 DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx, 1416 TP_PROTO(struct ieee80211_local *local, 1417 struct ieee80211_sub_if_data *sdata), 1418 1419 TP_ARGS(local, sdata) 1420 ); 1421 1422 DEFINE_EVENT(local_sdata_evt, drv_mgd_protect_tdls_discover, 1423 TP_PROTO(struct ieee80211_local *local, 1424 struct ieee80211_sub_if_data *sdata), 1425 1426 TP_ARGS(local, sdata) 1427 ); 1428 1429 DECLARE_EVENT_CLASS(local_chanctx, 1430 TP_PROTO(struct ieee80211_local *local, 1431 struct ieee80211_chanctx *ctx), 1432 1433 TP_ARGS(local, ctx), 1434 1435 TP_STRUCT__entry( 1436 LOCAL_ENTRY 1437 CHANCTX_ENTRY 1438 ), 1439 1440 TP_fast_assign( 1441 LOCAL_ASSIGN; 1442 CHANCTX_ASSIGN; 1443 ), 1444 1445 TP_printk( 1446 LOCAL_PR_FMT CHANCTX_PR_FMT, 1447 LOCAL_PR_ARG, CHANCTX_PR_ARG 1448 ) 1449 ); 1450 1451 DEFINE_EVENT(local_chanctx, drv_add_chanctx, 1452 TP_PROTO(struct ieee80211_local *local, 1453 struct ieee80211_chanctx *ctx), 1454 TP_ARGS(local, ctx) 1455 ); 1456 1457 DEFINE_EVENT(local_chanctx, drv_remove_chanctx, 1458 TP_PROTO(struct ieee80211_local *local, 1459 struct ieee80211_chanctx *ctx), 1460 TP_ARGS(local, ctx) 1461 ); 1462 1463 TRACE_EVENT(drv_change_chanctx, 1464 TP_PROTO(struct ieee80211_local *local, 1465 struct ieee80211_chanctx *ctx, 1466 u32 changed), 1467 1468 TP_ARGS(local, ctx, changed), 1469 1470 TP_STRUCT__entry( 1471 LOCAL_ENTRY 1472 CHANCTX_ENTRY 1473 __field(u32, changed) 1474 ), 1475 1476 TP_fast_assign( 1477 LOCAL_ASSIGN; 1478 CHANCTX_ASSIGN; 1479 __entry->changed = changed; 1480 ), 1481 1482 TP_printk( 1483 LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x", 1484 LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed 1485 ) 1486 ); 1487 1488 #if !defined(__TRACE_VIF_ENTRY) 1489 #define __TRACE_VIF_ENTRY 1490 struct trace_vif_entry { 1491 enum nl80211_iftype vif_type; 1492 bool p2p; 1493 char vif_name[IFNAMSIZ]; 1494 } __packed; 1495 1496 struct trace_chandef_entry { 1497 u32 control_freq; 1498 u32 chan_width; 1499 u32 center_freq1; 1500 u32 center_freq2; 1501 } __packed; 1502 1503 struct trace_switch_entry { 1504 struct trace_vif_entry vif; 1505 struct trace_chandef_entry old_chandef; 1506 struct trace_chandef_entry new_chandef; 1507 } __packed; 1508 1509 #define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from 1510 #endif 1511 1512 TRACE_EVENT(drv_switch_vif_chanctx, 1513 TP_PROTO(struct ieee80211_local *local, 1514 struct ieee80211_vif_chanctx_switch *vifs, 1515 int n_vifs, enum ieee80211_chanctx_switch_mode mode), 1516 TP_ARGS(local, vifs, n_vifs, mode), 1517 1518 TP_STRUCT__entry( 1519 LOCAL_ENTRY 1520 __field(int, n_vifs) 1521 __field(u32, mode) 1522 __dynamic_array(u8, vifs, 1523 sizeof(struct trace_switch_entry) * n_vifs) 1524 ), 1525 1526 TP_fast_assign( 1527 LOCAL_ASSIGN; 1528 __entry->n_vifs = n_vifs; 1529 __entry->mode = mode; 1530 { 1531 struct trace_switch_entry *local_vifs = 1532 __get_dynamic_array(vifs); 1533 int i; 1534 1535 for (i = 0; i < n_vifs; i++) { 1536 struct ieee80211_sub_if_data *sdata; 1537 1538 sdata = container_of(vifs[i].vif, 1539 struct ieee80211_sub_if_data, 1540 vif); 1541 1542 SWITCH_ENTRY_ASSIGN(vif.vif_type, vif->type); 1543 SWITCH_ENTRY_ASSIGN(vif.p2p, vif->p2p); 1544 strncpy(local_vifs[i].vif.vif_name, 1545 sdata->name, 1546 sizeof(local_vifs[i].vif.vif_name)); 1547 SWITCH_ENTRY_ASSIGN(old_chandef.control_freq, 1548 old_ctx->def.chan->center_freq); 1549 SWITCH_ENTRY_ASSIGN(old_chandef.chan_width, 1550 old_ctx->def.width); 1551 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq1, 1552 old_ctx->def.center_freq1); 1553 SWITCH_ENTRY_ASSIGN(old_chandef.center_freq2, 1554 old_ctx->def.center_freq2); 1555 SWITCH_ENTRY_ASSIGN(new_chandef.control_freq, 1556 new_ctx->def.chan->center_freq); 1557 SWITCH_ENTRY_ASSIGN(new_chandef.chan_width, 1558 new_ctx->def.width); 1559 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq1, 1560 new_ctx->def.center_freq1); 1561 SWITCH_ENTRY_ASSIGN(new_chandef.center_freq2, 1562 new_ctx->def.center_freq2); 1563 } 1564 } 1565 ), 1566 1567 TP_printk( 1568 LOCAL_PR_FMT " n_vifs:%d mode:%d", 1569 LOCAL_PR_ARG, __entry->n_vifs, __entry->mode 1570 ) 1571 ); 1572 1573 DECLARE_EVENT_CLASS(local_sdata_chanctx, 1574 TP_PROTO(struct ieee80211_local *local, 1575 struct ieee80211_sub_if_data *sdata, 1576 struct ieee80211_chanctx *ctx), 1577 1578 TP_ARGS(local, sdata, ctx), 1579 1580 TP_STRUCT__entry( 1581 LOCAL_ENTRY 1582 VIF_ENTRY 1583 CHANCTX_ENTRY 1584 ), 1585 1586 TP_fast_assign( 1587 LOCAL_ASSIGN; 1588 VIF_ASSIGN; 1589 CHANCTX_ASSIGN; 1590 ), 1591 1592 TP_printk( 1593 LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT, 1594 LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG 1595 ) 1596 ); 1597 1598 DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx, 1599 TP_PROTO(struct ieee80211_local *local, 1600 struct ieee80211_sub_if_data *sdata, 1601 struct ieee80211_chanctx *ctx), 1602 TP_ARGS(local, sdata, ctx) 1603 ); 1604 1605 DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx, 1606 TP_PROTO(struct ieee80211_local *local, 1607 struct ieee80211_sub_if_data *sdata, 1608 struct ieee80211_chanctx *ctx), 1609 TP_ARGS(local, sdata, ctx) 1610 ); 1611 1612 TRACE_EVENT(drv_start_ap, 1613 TP_PROTO(struct ieee80211_local *local, 1614 struct ieee80211_sub_if_data *sdata, 1615 struct ieee80211_bss_conf *info), 1616 1617 TP_ARGS(local, sdata, info), 1618 1619 TP_STRUCT__entry( 1620 LOCAL_ENTRY 1621 VIF_ENTRY 1622 __field(u8, dtimper) 1623 __field(u16, bcnint) 1624 __dynamic_array(u8, ssid, info->ssid_len); 1625 __field(bool, hidden_ssid); 1626 ), 1627 1628 TP_fast_assign( 1629 LOCAL_ASSIGN; 1630 VIF_ASSIGN; 1631 __entry->dtimper = info->dtim_period; 1632 __entry->bcnint = info->beacon_int; 1633 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len); 1634 __entry->hidden_ssid = info->hidden_ssid; 1635 ), 1636 1637 TP_printk( 1638 LOCAL_PR_FMT VIF_PR_FMT, 1639 LOCAL_PR_ARG, VIF_PR_ARG 1640 ) 1641 ); 1642 1643 DEFINE_EVENT(local_sdata_evt, drv_stop_ap, 1644 TP_PROTO(struct ieee80211_local *local, 1645 struct ieee80211_sub_if_data *sdata), 1646 TP_ARGS(local, sdata) 1647 ); 1648 1649 TRACE_EVENT(drv_reconfig_complete, 1650 TP_PROTO(struct ieee80211_local *local, 1651 enum ieee80211_reconfig_type reconfig_type), 1652 TP_ARGS(local, reconfig_type), 1653 1654 TP_STRUCT__entry( 1655 LOCAL_ENTRY 1656 __field(u8, reconfig_type) 1657 ), 1658 1659 TP_fast_assign( 1660 LOCAL_ASSIGN; 1661 __entry->reconfig_type = reconfig_type; 1662 ), 1663 1664 TP_printk( 1665 LOCAL_PR_FMT " reconfig_type:%d", 1666 LOCAL_PR_ARG, __entry->reconfig_type 1667 ) 1668 1669 ); 1670 1671 #if IS_ENABLED(CONFIG_IPV6) 1672 DEFINE_EVENT(local_sdata_evt, drv_ipv6_addr_change, 1673 TP_PROTO(struct ieee80211_local *local, 1674 struct ieee80211_sub_if_data *sdata), 1675 TP_ARGS(local, sdata) 1676 ); 1677 #endif 1678 1679 TRACE_EVENT(drv_join_ibss, 1680 TP_PROTO(struct ieee80211_local *local, 1681 struct ieee80211_sub_if_data *sdata, 1682 struct ieee80211_bss_conf *info), 1683 1684 TP_ARGS(local, sdata, info), 1685 1686 TP_STRUCT__entry( 1687 LOCAL_ENTRY 1688 VIF_ENTRY 1689 __field(u8, dtimper) 1690 __field(u16, bcnint) 1691 __dynamic_array(u8, ssid, info->ssid_len); 1692 ), 1693 1694 TP_fast_assign( 1695 LOCAL_ASSIGN; 1696 VIF_ASSIGN; 1697 __entry->dtimper = info->dtim_period; 1698 __entry->bcnint = info->beacon_int; 1699 memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len); 1700 ), 1701 1702 TP_printk( 1703 LOCAL_PR_FMT VIF_PR_FMT, 1704 LOCAL_PR_ARG, VIF_PR_ARG 1705 ) 1706 ); 1707 1708 DEFINE_EVENT(local_sdata_evt, drv_leave_ibss, 1709 TP_PROTO(struct ieee80211_local *local, 1710 struct ieee80211_sub_if_data *sdata), 1711 TP_ARGS(local, sdata) 1712 ); 1713 1714 TRACE_EVENT(drv_get_expected_throughput, 1715 TP_PROTO(struct ieee80211_sta *sta), 1716 1717 TP_ARGS(sta), 1718 1719 TP_STRUCT__entry( 1720 STA_ENTRY 1721 ), 1722 1723 TP_fast_assign( 1724 STA_ASSIGN; 1725 ), 1726 1727 TP_printk( 1728 STA_PR_FMT, STA_PR_ARG 1729 ) 1730 ); 1731 1732 TRACE_EVENT(drv_start_nan, 1733 TP_PROTO(struct ieee80211_local *local, 1734 struct ieee80211_sub_if_data *sdata, 1735 struct cfg80211_nan_conf *conf), 1736 1737 TP_ARGS(local, sdata, conf), 1738 TP_STRUCT__entry( 1739 LOCAL_ENTRY 1740 VIF_ENTRY 1741 __field(u8, master_pref) 1742 __field(u8, bands) 1743 ), 1744 1745 TP_fast_assign( 1746 LOCAL_ASSIGN; 1747 VIF_ASSIGN; 1748 __entry->master_pref = conf->master_pref; 1749 __entry->bands = conf->bands; 1750 ), 1751 1752 TP_printk( 1753 LOCAL_PR_FMT VIF_PR_FMT 1754 ", master preference: %u, bands: 0x%0x", 1755 LOCAL_PR_ARG, VIF_PR_ARG, __entry->master_pref, 1756 __entry->bands 1757 ) 1758 ); 1759 1760 TRACE_EVENT(drv_stop_nan, 1761 TP_PROTO(struct ieee80211_local *local, 1762 struct ieee80211_sub_if_data *sdata), 1763 1764 TP_ARGS(local, sdata), 1765 1766 TP_STRUCT__entry( 1767 LOCAL_ENTRY 1768 VIF_ENTRY 1769 ), 1770 1771 TP_fast_assign( 1772 LOCAL_ASSIGN; 1773 VIF_ASSIGN; 1774 ), 1775 1776 TP_printk( 1777 LOCAL_PR_FMT VIF_PR_FMT, 1778 LOCAL_PR_ARG, VIF_PR_ARG 1779 ) 1780 ); 1781 1782 TRACE_EVENT(drv_nan_change_conf, 1783 TP_PROTO(struct ieee80211_local *local, 1784 struct ieee80211_sub_if_data *sdata, 1785 struct cfg80211_nan_conf *conf, 1786 u32 changes), 1787 1788 TP_ARGS(local, sdata, conf, changes), 1789 TP_STRUCT__entry( 1790 LOCAL_ENTRY 1791 VIF_ENTRY 1792 __field(u8, master_pref) 1793 __field(u8, bands) 1794 __field(u32, changes) 1795 ), 1796 1797 TP_fast_assign( 1798 LOCAL_ASSIGN; 1799 VIF_ASSIGN; 1800 __entry->master_pref = conf->master_pref; 1801 __entry->bands = conf->bands; 1802 __entry->changes = changes; 1803 ), 1804 1805 TP_printk( 1806 LOCAL_PR_FMT VIF_PR_FMT 1807 ", master preference: %u, bands: 0x%0x, changes: 0x%x", 1808 LOCAL_PR_ARG, VIF_PR_ARG, __entry->master_pref, 1809 __entry->bands, __entry->changes 1810 ) 1811 ); 1812 1813 TRACE_EVENT(drv_add_nan_func, 1814 TP_PROTO(struct ieee80211_local *local, 1815 struct ieee80211_sub_if_data *sdata, 1816 const struct cfg80211_nan_func *func), 1817 1818 TP_ARGS(local, sdata, func), 1819 TP_STRUCT__entry( 1820 LOCAL_ENTRY 1821 VIF_ENTRY 1822 __field(u8, type) 1823 __field(u8, inst_id) 1824 ), 1825 1826 TP_fast_assign( 1827 LOCAL_ASSIGN; 1828 VIF_ASSIGN; 1829 __entry->type = func->type; 1830 __entry->inst_id = func->instance_id; 1831 ), 1832 1833 TP_printk( 1834 LOCAL_PR_FMT VIF_PR_FMT 1835 ", type: %u, inst_id: %u", 1836 LOCAL_PR_ARG, VIF_PR_ARG, __entry->type, __entry->inst_id 1837 ) 1838 ); 1839 1840 TRACE_EVENT(drv_del_nan_func, 1841 TP_PROTO(struct ieee80211_local *local, 1842 struct ieee80211_sub_if_data *sdata, 1843 u8 instance_id), 1844 1845 TP_ARGS(local, sdata, instance_id), 1846 TP_STRUCT__entry( 1847 LOCAL_ENTRY 1848 VIF_ENTRY 1849 __field(u8, instance_id) 1850 ), 1851 1852 TP_fast_assign( 1853 LOCAL_ASSIGN; 1854 VIF_ASSIGN; 1855 __entry->instance_id = instance_id; 1856 ), 1857 1858 TP_printk( 1859 LOCAL_PR_FMT VIF_PR_FMT 1860 ", instance_id: %u", 1861 LOCAL_PR_ARG, VIF_PR_ARG, __entry->instance_id 1862 ) 1863 ); 1864 1865 /* 1866 * Tracing for API calls that drivers call. 1867 */ 1868 1869 TRACE_EVENT(api_start_tx_ba_session, 1870 TP_PROTO(struct ieee80211_sta *sta, u16 tid), 1871 1872 TP_ARGS(sta, tid), 1873 1874 TP_STRUCT__entry( 1875 STA_ENTRY 1876 __field(u16, tid) 1877 ), 1878 1879 TP_fast_assign( 1880 STA_ASSIGN; 1881 __entry->tid = tid; 1882 ), 1883 1884 TP_printk( 1885 STA_PR_FMT " tid:%d", 1886 STA_PR_ARG, __entry->tid 1887 ) 1888 ); 1889 1890 TRACE_EVENT(api_start_tx_ba_cb, 1891 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid), 1892 1893 TP_ARGS(sdata, ra, tid), 1894 1895 TP_STRUCT__entry( 1896 VIF_ENTRY 1897 __array(u8, ra, ETH_ALEN) 1898 __field(u16, tid) 1899 ), 1900 1901 TP_fast_assign( 1902 VIF_ASSIGN; 1903 memcpy(__entry->ra, ra, ETH_ALEN); 1904 __entry->tid = tid; 1905 ), 1906 1907 TP_printk( 1908 VIF_PR_FMT " ra:%pM tid:%d", 1909 VIF_PR_ARG, __entry->ra, __entry->tid 1910 ) 1911 ); 1912 1913 TRACE_EVENT(api_stop_tx_ba_session, 1914 TP_PROTO(struct ieee80211_sta *sta, u16 tid), 1915 1916 TP_ARGS(sta, tid), 1917 1918 TP_STRUCT__entry( 1919 STA_ENTRY 1920 __field(u16, tid) 1921 ), 1922 1923 TP_fast_assign( 1924 STA_ASSIGN; 1925 __entry->tid = tid; 1926 ), 1927 1928 TP_printk( 1929 STA_PR_FMT " tid:%d", 1930 STA_PR_ARG, __entry->tid 1931 ) 1932 ); 1933 1934 TRACE_EVENT(api_stop_tx_ba_cb, 1935 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid), 1936 1937 TP_ARGS(sdata, ra, tid), 1938 1939 TP_STRUCT__entry( 1940 VIF_ENTRY 1941 __array(u8, ra, ETH_ALEN) 1942 __field(u16, tid) 1943 ), 1944 1945 TP_fast_assign( 1946 VIF_ASSIGN; 1947 memcpy(__entry->ra, ra, ETH_ALEN); 1948 __entry->tid = tid; 1949 ), 1950 1951 TP_printk( 1952 VIF_PR_FMT " ra:%pM tid:%d", 1953 VIF_PR_ARG, __entry->ra, __entry->tid 1954 ) 1955 ); 1956 1957 DEFINE_EVENT(local_only_evt, api_restart_hw, 1958 TP_PROTO(struct ieee80211_local *local), 1959 TP_ARGS(local) 1960 ); 1961 1962 TRACE_EVENT(api_beacon_loss, 1963 TP_PROTO(struct ieee80211_sub_if_data *sdata), 1964 1965 TP_ARGS(sdata), 1966 1967 TP_STRUCT__entry( 1968 VIF_ENTRY 1969 ), 1970 1971 TP_fast_assign( 1972 VIF_ASSIGN; 1973 ), 1974 1975 TP_printk( 1976 VIF_PR_FMT, 1977 VIF_PR_ARG 1978 ) 1979 ); 1980 1981 TRACE_EVENT(api_connection_loss, 1982 TP_PROTO(struct ieee80211_sub_if_data *sdata), 1983 1984 TP_ARGS(sdata), 1985 1986 TP_STRUCT__entry( 1987 VIF_ENTRY 1988 ), 1989 1990 TP_fast_assign( 1991 VIF_ASSIGN; 1992 ), 1993 1994 TP_printk( 1995 VIF_PR_FMT, 1996 VIF_PR_ARG 1997 ) 1998 ); 1999 2000 TRACE_EVENT(api_cqm_rssi_notify, 2001 TP_PROTO(struct ieee80211_sub_if_data *sdata, 2002 enum nl80211_cqm_rssi_threshold_event rssi_event, 2003 s32 rssi_level), 2004 2005 TP_ARGS(sdata, rssi_event, rssi_level), 2006 2007 TP_STRUCT__entry( 2008 VIF_ENTRY 2009 __field(u32, rssi_event) 2010 __field(s32, rssi_level) 2011 ), 2012 2013 TP_fast_assign( 2014 VIF_ASSIGN; 2015 __entry->rssi_event = rssi_event; 2016 __entry->rssi_level = rssi_level; 2017 ), 2018 2019 TP_printk( 2020 VIF_PR_FMT " event:%d rssi:%d", 2021 VIF_PR_ARG, __entry->rssi_event, __entry->rssi_level 2022 ) 2023 ); 2024 2025 DEFINE_EVENT(local_sdata_evt, api_cqm_beacon_loss_notify, 2026 TP_PROTO(struct ieee80211_local *local, 2027 struct ieee80211_sub_if_data *sdata), 2028 TP_ARGS(local, sdata) 2029 ); 2030 2031 TRACE_EVENT(api_scan_completed, 2032 TP_PROTO(struct ieee80211_local *local, bool aborted), 2033 2034 TP_ARGS(local, aborted), 2035 2036 TP_STRUCT__entry( 2037 LOCAL_ENTRY 2038 __field(bool, aborted) 2039 ), 2040 2041 TP_fast_assign( 2042 LOCAL_ASSIGN; 2043 __entry->aborted = aborted; 2044 ), 2045 2046 TP_printk( 2047 LOCAL_PR_FMT " aborted:%d", 2048 LOCAL_PR_ARG, __entry->aborted 2049 ) 2050 ); 2051 2052 TRACE_EVENT(api_sched_scan_results, 2053 TP_PROTO(struct ieee80211_local *local), 2054 2055 TP_ARGS(local), 2056 2057 TP_STRUCT__entry( 2058 LOCAL_ENTRY 2059 ), 2060 2061 TP_fast_assign( 2062 LOCAL_ASSIGN; 2063 ), 2064 2065 TP_printk( 2066 LOCAL_PR_FMT, LOCAL_PR_ARG 2067 ) 2068 ); 2069 2070 TRACE_EVENT(api_sched_scan_stopped, 2071 TP_PROTO(struct ieee80211_local *local), 2072 2073 TP_ARGS(local), 2074 2075 TP_STRUCT__entry( 2076 LOCAL_ENTRY 2077 ), 2078 2079 TP_fast_assign( 2080 LOCAL_ASSIGN; 2081 ), 2082 2083 TP_printk( 2084 LOCAL_PR_FMT, LOCAL_PR_ARG 2085 ) 2086 ); 2087 2088 TRACE_EVENT(api_sta_block_awake, 2089 TP_PROTO(struct ieee80211_local *local, 2090 struct ieee80211_sta *sta, bool block), 2091 2092 TP_ARGS(local, sta, block), 2093 2094 TP_STRUCT__entry( 2095 LOCAL_ENTRY 2096 STA_ENTRY 2097 __field(bool, block) 2098 ), 2099 2100 TP_fast_assign( 2101 LOCAL_ASSIGN; 2102 STA_ASSIGN; 2103 __entry->block = block; 2104 ), 2105 2106 TP_printk( 2107 LOCAL_PR_FMT STA_PR_FMT " block:%d", 2108 LOCAL_PR_ARG, STA_PR_ARG, __entry->block 2109 ) 2110 ); 2111 2112 TRACE_EVENT(api_chswitch_done, 2113 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success), 2114 2115 TP_ARGS(sdata, success), 2116 2117 TP_STRUCT__entry( 2118 VIF_ENTRY 2119 __field(bool, success) 2120 ), 2121 2122 TP_fast_assign( 2123 VIF_ASSIGN; 2124 __entry->success = success; 2125 ), 2126 2127 TP_printk( 2128 VIF_PR_FMT " success=%d", 2129 VIF_PR_ARG, __entry->success 2130 ) 2131 ); 2132 2133 DEFINE_EVENT(local_only_evt, api_ready_on_channel, 2134 TP_PROTO(struct ieee80211_local *local), 2135 TP_ARGS(local) 2136 ); 2137 2138 DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired, 2139 TP_PROTO(struct ieee80211_local *local), 2140 TP_ARGS(local) 2141 ); 2142 2143 TRACE_EVENT(api_gtk_rekey_notify, 2144 TP_PROTO(struct ieee80211_sub_if_data *sdata, 2145 const u8 *bssid, const u8 *replay_ctr), 2146 2147 TP_ARGS(sdata, bssid, replay_ctr), 2148 2149 TP_STRUCT__entry( 2150 VIF_ENTRY 2151 __array(u8, bssid, ETH_ALEN) 2152 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN) 2153 ), 2154 2155 TP_fast_assign( 2156 VIF_ASSIGN; 2157 memcpy(__entry->bssid, bssid, ETH_ALEN); 2158 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN); 2159 ), 2160 2161 TP_printk(VIF_PR_FMT, VIF_PR_ARG) 2162 ); 2163 2164 TRACE_EVENT(api_enable_rssi_reports, 2165 TP_PROTO(struct ieee80211_sub_if_data *sdata, 2166 int rssi_min_thold, int rssi_max_thold), 2167 2168 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold), 2169 2170 TP_STRUCT__entry( 2171 VIF_ENTRY 2172 __field(int, rssi_min_thold) 2173 __field(int, rssi_max_thold) 2174 ), 2175 2176 TP_fast_assign( 2177 VIF_ASSIGN; 2178 __entry->rssi_min_thold = rssi_min_thold; 2179 __entry->rssi_max_thold = rssi_max_thold; 2180 ), 2181 2182 TP_printk( 2183 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d", 2184 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold 2185 ) 2186 ); 2187 2188 TRACE_EVENT(api_eosp, 2189 TP_PROTO(struct ieee80211_local *local, 2190 struct ieee80211_sta *sta), 2191 2192 TP_ARGS(local, sta), 2193 2194 TP_STRUCT__entry( 2195 LOCAL_ENTRY 2196 STA_ENTRY 2197 ), 2198 2199 TP_fast_assign( 2200 LOCAL_ASSIGN; 2201 STA_ASSIGN; 2202 ), 2203 2204 TP_printk( 2205 LOCAL_PR_FMT STA_PR_FMT, 2206 LOCAL_PR_ARG, STA_PR_ARG 2207 ) 2208 ); 2209 2210 TRACE_EVENT(api_send_eosp_nullfunc, 2211 TP_PROTO(struct ieee80211_local *local, 2212 struct ieee80211_sta *sta, 2213 u8 tid), 2214 2215 TP_ARGS(local, sta, tid), 2216 2217 TP_STRUCT__entry( 2218 LOCAL_ENTRY 2219 STA_ENTRY 2220 __field(u8, tid) 2221 ), 2222 2223 TP_fast_assign( 2224 LOCAL_ASSIGN; 2225 STA_ASSIGN; 2226 __entry->tid = tid; 2227 ), 2228 2229 TP_printk( 2230 LOCAL_PR_FMT STA_PR_FMT " tid:%d", 2231 LOCAL_PR_ARG, STA_PR_ARG, __entry->tid 2232 ) 2233 ); 2234 2235 TRACE_EVENT(api_sta_set_buffered, 2236 TP_PROTO(struct ieee80211_local *local, 2237 struct ieee80211_sta *sta, 2238 u8 tid, bool buffered), 2239 2240 TP_ARGS(local, sta, tid, buffered), 2241 2242 TP_STRUCT__entry( 2243 LOCAL_ENTRY 2244 STA_ENTRY 2245 __field(u8, tid) 2246 __field(bool, buffered) 2247 ), 2248 2249 TP_fast_assign( 2250 LOCAL_ASSIGN; 2251 STA_ASSIGN; 2252 __entry->tid = tid; 2253 __entry->buffered = buffered; 2254 ), 2255 2256 TP_printk( 2257 LOCAL_PR_FMT STA_PR_FMT " tid:%d buffered:%d", 2258 LOCAL_PR_ARG, STA_PR_ARG, __entry->tid, __entry->buffered 2259 ) 2260 ); 2261 2262 /* 2263 * Tracing for internal functions 2264 * (which may also be called in response to driver calls) 2265 */ 2266 2267 TRACE_EVENT(wake_queue, 2268 TP_PROTO(struct ieee80211_local *local, u16 queue, 2269 enum queue_stop_reason reason), 2270 2271 TP_ARGS(local, queue, reason), 2272 2273 TP_STRUCT__entry( 2274 LOCAL_ENTRY 2275 __field(u16, queue) 2276 __field(u32, reason) 2277 ), 2278 2279 TP_fast_assign( 2280 LOCAL_ASSIGN; 2281 __entry->queue = queue; 2282 __entry->reason = reason; 2283 ), 2284 2285 TP_printk( 2286 LOCAL_PR_FMT " queue:%d, reason:%d", 2287 LOCAL_PR_ARG, __entry->queue, __entry->reason 2288 ) 2289 ); 2290 2291 TRACE_EVENT(stop_queue, 2292 TP_PROTO(struct ieee80211_local *local, u16 queue, 2293 enum queue_stop_reason reason), 2294 2295 TP_ARGS(local, queue, reason), 2296 2297 TP_STRUCT__entry( 2298 LOCAL_ENTRY 2299 __field(u16, queue) 2300 __field(u32, reason) 2301 ), 2302 2303 TP_fast_assign( 2304 LOCAL_ASSIGN; 2305 __entry->queue = queue; 2306 __entry->reason = reason; 2307 ), 2308 2309 TP_printk( 2310 LOCAL_PR_FMT " queue:%d, reason:%d", 2311 LOCAL_PR_ARG, __entry->queue, __entry->reason 2312 ) 2313 ); 2314 2315 TRACE_EVENT(drv_set_default_unicast_key, 2316 TP_PROTO(struct ieee80211_local *local, 2317 struct ieee80211_sub_if_data *sdata, 2318 int key_idx), 2319 2320 TP_ARGS(local, sdata, key_idx), 2321 2322 TP_STRUCT__entry( 2323 LOCAL_ENTRY 2324 VIF_ENTRY 2325 __field(int, key_idx) 2326 ), 2327 2328 TP_fast_assign( 2329 LOCAL_ASSIGN; 2330 VIF_ASSIGN; 2331 __entry->key_idx = key_idx; 2332 ), 2333 2334 TP_printk(LOCAL_PR_FMT VIF_PR_FMT " key_idx:%d", 2335 LOCAL_PR_ARG, VIF_PR_ARG, __entry->key_idx) 2336 ); 2337 2338 TRACE_EVENT(api_radar_detected, 2339 TP_PROTO(struct ieee80211_local *local), 2340 2341 TP_ARGS(local), 2342 2343 TP_STRUCT__entry( 2344 LOCAL_ENTRY 2345 ), 2346 2347 TP_fast_assign( 2348 LOCAL_ASSIGN; 2349 ), 2350 2351 TP_printk( 2352 LOCAL_PR_FMT " radar detected", 2353 LOCAL_PR_ARG 2354 ) 2355 ); 2356 2357 TRACE_EVENT(drv_channel_switch_beacon, 2358 TP_PROTO(struct ieee80211_local *local, 2359 struct ieee80211_sub_if_data *sdata, 2360 struct cfg80211_chan_def *chandef), 2361 2362 TP_ARGS(local, sdata, chandef), 2363 2364 TP_STRUCT__entry( 2365 LOCAL_ENTRY 2366 VIF_ENTRY 2367 CHANDEF_ENTRY 2368 ), 2369 2370 TP_fast_assign( 2371 LOCAL_ASSIGN; 2372 VIF_ASSIGN; 2373 CHANDEF_ASSIGN(chandef); 2374 ), 2375 2376 TP_printk( 2377 LOCAL_PR_FMT VIF_PR_FMT " channel switch to " CHANDEF_PR_FMT, 2378 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG 2379 ) 2380 ); 2381 2382 TRACE_EVENT(drv_pre_channel_switch, 2383 TP_PROTO(struct ieee80211_local *local, 2384 struct ieee80211_sub_if_data *sdata, 2385 struct ieee80211_channel_switch *ch_switch), 2386 2387 TP_ARGS(local, sdata, ch_switch), 2388 2389 TP_STRUCT__entry( 2390 LOCAL_ENTRY 2391 VIF_ENTRY 2392 CHANDEF_ENTRY 2393 __field(u64, timestamp) 2394 __field(u32, device_timestamp) 2395 __field(bool, block_tx) 2396 __field(u8, count) 2397 ), 2398 2399 TP_fast_assign( 2400 LOCAL_ASSIGN; 2401 VIF_ASSIGN; 2402 CHANDEF_ASSIGN(&ch_switch->chandef) 2403 __entry->timestamp = ch_switch->timestamp; 2404 __entry->device_timestamp = ch_switch->device_timestamp; 2405 __entry->block_tx = ch_switch->block_tx; 2406 __entry->count = ch_switch->count; 2407 ), 2408 2409 TP_printk( 2410 LOCAL_PR_FMT VIF_PR_FMT " prepare channel switch to " 2411 CHANDEF_PR_FMT " count:%d block_tx:%d timestamp:%llu", 2412 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count, 2413 __entry->block_tx, __entry->timestamp 2414 ) 2415 ); 2416 2417 DEFINE_EVENT(local_sdata_evt, drv_post_channel_switch, 2418 TP_PROTO(struct ieee80211_local *local, 2419 struct ieee80211_sub_if_data *sdata), 2420 TP_ARGS(local, sdata) 2421 ); 2422 2423 TRACE_EVENT(drv_get_txpower, 2424 TP_PROTO(struct ieee80211_local *local, 2425 struct ieee80211_sub_if_data *sdata, 2426 int dbm, int ret), 2427 2428 TP_ARGS(local, sdata, dbm, ret), 2429 2430 TP_STRUCT__entry( 2431 LOCAL_ENTRY 2432 VIF_ENTRY 2433 __field(int, dbm) 2434 __field(int, ret) 2435 ), 2436 2437 TP_fast_assign( 2438 LOCAL_ASSIGN; 2439 VIF_ASSIGN; 2440 __entry->dbm = dbm; 2441 __entry->ret = ret; 2442 ), 2443 2444 TP_printk( 2445 LOCAL_PR_FMT VIF_PR_FMT " dbm:%d ret:%d", 2446 LOCAL_PR_ARG, VIF_PR_ARG, __entry->dbm, __entry->ret 2447 ) 2448 ); 2449 2450 TRACE_EVENT(drv_tdls_channel_switch, 2451 TP_PROTO(struct ieee80211_local *local, 2452 struct ieee80211_sub_if_data *sdata, 2453 struct ieee80211_sta *sta, u8 oper_class, 2454 struct cfg80211_chan_def *chandef), 2455 2456 TP_ARGS(local, sdata, sta, oper_class, chandef), 2457 2458 TP_STRUCT__entry( 2459 LOCAL_ENTRY 2460 VIF_ENTRY 2461 STA_ENTRY 2462 __field(u8, oper_class) 2463 CHANDEF_ENTRY 2464 ), 2465 2466 TP_fast_assign( 2467 LOCAL_ASSIGN; 2468 VIF_ASSIGN; 2469 STA_ASSIGN; 2470 __entry->oper_class = oper_class; 2471 CHANDEF_ASSIGN(chandef) 2472 ), 2473 2474 TP_printk( 2475 LOCAL_PR_FMT VIF_PR_FMT " tdls channel switch to" 2476 CHANDEF_PR_FMT " oper_class:%d " STA_PR_FMT, 2477 LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->oper_class, 2478 STA_PR_ARG 2479 ) 2480 ); 2481 2482 TRACE_EVENT(drv_tdls_cancel_channel_switch, 2483 TP_PROTO(struct ieee80211_local *local, 2484 struct ieee80211_sub_if_data *sdata, 2485 struct ieee80211_sta *sta), 2486 2487 TP_ARGS(local, sdata, sta), 2488 2489 TP_STRUCT__entry( 2490 LOCAL_ENTRY 2491 VIF_ENTRY 2492 STA_ENTRY 2493 ), 2494 2495 TP_fast_assign( 2496 LOCAL_ASSIGN; 2497 VIF_ASSIGN; 2498 STA_ASSIGN; 2499 ), 2500 2501 TP_printk( 2502 LOCAL_PR_FMT VIF_PR_FMT 2503 " tdls cancel channel switch with " STA_PR_FMT, 2504 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG 2505 ) 2506 ); 2507 2508 TRACE_EVENT(drv_tdls_recv_channel_switch, 2509 TP_PROTO(struct ieee80211_local *local, 2510 struct ieee80211_sub_if_data *sdata, 2511 struct ieee80211_tdls_ch_sw_params *params), 2512 2513 TP_ARGS(local, sdata, params), 2514 2515 TP_STRUCT__entry( 2516 LOCAL_ENTRY 2517 VIF_ENTRY 2518 __field(u8, action_code) 2519 STA_ENTRY 2520 CHANDEF_ENTRY 2521 __field(u32, status) 2522 __field(bool, peer_initiator) 2523 __field(u32, timestamp) 2524 __field(u16, switch_time) 2525 __field(u16, switch_timeout) 2526 ), 2527 2528 TP_fast_assign( 2529 LOCAL_ASSIGN; 2530 VIF_ASSIGN; 2531 STA_NAMED_ASSIGN(params->sta); 2532 CHANDEF_ASSIGN(params->chandef) 2533 __entry->peer_initiator = params->sta->tdls_initiator; 2534 __entry->action_code = params->action_code; 2535 __entry->status = params->status; 2536 __entry->timestamp = params->timestamp; 2537 __entry->switch_time = params->switch_time; 2538 __entry->switch_timeout = params->switch_timeout; 2539 ), 2540 2541 TP_printk( 2542 LOCAL_PR_FMT VIF_PR_FMT " received tdls channel switch packet" 2543 " action:%d status:%d time:%d switch time:%d switch" 2544 " timeout:%d initiator: %d chan:" CHANDEF_PR_FMT STA_PR_FMT, 2545 LOCAL_PR_ARG, VIF_PR_ARG, __entry->action_code, __entry->status, 2546 __entry->timestamp, __entry->switch_time, 2547 __entry->switch_timeout, __entry->peer_initiator, 2548 CHANDEF_PR_ARG, STA_PR_ARG 2549 ) 2550 ); 2551 2552 TRACE_EVENT(drv_wake_tx_queue, 2553 TP_PROTO(struct ieee80211_local *local, 2554 struct ieee80211_sub_if_data *sdata, 2555 struct txq_info *txq), 2556 2557 TP_ARGS(local, sdata, txq), 2558 2559 TP_STRUCT__entry( 2560 LOCAL_ENTRY 2561 VIF_ENTRY 2562 STA_ENTRY 2563 __field(u8, ac) 2564 __field(u8, tid) 2565 ), 2566 2567 TP_fast_assign( 2568 struct ieee80211_sta *sta = txq->txq.sta; 2569 2570 LOCAL_ASSIGN; 2571 VIF_ASSIGN; 2572 STA_ASSIGN; 2573 __entry->ac = txq->txq.ac; 2574 __entry->tid = txq->txq.tid; 2575 ), 2576 2577 TP_printk( 2578 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ac:%d tid:%d", 2579 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ac, __entry->tid 2580 ) 2581 ); 2582 2583 #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ 2584 2585 #undef TRACE_INCLUDE_PATH 2586 #define TRACE_INCLUDE_PATH . 2587 #undef TRACE_INCLUDE_FILE 2588 #define TRACE_INCLUDE_FILE trace 2589 #include <trace/define_trace.h> 2590