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 | |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 28 | #define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \ |
| 29 | __string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>") |
| 30 | #define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \ |
| 31 | __assign_str(vif_name, sdata->dev ? sdata->dev->name : "<nodev>") |
| 32 | #define VIF_PR_FMT " vif:%s(%d)" |
| 33 | #define VIF_PR_ARG __get_str(vif_name), __entry->vif_type |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 34 | |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 35 | /* |
| 36 | * Tracing for driver callbacks. |
| 37 | */ |
| 38 | |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 39 | TRACE_EVENT(drv_start, |
| 40 | TP_PROTO(struct ieee80211_local *local, int ret), |
| 41 | |
| 42 | TP_ARGS(local, ret), |
| 43 | |
| 44 | TP_STRUCT__entry( |
| 45 | LOCAL_ENTRY |
| 46 | __field(int, ret) |
| 47 | ), |
| 48 | |
| 49 | TP_fast_assign( |
| 50 | LOCAL_ASSIGN; |
| 51 | __entry->ret = ret; |
| 52 | ), |
| 53 | |
| 54 | TP_printk( |
| 55 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 56 | ) |
| 57 | ); |
| 58 | |
| 59 | TRACE_EVENT(drv_stop, |
| 60 | TP_PROTO(struct ieee80211_local *local), |
| 61 | |
| 62 | TP_ARGS(local), |
| 63 | |
| 64 | TP_STRUCT__entry( |
| 65 | LOCAL_ENTRY |
| 66 | ), |
| 67 | |
| 68 | TP_fast_assign( |
| 69 | LOCAL_ASSIGN; |
| 70 | ), |
| 71 | |
| 72 | TP_printk( |
| 73 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 74 | ) |
| 75 | ); |
| 76 | |
| 77 | TRACE_EVENT(drv_add_interface, |
| 78 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 79 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 80 | int ret), |
| 81 | |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 82 | TP_ARGS(local, sdata, ret), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 83 | |
| 84 | TP_STRUCT__entry( |
| 85 | LOCAL_ENTRY |
| 86 | VIF_ENTRY |
| 87 | __array(char, addr, 6) |
| 88 | __field(int, ret) |
| 89 | ), |
| 90 | |
| 91 | TP_fast_assign( |
| 92 | LOCAL_ASSIGN; |
| 93 | VIF_ASSIGN; |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 94 | memcpy(__entry->addr, sdata->vif.addr, 6); |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 95 | __entry->ret = ret; |
| 96 | ), |
| 97 | |
| 98 | TP_printk( |
| 99 | LOCAL_PR_FMT VIF_PR_FMT " addr:%pM ret:%d", |
| 100 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr, __entry->ret |
| 101 | ) |
| 102 | ); |
| 103 | |
| 104 | TRACE_EVENT(drv_remove_interface, |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 105 | TP_PROTO(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 106 | |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 107 | TP_ARGS(local, sdata), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 108 | |
| 109 | TP_STRUCT__entry( |
| 110 | LOCAL_ENTRY |
| 111 | VIF_ENTRY |
| 112 | __array(char, addr, 6) |
| 113 | ), |
| 114 | |
| 115 | TP_fast_assign( |
| 116 | LOCAL_ASSIGN; |
| 117 | VIF_ASSIGN; |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 118 | memcpy(__entry->addr, sdata->vif.addr, 6); |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 119 | ), |
| 120 | |
| 121 | TP_printk( |
| 122 | LOCAL_PR_FMT VIF_PR_FMT " addr:%pM", |
| 123 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr |
| 124 | ) |
| 125 | ); |
| 126 | |
| 127 | TRACE_EVENT(drv_config, |
| 128 | TP_PROTO(struct ieee80211_local *local, |
| 129 | u32 changed, |
| 130 | int ret), |
| 131 | |
| 132 | TP_ARGS(local, changed, ret), |
| 133 | |
| 134 | TP_STRUCT__entry( |
| 135 | LOCAL_ENTRY |
| 136 | __field(u32, changed) |
| 137 | __field(int, ret) |
Johannes Berg | f911ab8 | 2009-11-25 19:07:20 +0100 | [diff] [blame] | 138 | __field(u32, flags) |
| 139 | __field(int, power_level) |
| 140 | __field(int, dynamic_ps_timeout) |
| 141 | __field(int, max_sleep_period) |
| 142 | __field(u16, listen_interval) |
| 143 | __field(u8, long_frame_max_tx_count) |
| 144 | __field(u8, short_frame_max_tx_count) |
| 145 | __field(int, center_freq) |
| 146 | __field(int, channel_type) |
Johannes Berg | 0f78231 | 2009-12-01 13:37:02 +0100 | [diff] [blame] | 147 | __field(int, smps) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 148 | ), |
| 149 | |
| 150 | TP_fast_assign( |
| 151 | LOCAL_ASSIGN; |
| 152 | __entry->changed = changed; |
| 153 | __entry->ret = ret; |
Johannes Berg | f911ab8 | 2009-11-25 19:07:20 +0100 | [diff] [blame] | 154 | __entry->flags = local->hw.conf.flags; |
| 155 | __entry->power_level = local->hw.conf.power_level; |
| 156 | __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout; |
| 157 | __entry->max_sleep_period = local->hw.conf.max_sleep_period; |
| 158 | __entry->listen_interval = local->hw.conf.listen_interval; |
| 159 | __entry->long_frame_max_tx_count = local->hw.conf.long_frame_max_tx_count; |
| 160 | __entry->short_frame_max_tx_count = local->hw.conf.short_frame_max_tx_count; |
| 161 | __entry->center_freq = local->hw.conf.channel->center_freq; |
| 162 | __entry->channel_type = local->hw.conf.channel_type; |
Johannes Berg | 0f78231 | 2009-12-01 13:37:02 +0100 | [diff] [blame] | 163 | __entry->smps = local->hw.conf.smps_mode; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 164 | ), |
| 165 | |
| 166 | TP_printk( |
Johannes Berg | f911ab8 | 2009-11-25 19:07:20 +0100 | [diff] [blame] | 167 | LOCAL_PR_FMT " ch:%#x freq:%d ret:%d", |
| 168 | LOCAL_PR_ARG, __entry->changed, __entry->center_freq, __entry->ret |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 169 | ) |
| 170 | ); |
| 171 | |
| 172 | TRACE_EVENT(drv_bss_info_changed, |
| 173 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 174 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 175 | struct ieee80211_bss_conf *info, |
| 176 | u32 changed), |
| 177 | |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 178 | TP_ARGS(local, sdata, info, changed), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 179 | |
| 180 | TP_STRUCT__entry( |
| 181 | LOCAL_ENTRY |
| 182 | VIF_ENTRY |
| 183 | __field(bool, assoc) |
| 184 | __field(u16, aid) |
| 185 | __field(bool, cts) |
| 186 | __field(bool, shortpre) |
| 187 | __field(bool, shortslot) |
| 188 | __field(u8, dtimper) |
| 189 | __field(u16, bcnint) |
| 190 | __field(u16, assoc_cap) |
| 191 | __field(u64, timestamp) |
| 192 | __field(u32, basic_rates) |
| 193 | __field(u32, changed) |
Johannes Berg | f911ab8 | 2009-11-25 19:07:20 +0100 | [diff] [blame] | 194 | __field(bool, enable_beacon) |
| 195 | __field(u16, ht_operation_mode) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 196 | ), |
| 197 | |
| 198 | TP_fast_assign( |
| 199 | LOCAL_ASSIGN; |
| 200 | VIF_ASSIGN; |
| 201 | __entry->changed = changed; |
| 202 | __entry->aid = info->aid; |
| 203 | __entry->assoc = info->assoc; |
| 204 | __entry->shortpre = info->use_short_preamble; |
| 205 | __entry->cts = info->use_cts_prot; |
| 206 | __entry->shortslot = info->use_short_slot; |
| 207 | __entry->dtimper = info->dtim_period; |
| 208 | __entry->bcnint = info->beacon_int; |
| 209 | __entry->assoc_cap = info->assoc_capability; |
| 210 | __entry->timestamp = info->timestamp; |
| 211 | __entry->basic_rates = info->basic_rates; |
Johannes Berg | f911ab8 | 2009-11-25 19:07:20 +0100 | [diff] [blame] | 212 | __entry->enable_beacon = info->enable_beacon; |
| 213 | __entry->ht_operation_mode = info->ht_operation_mode; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 214 | ), |
| 215 | |
| 216 | TP_printk( |
| 217 | LOCAL_PR_FMT VIF_PR_FMT " changed:%#x", |
| 218 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed |
| 219 | ) |
| 220 | ); |
| 221 | |
Juuso Oikarinen | 2b2c009 | 2010-05-27 15:32:13 +0300 | [diff] [blame] | 222 | TRACE_EVENT(drv_configure_arp_filter, |
| 223 | TP_PROTO(struct ieee80211_local *local, |
| 224 | struct ieee80211_sub_if_data *sdata, |
| 225 | struct in_ifaddr *ifa_list, int ret), |
| 226 | |
| 227 | TP_ARGS(local, sdata, ifa_list, ret), |
| 228 | |
| 229 | TP_STRUCT__entry( |
| 230 | LOCAL_ENTRY |
| 231 | VIF_ENTRY |
| 232 | __field(int, ret) |
| 233 | ), |
| 234 | |
| 235 | TP_fast_assign( |
| 236 | LOCAL_ASSIGN; |
| 237 | VIF_ASSIGN; |
| 238 | __entry->ret = ret; |
| 239 | ), |
| 240 | |
| 241 | TP_printk( |
| 242 | VIF_PR_FMT LOCAL_PR_FMT " ret:%d", |
| 243 | VIF_PR_ARG, LOCAL_PR_ARG, __entry->ret |
| 244 | ) |
| 245 | ); |
| 246 | |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 247 | TRACE_EVENT(drv_prepare_multicast, |
| 248 | TP_PROTO(struct ieee80211_local *local, int mc_count, u64 ret), |
| 249 | |
| 250 | TP_ARGS(local, mc_count, ret), |
| 251 | |
| 252 | TP_STRUCT__entry( |
| 253 | LOCAL_ENTRY |
| 254 | __field(int, mc_count) |
| 255 | __field(u64, ret) |
| 256 | ), |
| 257 | |
| 258 | TP_fast_assign( |
| 259 | LOCAL_ASSIGN; |
| 260 | __entry->mc_count = mc_count; |
| 261 | __entry->ret = ret; |
| 262 | ), |
| 263 | |
| 264 | TP_printk( |
| 265 | LOCAL_PR_FMT " prepare mc (%d): %llx", |
| 266 | LOCAL_PR_ARG, __entry->mc_count, |
| 267 | (unsigned long long) __entry->ret |
| 268 | ) |
| 269 | ); |
| 270 | |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 271 | TRACE_EVENT(drv_configure_filter, |
| 272 | TP_PROTO(struct ieee80211_local *local, |
| 273 | unsigned int changed_flags, |
| 274 | unsigned int *total_flags, |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 275 | u64 multicast), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 276 | |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 277 | TP_ARGS(local, changed_flags, total_flags, multicast), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 278 | |
| 279 | TP_STRUCT__entry( |
| 280 | LOCAL_ENTRY |
| 281 | __field(unsigned int, changed) |
| 282 | __field(unsigned int, total) |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 283 | __field(u64, multicast) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 284 | ), |
| 285 | |
| 286 | TP_fast_assign( |
| 287 | LOCAL_ASSIGN; |
| 288 | __entry->changed = changed_flags; |
| 289 | __entry->total = *total_flags; |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 290 | __entry->multicast = multicast; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 291 | ), |
| 292 | |
| 293 | TP_printk( |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 294 | LOCAL_PR_FMT " changed:%#x total:%#x", |
| 295 | LOCAL_PR_ARG, __entry->changed, __entry->total |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 296 | ) |
| 297 | ); |
| 298 | |
| 299 | TRACE_EVENT(drv_set_tim, |
| 300 | TP_PROTO(struct ieee80211_local *local, |
| 301 | struct ieee80211_sta *sta, bool set, int ret), |
| 302 | |
| 303 | TP_ARGS(local, sta, set, ret), |
| 304 | |
| 305 | TP_STRUCT__entry( |
| 306 | LOCAL_ENTRY |
| 307 | STA_ENTRY |
| 308 | __field(bool, set) |
| 309 | __field(int, ret) |
| 310 | ), |
| 311 | |
| 312 | TP_fast_assign( |
| 313 | LOCAL_ASSIGN; |
| 314 | STA_ASSIGN; |
| 315 | __entry->set = set; |
| 316 | __entry->ret = ret; |
| 317 | ), |
| 318 | |
| 319 | TP_printk( |
| 320 | LOCAL_PR_FMT STA_PR_FMT " set:%d ret:%d", |
| 321 | LOCAL_PR_ARG, STA_PR_FMT, __entry->set, __entry->ret |
| 322 | ) |
| 323 | ); |
| 324 | |
| 325 | TRACE_EVENT(drv_set_key, |
| 326 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 327 | enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 328 | struct ieee80211_sta *sta, |
| 329 | struct ieee80211_key_conf *key, int ret), |
| 330 | |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 331 | TP_ARGS(local, cmd, sdata, sta, key, ret), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 332 | |
| 333 | TP_STRUCT__entry( |
| 334 | LOCAL_ENTRY |
| 335 | VIF_ENTRY |
| 336 | STA_ENTRY |
| 337 | __field(enum ieee80211_key_alg, alg) |
| 338 | __field(u8, hw_key_idx) |
| 339 | __field(u8, flags) |
| 340 | __field(s8, keyidx) |
| 341 | __field(int, ret) |
| 342 | ), |
| 343 | |
| 344 | TP_fast_assign( |
| 345 | LOCAL_ASSIGN; |
| 346 | VIF_ASSIGN; |
| 347 | STA_ASSIGN; |
| 348 | __entry->alg = key->alg; |
| 349 | __entry->flags = key->flags; |
| 350 | __entry->keyidx = key->keyidx; |
| 351 | __entry->hw_key_idx = key->hw_key_idx; |
| 352 | __entry->ret = ret; |
| 353 | ), |
| 354 | |
| 355 | TP_printk( |
| 356 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ret:%d", |
| 357 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ret |
| 358 | ) |
| 359 | ); |
| 360 | |
| 361 | TRACE_EVENT(drv_update_tkip_key, |
| 362 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | b3fbdcf | 2010-01-21 11:40:47 +0100 | [diff] [blame] | 363 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 364 | struct ieee80211_key_conf *conf, |
Johannes Berg | b3fbdcf | 2010-01-21 11:40:47 +0100 | [diff] [blame] | 365 | struct ieee80211_sta *sta, u32 iv32), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 366 | |
Johannes Berg | b3fbdcf | 2010-01-21 11:40:47 +0100 | [diff] [blame] | 367 | TP_ARGS(local, sdata, conf, sta, iv32), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 368 | |
| 369 | TP_STRUCT__entry( |
| 370 | LOCAL_ENTRY |
Johannes Berg | b3fbdcf | 2010-01-21 11:40:47 +0100 | [diff] [blame] | 371 | VIF_ENTRY |
| 372 | STA_ENTRY |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 373 | __field(u32, iv32) |
| 374 | ), |
| 375 | |
| 376 | TP_fast_assign( |
| 377 | LOCAL_ASSIGN; |
Johannes Berg | b3fbdcf | 2010-01-21 11:40:47 +0100 | [diff] [blame] | 378 | VIF_ASSIGN; |
| 379 | STA_ASSIGN; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 380 | __entry->iv32 = iv32; |
| 381 | ), |
| 382 | |
| 383 | TP_printk( |
Johannes Berg | b3fbdcf | 2010-01-21 11:40:47 +0100 | [diff] [blame] | 384 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x", |
| 385 | LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32 |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 386 | ) |
| 387 | ); |
| 388 | |
| 389 | TRACE_EVENT(drv_hw_scan, |
| 390 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | a060bbf | 2010-04-27 11:59:34 +0200 | [diff] [blame] | 391 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 392 | struct cfg80211_scan_request *req, int ret), |
| 393 | |
Johannes Berg | a060bbf | 2010-04-27 11:59:34 +0200 | [diff] [blame] | 394 | TP_ARGS(local, sdata, req, ret), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 395 | |
| 396 | TP_STRUCT__entry( |
| 397 | LOCAL_ENTRY |
Johannes Berg | a060bbf | 2010-04-27 11:59:34 +0200 | [diff] [blame] | 398 | VIF_ENTRY |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 399 | __field(int, ret) |
| 400 | ), |
| 401 | |
| 402 | TP_fast_assign( |
| 403 | LOCAL_ASSIGN; |
Johannes Berg | a060bbf | 2010-04-27 11:59:34 +0200 | [diff] [blame] | 404 | VIF_ASSIGN; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 405 | __entry->ret = ret; |
| 406 | ), |
| 407 | |
| 408 | TP_printk( |
Johannes Berg | a060bbf | 2010-04-27 11:59:34 +0200 | [diff] [blame] | 409 | LOCAL_PR_FMT VIF_PR_FMT " ret:%d", |
| 410 | LOCAL_PR_ARG,VIF_PR_ARG, __entry->ret |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 411 | ) |
| 412 | ); |
| 413 | |
| 414 | TRACE_EVENT(drv_sw_scan_start, |
| 415 | TP_PROTO(struct ieee80211_local *local), |
| 416 | |
| 417 | TP_ARGS(local), |
| 418 | |
| 419 | TP_STRUCT__entry( |
| 420 | LOCAL_ENTRY |
| 421 | ), |
| 422 | |
| 423 | TP_fast_assign( |
| 424 | LOCAL_ASSIGN; |
| 425 | ), |
| 426 | |
| 427 | TP_printk( |
| 428 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 429 | ) |
| 430 | ); |
| 431 | |
| 432 | TRACE_EVENT(drv_sw_scan_complete, |
| 433 | TP_PROTO(struct ieee80211_local *local), |
| 434 | |
| 435 | TP_ARGS(local), |
| 436 | |
| 437 | TP_STRUCT__entry( |
| 438 | LOCAL_ENTRY |
| 439 | ), |
| 440 | |
| 441 | TP_fast_assign( |
| 442 | LOCAL_ASSIGN; |
| 443 | ), |
| 444 | |
| 445 | TP_printk( |
| 446 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 447 | ) |
| 448 | ); |
| 449 | |
| 450 | TRACE_EVENT(drv_get_stats, |
| 451 | TP_PROTO(struct ieee80211_local *local, |
| 452 | struct ieee80211_low_level_stats *stats, |
| 453 | int ret), |
| 454 | |
| 455 | TP_ARGS(local, stats, ret), |
| 456 | |
| 457 | TP_STRUCT__entry( |
| 458 | LOCAL_ENTRY |
| 459 | __field(int, ret) |
| 460 | __field(unsigned int, ackfail) |
| 461 | __field(unsigned int, rtsfail) |
| 462 | __field(unsigned int, fcserr) |
| 463 | __field(unsigned int, rtssucc) |
| 464 | ), |
| 465 | |
| 466 | TP_fast_assign( |
| 467 | LOCAL_ASSIGN; |
| 468 | __entry->ret = ret; |
| 469 | __entry->ackfail = stats->dot11ACKFailureCount; |
| 470 | __entry->rtsfail = stats->dot11RTSFailureCount; |
| 471 | __entry->fcserr = stats->dot11FCSErrorCount; |
| 472 | __entry->rtssucc = stats->dot11RTSSuccessCount; |
| 473 | ), |
| 474 | |
| 475 | TP_printk( |
| 476 | LOCAL_PR_FMT " ret:%d", |
| 477 | LOCAL_PR_ARG, __entry->ret |
| 478 | ) |
| 479 | ); |
| 480 | |
| 481 | TRACE_EVENT(drv_get_tkip_seq, |
| 482 | TP_PROTO(struct ieee80211_local *local, |
| 483 | u8 hw_key_idx, u32 *iv32, u16 *iv16), |
| 484 | |
| 485 | TP_ARGS(local, hw_key_idx, iv32, iv16), |
| 486 | |
| 487 | TP_STRUCT__entry( |
| 488 | LOCAL_ENTRY |
| 489 | __field(u8, hw_key_idx) |
| 490 | __field(u32, iv32) |
| 491 | __field(u16, iv16) |
| 492 | ), |
| 493 | |
| 494 | TP_fast_assign( |
| 495 | LOCAL_ASSIGN; |
| 496 | __entry->hw_key_idx = hw_key_idx; |
| 497 | __entry->iv32 = *iv32; |
| 498 | __entry->iv16 = *iv16; |
| 499 | ), |
| 500 | |
| 501 | TP_printk( |
| 502 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 503 | ) |
| 504 | ); |
| 505 | |
| 506 | TRACE_EVENT(drv_set_rts_threshold, |
| 507 | TP_PROTO(struct ieee80211_local *local, u32 value, int ret), |
| 508 | |
| 509 | TP_ARGS(local, value, ret), |
| 510 | |
| 511 | TP_STRUCT__entry( |
| 512 | LOCAL_ENTRY |
| 513 | __field(u32, value) |
| 514 | __field(int, ret) |
| 515 | ), |
| 516 | |
| 517 | TP_fast_assign( |
| 518 | LOCAL_ASSIGN; |
| 519 | __entry->ret = ret; |
| 520 | __entry->value = value; |
| 521 | ), |
| 522 | |
| 523 | TP_printk( |
| 524 | LOCAL_PR_FMT " value:%d ret:%d", |
| 525 | LOCAL_PR_ARG, __entry->value, __entry->ret |
| 526 | ) |
| 527 | ); |
| 528 | |
Lukáš Turek | 310bc67 | 2009-12-21 22:50:48 +0100 | [diff] [blame] | 529 | TRACE_EVENT(drv_set_coverage_class, |
| 530 | TP_PROTO(struct ieee80211_local *local, u8 value, int ret), |
| 531 | |
| 532 | TP_ARGS(local, value, ret), |
| 533 | |
| 534 | TP_STRUCT__entry( |
| 535 | LOCAL_ENTRY |
| 536 | __field(u8, value) |
| 537 | __field(int, ret) |
| 538 | ), |
| 539 | |
| 540 | TP_fast_assign( |
| 541 | LOCAL_ASSIGN; |
| 542 | __entry->ret = ret; |
| 543 | __entry->value = value; |
| 544 | ), |
| 545 | |
| 546 | TP_printk( |
| 547 | LOCAL_PR_FMT " value:%d ret:%d", |
| 548 | LOCAL_PR_ARG, __entry->value, __entry->ret |
| 549 | ) |
| 550 | ); |
| 551 | |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 552 | TRACE_EVENT(drv_sta_notify, |
| 553 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 554 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 555 | enum sta_notify_cmd cmd, |
| 556 | struct ieee80211_sta *sta), |
| 557 | |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 558 | TP_ARGS(local, sdata, cmd, sta), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 559 | |
| 560 | TP_STRUCT__entry( |
| 561 | LOCAL_ENTRY |
| 562 | VIF_ENTRY |
| 563 | STA_ENTRY |
| 564 | __field(u32, cmd) |
| 565 | ), |
| 566 | |
| 567 | TP_fast_assign( |
| 568 | LOCAL_ASSIGN; |
| 569 | VIF_ASSIGN; |
| 570 | STA_ASSIGN; |
| 571 | __entry->cmd = cmd; |
| 572 | ), |
| 573 | |
| 574 | TP_printk( |
| 575 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d", |
| 576 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd |
| 577 | ) |
| 578 | ); |
| 579 | |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 580 | TRACE_EVENT(drv_sta_add, |
| 581 | TP_PROTO(struct ieee80211_local *local, |
| 582 | struct ieee80211_sub_if_data *sdata, |
| 583 | struct ieee80211_sta *sta, int ret), |
| 584 | |
| 585 | TP_ARGS(local, sdata, sta, ret), |
| 586 | |
| 587 | TP_STRUCT__entry( |
| 588 | LOCAL_ENTRY |
| 589 | VIF_ENTRY |
| 590 | STA_ENTRY |
| 591 | __field(int, ret) |
| 592 | ), |
| 593 | |
| 594 | TP_fast_assign( |
| 595 | LOCAL_ASSIGN; |
| 596 | VIF_ASSIGN; |
| 597 | STA_ASSIGN; |
| 598 | __entry->ret = ret; |
| 599 | ), |
| 600 | |
| 601 | TP_printk( |
| 602 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ret:%d", |
| 603 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ret |
| 604 | ) |
| 605 | ); |
| 606 | |
| 607 | TRACE_EVENT(drv_sta_remove, |
| 608 | TP_PROTO(struct ieee80211_local *local, |
| 609 | struct ieee80211_sub_if_data *sdata, |
| 610 | struct ieee80211_sta *sta), |
| 611 | |
| 612 | TP_ARGS(local, sdata, sta), |
| 613 | |
| 614 | TP_STRUCT__entry( |
| 615 | LOCAL_ENTRY |
| 616 | VIF_ENTRY |
| 617 | STA_ENTRY |
| 618 | ), |
| 619 | |
| 620 | TP_fast_assign( |
| 621 | LOCAL_ASSIGN; |
| 622 | VIF_ASSIGN; |
| 623 | STA_ASSIGN; |
| 624 | ), |
| 625 | |
| 626 | TP_printk( |
| 627 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT, |
| 628 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG |
| 629 | ) |
| 630 | ); |
| 631 | |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 632 | TRACE_EVENT(drv_conf_tx, |
| 633 | TP_PROTO(struct ieee80211_local *local, u16 queue, |
| 634 | const struct ieee80211_tx_queue_params *params, |
| 635 | int ret), |
| 636 | |
| 637 | TP_ARGS(local, queue, params, ret), |
| 638 | |
| 639 | TP_STRUCT__entry( |
| 640 | LOCAL_ENTRY |
| 641 | __field(u16, queue) |
| 642 | __field(u16, txop) |
| 643 | __field(u16, cw_min) |
| 644 | __field(u16, cw_max) |
| 645 | __field(u8, aifs) |
| 646 | __field(int, ret) |
| 647 | ), |
| 648 | |
| 649 | TP_fast_assign( |
| 650 | LOCAL_ASSIGN; |
| 651 | __entry->queue = queue; |
| 652 | __entry->ret = ret; |
| 653 | __entry->txop = params->txop; |
| 654 | __entry->cw_max = params->cw_max; |
| 655 | __entry->cw_min = params->cw_min; |
| 656 | __entry->aifs = params->aifs; |
| 657 | ), |
| 658 | |
| 659 | TP_printk( |
| 660 | LOCAL_PR_FMT " queue:%d ret:%d", |
| 661 | LOCAL_PR_ARG, __entry->queue, __entry->ret |
| 662 | ) |
| 663 | ); |
| 664 | |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 665 | TRACE_EVENT(drv_get_tsf, |
| 666 | TP_PROTO(struct ieee80211_local *local, u64 ret), |
| 667 | |
| 668 | TP_ARGS(local, ret), |
| 669 | |
| 670 | TP_STRUCT__entry( |
| 671 | LOCAL_ENTRY |
| 672 | __field(u64, ret) |
| 673 | ), |
| 674 | |
| 675 | TP_fast_assign( |
| 676 | LOCAL_ASSIGN; |
| 677 | __entry->ret = ret; |
| 678 | ), |
| 679 | |
| 680 | TP_printk( |
| 681 | LOCAL_PR_FMT " ret:%llu", |
| 682 | LOCAL_PR_ARG, (unsigned long long)__entry->ret |
| 683 | ) |
| 684 | ); |
| 685 | |
| 686 | TRACE_EVENT(drv_set_tsf, |
| 687 | TP_PROTO(struct ieee80211_local *local, u64 tsf), |
| 688 | |
| 689 | TP_ARGS(local, tsf), |
| 690 | |
| 691 | TP_STRUCT__entry( |
| 692 | LOCAL_ENTRY |
| 693 | __field(u64, tsf) |
| 694 | ), |
| 695 | |
| 696 | TP_fast_assign( |
| 697 | LOCAL_ASSIGN; |
| 698 | __entry->tsf = tsf; |
| 699 | ), |
| 700 | |
| 701 | TP_printk( |
| 702 | LOCAL_PR_FMT " tsf:%llu", |
| 703 | LOCAL_PR_ARG, (unsigned long long)__entry->tsf |
| 704 | ) |
| 705 | ); |
| 706 | |
| 707 | TRACE_EVENT(drv_reset_tsf, |
| 708 | TP_PROTO(struct ieee80211_local *local), |
| 709 | |
| 710 | TP_ARGS(local), |
| 711 | |
| 712 | TP_STRUCT__entry( |
| 713 | LOCAL_ENTRY |
| 714 | ), |
| 715 | |
| 716 | TP_fast_assign( |
| 717 | LOCAL_ASSIGN; |
| 718 | ), |
| 719 | |
| 720 | TP_printk( |
| 721 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 722 | ) |
| 723 | ); |
| 724 | |
| 725 | TRACE_EVENT(drv_tx_last_beacon, |
| 726 | TP_PROTO(struct ieee80211_local *local, int ret), |
| 727 | |
| 728 | TP_ARGS(local, ret), |
| 729 | |
| 730 | TP_STRUCT__entry( |
| 731 | LOCAL_ENTRY |
| 732 | __field(int, ret) |
| 733 | ), |
| 734 | |
| 735 | TP_fast_assign( |
| 736 | LOCAL_ASSIGN; |
| 737 | __entry->ret = ret; |
| 738 | ), |
| 739 | |
| 740 | TP_printk( |
| 741 | LOCAL_PR_FMT " ret:%d", |
| 742 | LOCAL_PR_ARG, __entry->ret |
| 743 | ) |
| 744 | ); |
| 745 | |
| 746 | TRACE_EVENT(drv_ampdu_action, |
| 747 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 748 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 749 | enum ieee80211_ampdu_mlme_action action, |
| 750 | struct ieee80211_sta *sta, u16 tid, |
| 751 | u16 *ssn, int ret), |
| 752 | |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 753 | TP_ARGS(local, sdata, action, sta, tid, ssn, ret), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 754 | |
| 755 | TP_STRUCT__entry( |
| 756 | LOCAL_ENTRY |
| 757 | STA_ENTRY |
| 758 | __field(u32, action) |
| 759 | __field(u16, tid) |
| 760 | __field(u16, ssn) |
| 761 | __field(int, ret) |
Johannes Berg | c951ad3 | 2009-11-16 12:00:38 +0100 | [diff] [blame] | 762 | VIF_ENTRY |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 763 | ), |
| 764 | |
| 765 | TP_fast_assign( |
| 766 | LOCAL_ASSIGN; |
Johannes Berg | c951ad3 | 2009-11-16 12:00:38 +0100 | [diff] [blame] | 767 | VIF_ASSIGN; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 768 | STA_ASSIGN; |
| 769 | __entry->ret = ret; |
| 770 | __entry->action = action; |
| 771 | __entry->tid = tid; |
Zhu Yi | 3092ad0 | 2010-01-26 15:58:57 +0800 | [diff] [blame] | 772 | __entry->ssn = ssn ? *ssn : 0; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 773 | ), |
| 774 | |
| 775 | TP_printk( |
Johannes Berg | c951ad3 | 2009-11-16 12:00:38 +0100 | [diff] [blame] | 776 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d ret:%d", |
| 777 | 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] | 778 | ) |
| 779 | ); |
Johannes Berg | a80f7c0 | 2009-12-23 13:15:32 +0100 | [diff] [blame] | 780 | |
| 781 | TRACE_EVENT(drv_flush, |
| 782 | TP_PROTO(struct ieee80211_local *local, bool drop), |
| 783 | |
| 784 | TP_ARGS(local, drop), |
| 785 | |
| 786 | TP_STRUCT__entry( |
| 787 | LOCAL_ENTRY |
| 788 | __field(bool, drop) |
| 789 | ), |
| 790 | |
| 791 | TP_fast_assign( |
| 792 | LOCAL_ASSIGN; |
| 793 | __entry->drop = drop; |
| 794 | ), |
| 795 | |
| 796 | TP_printk( |
| 797 | LOCAL_PR_FMT " drop:%d", |
| 798 | LOCAL_PR_ARG, __entry->drop |
| 799 | ) |
| 800 | ); |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 801 | |
Johannes Berg | 5ce6e43 | 2010-05-11 16:20:57 +0200 | [diff] [blame] | 802 | TRACE_EVENT(drv_channel_switch, |
| 803 | TP_PROTO(struct ieee80211_local *local, |
| 804 | struct ieee80211_channel_switch *ch_switch), |
| 805 | |
| 806 | TP_ARGS(local, ch_switch), |
| 807 | |
| 808 | TP_STRUCT__entry( |
| 809 | LOCAL_ENTRY |
| 810 | __field(u64, timestamp) |
| 811 | __field(bool, block_tx) |
| 812 | __field(u16, freq) |
| 813 | __field(u8, count) |
| 814 | ), |
| 815 | |
| 816 | TP_fast_assign( |
| 817 | LOCAL_ASSIGN; |
| 818 | __entry->timestamp = ch_switch->timestamp; |
| 819 | __entry->block_tx = ch_switch->block_tx; |
| 820 | __entry->freq = ch_switch->channel->center_freq; |
| 821 | __entry->count = ch_switch->count; |
| 822 | ), |
| 823 | |
| 824 | TP_printk( |
| 825 | LOCAL_PR_FMT " new freq:%u count:%d", |
| 826 | LOCAL_PR_ARG, __entry->freq, __entry->count |
| 827 | ) |
| 828 | ); |
| 829 | |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 830 | /* |
| 831 | * Tracing for API calls that drivers call. |
| 832 | */ |
| 833 | |
| 834 | TRACE_EVENT(api_start_tx_ba_session, |
| 835 | TP_PROTO(struct ieee80211_sta *sta, u16 tid), |
| 836 | |
| 837 | TP_ARGS(sta, tid), |
| 838 | |
| 839 | TP_STRUCT__entry( |
| 840 | STA_ENTRY |
| 841 | __field(u16, tid) |
| 842 | ), |
| 843 | |
| 844 | TP_fast_assign( |
| 845 | STA_ASSIGN; |
| 846 | __entry->tid = tid; |
| 847 | ), |
| 848 | |
| 849 | TP_printk( |
| 850 | STA_PR_FMT " tid:%d", |
| 851 | STA_PR_ARG, __entry->tid |
| 852 | ) |
| 853 | ); |
| 854 | |
| 855 | TRACE_EVENT(api_start_tx_ba_cb, |
| 856 | TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid), |
| 857 | |
| 858 | TP_ARGS(sdata, ra, tid), |
| 859 | |
| 860 | TP_STRUCT__entry( |
| 861 | VIF_ENTRY |
| 862 | __array(u8, ra, ETH_ALEN) |
| 863 | __field(u16, tid) |
| 864 | ), |
| 865 | |
| 866 | TP_fast_assign( |
| 867 | VIF_ASSIGN; |
| 868 | memcpy(__entry->ra, ra, ETH_ALEN); |
| 869 | __entry->tid = tid; |
| 870 | ), |
| 871 | |
| 872 | TP_printk( |
| 873 | VIF_PR_FMT " ra:%pM tid:%d", |
| 874 | VIF_PR_ARG, __entry->ra, __entry->tid |
| 875 | ) |
| 876 | ); |
| 877 | |
| 878 | TRACE_EVENT(api_stop_tx_ba_session, |
Johannes Berg | 6a8579d | 2010-05-27 14:41:07 +0200 | [diff] [blame^] | 879 | TP_PROTO(struct ieee80211_sta *sta, u16 tid), |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 880 | |
Johannes Berg | 6a8579d | 2010-05-27 14:41:07 +0200 | [diff] [blame^] | 881 | TP_ARGS(sta, tid), |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 882 | |
| 883 | TP_STRUCT__entry( |
| 884 | STA_ENTRY |
| 885 | __field(u16, tid) |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 886 | ), |
| 887 | |
| 888 | TP_fast_assign( |
| 889 | STA_ASSIGN; |
| 890 | __entry->tid = tid; |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 891 | ), |
| 892 | |
| 893 | TP_printk( |
Johannes Berg | 6a8579d | 2010-05-27 14:41:07 +0200 | [diff] [blame^] | 894 | STA_PR_FMT " tid:%d", |
| 895 | STA_PR_ARG, __entry->tid |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 896 | ) |
| 897 | ); |
| 898 | |
| 899 | TRACE_EVENT(api_stop_tx_ba_cb, |
| 900 | TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid), |
| 901 | |
| 902 | TP_ARGS(sdata, ra, tid), |
| 903 | |
| 904 | TP_STRUCT__entry( |
| 905 | VIF_ENTRY |
| 906 | __array(u8, ra, ETH_ALEN) |
| 907 | __field(u16, tid) |
| 908 | ), |
| 909 | |
| 910 | TP_fast_assign( |
| 911 | VIF_ASSIGN; |
| 912 | memcpy(__entry->ra, ra, ETH_ALEN); |
| 913 | __entry->tid = tid; |
| 914 | ), |
| 915 | |
| 916 | TP_printk( |
| 917 | VIF_PR_FMT " ra:%pM tid:%d", |
| 918 | VIF_PR_ARG, __entry->ra, __entry->tid |
| 919 | ) |
| 920 | ); |
| 921 | |
| 922 | TRACE_EVENT(api_restart_hw, |
| 923 | TP_PROTO(struct ieee80211_local *local), |
| 924 | |
| 925 | TP_ARGS(local), |
| 926 | |
| 927 | TP_STRUCT__entry( |
| 928 | LOCAL_ENTRY |
| 929 | ), |
| 930 | |
| 931 | TP_fast_assign( |
| 932 | LOCAL_ASSIGN; |
| 933 | ), |
| 934 | |
| 935 | TP_printk( |
| 936 | LOCAL_PR_FMT, |
| 937 | LOCAL_PR_ARG |
| 938 | ) |
| 939 | ); |
| 940 | |
| 941 | TRACE_EVENT(api_beacon_loss, |
| 942 | TP_PROTO(struct ieee80211_sub_if_data *sdata), |
| 943 | |
| 944 | TP_ARGS(sdata), |
| 945 | |
| 946 | TP_STRUCT__entry( |
| 947 | VIF_ENTRY |
| 948 | ), |
| 949 | |
| 950 | TP_fast_assign( |
| 951 | VIF_ASSIGN; |
| 952 | ), |
| 953 | |
| 954 | TP_printk( |
| 955 | VIF_PR_FMT, |
| 956 | VIF_PR_ARG |
| 957 | ) |
| 958 | ); |
| 959 | |
| 960 | TRACE_EVENT(api_connection_loss, |
| 961 | TP_PROTO(struct ieee80211_sub_if_data *sdata), |
| 962 | |
| 963 | TP_ARGS(sdata), |
| 964 | |
| 965 | TP_STRUCT__entry( |
| 966 | VIF_ENTRY |
| 967 | ), |
| 968 | |
| 969 | TP_fast_assign( |
| 970 | VIF_ASSIGN; |
| 971 | ), |
| 972 | |
| 973 | TP_printk( |
| 974 | VIF_PR_FMT, |
| 975 | VIF_PR_ARG |
| 976 | ) |
| 977 | ); |
| 978 | |
| 979 | TRACE_EVENT(api_cqm_rssi_notify, |
| 980 | TP_PROTO(struct ieee80211_sub_if_data *sdata, |
| 981 | enum nl80211_cqm_rssi_threshold_event rssi_event), |
| 982 | |
| 983 | TP_ARGS(sdata, rssi_event), |
| 984 | |
| 985 | TP_STRUCT__entry( |
| 986 | VIF_ENTRY |
| 987 | __field(u32, rssi_event) |
| 988 | ), |
| 989 | |
| 990 | TP_fast_assign( |
| 991 | VIF_ASSIGN; |
| 992 | __entry->rssi_event = rssi_event; |
| 993 | ), |
| 994 | |
| 995 | TP_printk( |
| 996 | VIF_PR_FMT " event:%d", |
| 997 | VIF_PR_ARG, __entry->rssi_event |
| 998 | ) |
| 999 | ); |
| 1000 | |
| 1001 | TRACE_EVENT(api_scan_completed, |
| 1002 | TP_PROTO(struct ieee80211_local *local, bool aborted), |
| 1003 | |
| 1004 | TP_ARGS(local, aborted), |
| 1005 | |
| 1006 | TP_STRUCT__entry( |
| 1007 | LOCAL_ENTRY |
| 1008 | __field(bool, aborted) |
| 1009 | ), |
| 1010 | |
| 1011 | TP_fast_assign( |
| 1012 | LOCAL_ASSIGN; |
| 1013 | __entry->aborted = aborted; |
| 1014 | ), |
| 1015 | |
| 1016 | TP_printk( |
| 1017 | LOCAL_PR_FMT " aborted:%d", |
| 1018 | LOCAL_PR_ARG, __entry->aborted |
| 1019 | ) |
| 1020 | ); |
| 1021 | |
| 1022 | TRACE_EVENT(api_sta_block_awake, |
| 1023 | TP_PROTO(struct ieee80211_local *local, |
| 1024 | struct ieee80211_sta *sta, bool block), |
| 1025 | |
| 1026 | TP_ARGS(local, sta, block), |
| 1027 | |
| 1028 | TP_STRUCT__entry( |
| 1029 | LOCAL_ENTRY |
| 1030 | STA_ENTRY |
| 1031 | __field(bool, block) |
| 1032 | ), |
| 1033 | |
| 1034 | TP_fast_assign( |
| 1035 | LOCAL_ASSIGN; |
| 1036 | STA_ASSIGN; |
| 1037 | __entry->block = block; |
| 1038 | ), |
| 1039 | |
| 1040 | TP_printk( |
| 1041 | LOCAL_PR_FMT STA_PR_FMT " block:%d", |
| 1042 | LOCAL_PR_ARG, STA_PR_FMT, __entry->block |
| 1043 | ) |
| 1044 | ); |
| 1045 | |
Johannes Berg | 5ce6e43 | 2010-05-11 16:20:57 +0200 | [diff] [blame] | 1046 | TRACE_EVENT(api_chswitch_done, |
| 1047 | TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success), |
| 1048 | |
| 1049 | TP_ARGS(sdata, success), |
| 1050 | |
| 1051 | TP_STRUCT__entry( |
| 1052 | VIF_ENTRY |
| 1053 | __field(bool, success) |
| 1054 | ), |
| 1055 | |
| 1056 | TP_fast_assign( |
| 1057 | VIF_ASSIGN; |
| 1058 | __entry->success = success; |
| 1059 | ), |
| 1060 | |
| 1061 | TP_printk( |
| 1062 | VIF_PR_FMT " success=%d", |
| 1063 | VIF_PR_ARG, __entry->success |
| 1064 | ) |
| 1065 | ); |
| 1066 | |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1067 | /* |
| 1068 | * Tracing for internal functions |
| 1069 | * (which may also be called in response to driver calls) |
| 1070 | */ |
| 1071 | |
| 1072 | TRACE_EVENT(wake_queue, |
| 1073 | TP_PROTO(struct ieee80211_local *local, u16 queue, |
| 1074 | enum queue_stop_reason reason), |
| 1075 | |
| 1076 | TP_ARGS(local, queue, reason), |
| 1077 | |
| 1078 | TP_STRUCT__entry( |
| 1079 | LOCAL_ENTRY |
| 1080 | __field(u16, queue) |
| 1081 | __field(u32, reason) |
| 1082 | ), |
| 1083 | |
| 1084 | TP_fast_assign( |
| 1085 | LOCAL_ASSIGN; |
| 1086 | __entry->queue = queue; |
| 1087 | __entry->reason = reason; |
| 1088 | ), |
| 1089 | |
| 1090 | TP_printk( |
| 1091 | LOCAL_PR_FMT " queue:%d, reason:%d", |
| 1092 | LOCAL_PR_ARG, __entry->queue, __entry->reason |
| 1093 | ) |
| 1094 | ); |
| 1095 | |
| 1096 | TRACE_EVENT(stop_queue, |
| 1097 | TP_PROTO(struct ieee80211_local *local, u16 queue, |
| 1098 | enum queue_stop_reason reason), |
| 1099 | |
| 1100 | TP_ARGS(local, queue, reason), |
| 1101 | |
| 1102 | TP_STRUCT__entry( |
| 1103 | LOCAL_ENTRY |
| 1104 | __field(u16, queue) |
| 1105 | __field(u32, reason) |
| 1106 | ), |
| 1107 | |
| 1108 | TP_fast_assign( |
| 1109 | LOCAL_ASSIGN; |
| 1110 | __entry->queue = queue; |
| 1111 | __entry->reason = reason; |
| 1112 | ), |
| 1113 | |
| 1114 | TP_printk( |
| 1115 | LOCAL_PR_FMT " queue:%d, reason:%d", |
| 1116 | LOCAL_PR_ARG, __entry->queue, __entry->reason |
| 1117 | ) |
| 1118 | ); |
Christian Lamparter | f742880 | 2009-07-19 23:21:07 +0200 | [diff] [blame] | 1119 | #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 1120 | |
| 1121 | #undef TRACE_INCLUDE_PATH |
| 1122 | #define TRACE_INCLUDE_PATH . |
| 1123 | #undef TRACE_INCLUDE_FILE |
| 1124 | #define TRACE_INCLUDE_FILE driver-trace |
| 1125 | #include <trace/define_trace.h> |