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