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