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