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) |
Johannes Berg | f911ab8 | 2009-11-25 19:07:20 +0100 | [diff] [blame] | 134 | __field(u32, flags) |
| 135 | __field(int, power_level) |
| 136 | __field(int, dynamic_ps_timeout) |
| 137 | __field(int, max_sleep_period) |
| 138 | __field(u16, listen_interval) |
| 139 | __field(u8, long_frame_max_tx_count) |
| 140 | __field(u8, short_frame_max_tx_count) |
| 141 | __field(int, center_freq) |
| 142 | __field(int, channel_type) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 143 | ), |
| 144 | |
| 145 | TP_fast_assign( |
| 146 | LOCAL_ASSIGN; |
| 147 | __entry->changed = changed; |
| 148 | __entry->ret = ret; |
Johannes Berg | f911ab8 | 2009-11-25 19:07:20 +0100 | [diff] [blame] | 149 | __entry->flags = local->hw.conf.flags; |
| 150 | __entry->power_level = local->hw.conf.power_level; |
| 151 | __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout; |
| 152 | __entry->max_sleep_period = local->hw.conf.max_sleep_period; |
| 153 | __entry->listen_interval = local->hw.conf.listen_interval; |
| 154 | __entry->long_frame_max_tx_count = local->hw.conf.long_frame_max_tx_count; |
| 155 | __entry->short_frame_max_tx_count = local->hw.conf.short_frame_max_tx_count; |
| 156 | __entry->center_freq = local->hw.conf.channel->center_freq; |
| 157 | __entry->channel_type = local->hw.conf.channel_type; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 158 | ), |
| 159 | |
| 160 | TP_printk( |
Johannes Berg | f911ab8 | 2009-11-25 19:07:20 +0100 | [diff] [blame] | 161 | LOCAL_PR_FMT " ch:%#x freq:%d ret:%d", |
| 162 | LOCAL_PR_ARG, __entry->changed, __entry->center_freq, __entry->ret |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 163 | ) |
| 164 | ); |
| 165 | |
| 166 | TRACE_EVENT(drv_bss_info_changed, |
| 167 | TP_PROTO(struct ieee80211_local *local, |
| 168 | struct ieee80211_vif *vif, |
| 169 | struct ieee80211_bss_conf *info, |
| 170 | u32 changed), |
| 171 | |
| 172 | TP_ARGS(local, vif, info, changed), |
| 173 | |
| 174 | TP_STRUCT__entry( |
| 175 | LOCAL_ENTRY |
| 176 | VIF_ENTRY |
| 177 | __field(bool, assoc) |
| 178 | __field(u16, aid) |
| 179 | __field(bool, cts) |
| 180 | __field(bool, shortpre) |
| 181 | __field(bool, shortslot) |
| 182 | __field(u8, dtimper) |
| 183 | __field(u16, bcnint) |
| 184 | __field(u16, assoc_cap) |
| 185 | __field(u64, timestamp) |
| 186 | __field(u32, basic_rates) |
| 187 | __field(u32, changed) |
Johannes Berg | f911ab8 | 2009-11-25 19:07:20 +0100 | [diff] [blame] | 188 | __field(bool, enable_beacon) |
| 189 | __field(u16, ht_operation_mode) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 190 | ), |
| 191 | |
| 192 | TP_fast_assign( |
| 193 | LOCAL_ASSIGN; |
| 194 | VIF_ASSIGN; |
| 195 | __entry->changed = changed; |
| 196 | __entry->aid = info->aid; |
| 197 | __entry->assoc = info->assoc; |
| 198 | __entry->shortpre = info->use_short_preamble; |
| 199 | __entry->cts = info->use_cts_prot; |
| 200 | __entry->shortslot = info->use_short_slot; |
| 201 | __entry->dtimper = info->dtim_period; |
| 202 | __entry->bcnint = info->beacon_int; |
| 203 | __entry->assoc_cap = info->assoc_capability; |
| 204 | __entry->timestamp = info->timestamp; |
| 205 | __entry->basic_rates = info->basic_rates; |
Johannes Berg | f911ab8 | 2009-11-25 19:07:20 +0100 | [diff] [blame] | 206 | __entry->enable_beacon = info->enable_beacon; |
| 207 | __entry->ht_operation_mode = info->ht_operation_mode; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 208 | ), |
| 209 | |
| 210 | TP_printk( |
| 211 | LOCAL_PR_FMT VIF_PR_FMT " changed:%#x", |
| 212 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed |
| 213 | ) |
| 214 | ); |
| 215 | |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 216 | TRACE_EVENT(drv_prepare_multicast, |
| 217 | TP_PROTO(struct ieee80211_local *local, int mc_count, u64 ret), |
| 218 | |
| 219 | TP_ARGS(local, mc_count, ret), |
| 220 | |
| 221 | TP_STRUCT__entry( |
| 222 | LOCAL_ENTRY |
| 223 | __field(int, mc_count) |
| 224 | __field(u64, ret) |
| 225 | ), |
| 226 | |
| 227 | TP_fast_assign( |
| 228 | LOCAL_ASSIGN; |
| 229 | __entry->mc_count = mc_count; |
| 230 | __entry->ret = ret; |
| 231 | ), |
| 232 | |
| 233 | TP_printk( |
| 234 | LOCAL_PR_FMT " prepare mc (%d): %llx", |
| 235 | LOCAL_PR_ARG, __entry->mc_count, |
| 236 | (unsigned long long) __entry->ret |
| 237 | ) |
| 238 | ); |
| 239 | |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 240 | TRACE_EVENT(drv_configure_filter, |
| 241 | TP_PROTO(struct ieee80211_local *local, |
| 242 | unsigned int changed_flags, |
| 243 | unsigned int *total_flags, |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 244 | u64 multicast), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 245 | |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 246 | TP_ARGS(local, changed_flags, total_flags, multicast), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 247 | |
| 248 | TP_STRUCT__entry( |
| 249 | LOCAL_ENTRY |
| 250 | __field(unsigned int, changed) |
| 251 | __field(unsigned int, total) |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 252 | __field(u64, multicast) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 253 | ), |
| 254 | |
| 255 | TP_fast_assign( |
| 256 | LOCAL_ASSIGN; |
| 257 | __entry->changed = changed_flags; |
| 258 | __entry->total = *total_flags; |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 259 | __entry->multicast = multicast; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 260 | ), |
| 261 | |
| 262 | TP_printk( |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 263 | LOCAL_PR_FMT " changed:%#x total:%#x", |
| 264 | LOCAL_PR_ARG, __entry->changed, __entry->total |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 265 | ) |
| 266 | ); |
| 267 | |
| 268 | TRACE_EVENT(drv_set_tim, |
| 269 | TP_PROTO(struct ieee80211_local *local, |
| 270 | struct ieee80211_sta *sta, bool set, int ret), |
| 271 | |
| 272 | TP_ARGS(local, sta, set, ret), |
| 273 | |
| 274 | TP_STRUCT__entry( |
| 275 | LOCAL_ENTRY |
| 276 | STA_ENTRY |
| 277 | __field(bool, set) |
| 278 | __field(int, ret) |
| 279 | ), |
| 280 | |
| 281 | TP_fast_assign( |
| 282 | LOCAL_ASSIGN; |
| 283 | STA_ASSIGN; |
| 284 | __entry->set = set; |
| 285 | __entry->ret = ret; |
| 286 | ), |
| 287 | |
| 288 | TP_printk( |
| 289 | LOCAL_PR_FMT STA_PR_FMT " set:%d ret:%d", |
| 290 | LOCAL_PR_ARG, STA_PR_FMT, __entry->set, __entry->ret |
| 291 | ) |
| 292 | ); |
| 293 | |
| 294 | TRACE_EVENT(drv_set_key, |
| 295 | TP_PROTO(struct ieee80211_local *local, |
| 296 | enum set_key_cmd cmd, struct ieee80211_vif *vif, |
| 297 | struct ieee80211_sta *sta, |
| 298 | struct ieee80211_key_conf *key, int ret), |
| 299 | |
| 300 | TP_ARGS(local, cmd, vif, sta, key, ret), |
| 301 | |
| 302 | TP_STRUCT__entry( |
| 303 | LOCAL_ENTRY |
| 304 | VIF_ENTRY |
| 305 | STA_ENTRY |
| 306 | __field(enum ieee80211_key_alg, alg) |
| 307 | __field(u8, hw_key_idx) |
| 308 | __field(u8, flags) |
| 309 | __field(s8, keyidx) |
| 310 | __field(int, ret) |
| 311 | ), |
| 312 | |
| 313 | TP_fast_assign( |
| 314 | LOCAL_ASSIGN; |
| 315 | VIF_ASSIGN; |
| 316 | STA_ASSIGN; |
| 317 | __entry->alg = key->alg; |
| 318 | __entry->flags = key->flags; |
| 319 | __entry->keyidx = key->keyidx; |
| 320 | __entry->hw_key_idx = key->hw_key_idx; |
| 321 | __entry->ret = ret; |
| 322 | ), |
| 323 | |
| 324 | TP_printk( |
| 325 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ret:%d", |
| 326 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ret |
| 327 | ) |
| 328 | ); |
| 329 | |
| 330 | TRACE_EVENT(drv_update_tkip_key, |
| 331 | TP_PROTO(struct ieee80211_local *local, |
| 332 | struct ieee80211_key_conf *conf, |
| 333 | const u8 *address, u32 iv32), |
| 334 | |
| 335 | TP_ARGS(local, conf, address, iv32), |
| 336 | |
| 337 | TP_STRUCT__entry( |
| 338 | LOCAL_ENTRY |
| 339 | __array(u8, addr, 6) |
| 340 | __field(u32, iv32) |
| 341 | ), |
| 342 | |
| 343 | TP_fast_assign( |
| 344 | LOCAL_ASSIGN; |
| 345 | memcpy(__entry->addr, address, 6); |
| 346 | __entry->iv32 = iv32; |
| 347 | ), |
| 348 | |
| 349 | TP_printk( |
| 350 | LOCAL_PR_FMT " addr:%pM iv32:%#x", |
| 351 | LOCAL_PR_ARG, __entry->addr, __entry->iv32 |
| 352 | ) |
| 353 | ); |
| 354 | |
| 355 | TRACE_EVENT(drv_hw_scan, |
| 356 | TP_PROTO(struct ieee80211_local *local, |
| 357 | struct cfg80211_scan_request *req, int ret), |
| 358 | |
| 359 | TP_ARGS(local, req, ret), |
| 360 | |
| 361 | TP_STRUCT__entry( |
| 362 | LOCAL_ENTRY |
| 363 | __field(int, ret) |
| 364 | ), |
| 365 | |
| 366 | TP_fast_assign( |
| 367 | LOCAL_ASSIGN; |
| 368 | __entry->ret = ret; |
| 369 | ), |
| 370 | |
| 371 | TP_printk( |
| 372 | LOCAL_PR_FMT " ret:%d", |
| 373 | LOCAL_PR_ARG, __entry->ret |
| 374 | ) |
| 375 | ); |
| 376 | |
| 377 | TRACE_EVENT(drv_sw_scan_start, |
| 378 | TP_PROTO(struct ieee80211_local *local), |
| 379 | |
| 380 | TP_ARGS(local), |
| 381 | |
| 382 | TP_STRUCT__entry( |
| 383 | LOCAL_ENTRY |
| 384 | ), |
| 385 | |
| 386 | TP_fast_assign( |
| 387 | LOCAL_ASSIGN; |
| 388 | ), |
| 389 | |
| 390 | TP_printk( |
| 391 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 392 | ) |
| 393 | ); |
| 394 | |
| 395 | TRACE_EVENT(drv_sw_scan_complete, |
| 396 | TP_PROTO(struct ieee80211_local *local), |
| 397 | |
| 398 | TP_ARGS(local), |
| 399 | |
| 400 | TP_STRUCT__entry( |
| 401 | LOCAL_ENTRY |
| 402 | ), |
| 403 | |
| 404 | TP_fast_assign( |
| 405 | LOCAL_ASSIGN; |
| 406 | ), |
| 407 | |
| 408 | TP_printk( |
| 409 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 410 | ) |
| 411 | ); |
| 412 | |
| 413 | TRACE_EVENT(drv_get_stats, |
| 414 | TP_PROTO(struct ieee80211_local *local, |
| 415 | struct ieee80211_low_level_stats *stats, |
| 416 | int ret), |
| 417 | |
| 418 | TP_ARGS(local, stats, ret), |
| 419 | |
| 420 | TP_STRUCT__entry( |
| 421 | LOCAL_ENTRY |
| 422 | __field(int, ret) |
| 423 | __field(unsigned int, ackfail) |
| 424 | __field(unsigned int, rtsfail) |
| 425 | __field(unsigned int, fcserr) |
| 426 | __field(unsigned int, rtssucc) |
| 427 | ), |
| 428 | |
| 429 | TP_fast_assign( |
| 430 | LOCAL_ASSIGN; |
| 431 | __entry->ret = ret; |
| 432 | __entry->ackfail = stats->dot11ACKFailureCount; |
| 433 | __entry->rtsfail = stats->dot11RTSFailureCount; |
| 434 | __entry->fcserr = stats->dot11FCSErrorCount; |
| 435 | __entry->rtssucc = stats->dot11RTSSuccessCount; |
| 436 | ), |
| 437 | |
| 438 | TP_printk( |
| 439 | LOCAL_PR_FMT " ret:%d", |
| 440 | LOCAL_PR_ARG, __entry->ret |
| 441 | ) |
| 442 | ); |
| 443 | |
| 444 | TRACE_EVENT(drv_get_tkip_seq, |
| 445 | TP_PROTO(struct ieee80211_local *local, |
| 446 | u8 hw_key_idx, u32 *iv32, u16 *iv16), |
| 447 | |
| 448 | TP_ARGS(local, hw_key_idx, iv32, iv16), |
| 449 | |
| 450 | TP_STRUCT__entry( |
| 451 | LOCAL_ENTRY |
| 452 | __field(u8, hw_key_idx) |
| 453 | __field(u32, iv32) |
| 454 | __field(u16, iv16) |
| 455 | ), |
| 456 | |
| 457 | TP_fast_assign( |
| 458 | LOCAL_ASSIGN; |
| 459 | __entry->hw_key_idx = hw_key_idx; |
| 460 | __entry->iv32 = *iv32; |
| 461 | __entry->iv16 = *iv16; |
| 462 | ), |
| 463 | |
| 464 | TP_printk( |
| 465 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 466 | ) |
| 467 | ); |
| 468 | |
| 469 | TRACE_EVENT(drv_set_rts_threshold, |
| 470 | TP_PROTO(struct ieee80211_local *local, u32 value, int ret), |
| 471 | |
| 472 | TP_ARGS(local, value, ret), |
| 473 | |
| 474 | TP_STRUCT__entry( |
| 475 | LOCAL_ENTRY |
| 476 | __field(u32, value) |
| 477 | __field(int, ret) |
| 478 | ), |
| 479 | |
| 480 | TP_fast_assign( |
| 481 | LOCAL_ASSIGN; |
| 482 | __entry->ret = ret; |
| 483 | __entry->value = value; |
| 484 | ), |
| 485 | |
| 486 | TP_printk( |
| 487 | LOCAL_PR_FMT " value:%d ret:%d", |
| 488 | LOCAL_PR_ARG, __entry->value, __entry->ret |
| 489 | ) |
| 490 | ); |
| 491 | |
| 492 | TRACE_EVENT(drv_sta_notify, |
| 493 | TP_PROTO(struct ieee80211_local *local, |
| 494 | struct ieee80211_vif *vif, |
| 495 | enum sta_notify_cmd cmd, |
| 496 | struct ieee80211_sta *sta), |
| 497 | |
| 498 | TP_ARGS(local, vif, cmd, sta), |
| 499 | |
| 500 | TP_STRUCT__entry( |
| 501 | LOCAL_ENTRY |
| 502 | VIF_ENTRY |
| 503 | STA_ENTRY |
| 504 | __field(u32, cmd) |
| 505 | ), |
| 506 | |
| 507 | TP_fast_assign( |
| 508 | LOCAL_ASSIGN; |
| 509 | VIF_ASSIGN; |
| 510 | STA_ASSIGN; |
| 511 | __entry->cmd = cmd; |
| 512 | ), |
| 513 | |
| 514 | TP_printk( |
| 515 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d", |
| 516 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd |
| 517 | ) |
| 518 | ); |
| 519 | |
| 520 | TRACE_EVENT(drv_conf_tx, |
| 521 | TP_PROTO(struct ieee80211_local *local, u16 queue, |
| 522 | const struct ieee80211_tx_queue_params *params, |
| 523 | int ret), |
| 524 | |
| 525 | TP_ARGS(local, queue, params, ret), |
| 526 | |
| 527 | TP_STRUCT__entry( |
| 528 | LOCAL_ENTRY |
| 529 | __field(u16, queue) |
| 530 | __field(u16, txop) |
| 531 | __field(u16, cw_min) |
| 532 | __field(u16, cw_max) |
| 533 | __field(u8, aifs) |
| 534 | __field(int, ret) |
| 535 | ), |
| 536 | |
| 537 | TP_fast_assign( |
| 538 | LOCAL_ASSIGN; |
| 539 | __entry->queue = queue; |
| 540 | __entry->ret = ret; |
| 541 | __entry->txop = params->txop; |
| 542 | __entry->cw_max = params->cw_max; |
| 543 | __entry->cw_min = params->cw_min; |
| 544 | __entry->aifs = params->aifs; |
| 545 | ), |
| 546 | |
| 547 | TP_printk( |
| 548 | LOCAL_PR_FMT " queue:%d ret:%d", |
| 549 | LOCAL_PR_ARG, __entry->queue, __entry->ret |
| 550 | ) |
| 551 | ); |
| 552 | |
| 553 | TRACE_EVENT(drv_get_tx_stats, |
| 554 | TP_PROTO(struct ieee80211_local *local, |
| 555 | struct ieee80211_tx_queue_stats *stats, |
| 556 | int ret), |
| 557 | |
| 558 | TP_ARGS(local, stats, ret), |
| 559 | |
| 560 | TP_STRUCT__entry( |
| 561 | LOCAL_ENTRY |
| 562 | __field(int, ret) |
| 563 | ), |
| 564 | |
| 565 | TP_fast_assign( |
| 566 | LOCAL_ASSIGN; |
| 567 | __entry->ret = ret; |
| 568 | ), |
| 569 | |
| 570 | TP_printk( |
| 571 | LOCAL_PR_FMT " ret:%d", |
| 572 | LOCAL_PR_ARG, __entry->ret |
| 573 | ) |
| 574 | ); |
| 575 | |
| 576 | TRACE_EVENT(drv_get_tsf, |
| 577 | TP_PROTO(struct ieee80211_local *local, u64 ret), |
| 578 | |
| 579 | TP_ARGS(local, ret), |
| 580 | |
| 581 | TP_STRUCT__entry( |
| 582 | LOCAL_ENTRY |
| 583 | __field(u64, ret) |
| 584 | ), |
| 585 | |
| 586 | TP_fast_assign( |
| 587 | LOCAL_ASSIGN; |
| 588 | __entry->ret = ret; |
| 589 | ), |
| 590 | |
| 591 | TP_printk( |
| 592 | LOCAL_PR_FMT " ret:%llu", |
| 593 | LOCAL_PR_ARG, (unsigned long long)__entry->ret |
| 594 | ) |
| 595 | ); |
| 596 | |
| 597 | TRACE_EVENT(drv_set_tsf, |
| 598 | TP_PROTO(struct ieee80211_local *local, u64 tsf), |
| 599 | |
| 600 | TP_ARGS(local, tsf), |
| 601 | |
| 602 | TP_STRUCT__entry( |
| 603 | LOCAL_ENTRY |
| 604 | __field(u64, tsf) |
| 605 | ), |
| 606 | |
| 607 | TP_fast_assign( |
| 608 | LOCAL_ASSIGN; |
| 609 | __entry->tsf = tsf; |
| 610 | ), |
| 611 | |
| 612 | TP_printk( |
| 613 | LOCAL_PR_FMT " tsf:%llu", |
| 614 | LOCAL_PR_ARG, (unsigned long long)__entry->tsf |
| 615 | ) |
| 616 | ); |
| 617 | |
| 618 | TRACE_EVENT(drv_reset_tsf, |
| 619 | TP_PROTO(struct ieee80211_local *local), |
| 620 | |
| 621 | TP_ARGS(local), |
| 622 | |
| 623 | TP_STRUCT__entry( |
| 624 | LOCAL_ENTRY |
| 625 | ), |
| 626 | |
| 627 | TP_fast_assign( |
| 628 | LOCAL_ASSIGN; |
| 629 | ), |
| 630 | |
| 631 | TP_printk( |
| 632 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 633 | ) |
| 634 | ); |
| 635 | |
| 636 | TRACE_EVENT(drv_tx_last_beacon, |
| 637 | TP_PROTO(struct ieee80211_local *local, int ret), |
| 638 | |
| 639 | TP_ARGS(local, ret), |
| 640 | |
| 641 | TP_STRUCT__entry( |
| 642 | LOCAL_ENTRY |
| 643 | __field(int, ret) |
| 644 | ), |
| 645 | |
| 646 | TP_fast_assign( |
| 647 | LOCAL_ASSIGN; |
| 648 | __entry->ret = ret; |
| 649 | ), |
| 650 | |
| 651 | TP_printk( |
| 652 | LOCAL_PR_FMT " ret:%d", |
| 653 | LOCAL_PR_ARG, __entry->ret |
| 654 | ) |
| 655 | ); |
| 656 | |
| 657 | TRACE_EVENT(drv_ampdu_action, |
| 658 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | c951ad3 | 2009-11-16 12:00:38 +0100 | [diff] [blame] | 659 | struct ieee80211_vif *vif, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 660 | enum ieee80211_ampdu_mlme_action action, |
| 661 | struct ieee80211_sta *sta, u16 tid, |
| 662 | u16 *ssn, int ret), |
| 663 | |
Johannes Berg | c951ad3 | 2009-11-16 12:00:38 +0100 | [diff] [blame] | 664 | TP_ARGS(local, vif, action, sta, tid, ssn, ret), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 665 | |
| 666 | TP_STRUCT__entry( |
| 667 | LOCAL_ENTRY |
| 668 | STA_ENTRY |
| 669 | __field(u32, action) |
| 670 | __field(u16, tid) |
| 671 | __field(u16, ssn) |
| 672 | __field(int, ret) |
Johannes Berg | c951ad3 | 2009-11-16 12:00:38 +0100 | [diff] [blame] | 673 | VIF_ENTRY |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 674 | ), |
| 675 | |
| 676 | TP_fast_assign( |
| 677 | LOCAL_ASSIGN; |
Johannes Berg | c951ad3 | 2009-11-16 12:00:38 +0100 | [diff] [blame] | 678 | VIF_ASSIGN; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 679 | STA_ASSIGN; |
| 680 | __entry->ret = ret; |
| 681 | __entry->action = action; |
| 682 | __entry->tid = tid; |
Zhu Yi | 3092ad0 | 2010-01-26 15:58:57 +0800 | [diff] [blame] | 683 | __entry->ssn = ssn ? *ssn : 0; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 684 | ), |
| 685 | |
| 686 | TP_printk( |
Johannes Berg | c951ad3 | 2009-11-16 12:00:38 +0100 | [diff] [blame] | 687 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d ret:%d", |
| 688 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action, __entry->tid, __entry->ret |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 689 | ) |
| 690 | ); |
Christian Lamparter | f742880 | 2009-07-19 23:21:07 +0200 | [diff] [blame] | 691 | #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 692 | |
| 693 | #undef TRACE_INCLUDE_PATH |
| 694 | #define TRACE_INCLUDE_PATH . |
| 695 | #undef TRACE_INCLUDE_FILE |
| 696 | #define TRACE_INCLUDE_FILE driver-trace |
| 697 | #include <trace/define_trace.h> |