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