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