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