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