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