Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 1 | #if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ) |
| 2 | #define __MAC80211_DRIVER_TRACE |
| 3 | |
| 4 | #include <linux/tracepoint.h> |
| 5 | #include <net/mac80211.h> |
| 6 | #include "ieee80211_i.h" |
| 7 | |
Christian Lamparter | f742880 | 2009-07-19 23:21:07 +0200 | [diff] [blame] | 8 | #if !defined(CONFIG_MAC80211_DRIVER_API_TRACER) || defined(__CHECKER__) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 9 | #undef TRACE_EVENT |
| 10 | #define TRACE_EVENT(name, proto, ...) \ |
| 11 | static inline void trace_ ## name(proto) {} |
| 12 | #endif |
| 13 | |
| 14 | #undef TRACE_SYSTEM |
| 15 | #define TRACE_SYSTEM mac80211 |
| 16 | |
| 17 | #define MAXNAME 32 |
| 18 | #define LOCAL_ENTRY __array(char, wiphy_name, 32) |
| 19 | #define LOCAL_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME) |
| 20 | #define LOCAL_PR_FMT "%s" |
| 21 | #define LOCAL_PR_ARG __entry->wiphy_name |
| 22 | |
| 23 | #define STA_ENTRY __array(char, sta_addr, ETH_ALEN) |
| 24 | #define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN)) |
| 25 | #define STA_PR_FMT " sta:%pM" |
| 26 | #define STA_PR_ARG __entry->sta_addr |
| 27 | |
| 28 | #define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, vif) |
| 29 | #define VIF_ASSIGN __entry->vif_type = vif ? vif->type : 0; __entry->vif = vif |
| 30 | #define VIF_PR_FMT " vif:%p(%d)" |
| 31 | #define VIF_PR_ARG __entry->vif, __entry->vif_type |
| 32 | |
| 33 | TRACE_EVENT(drv_start, |
| 34 | TP_PROTO(struct ieee80211_local *local, int ret), |
| 35 | |
| 36 | TP_ARGS(local, ret), |
| 37 | |
| 38 | TP_STRUCT__entry( |
| 39 | LOCAL_ENTRY |
| 40 | __field(int, ret) |
| 41 | ), |
| 42 | |
| 43 | TP_fast_assign( |
| 44 | LOCAL_ASSIGN; |
| 45 | __entry->ret = ret; |
| 46 | ), |
| 47 | |
| 48 | TP_printk( |
| 49 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 50 | ) |
| 51 | ); |
| 52 | |
| 53 | TRACE_EVENT(drv_stop, |
| 54 | TP_PROTO(struct ieee80211_local *local), |
| 55 | |
| 56 | TP_ARGS(local), |
| 57 | |
| 58 | TP_STRUCT__entry( |
| 59 | LOCAL_ENTRY |
| 60 | ), |
| 61 | |
| 62 | TP_fast_assign( |
| 63 | LOCAL_ASSIGN; |
| 64 | ), |
| 65 | |
| 66 | TP_printk( |
| 67 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 68 | ) |
| 69 | ); |
| 70 | |
| 71 | TRACE_EVENT(drv_add_interface, |
| 72 | TP_PROTO(struct ieee80211_local *local, |
| 73 | const u8 *addr, |
| 74 | struct ieee80211_vif *vif, |
| 75 | int ret), |
| 76 | |
| 77 | TP_ARGS(local, addr, vif, ret), |
| 78 | |
| 79 | TP_STRUCT__entry( |
| 80 | LOCAL_ENTRY |
| 81 | VIF_ENTRY |
| 82 | __array(char, addr, 6) |
| 83 | __field(int, ret) |
| 84 | ), |
| 85 | |
| 86 | TP_fast_assign( |
| 87 | LOCAL_ASSIGN; |
| 88 | VIF_ASSIGN; |
| 89 | memcpy(__entry->addr, addr, 6); |
| 90 | __entry->ret = ret; |
| 91 | ), |
| 92 | |
| 93 | TP_printk( |
| 94 | LOCAL_PR_FMT VIF_PR_FMT " addr:%pM ret:%d", |
| 95 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr, __entry->ret |
| 96 | ) |
| 97 | ); |
| 98 | |
| 99 | TRACE_EVENT(drv_remove_interface, |
| 100 | TP_PROTO(struct ieee80211_local *local, |
| 101 | const u8 *addr, struct ieee80211_vif *vif), |
| 102 | |
| 103 | TP_ARGS(local, addr, vif), |
| 104 | |
| 105 | TP_STRUCT__entry( |
| 106 | LOCAL_ENTRY |
| 107 | VIF_ENTRY |
| 108 | __array(char, addr, 6) |
| 109 | ), |
| 110 | |
| 111 | TP_fast_assign( |
| 112 | LOCAL_ASSIGN; |
| 113 | VIF_ASSIGN; |
| 114 | memcpy(__entry->addr, addr, 6); |
| 115 | ), |
| 116 | |
| 117 | TP_printk( |
| 118 | LOCAL_PR_FMT VIF_PR_FMT " addr:%pM", |
| 119 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr |
| 120 | ) |
| 121 | ); |
| 122 | |
| 123 | TRACE_EVENT(drv_config, |
| 124 | TP_PROTO(struct ieee80211_local *local, |
| 125 | u32 changed, |
| 126 | int ret), |
| 127 | |
| 128 | TP_ARGS(local, changed, ret), |
| 129 | |
| 130 | TP_STRUCT__entry( |
| 131 | LOCAL_ENTRY |
| 132 | __field(u32, changed) |
| 133 | __field(int, ret) |
| 134 | ), |
| 135 | |
| 136 | TP_fast_assign( |
| 137 | LOCAL_ASSIGN; |
| 138 | __entry->changed = changed; |
| 139 | __entry->ret = ret; |
| 140 | ), |
| 141 | |
| 142 | TP_printk( |
| 143 | LOCAL_PR_FMT " ch:%#x ret:%d", |
| 144 | LOCAL_PR_ARG, __entry->changed, __entry->ret |
| 145 | ) |
| 146 | ); |
| 147 | |
| 148 | TRACE_EVENT(drv_bss_info_changed, |
| 149 | TP_PROTO(struct ieee80211_local *local, |
| 150 | struct ieee80211_vif *vif, |
| 151 | struct ieee80211_bss_conf *info, |
| 152 | u32 changed), |
| 153 | |
| 154 | TP_ARGS(local, vif, info, changed), |
| 155 | |
| 156 | TP_STRUCT__entry( |
| 157 | LOCAL_ENTRY |
| 158 | VIF_ENTRY |
| 159 | __field(bool, assoc) |
| 160 | __field(u16, aid) |
| 161 | __field(bool, cts) |
| 162 | __field(bool, shortpre) |
| 163 | __field(bool, shortslot) |
| 164 | __field(u8, dtimper) |
| 165 | __field(u16, bcnint) |
| 166 | __field(u16, assoc_cap) |
| 167 | __field(u64, timestamp) |
| 168 | __field(u32, basic_rates) |
| 169 | __field(u32, changed) |
| 170 | ), |
| 171 | |
| 172 | TP_fast_assign( |
| 173 | LOCAL_ASSIGN; |
| 174 | VIF_ASSIGN; |
| 175 | __entry->changed = changed; |
| 176 | __entry->aid = info->aid; |
| 177 | __entry->assoc = info->assoc; |
| 178 | __entry->shortpre = info->use_short_preamble; |
| 179 | __entry->cts = info->use_cts_prot; |
| 180 | __entry->shortslot = info->use_short_slot; |
| 181 | __entry->dtimper = info->dtim_period; |
| 182 | __entry->bcnint = info->beacon_int; |
| 183 | __entry->assoc_cap = info->assoc_capability; |
| 184 | __entry->timestamp = info->timestamp; |
| 185 | __entry->basic_rates = info->basic_rates; |
| 186 | ), |
| 187 | |
| 188 | TP_printk( |
| 189 | LOCAL_PR_FMT VIF_PR_FMT " changed:%#x", |
| 190 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed |
| 191 | ) |
| 192 | ); |
| 193 | |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 194 | TRACE_EVENT(drv_prepare_multicast, |
| 195 | TP_PROTO(struct ieee80211_local *local, int mc_count, u64 ret), |
| 196 | |
| 197 | TP_ARGS(local, mc_count, ret), |
| 198 | |
| 199 | TP_STRUCT__entry( |
| 200 | LOCAL_ENTRY |
| 201 | __field(int, mc_count) |
| 202 | __field(u64, ret) |
| 203 | ), |
| 204 | |
| 205 | TP_fast_assign( |
| 206 | LOCAL_ASSIGN; |
| 207 | __entry->mc_count = mc_count; |
| 208 | __entry->ret = ret; |
| 209 | ), |
| 210 | |
| 211 | TP_printk( |
| 212 | LOCAL_PR_FMT " prepare mc (%d): %llx", |
| 213 | LOCAL_PR_ARG, __entry->mc_count, |
| 214 | (unsigned long long) __entry->ret |
| 215 | ) |
| 216 | ); |
| 217 | |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 218 | TRACE_EVENT(drv_configure_filter, |
| 219 | TP_PROTO(struct ieee80211_local *local, |
| 220 | unsigned int changed_flags, |
| 221 | unsigned int *total_flags, |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 222 | u64 multicast), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 223 | |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 224 | TP_ARGS(local, changed_flags, total_flags, multicast), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 225 | |
| 226 | TP_STRUCT__entry( |
| 227 | LOCAL_ENTRY |
| 228 | __field(unsigned int, changed) |
| 229 | __field(unsigned int, total) |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 230 | __field(u64, multicast) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 231 | ), |
| 232 | |
| 233 | TP_fast_assign( |
| 234 | LOCAL_ASSIGN; |
| 235 | __entry->changed = changed_flags; |
| 236 | __entry->total = *total_flags; |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 237 | __entry->multicast = multicast; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 238 | ), |
| 239 | |
| 240 | TP_printk( |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 241 | LOCAL_PR_FMT " changed:%#x total:%#x", |
| 242 | LOCAL_PR_ARG, __entry->changed, __entry->total |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 243 | ) |
| 244 | ); |
| 245 | |
| 246 | TRACE_EVENT(drv_set_tim, |
| 247 | TP_PROTO(struct ieee80211_local *local, |
| 248 | struct ieee80211_sta *sta, bool set, int ret), |
| 249 | |
| 250 | TP_ARGS(local, sta, set, ret), |
| 251 | |
| 252 | TP_STRUCT__entry( |
| 253 | LOCAL_ENTRY |
| 254 | STA_ENTRY |
| 255 | __field(bool, set) |
| 256 | __field(int, ret) |
| 257 | ), |
| 258 | |
| 259 | TP_fast_assign( |
| 260 | LOCAL_ASSIGN; |
| 261 | STA_ASSIGN; |
| 262 | __entry->set = set; |
| 263 | __entry->ret = ret; |
| 264 | ), |
| 265 | |
| 266 | TP_printk( |
| 267 | LOCAL_PR_FMT STA_PR_FMT " set:%d ret:%d", |
| 268 | LOCAL_PR_ARG, STA_PR_FMT, __entry->set, __entry->ret |
| 269 | ) |
| 270 | ); |
| 271 | |
| 272 | TRACE_EVENT(drv_set_key, |
| 273 | TP_PROTO(struct ieee80211_local *local, |
| 274 | enum set_key_cmd cmd, struct ieee80211_vif *vif, |
| 275 | struct ieee80211_sta *sta, |
| 276 | struct ieee80211_key_conf *key, int ret), |
| 277 | |
| 278 | TP_ARGS(local, cmd, vif, sta, key, ret), |
| 279 | |
| 280 | TP_STRUCT__entry( |
| 281 | LOCAL_ENTRY |
| 282 | VIF_ENTRY |
| 283 | STA_ENTRY |
| 284 | __field(enum ieee80211_key_alg, alg) |
| 285 | __field(u8, hw_key_idx) |
| 286 | __field(u8, flags) |
| 287 | __field(s8, keyidx) |
| 288 | __field(int, ret) |
| 289 | ), |
| 290 | |
| 291 | TP_fast_assign( |
| 292 | LOCAL_ASSIGN; |
| 293 | VIF_ASSIGN; |
| 294 | STA_ASSIGN; |
| 295 | __entry->alg = key->alg; |
| 296 | __entry->flags = key->flags; |
| 297 | __entry->keyidx = key->keyidx; |
| 298 | __entry->hw_key_idx = key->hw_key_idx; |
| 299 | __entry->ret = ret; |
| 300 | ), |
| 301 | |
| 302 | TP_printk( |
| 303 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ret:%d", |
| 304 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ret |
| 305 | ) |
| 306 | ); |
| 307 | |
| 308 | TRACE_EVENT(drv_update_tkip_key, |
| 309 | TP_PROTO(struct ieee80211_local *local, |
| 310 | struct ieee80211_key_conf *conf, |
| 311 | const u8 *address, u32 iv32), |
| 312 | |
| 313 | TP_ARGS(local, conf, address, iv32), |
| 314 | |
| 315 | TP_STRUCT__entry( |
| 316 | LOCAL_ENTRY |
| 317 | __array(u8, addr, 6) |
| 318 | __field(u32, iv32) |
| 319 | ), |
| 320 | |
| 321 | TP_fast_assign( |
| 322 | LOCAL_ASSIGN; |
| 323 | memcpy(__entry->addr, address, 6); |
| 324 | __entry->iv32 = iv32; |
| 325 | ), |
| 326 | |
| 327 | TP_printk( |
| 328 | LOCAL_PR_FMT " addr:%pM iv32:%#x", |
| 329 | LOCAL_PR_ARG, __entry->addr, __entry->iv32 |
| 330 | ) |
| 331 | ); |
| 332 | |
| 333 | TRACE_EVENT(drv_hw_scan, |
| 334 | TP_PROTO(struct ieee80211_local *local, |
| 335 | struct cfg80211_scan_request *req, int ret), |
| 336 | |
| 337 | TP_ARGS(local, req, ret), |
| 338 | |
| 339 | TP_STRUCT__entry( |
| 340 | LOCAL_ENTRY |
| 341 | __field(int, ret) |
| 342 | ), |
| 343 | |
| 344 | TP_fast_assign( |
| 345 | LOCAL_ASSIGN; |
| 346 | __entry->ret = ret; |
| 347 | ), |
| 348 | |
| 349 | TP_printk( |
| 350 | LOCAL_PR_FMT " ret:%d", |
| 351 | LOCAL_PR_ARG, __entry->ret |
| 352 | ) |
| 353 | ); |
| 354 | |
| 355 | TRACE_EVENT(drv_sw_scan_start, |
| 356 | TP_PROTO(struct ieee80211_local *local), |
| 357 | |
| 358 | TP_ARGS(local), |
| 359 | |
| 360 | TP_STRUCT__entry( |
| 361 | LOCAL_ENTRY |
| 362 | ), |
| 363 | |
| 364 | TP_fast_assign( |
| 365 | LOCAL_ASSIGN; |
| 366 | ), |
| 367 | |
| 368 | TP_printk( |
| 369 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 370 | ) |
| 371 | ); |
| 372 | |
| 373 | TRACE_EVENT(drv_sw_scan_complete, |
| 374 | TP_PROTO(struct ieee80211_local *local), |
| 375 | |
| 376 | TP_ARGS(local), |
| 377 | |
| 378 | TP_STRUCT__entry( |
| 379 | LOCAL_ENTRY |
| 380 | ), |
| 381 | |
| 382 | TP_fast_assign( |
| 383 | LOCAL_ASSIGN; |
| 384 | ), |
| 385 | |
| 386 | TP_printk( |
| 387 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 388 | ) |
| 389 | ); |
| 390 | |
| 391 | TRACE_EVENT(drv_get_stats, |
| 392 | TP_PROTO(struct ieee80211_local *local, |
| 393 | struct ieee80211_low_level_stats *stats, |
| 394 | int ret), |
| 395 | |
| 396 | TP_ARGS(local, stats, ret), |
| 397 | |
| 398 | TP_STRUCT__entry( |
| 399 | LOCAL_ENTRY |
| 400 | __field(int, ret) |
| 401 | __field(unsigned int, ackfail) |
| 402 | __field(unsigned int, rtsfail) |
| 403 | __field(unsigned int, fcserr) |
| 404 | __field(unsigned int, rtssucc) |
| 405 | ), |
| 406 | |
| 407 | TP_fast_assign( |
| 408 | LOCAL_ASSIGN; |
| 409 | __entry->ret = ret; |
| 410 | __entry->ackfail = stats->dot11ACKFailureCount; |
| 411 | __entry->rtsfail = stats->dot11RTSFailureCount; |
| 412 | __entry->fcserr = stats->dot11FCSErrorCount; |
| 413 | __entry->rtssucc = stats->dot11RTSSuccessCount; |
| 414 | ), |
| 415 | |
| 416 | TP_printk( |
| 417 | LOCAL_PR_FMT " ret:%d", |
| 418 | LOCAL_PR_ARG, __entry->ret |
| 419 | ) |
| 420 | ); |
| 421 | |
| 422 | TRACE_EVENT(drv_get_tkip_seq, |
| 423 | TP_PROTO(struct ieee80211_local *local, |
| 424 | u8 hw_key_idx, u32 *iv32, u16 *iv16), |
| 425 | |
| 426 | TP_ARGS(local, hw_key_idx, iv32, iv16), |
| 427 | |
| 428 | TP_STRUCT__entry( |
| 429 | LOCAL_ENTRY |
| 430 | __field(u8, hw_key_idx) |
| 431 | __field(u32, iv32) |
| 432 | __field(u16, iv16) |
| 433 | ), |
| 434 | |
| 435 | TP_fast_assign( |
| 436 | LOCAL_ASSIGN; |
| 437 | __entry->hw_key_idx = hw_key_idx; |
| 438 | __entry->iv32 = *iv32; |
| 439 | __entry->iv16 = *iv16; |
| 440 | ), |
| 441 | |
| 442 | TP_printk( |
| 443 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 444 | ) |
| 445 | ); |
| 446 | |
| 447 | TRACE_EVENT(drv_set_rts_threshold, |
| 448 | TP_PROTO(struct ieee80211_local *local, u32 value, int ret), |
| 449 | |
| 450 | TP_ARGS(local, value, ret), |
| 451 | |
| 452 | TP_STRUCT__entry( |
| 453 | LOCAL_ENTRY |
| 454 | __field(u32, value) |
| 455 | __field(int, ret) |
| 456 | ), |
| 457 | |
| 458 | TP_fast_assign( |
| 459 | LOCAL_ASSIGN; |
| 460 | __entry->ret = ret; |
| 461 | __entry->value = value; |
| 462 | ), |
| 463 | |
| 464 | TP_printk( |
| 465 | LOCAL_PR_FMT " value:%d ret:%d", |
| 466 | LOCAL_PR_ARG, __entry->value, __entry->ret |
| 467 | ) |
| 468 | ); |
| 469 | |
| 470 | TRACE_EVENT(drv_sta_notify, |
| 471 | TP_PROTO(struct ieee80211_local *local, |
| 472 | struct ieee80211_vif *vif, |
| 473 | enum sta_notify_cmd cmd, |
| 474 | struct ieee80211_sta *sta), |
| 475 | |
| 476 | TP_ARGS(local, vif, cmd, sta), |
| 477 | |
| 478 | TP_STRUCT__entry( |
| 479 | LOCAL_ENTRY |
| 480 | VIF_ENTRY |
| 481 | STA_ENTRY |
| 482 | __field(u32, cmd) |
| 483 | ), |
| 484 | |
| 485 | TP_fast_assign( |
| 486 | LOCAL_ASSIGN; |
| 487 | VIF_ASSIGN; |
| 488 | STA_ASSIGN; |
| 489 | __entry->cmd = cmd; |
| 490 | ), |
| 491 | |
| 492 | TP_printk( |
| 493 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d", |
| 494 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd |
| 495 | ) |
| 496 | ); |
| 497 | |
| 498 | TRACE_EVENT(drv_conf_tx, |
| 499 | TP_PROTO(struct ieee80211_local *local, u16 queue, |
| 500 | const struct ieee80211_tx_queue_params *params, |
| 501 | int ret), |
| 502 | |
| 503 | TP_ARGS(local, queue, params, ret), |
| 504 | |
| 505 | TP_STRUCT__entry( |
| 506 | LOCAL_ENTRY |
| 507 | __field(u16, queue) |
| 508 | __field(u16, txop) |
| 509 | __field(u16, cw_min) |
| 510 | __field(u16, cw_max) |
| 511 | __field(u8, aifs) |
| 512 | __field(int, ret) |
| 513 | ), |
| 514 | |
| 515 | TP_fast_assign( |
| 516 | LOCAL_ASSIGN; |
| 517 | __entry->queue = queue; |
| 518 | __entry->ret = ret; |
| 519 | __entry->txop = params->txop; |
| 520 | __entry->cw_max = params->cw_max; |
| 521 | __entry->cw_min = params->cw_min; |
| 522 | __entry->aifs = params->aifs; |
| 523 | ), |
| 524 | |
| 525 | TP_printk( |
| 526 | LOCAL_PR_FMT " queue:%d ret:%d", |
| 527 | LOCAL_PR_ARG, __entry->queue, __entry->ret |
| 528 | ) |
| 529 | ); |
| 530 | |
| 531 | TRACE_EVENT(drv_get_tx_stats, |
| 532 | TP_PROTO(struct ieee80211_local *local, |
| 533 | struct ieee80211_tx_queue_stats *stats, |
| 534 | int ret), |
| 535 | |
| 536 | TP_ARGS(local, stats, ret), |
| 537 | |
| 538 | TP_STRUCT__entry( |
| 539 | LOCAL_ENTRY |
| 540 | __field(int, ret) |
| 541 | ), |
| 542 | |
| 543 | TP_fast_assign( |
| 544 | LOCAL_ASSIGN; |
| 545 | __entry->ret = ret; |
| 546 | ), |
| 547 | |
| 548 | TP_printk( |
| 549 | LOCAL_PR_FMT " ret:%d", |
| 550 | LOCAL_PR_ARG, __entry->ret |
| 551 | ) |
| 552 | ); |
| 553 | |
| 554 | TRACE_EVENT(drv_get_tsf, |
| 555 | TP_PROTO(struct ieee80211_local *local, u64 ret), |
| 556 | |
| 557 | TP_ARGS(local, ret), |
| 558 | |
| 559 | TP_STRUCT__entry( |
| 560 | LOCAL_ENTRY |
| 561 | __field(u64, ret) |
| 562 | ), |
| 563 | |
| 564 | TP_fast_assign( |
| 565 | LOCAL_ASSIGN; |
| 566 | __entry->ret = ret; |
| 567 | ), |
| 568 | |
| 569 | TP_printk( |
| 570 | LOCAL_PR_FMT " ret:%llu", |
| 571 | LOCAL_PR_ARG, (unsigned long long)__entry->ret |
| 572 | ) |
| 573 | ); |
| 574 | |
| 575 | TRACE_EVENT(drv_set_tsf, |
| 576 | TP_PROTO(struct ieee80211_local *local, u64 tsf), |
| 577 | |
| 578 | TP_ARGS(local, tsf), |
| 579 | |
| 580 | TP_STRUCT__entry( |
| 581 | LOCAL_ENTRY |
| 582 | __field(u64, tsf) |
| 583 | ), |
| 584 | |
| 585 | TP_fast_assign( |
| 586 | LOCAL_ASSIGN; |
| 587 | __entry->tsf = tsf; |
| 588 | ), |
| 589 | |
| 590 | TP_printk( |
| 591 | LOCAL_PR_FMT " tsf:%llu", |
| 592 | LOCAL_PR_ARG, (unsigned long long)__entry->tsf |
| 593 | ) |
| 594 | ); |
| 595 | |
| 596 | TRACE_EVENT(drv_reset_tsf, |
| 597 | TP_PROTO(struct ieee80211_local *local), |
| 598 | |
| 599 | TP_ARGS(local), |
| 600 | |
| 601 | TP_STRUCT__entry( |
| 602 | LOCAL_ENTRY |
| 603 | ), |
| 604 | |
| 605 | TP_fast_assign( |
| 606 | LOCAL_ASSIGN; |
| 607 | ), |
| 608 | |
| 609 | TP_printk( |
| 610 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 611 | ) |
| 612 | ); |
| 613 | |
| 614 | TRACE_EVENT(drv_tx_last_beacon, |
| 615 | TP_PROTO(struct ieee80211_local *local, int ret), |
| 616 | |
| 617 | TP_ARGS(local, ret), |
| 618 | |
| 619 | TP_STRUCT__entry( |
| 620 | LOCAL_ENTRY |
| 621 | __field(int, ret) |
| 622 | ), |
| 623 | |
| 624 | TP_fast_assign( |
| 625 | LOCAL_ASSIGN; |
| 626 | __entry->ret = ret; |
| 627 | ), |
| 628 | |
| 629 | TP_printk( |
| 630 | LOCAL_PR_FMT " ret:%d", |
| 631 | LOCAL_PR_ARG, __entry->ret |
| 632 | ) |
| 633 | ); |
| 634 | |
| 635 | TRACE_EVENT(drv_ampdu_action, |
| 636 | TP_PROTO(struct ieee80211_local *local, |
| 637 | enum ieee80211_ampdu_mlme_action action, |
| 638 | struct ieee80211_sta *sta, u16 tid, |
| 639 | u16 *ssn, int ret), |
| 640 | |
| 641 | TP_ARGS(local, action, sta, tid, ssn, ret), |
| 642 | |
| 643 | TP_STRUCT__entry( |
| 644 | LOCAL_ENTRY |
| 645 | STA_ENTRY |
| 646 | __field(u32, action) |
| 647 | __field(u16, tid) |
| 648 | __field(u16, ssn) |
| 649 | __field(int, ret) |
| 650 | ), |
| 651 | |
| 652 | TP_fast_assign( |
| 653 | LOCAL_ASSIGN; |
| 654 | STA_ASSIGN; |
| 655 | __entry->ret = ret; |
| 656 | __entry->action = action; |
| 657 | __entry->tid = tid; |
| 658 | __entry->ssn = *ssn; |
| 659 | ), |
| 660 | |
| 661 | TP_printk( |
| 662 | LOCAL_PR_FMT STA_PR_FMT " action:%d tid:%d ret:%d", |
| 663 | LOCAL_PR_ARG, STA_PR_ARG, __entry->action, __entry->tid, __entry->ret |
| 664 | ) |
| 665 | ); |
Christian Lamparter | f742880 | 2009-07-19 23:21:07 +0200 | [diff] [blame] | 666 | #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 667 | |
| 668 | #undef TRACE_INCLUDE_PATH |
| 669 | #define TRACE_INCLUDE_PATH . |
| 670 | #undef TRACE_INCLUDE_FILE |
| 671 | #define TRACE_INCLUDE_FILE driver-trace |
| 672 | #include <trace/define_trace.h> |