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 | |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 8 | #undef TRACE_SYSTEM |
| 9 | #define TRACE_SYSTEM mac80211 |
| 10 | |
| 11 | #define MAXNAME 32 |
| 12 | #define LOCAL_ENTRY __array(char, wiphy_name, 32) |
| 13 | #define LOCAL_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME) |
| 14 | #define LOCAL_PR_FMT "%s" |
| 15 | #define LOCAL_PR_ARG __entry->wiphy_name |
| 16 | |
| 17 | #define STA_ENTRY __array(char, sta_addr, ETH_ALEN) |
| 18 | #define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN)) |
| 19 | #define STA_PR_FMT " sta:%pM" |
| 20 | #define STA_PR_ARG __entry->sta_addr |
| 21 | |
Johannes Berg | 2ca27bc | 2010-09-16 14:58:23 +0200 | [diff] [blame] | 22 | #define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \ |
| 23 | __field(bool, p2p) \ |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 24 | __string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>") |
Johannes Berg | 2ca27bc | 2010-09-16 14:58:23 +0200 | [diff] [blame] | 25 | #define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \ |
| 26 | __entry->p2p = sdata->vif.p2p; \ |
Johannes Berg | f142c6b | 2012-06-18 20:07:15 +0200 | [diff] [blame] | 27 | __assign_str(vif_name, sdata->dev ? sdata->dev->name : sdata->name) |
Johannes Berg | 2ca27bc | 2010-09-16 14:58:23 +0200 | [diff] [blame] | 28 | #define VIF_PR_FMT " vif:%s(%d%s)" |
| 29 | #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] | 30 | |
Johannes Berg | 5a32aff | 2012-12-21 12:36:33 +0100 | [diff] [blame] | 31 | #define CHANDEF_ENTRY __field(u32, control_freq) \ |
Johannes Berg | 4bf8853 | 2012-11-09 11:39:59 +0100 | [diff] [blame] | 32 | __field(u32, chan_width) \ |
| 33 | __field(u32, center_freq1) \ |
Johannes Berg | 5a32aff | 2012-12-21 12:36:33 +0100 | [diff] [blame] | 34 | __field(u32, center_freq2) |
| 35 | #define CHANDEF_ASSIGN(c) \ |
| 36 | __entry->control_freq = (c)->chan->center_freq; \ |
| 37 | __entry->chan_width = (c)->width; \ |
| 38 | __entry->center_freq1 = (c)->center_freq1; \ |
| 39 | __entry->center_freq1 = (c)->center_freq2; |
| 40 | #define CHANDEF_PR_FMT " control:%d MHz width:%d center: %d/%d MHz" |
| 41 | #define CHANDEF_PR_ARG __entry->control_freq, __entry->chan_width, \ |
| 42 | __entry->center_freq1, __entry->center_freq2 |
| 43 | |
| 44 | #define CHANCTX_ENTRY CHANDEF_ENTRY \ |
Johannes Berg | 04ecd25 | 2012-09-11 14:34:12 +0200 | [diff] [blame] | 45 | __field(u8, rx_chains_static) \ |
| 46 | __field(u8, rx_chains_dynamic) |
Johannes Berg | 5a32aff | 2012-12-21 12:36:33 +0100 | [diff] [blame] | 47 | #define CHANCTX_ASSIGN CHANDEF_ASSIGN(&ctx->conf.def) \ |
Johannes Berg | 04ecd25 | 2012-09-11 14:34:12 +0200 | [diff] [blame] | 48 | __entry->rx_chains_static = ctx->conf.rx_chains_static; \ |
| 49 | __entry->rx_chains_dynamic = ctx->conf.rx_chains_dynamic |
Johannes Berg | 5a32aff | 2012-12-21 12:36:33 +0100 | [diff] [blame] | 50 | #define CHANCTX_PR_FMT CHANDEF_PR_FMT " chains:%d/%d" |
| 51 | #define CHANCTX_PR_ARG CHANDEF_PR_ARG, \ |
Johannes Berg | 04ecd25 | 2012-09-11 14:34:12 +0200 | [diff] [blame] | 52 | __entry->rx_chains_static, __entry->rx_chains_dynamic |
Michal Kazior | c3645ea | 2012-06-26 14:37:17 +0200 | [diff] [blame] | 53 | |
| 54 | |
| 55 | |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 56 | /* |
| 57 | * Tracing for driver callbacks. |
| 58 | */ |
| 59 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 60 | DECLARE_EVENT_CLASS(local_only_evt, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 61 | TP_PROTO(struct ieee80211_local *local), |
| 62 | TP_ARGS(local), |
| 63 | TP_STRUCT__entry( |
| 64 | LOCAL_ENTRY |
| 65 | ), |
| 66 | TP_fast_assign( |
| 67 | LOCAL_ASSIGN; |
| 68 | ), |
| 69 | TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG) |
| 70 | ); |
| 71 | |
Luciano Coelho | 92ddc11 | 2011-05-09 14:40:06 +0300 | [diff] [blame] | 72 | DECLARE_EVENT_CLASS(local_sdata_addr_evt, |
| 73 | TP_PROTO(struct ieee80211_local *local, |
| 74 | struct ieee80211_sub_if_data *sdata), |
| 75 | TP_ARGS(local, sdata), |
| 76 | |
| 77 | TP_STRUCT__entry( |
| 78 | LOCAL_ENTRY |
| 79 | VIF_ENTRY |
| 80 | __array(char, addr, 6) |
| 81 | ), |
| 82 | |
| 83 | TP_fast_assign( |
| 84 | LOCAL_ASSIGN; |
| 85 | VIF_ASSIGN; |
| 86 | memcpy(__entry->addr, sdata->vif.addr, 6); |
| 87 | ), |
| 88 | |
| 89 | TP_printk( |
| 90 | LOCAL_PR_FMT VIF_PR_FMT " addr:%pM", |
| 91 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr |
| 92 | ) |
| 93 | ); |
| 94 | |
| 95 | DECLARE_EVENT_CLASS(local_u32_evt, |
| 96 | TP_PROTO(struct ieee80211_local *local, u32 value), |
| 97 | TP_ARGS(local, value), |
| 98 | |
| 99 | TP_STRUCT__entry( |
| 100 | LOCAL_ENTRY |
| 101 | __field(u32, value) |
| 102 | ), |
| 103 | |
| 104 | TP_fast_assign( |
| 105 | LOCAL_ASSIGN; |
| 106 | __entry->value = value; |
| 107 | ), |
| 108 | |
| 109 | TP_printk( |
| 110 | LOCAL_PR_FMT " value:%d", |
| 111 | LOCAL_PR_ARG, __entry->value |
| 112 | ) |
| 113 | ); |
| 114 | |
Luciano Coelho | 79f460c | 2011-05-11 17:09:36 +0300 | [diff] [blame] | 115 | DECLARE_EVENT_CLASS(local_sdata_evt, |
| 116 | TP_PROTO(struct ieee80211_local *local, |
| 117 | struct ieee80211_sub_if_data *sdata), |
| 118 | TP_ARGS(local, sdata), |
| 119 | |
| 120 | TP_STRUCT__entry( |
| 121 | LOCAL_ENTRY |
| 122 | VIF_ENTRY |
| 123 | ), |
| 124 | |
| 125 | TP_fast_assign( |
| 126 | LOCAL_ASSIGN; |
| 127 | VIF_ASSIGN; |
| 128 | ), |
| 129 | |
| 130 | TP_printk( |
| 131 | LOCAL_PR_FMT VIF_PR_FMT, |
| 132 | LOCAL_PR_ARG, VIF_PR_ARG |
| 133 | ) |
| 134 | ); |
| 135 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 136 | DEFINE_EVENT(local_only_evt, drv_return_void, |
| 137 | TP_PROTO(struct ieee80211_local *local), |
| 138 | TP_ARGS(local) |
| 139 | ); |
| 140 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 141 | TRACE_EVENT(drv_return_int, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 142 | TP_PROTO(struct ieee80211_local *local, int ret), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 143 | TP_ARGS(local, ret), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 144 | TP_STRUCT__entry( |
| 145 | LOCAL_ENTRY |
| 146 | __field(int, ret) |
| 147 | ), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 148 | TP_fast_assign( |
| 149 | LOCAL_ASSIGN; |
| 150 | __entry->ret = ret; |
| 151 | ), |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 152 | TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret) |
| 153 | ); |
| 154 | |
Vivek Natarajan | e8306f9 | 2011-04-06 11:41:10 +0530 | [diff] [blame] | 155 | TRACE_EVENT(drv_return_bool, |
| 156 | TP_PROTO(struct ieee80211_local *local, bool ret), |
| 157 | TP_ARGS(local, ret), |
| 158 | TP_STRUCT__entry( |
| 159 | LOCAL_ENTRY |
| 160 | __field(bool, ret) |
| 161 | ), |
| 162 | TP_fast_assign( |
| 163 | LOCAL_ASSIGN; |
| 164 | __entry->ret = ret; |
| 165 | ), |
| 166 | TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ? |
| 167 | "true" : "false") |
| 168 | ); |
| 169 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 170 | TRACE_EVENT(drv_return_u64, |
| 171 | TP_PROTO(struct ieee80211_local *local, u64 ret), |
| 172 | TP_ARGS(local, ret), |
| 173 | TP_STRUCT__entry( |
| 174 | LOCAL_ENTRY |
| 175 | __field(u64, ret) |
| 176 | ), |
| 177 | TP_fast_assign( |
| 178 | LOCAL_ASSIGN; |
| 179 | __entry->ret = ret; |
| 180 | ), |
| 181 | TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret) |
| 182 | ); |
| 183 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 184 | DEFINE_EVENT(local_only_evt, drv_start, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 185 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 186 | TP_ARGS(local) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 187 | ); |
| 188 | |
Ben Greear | e352114 | 2012-04-23 12:50:31 -0700 | [diff] [blame] | 189 | DEFINE_EVENT(local_u32_evt, drv_get_et_strings, |
| 190 | TP_PROTO(struct ieee80211_local *local, u32 sset), |
| 191 | TP_ARGS(local, sset) |
| 192 | ); |
| 193 | |
| 194 | DEFINE_EVENT(local_u32_evt, drv_get_et_sset_count, |
| 195 | TP_PROTO(struct ieee80211_local *local, u32 sset), |
| 196 | TP_ARGS(local, sset) |
| 197 | ); |
| 198 | |
| 199 | DEFINE_EVENT(local_only_evt, drv_get_et_stats, |
| 200 | TP_PROTO(struct ieee80211_local *local), |
| 201 | TP_ARGS(local) |
| 202 | ); |
| 203 | |
Johannes Berg | eecc480 | 2011-05-04 15:37:29 +0200 | [diff] [blame] | 204 | DEFINE_EVENT(local_only_evt, drv_suspend, |
| 205 | TP_PROTO(struct ieee80211_local *local), |
| 206 | TP_ARGS(local) |
| 207 | ); |
| 208 | |
| 209 | DEFINE_EVENT(local_only_evt, drv_resume, |
| 210 | TP_PROTO(struct ieee80211_local *local), |
| 211 | TP_ARGS(local) |
| 212 | ); |
| 213 | |
Johannes Berg | 6d52563 | 2012-04-04 15:05:25 +0200 | [diff] [blame] | 214 | TRACE_EVENT(drv_set_wakeup, |
| 215 | TP_PROTO(struct ieee80211_local *local, bool enabled), |
| 216 | TP_ARGS(local, enabled), |
| 217 | TP_STRUCT__entry( |
| 218 | LOCAL_ENTRY |
| 219 | __field(bool, enabled) |
| 220 | ), |
| 221 | TP_fast_assign( |
| 222 | LOCAL_ASSIGN; |
| 223 | __entry->enabled = enabled; |
| 224 | ), |
| 225 | TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled) |
| 226 | ); |
| 227 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 228 | DEFINE_EVENT(local_only_evt, drv_stop, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 229 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 230 | TP_ARGS(local) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 231 | ); |
| 232 | |
Luciano Coelho | 92ddc11 | 2011-05-09 14:40:06 +0300 | [diff] [blame] | 233 | DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 234 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 235 | struct ieee80211_sub_if_data *sdata), |
Luciano Coelho | 92ddc11 | 2011-05-09 14:40:06 +0300 | [diff] [blame] | 236 | TP_ARGS(local, sdata) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 237 | ); |
| 238 | |
Johannes Berg | 34d4bc4 | 2010-08-27 12:35:58 +0200 | [diff] [blame] | 239 | TRACE_EVENT(drv_change_interface, |
| 240 | TP_PROTO(struct ieee80211_local *local, |
| 241 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 2ca27bc | 2010-09-16 14:58:23 +0200 | [diff] [blame] | 242 | enum nl80211_iftype type, bool p2p), |
Johannes Berg | 34d4bc4 | 2010-08-27 12:35:58 +0200 | [diff] [blame] | 243 | |
Johannes Berg | 2ca27bc | 2010-09-16 14:58:23 +0200 | [diff] [blame] | 244 | TP_ARGS(local, sdata, type, p2p), |
Johannes Berg | 34d4bc4 | 2010-08-27 12:35:58 +0200 | [diff] [blame] | 245 | |
| 246 | TP_STRUCT__entry( |
| 247 | LOCAL_ENTRY |
| 248 | VIF_ENTRY |
| 249 | __field(u32, new_type) |
Johannes Berg | 2ca27bc | 2010-09-16 14:58:23 +0200 | [diff] [blame] | 250 | __field(bool, new_p2p) |
Johannes Berg | 34d4bc4 | 2010-08-27 12:35:58 +0200 | [diff] [blame] | 251 | ), |
| 252 | |
| 253 | TP_fast_assign( |
| 254 | LOCAL_ASSIGN; |
| 255 | VIF_ASSIGN; |
| 256 | __entry->new_type = type; |
Johannes Berg | 2ca27bc | 2010-09-16 14:58:23 +0200 | [diff] [blame] | 257 | __entry->new_p2p = p2p; |
Johannes Berg | 34d4bc4 | 2010-08-27 12:35:58 +0200 | [diff] [blame] | 258 | ), |
| 259 | |
| 260 | TP_printk( |
Johannes Berg | 2ca27bc | 2010-09-16 14:58:23 +0200 | [diff] [blame] | 261 | LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s", |
| 262 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type, |
| 263 | __entry->new_p2p ? "/p2p" : "" |
Johannes Berg | 34d4bc4 | 2010-08-27 12:35:58 +0200 | [diff] [blame] | 264 | ) |
| 265 | ); |
| 266 | |
Luciano Coelho | 92ddc11 | 2011-05-09 14:40:06 +0300 | [diff] [blame] | 267 | DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface, |
| 268 | TP_PROTO(struct ieee80211_local *local, |
| 269 | struct ieee80211_sub_if_data *sdata), |
| 270 | TP_ARGS(local, sdata) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 271 | ); |
| 272 | |
| 273 | TRACE_EVENT(drv_config, |
| 274 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 275 | u32 changed), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 276 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 277 | TP_ARGS(local, changed), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 278 | |
| 279 | TP_STRUCT__entry( |
| 280 | LOCAL_ENTRY |
| 281 | __field(u32, changed) |
Johannes Berg | f911ab8 | 2009-11-25 19:07:20 +0100 | [diff] [blame] | 282 | __field(u32, flags) |
| 283 | __field(int, power_level) |
| 284 | __field(int, dynamic_ps_timeout) |
| 285 | __field(int, max_sleep_period) |
| 286 | __field(u16, listen_interval) |
| 287 | __field(u8, long_frame_max_tx_count) |
| 288 | __field(u8, short_frame_max_tx_count) |
| 289 | __field(int, center_freq) |
| 290 | __field(int, channel_type) |
Johannes Berg | 0f78231 | 2009-12-01 13:37:02 +0100 | [diff] [blame] | 291 | __field(int, smps) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 292 | ), |
| 293 | |
| 294 | TP_fast_assign( |
| 295 | LOCAL_ASSIGN; |
| 296 | __entry->changed = changed; |
Johannes Berg | f911ab8 | 2009-11-25 19:07:20 +0100 | [diff] [blame] | 297 | __entry->flags = local->hw.conf.flags; |
| 298 | __entry->power_level = local->hw.conf.power_level; |
| 299 | __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout; |
| 300 | __entry->max_sleep_period = local->hw.conf.max_sleep_period; |
| 301 | __entry->listen_interval = local->hw.conf.listen_interval; |
Johannes Berg | 3d01be7 | 2012-07-26 14:27:39 +0200 | [diff] [blame] | 302 | __entry->long_frame_max_tx_count = |
| 303 | local->hw.conf.long_frame_max_tx_count; |
| 304 | __entry->short_frame_max_tx_count = |
| 305 | local->hw.conf.short_frame_max_tx_count; |
| 306 | __entry->center_freq = local->hw.conf.channel ? |
| 307 | local->hw.conf.channel->center_freq : 0; |
Johannes Berg | f911ab8 | 2009-11-25 19:07:20 +0100 | [diff] [blame] | 308 | __entry->channel_type = local->hw.conf.channel_type; |
Johannes Berg | 0f78231 | 2009-12-01 13:37:02 +0100 | [diff] [blame] | 309 | __entry->smps = local->hw.conf.smps_mode; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 310 | ), |
| 311 | |
| 312 | TP_printk( |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 313 | LOCAL_PR_FMT " ch:%#x freq:%d", |
| 314 | LOCAL_PR_ARG, __entry->changed, __entry->center_freq |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 315 | ) |
| 316 | ); |
| 317 | |
| 318 | TRACE_EVENT(drv_bss_info_changed, |
| 319 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 320 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 321 | struct ieee80211_bss_conf *info, |
| 322 | u32 changed), |
| 323 | |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 324 | TP_ARGS(local, sdata, info, changed), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 325 | |
| 326 | TP_STRUCT__entry( |
| 327 | LOCAL_ENTRY |
| 328 | VIF_ENTRY |
Johannes Berg | 1724ffb | 2012-10-24 11:38:30 +0200 | [diff] [blame] | 329 | __field(u32, changed) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 330 | __field(bool, assoc) |
Johannes Berg | 1724ffb | 2012-10-24 11:38:30 +0200 | [diff] [blame] | 331 | __field(bool, ibss_joined) |
| 332 | __field(bool, ibss_creator) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 333 | __field(u16, aid) |
| 334 | __field(bool, cts) |
| 335 | __field(bool, shortpre) |
| 336 | __field(bool, shortslot) |
Johannes Berg | 1724ffb | 2012-10-24 11:38:30 +0200 | [diff] [blame] | 337 | __field(bool, enable_beacon) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 338 | __field(u8, dtimper) |
| 339 | __field(u16, bcnint) |
| 340 | __field(u16, assoc_cap) |
Johannes Berg | 8c358bc | 2012-05-22 22:13:05 +0200 | [diff] [blame] | 341 | __field(u64, sync_tsf) |
| 342 | __field(u32, sync_device_ts) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 343 | __field(u32, basic_rates) |
Johannes Berg | 1724ffb | 2012-10-24 11:38:30 +0200 | [diff] [blame] | 344 | __array(int, mcast_rate, IEEE80211_NUM_BANDS) |
Johannes Berg | f911ab8 | 2009-11-25 19:07:20 +0100 | [diff] [blame] | 345 | __field(u16, ht_operation_mode) |
Johannes Berg | 1724ffb | 2012-10-24 11:38:30 +0200 | [diff] [blame] | 346 | __field(s32, cqm_rssi_thold); |
| 347 | __field(s32, cqm_rssi_hyst); |
Johannes Berg | 4bf8853 | 2012-11-09 11:39:59 +0100 | [diff] [blame] | 348 | __field(u32, channel_width); |
| 349 | __field(u32, channel_cfreq1); |
Johannes Berg | 1724ffb | 2012-10-24 11:38:30 +0200 | [diff] [blame] | 350 | __dynamic_array(u32, arp_addr_list, info->arp_addr_cnt); |
| 351 | __field(bool, arp_filter_enabled); |
| 352 | __field(bool, qos); |
| 353 | __field(bool, idle); |
| 354 | __field(bool, ps); |
| 355 | __dynamic_array(u8, ssid, info->ssid_len); |
| 356 | __field(bool, hidden_ssid); |
Johannes Berg | 1ea6f9c | 2012-10-24 10:59:25 +0200 | [diff] [blame] | 357 | __field(int, txpower) |
Johannes Berg | 488dd7b | 2012-10-29 20:08:01 +0100 | [diff] [blame] | 358 | __field(u8, p2p_ctwindow) |
| 359 | __field(bool, p2p_oppps) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 360 | ), |
| 361 | |
| 362 | TP_fast_assign( |
| 363 | LOCAL_ASSIGN; |
| 364 | VIF_ASSIGN; |
| 365 | __entry->changed = changed; |
| 366 | __entry->aid = info->aid; |
| 367 | __entry->assoc = info->assoc; |
Johannes Berg | 1724ffb | 2012-10-24 11:38:30 +0200 | [diff] [blame] | 368 | __entry->ibss_joined = info->ibss_joined; |
| 369 | __entry->ibss_creator = info->ibss_creator; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 370 | __entry->shortpre = info->use_short_preamble; |
| 371 | __entry->cts = info->use_cts_prot; |
| 372 | __entry->shortslot = info->use_short_slot; |
Johannes Berg | 1724ffb | 2012-10-24 11:38:30 +0200 | [diff] [blame] | 373 | __entry->enable_beacon = info->enable_beacon; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 374 | __entry->dtimper = info->dtim_period; |
| 375 | __entry->bcnint = info->beacon_int; |
| 376 | __entry->assoc_cap = info->assoc_capability; |
Johannes Berg | 8c358bc | 2012-05-22 22:13:05 +0200 | [diff] [blame] | 377 | __entry->sync_tsf = info->sync_tsf; |
| 378 | __entry->sync_device_ts = info->sync_device_ts; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 379 | __entry->basic_rates = info->basic_rates; |
Johannes Berg | 1724ffb | 2012-10-24 11:38:30 +0200 | [diff] [blame] | 380 | memcpy(__entry->mcast_rate, info->mcast_rate, |
| 381 | sizeof(__entry->mcast_rate)); |
Johannes Berg | f911ab8 | 2009-11-25 19:07:20 +0100 | [diff] [blame] | 382 | __entry->ht_operation_mode = info->ht_operation_mode; |
Johannes Berg | 1724ffb | 2012-10-24 11:38:30 +0200 | [diff] [blame] | 383 | __entry->cqm_rssi_thold = info->cqm_rssi_thold; |
| 384 | __entry->cqm_rssi_hyst = info->cqm_rssi_hyst; |
Johannes Berg | 4bf8853 | 2012-11-09 11:39:59 +0100 | [diff] [blame] | 385 | __entry->channel_width = info->chandef.width; |
| 386 | __entry->channel_cfreq1 = info->chandef.center_freq1; |
Johannes Berg | 1724ffb | 2012-10-24 11:38:30 +0200 | [diff] [blame] | 387 | memcpy(__get_dynamic_array(arp_addr_list), info->arp_addr_list, |
| 388 | sizeof(u32) * info->arp_addr_cnt); |
| 389 | __entry->arp_filter_enabled = info->arp_filter_enabled; |
| 390 | __entry->qos = info->qos; |
| 391 | __entry->idle = info->idle; |
| 392 | __entry->ps = info->ps; |
| 393 | memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len); |
| 394 | __entry->hidden_ssid = info->hidden_ssid; |
Johannes Berg | 1ea6f9c | 2012-10-24 10:59:25 +0200 | [diff] [blame] | 395 | __entry->txpower = info->txpower; |
Johannes Berg | 488dd7b | 2012-10-29 20:08:01 +0100 | [diff] [blame] | 396 | __entry->p2p_ctwindow = info->p2p_ctwindow; |
| 397 | __entry->p2p_oppps = info->p2p_oppps; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 398 | ), |
| 399 | |
| 400 | TP_printk( |
| 401 | LOCAL_PR_FMT VIF_PR_FMT " changed:%#x", |
| 402 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed |
| 403 | ) |
| 404 | ); |
| 405 | |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 406 | TRACE_EVENT(drv_prepare_multicast, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 407 | TP_PROTO(struct ieee80211_local *local, int mc_count), |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 408 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 409 | TP_ARGS(local, mc_count), |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 410 | |
| 411 | TP_STRUCT__entry( |
| 412 | LOCAL_ENTRY |
| 413 | __field(int, mc_count) |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 414 | ), |
| 415 | |
| 416 | TP_fast_assign( |
| 417 | LOCAL_ASSIGN; |
| 418 | __entry->mc_count = mc_count; |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 419 | ), |
| 420 | |
| 421 | TP_printk( |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 422 | LOCAL_PR_FMT " prepare mc (%d)", |
| 423 | LOCAL_PR_ARG, __entry->mc_count |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 424 | ) |
| 425 | ); |
| 426 | |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 427 | TRACE_EVENT(drv_configure_filter, |
| 428 | TP_PROTO(struct ieee80211_local *local, |
| 429 | unsigned int changed_flags, |
| 430 | unsigned int *total_flags, |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 431 | u64 multicast), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 432 | |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 433 | TP_ARGS(local, changed_flags, total_flags, multicast), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 434 | |
| 435 | TP_STRUCT__entry( |
| 436 | LOCAL_ENTRY |
| 437 | __field(unsigned int, changed) |
| 438 | __field(unsigned int, total) |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 439 | __field(u64, multicast) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 440 | ), |
| 441 | |
| 442 | TP_fast_assign( |
| 443 | LOCAL_ASSIGN; |
| 444 | __entry->changed = changed_flags; |
| 445 | __entry->total = *total_flags; |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 446 | __entry->multicast = multicast; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 447 | ), |
| 448 | |
| 449 | TP_printk( |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 450 | LOCAL_PR_FMT " changed:%#x total:%#x", |
| 451 | LOCAL_PR_ARG, __entry->changed, __entry->total |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 452 | ) |
| 453 | ); |
| 454 | |
| 455 | TRACE_EVENT(drv_set_tim, |
| 456 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 457 | struct ieee80211_sta *sta, bool set), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 458 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 459 | TP_ARGS(local, sta, set), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 460 | |
| 461 | TP_STRUCT__entry( |
| 462 | LOCAL_ENTRY |
| 463 | STA_ENTRY |
| 464 | __field(bool, set) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 465 | ), |
| 466 | |
| 467 | TP_fast_assign( |
| 468 | LOCAL_ASSIGN; |
| 469 | STA_ASSIGN; |
| 470 | __entry->set = set; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 471 | ), |
| 472 | |
| 473 | TP_printk( |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 474 | LOCAL_PR_FMT STA_PR_FMT " set:%d", |
| 475 | LOCAL_PR_ARG, STA_PR_FMT, __entry->set |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 476 | ) |
| 477 | ); |
| 478 | |
| 479 | TRACE_EVENT(drv_set_key, |
| 480 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 481 | enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 482 | struct ieee80211_sta *sta, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 483 | struct ieee80211_key_conf *key), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 484 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 485 | TP_ARGS(local, cmd, sdata, sta, key), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 486 | |
| 487 | TP_STRUCT__entry( |
| 488 | LOCAL_ENTRY |
| 489 | VIF_ENTRY |
| 490 | STA_ENTRY |
Johannes Berg | 97359d1 | 2010-08-10 09:46:38 +0200 | [diff] [blame] | 491 | __field(u32, cipher) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 492 | __field(u8, hw_key_idx) |
| 493 | __field(u8, flags) |
| 494 | __field(s8, keyidx) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 495 | ), |
| 496 | |
| 497 | TP_fast_assign( |
| 498 | LOCAL_ASSIGN; |
| 499 | VIF_ASSIGN; |
| 500 | STA_ASSIGN; |
Johannes Berg | 97359d1 | 2010-08-10 09:46:38 +0200 | [diff] [blame] | 501 | __entry->cipher = key->cipher; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 502 | __entry->flags = key->flags; |
| 503 | __entry->keyidx = key->keyidx; |
| 504 | __entry->hw_key_idx = key->hw_key_idx; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 505 | ), |
| 506 | |
| 507 | TP_printk( |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 508 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT, |
| 509 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 510 | ) |
| 511 | ); |
| 512 | |
| 513 | TRACE_EVENT(drv_update_tkip_key, |
| 514 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | b3fbdcf | 2010-01-21 11:40:47 +0100 | [diff] [blame] | 515 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 516 | struct ieee80211_key_conf *conf, |
Johannes Berg | b3fbdcf | 2010-01-21 11:40:47 +0100 | [diff] [blame] | 517 | struct ieee80211_sta *sta, u32 iv32), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 518 | |
Johannes Berg | b3fbdcf | 2010-01-21 11:40:47 +0100 | [diff] [blame] | 519 | TP_ARGS(local, sdata, conf, sta, iv32), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 520 | |
| 521 | TP_STRUCT__entry( |
| 522 | LOCAL_ENTRY |
Johannes Berg | b3fbdcf | 2010-01-21 11:40:47 +0100 | [diff] [blame] | 523 | VIF_ENTRY |
| 524 | STA_ENTRY |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 525 | __field(u32, iv32) |
| 526 | ), |
| 527 | |
| 528 | TP_fast_assign( |
| 529 | LOCAL_ASSIGN; |
Johannes Berg | b3fbdcf | 2010-01-21 11:40:47 +0100 | [diff] [blame] | 530 | VIF_ASSIGN; |
| 531 | STA_ASSIGN; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 532 | __entry->iv32 = iv32; |
| 533 | ), |
| 534 | |
| 535 | TP_printk( |
Johannes Berg | b3fbdcf | 2010-01-21 11:40:47 +0100 | [diff] [blame] | 536 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x", |
| 537 | LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32 |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 538 | ) |
| 539 | ); |
| 540 | |
Luciano Coelho | 79f460c | 2011-05-11 17:09:36 +0300 | [diff] [blame] | 541 | DEFINE_EVENT(local_sdata_evt, drv_hw_scan, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 542 | TP_PROTO(struct ieee80211_local *local, |
Luciano Coelho | 79f460c | 2011-05-11 17:09:36 +0300 | [diff] [blame] | 543 | struct ieee80211_sub_if_data *sdata), |
| 544 | TP_ARGS(local, sdata) |
| 545 | ); |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 546 | |
Eliad Peller | b856439 | 2011-06-13 12:47:30 +0300 | [diff] [blame] | 547 | DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan, |
| 548 | TP_PROTO(struct ieee80211_local *local, |
| 549 | struct ieee80211_sub_if_data *sdata), |
| 550 | TP_ARGS(local, sdata) |
| 551 | ); |
| 552 | |
Luciano Coelho | 79f460c | 2011-05-11 17:09:36 +0300 | [diff] [blame] | 553 | DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start, |
| 554 | TP_PROTO(struct ieee80211_local *local, |
| 555 | struct ieee80211_sub_if_data *sdata), |
| 556 | TP_ARGS(local, sdata) |
| 557 | ); |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 558 | |
Luciano Coelho | 79f460c | 2011-05-11 17:09:36 +0300 | [diff] [blame] | 559 | DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop, |
| 560 | TP_PROTO(struct ieee80211_local *local, |
| 561 | struct ieee80211_sub_if_data *sdata), |
| 562 | TP_ARGS(local, sdata) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 563 | ); |
| 564 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 565 | DEFINE_EVENT(local_only_evt, drv_sw_scan_start, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 566 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 567 | TP_ARGS(local) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 568 | ); |
| 569 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 570 | DEFINE_EVENT(local_only_evt, drv_sw_scan_complete, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 571 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 572 | TP_ARGS(local) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 573 | ); |
| 574 | |
| 575 | TRACE_EVENT(drv_get_stats, |
| 576 | TP_PROTO(struct ieee80211_local *local, |
| 577 | struct ieee80211_low_level_stats *stats, |
| 578 | int ret), |
| 579 | |
| 580 | TP_ARGS(local, stats, ret), |
| 581 | |
| 582 | TP_STRUCT__entry( |
| 583 | LOCAL_ENTRY |
| 584 | __field(int, ret) |
| 585 | __field(unsigned int, ackfail) |
| 586 | __field(unsigned int, rtsfail) |
| 587 | __field(unsigned int, fcserr) |
| 588 | __field(unsigned int, rtssucc) |
| 589 | ), |
| 590 | |
| 591 | TP_fast_assign( |
| 592 | LOCAL_ASSIGN; |
| 593 | __entry->ret = ret; |
| 594 | __entry->ackfail = stats->dot11ACKFailureCount; |
| 595 | __entry->rtsfail = stats->dot11RTSFailureCount; |
| 596 | __entry->fcserr = stats->dot11FCSErrorCount; |
| 597 | __entry->rtssucc = stats->dot11RTSSuccessCount; |
| 598 | ), |
| 599 | |
| 600 | TP_printk( |
| 601 | LOCAL_PR_FMT " ret:%d", |
| 602 | LOCAL_PR_ARG, __entry->ret |
| 603 | ) |
| 604 | ); |
| 605 | |
| 606 | TRACE_EVENT(drv_get_tkip_seq, |
| 607 | TP_PROTO(struct ieee80211_local *local, |
| 608 | u8 hw_key_idx, u32 *iv32, u16 *iv16), |
| 609 | |
| 610 | TP_ARGS(local, hw_key_idx, iv32, iv16), |
| 611 | |
| 612 | TP_STRUCT__entry( |
| 613 | LOCAL_ENTRY |
| 614 | __field(u8, hw_key_idx) |
| 615 | __field(u32, iv32) |
| 616 | __field(u16, iv16) |
| 617 | ), |
| 618 | |
| 619 | TP_fast_assign( |
| 620 | LOCAL_ASSIGN; |
| 621 | __entry->hw_key_idx = hw_key_idx; |
| 622 | __entry->iv32 = *iv32; |
| 623 | __entry->iv16 = *iv16; |
| 624 | ), |
| 625 | |
| 626 | TP_printk( |
| 627 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 628 | ) |
| 629 | ); |
| 630 | |
Luciano Coelho | 92ddc11 | 2011-05-09 14:40:06 +0300 | [diff] [blame] | 631 | DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold, |
Arik Nemtsov | f23a478 | 2010-11-08 11:51:06 +0200 | [diff] [blame] | 632 | TP_PROTO(struct ieee80211_local *local, u32 value), |
Luciano Coelho | 92ddc11 | 2011-05-09 14:40:06 +0300 | [diff] [blame] | 633 | TP_ARGS(local, value) |
Arik Nemtsov | f23a478 | 2010-11-08 11:51:06 +0200 | [diff] [blame] | 634 | ); |
| 635 | |
Luciano Coelho | 92ddc11 | 2011-05-09 14:40:06 +0300 | [diff] [blame] | 636 | DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 637 | TP_PROTO(struct ieee80211_local *local, u32 value), |
Luciano Coelho | 92ddc11 | 2011-05-09 14:40:06 +0300 | [diff] [blame] | 638 | TP_ARGS(local, value) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 639 | ); |
| 640 | |
Lukáš Turek | 310bc67 | 2009-12-21 22:50:48 +0100 | [diff] [blame] | 641 | TRACE_EVENT(drv_set_coverage_class, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 642 | TP_PROTO(struct ieee80211_local *local, u8 value), |
Lukáš Turek | 310bc67 | 2009-12-21 22:50:48 +0100 | [diff] [blame] | 643 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 644 | TP_ARGS(local, value), |
Lukáš Turek | 310bc67 | 2009-12-21 22:50:48 +0100 | [diff] [blame] | 645 | |
| 646 | TP_STRUCT__entry( |
| 647 | LOCAL_ENTRY |
| 648 | __field(u8, value) |
Lukáš Turek | 310bc67 | 2009-12-21 22:50:48 +0100 | [diff] [blame] | 649 | ), |
| 650 | |
| 651 | TP_fast_assign( |
| 652 | LOCAL_ASSIGN; |
Lukáš Turek | 310bc67 | 2009-12-21 22:50:48 +0100 | [diff] [blame] | 653 | __entry->value = value; |
| 654 | ), |
| 655 | |
| 656 | TP_printk( |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 657 | LOCAL_PR_FMT " value:%d", |
| 658 | LOCAL_PR_ARG, __entry->value |
Lukáš Turek | 310bc67 | 2009-12-21 22:50:48 +0100 | [diff] [blame] | 659 | ) |
| 660 | ); |
| 661 | |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 662 | TRACE_EVENT(drv_sta_notify, |
| 663 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 664 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 665 | enum sta_notify_cmd cmd, |
| 666 | struct ieee80211_sta *sta), |
| 667 | |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 668 | TP_ARGS(local, sdata, cmd, sta), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 669 | |
| 670 | TP_STRUCT__entry( |
| 671 | LOCAL_ENTRY |
| 672 | VIF_ENTRY |
| 673 | STA_ENTRY |
| 674 | __field(u32, cmd) |
| 675 | ), |
| 676 | |
| 677 | TP_fast_assign( |
| 678 | LOCAL_ASSIGN; |
| 679 | VIF_ASSIGN; |
| 680 | STA_ASSIGN; |
| 681 | __entry->cmd = cmd; |
| 682 | ), |
| 683 | |
| 684 | TP_printk( |
| 685 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d", |
| 686 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd |
| 687 | ) |
| 688 | ); |
| 689 | |
Johannes Berg | f09603a | 2012-01-20 13:55:21 +0100 | [diff] [blame] | 690 | TRACE_EVENT(drv_sta_state, |
| 691 | TP_PROTO(struct ieee80211_local *local, |
| 692 | struct ieee80211_sub_if_data *sdata, |
| 693 | struct ieee80211_sta *sta, |
| 694 | enum ieee80211_sta_state old_state, |
| 695 | enum ieee80211_sta_state new_state), |
| 696 | |
| 697 | TP_ARGS(local, sdata, sta, old_state, new_state), |
| 698 | |
| 699 | TP_STRUCT__entry( |
| 700 | LOCAL_ENTRY |
| 701 | VIF_ENTRY |
| 702 | STA_ENTRY |
| 703 | __field(u32, old_state) |
| 704 | __field(u32, new_state) |
| 705 | ), |
| 706 | |
| 707 | TP_fast_assign( |
| 708 | LOCAL_ASSIGN; |
| 709 | VIF_ASSIGN; |
| 710 | STA_ASSIGN; |
| 711 | __entry->old_state = old_state; |
| 712 | __entry->new_state = new_state; |
| 713 | ), |
| 714 | |
| 715 | TP_printk( |
| 716 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d", |
| 717 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, |
| 718 | __entry->old_state, __entry->new_state |
| 719 | ) |
| 720 | ); |
| 721 | |
Johannes Berg | 8f727ef | 2012-03-30 08:43:32 +0200 | [diff] [blame] | 722 | TRACE_EVENT(drv_sta_rc_update, |
| 723 | TP_PROTO(struct ieee80211_local *local, |
| 724 | struct ieee80211_sub_if_data *sdata, |
| 725 | struct ieee80211_sta *sta, |
| 726 | u32 changed), |
| 727 | |
| 728 | TP_ARGS(local, sdata, sta, changed), |
| 729 | |
| 730 | TP_STRUCT__entry( |
| 731 | LOCAL_ENTRY |
| 732 | VIF_ENTRY |
| 733 | STA_ENTRY |
| 734 | __field(u32, changed) |
| 735 | ), |
| 736 | |
| 737 | TP_fast_assign( |
| 738 | LOCAL_ASSIGN; |
| 739 | VIF_ASSIGN; |
| 740 | STA_ASSIGN; |
| 741 | __entry->changed = changed; |
| 742 | ), |
| 743 | |
| 744 | TP_printk( |
| 745 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x", |
| 746 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed |
| 747 | ) |
| 748 | ); |
| 749 | |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 750 | TRACE_EVENT(drv_sta_add, |
| 751 | TP_PROTO(struct ieee80211_local *local, |
| 752 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 753 | struct ieee80211_sta *sta), |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 754 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 755 | TP_ARGS(local, sdata, sta), |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 756 | |
| 757 | TP_STRUCT__entry( |
| 758 | LOCAL_ENTRY |
| 759 | VIF_ENTRY |
| 760 | STA_ENTRY |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 761 | ), |
| 762 | |
| 763 | TP_fast_assign( |
| 764 | LOCAL_ASSIGN; |
| 765 | VIF_ASSIGN; |
| 766 | STA_ASSIGN; |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 767 | ), |
| 768 | |
| 769 | TP_printk( |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 770 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT, |
| 771 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 772 | ) |
| 773 | ); |
| 774 | |
| 775 | TRACE_EVENT(drv_sta_remove, |
| 776 | TP_PROTO(struct ieee80211_local *local, |
| 777 | struct ieee80211_sub_if_data *sdata, |
| 778 | struct ieee80211_sta *sta), |
| 779 | |
| 780 | TP_ARGS(local, sdata, sta), |
| 781 | |
| 782 | TP_STRUCT__entry( |
| 783 | LOCAL_ENTRY |
| 784 | VIF_ENTRY |
| 785 | STA_ENTRY |
| 786 | ), |
| 787 | |
| 788 | TP_fast_assign( |
| 789 | LOCAL_ASSIGN; |
| 790 | VIF_ASSIGN; |
| 791 | STA_ASSIGN; |
| 792 | ), |
| 793 | |
| 794 | TP_printk( |
| 795 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT, |
| 796 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG |
| 797 | ) |
| 798 | ); |
| 799 | |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 800 | TRACE_EVENT(drv_conf_tx, |
Eliad Peller | f6f3def | 2011-09-25 20:06:54 +0300 | [diff] [blame] | 801 | TP_PROTO(struct ieee80211_local *local, |
| 802 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | a3304b0 | 2012-03-28 11:04:24 +0200 | [diff] [blame] | 803 | u16 ac, const struct ieee80211_tx_queue_params *params), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 804 | |
Johannes Berg | a3304b0 | 2012-03-28 11:04:24 +0200 | [diff] [blame] | 805 | TP_ARGS(local, sdata, ac, params), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 806 | |
| 807 | TP_STRUCT__entry( |
| 808 | LOCAL_ENTRY |
Eliad Peller | f6f3def | 2011-09-25 20:06:54 +0300 | [diff] [blame] | 809 | VIF_ENTRY |
Johannes Berg | a3304b0 | 2012-03-28 11:04:24 +0200 | [diff] [blame] | 810 | __field(u16, ac) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 811 | __field(u16, txop) |
| 812 | __field(u16, cw_min) |
| 813 | __field(u16, cw_max) |
| 814 | __field(u8, aifs) |
Eliad Peller | f6f3def | 2011-09-25 20:06:54 +0300 | [diff] [blame] | 815 | __field(bool, uapsd) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 816 | ), |
| 817 | |
| 818 | TP_fast_assign( |
| 819 | LOCAL_ASSIGN; |
Eliad Peller | f6f3def | 2011-09-25 20:06:54 +0300 | [diff] [blame] | 820 | VIF_ASSIGN; |
Johannes Berg | a3304b0 | 2012-03-28 11:04:24 +0200 | [diff] [blame] | 821 | __entry->ac = ac; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 822 | __entry->txop = params->txop; |
| 823 | __entry->cw_max = params->cw_max; |
| 824 | __entry->cw_min = params->cw_min; |
| 825 | __entry->aifs = params->aifs; |
Eliad Peller | f6f3def | 2011-09-25 20:06:54 +0300 | [diff] [blame] | 826 | __entry->uapsd = params->uapsd; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 827 | ), |
| 828 | |
| 829 | TP_printk( |
Johannes Berg | a3304b0 | 2012-03-28 11:04:24 +0200 | [diff] [blame] | 830 | LOCAL_PR_FMT VIF_PR_FMT " AC:%d", |
| 831 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 832 | ) |
| 833 | ); |
| 834 | |
Eliad Peller | 37a41b4 | 2011-09-21 14:06:11 +0300 | [diff] [blame] | 835 | DEFINE_EVENT(local_sdata_evt, drv_get_tsf, |
| 836 | TP_PROTO(struct ieee80211_local *local, |
| 837 | struct ieee80211_sub_if_data *sdata), |
| 838 | TP_ARGS(local, sdata) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 839 | ); |
| 840 | |
| 841 | TRACE_EVENT(drv_set_tsf, |
Eliad Peller | 37a41b4 | 2011-09-21 14:06:11 +0300 | [diff] [blame] | 842 | TP_PROTO(struct ieee80211_local *local, |
| 843 | struct ieee80211_sub_if_data *sdata, |
| 844 | u64 tsf), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 845 | |
Eliad Peller | 37a41b4 | 2011-09-21 14:06:11 +0300 | [diff] [blame] | 846 | TP_ARGS(local, sdata, tsf), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 847 | |
| 848 | TP_STRUCT__entry( |
| 849 | LOCAL_ENTRY |
Eliad Peller | 37a41b4 | 2011-09-21 14:06:11 +0300 | [diff] [blame] | 850 | VIF_ENTRY |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 851 | __field(u64, tsf) |
| 852 | ), |
| 853 | |
| 854 | TP_fast_assign( |
| 855 | LOCAL_ASSIGN; |
Eliad Peller | 37a41b4 | 2011-09-21 14:06:11 +0300 | [diff] [blame] | 856 | VIF_ASSIGN; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 857 | __entry->tsf = tsf; |
| 858 | ), |
| 859 | |
| 860 | TP_printk( |
Eliad Peller | 37a41b4 | 2011-09-21 14:06:11 +0300 | [diff] [blame] | 861 | LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu", |
| 862 | LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 863 | ) |
| 864 | ); |
| 865 | |
Eliad Peller | 37a41b4 | 2011-09-21 14:06:11 +0300 | [diff] [blame] | 866 | DEFINE_EVENT(local_sdata_evt, drv_reset_tsf, |
| 867 | TP_PROTO(struct ieee80211_local *local, |
| 868 | struct ieee80211_sub_if_data *sdata), |
| 869 | TP_ARGS(local, sdata) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 870 | ); |
| 871 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 872 | DEFINE_EVENT(local_only_evt, drv_tx_last_beacon, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 873 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 874 | TP_ARGS(local) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 875 | ); |
| 876 | |
| 877 | TRACE_EVENT(drv_ampdu_action, |
| 878 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 879 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 880 | enum ieee80211_ampdu_mlme_action action, |
| 881 | struct ieee80211_sta *sta, u16 tid, |
Johannes Berg | 0b01f03 | 2011-01-18 13:51:05 +0100 | [diff] [blame] | 882 | u16 *ssn, u8 buf_size), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 883 | |
Johannes Berg | 0b01f03 | 2011-01-18 13:51:05 +0100 | [diff] [blame] | 884 | TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 885 | |
| 886 | TP_STRUCT__entry( |
| 887 | LOCAL_ENTRY |
| 888 | STA_ENTRY |
| 889 | __field(u32, action) |
| 890 | __field(u16, tid) |
| 891 | __field(u16, ssn) |
Johannes Berg | 0b01f03 | 2011-01-18 13:51:05 +0100 | [diff] [blame] | 892 | __field(u8, buf_size) |
Johannes Berg | c951ad3 | 2009-11-16 12:00:38 +0100 | [diff] [blame] | 893 | VIF_ENTRY |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 894 | ), |
| 895 | |
| 896 | TP_fast_assign( |
| 897 | LOCAL_ASSIGN; |
Johannes Berg | c951ad3 | 2009-11-16 12:00:38 +0100 | [diff] [blame] | 898 | VIF_ASSIGN; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 899 | STA_ASSIGN; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 900 | __entry->action = action; |
| 901 | __entry->tid = tid; |
Zhu Yi | 3092ad0 | 2010-01-26 15:58:57 +0800 | [diff] [blame] | 902 | __entry->ssn = ssn ? *ssn : 0; |
Johannes Berg | 0b01f03 | 2011-01-18 13:51:05 +0100 | [diff] [blame] | 903 | __entry->buf_size = buf_size; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 904 | ), |
| 905 | |
| 906 | TP_printk( |
Johannes Berg | 0b01f03 | 2011-01-18 13:51:05 +0100 | [diff] [blame] | 907 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d", |
| 908 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action, |
| 909 | __entry->tid, __entry->buf_size |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 910 | ) |
| 911 | ); |
Johannes Berg | a80f7c0 | 2009-12-23 13:15:32 +0100 | [diff] [blame] | 912 | |
John W. Linville | c466d4e | 2010-06-29 14:51:23 -0400 | [diff] [blame] | 913 | TRACE_EVENT(drv_get_survey, |
| 914 | TP_PROTO(struct ieee80211_local *local, int idx, |
| 915 | struct survey_info *survey), |
| 916 | |
| 917 | TP_ARGS(local, idx, survey), |
| 918 | |
| 919 | TP_STRUCT__entry( |
| 920 | LOCAL_ENTRY |
| 921 | __field(int, idx) |
| 922 | ), |
| 923 | |
| 924 | TP_fast_assign( |
| 925 | LOCAL_ASSIGN; |
| 926 | __entry->idx = idx; |
| 927 | ), |
| 928 | |
| 929 | TP_printk( |
| 930 | LOCAL_PR_FMT " idx:%d", |
| 931 | LOCAL_PR_ARG, __entry->idx |
| 932 | ) |
| 933 | ); |
| 934 | |
Johannes Berg | a80f7c0 | 2009-12-23 13:15:32 +0100 | [diff] [blame] | 935 | TRACE_EVENT(drv_flush, |
| 936 | TP_PROTO(struct ieee80211_local *local, bool drop), |
| 937 | |
| 938 | TP_ARGS(local, drop), |
| 939 | |
| 940 | TP_STRUCT__entry( |
| 941 | LOCAL_ENTRY |
| 942 | __field(bool, drop) |
| 943 | ), |
| 944 | |
| 945 | TP_fast_assign( |
| 946 | LOCAL_ASSIGN; |
| 947 | __entry->drop = drop; |
| 948 | ), |
| 949 | |
| 950 | TP_printk( |
| 951 | LOCAL_PR_FMT " drop:%d", |
| 952 | LOCAL_PR_ARG, __entry->drop |
| 953 | ) |
| 954 | ); |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 955 | |
Johannes Berg | 5ce6e43 | 2010-05-11 16:20:57 +0200 | [diff] [blame] | 956 | TRACE_EVENT(drv_channel_switch, |
| 957 | TP_PROTO(struct ieee80211_local *local, |
| 958 | struct ieee80211_channel_switch *ch_switch), |
| 959 | |
| 960 | TP_ARGS(local, ch_switch), |
| 961 | |
| 962 | TP_STRUCT__entry( |
| 963 | LOCAL_ENTRY |
| 964 | __field(u64, timestamp) |
| 965 | __field(bool, block_tx) |
| 966 | __field(u16, freq) |
| 967 | __field(u8, count) |
| 968 | ), |
| 969 | |
| 970 | TP_fast_assign( |
| 971 | LOCAL_ASSIGN; |
| 972 | __entry->timestamp = ch_switch->timestamp; |
| 973 | __entry->block_tx = ch_switch->block_tx; |
| 974 | __entry->freq = ch_switch->channel->center_freq; |
| 975 | __entry->count = ch_switch->count; |
| 976 | ), |
| 977 | |
| 978 | TP_printk( |
| 979 | LOCAL_PR_FMT " new freq:%u count:%d", |
| 980 | LOCAL_PR_ARG, __entry->freq, __entry->count |
| 981 | ) |
| 982 | ); |
| 983 | |
Bruno Randolf | 15d9675 | 2010-11-10 12:50:56 +0900 | [diff] [blame] | 984 | TRACE_EVENT(drv_set_antenna, |
| 985 | TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret), |
| 986 | |
| 987 | TP_ARGS(local, tx_ant, rx_ant, ret), |
| 988 | |
| 989 | TP_STRUCT__entry( |
| 990 | LOCAL_ENTRY |
| 991 | __field(u32, tx_ant) |
| 992 | __field(u32, rx_ant) |
| 993 | __field(int, ret) |
| 994 | ), |
| 995 | |
| 996 | TP_fast_assign( |
| 997 | LOCAL_ASSIGN; |
| 998 | __entry->tx_ant = tx_ant; |
| 999 | __entry->rx_ant = rx_ant; |
| 1000 | __entry->ret = ret; |
| 1001 | ), |
| 1002 | |
| 1003 | TP_printk( |
| 1004 | LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d", |
| 1005 | LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret |
| 1006 | ) |
| 1007 | ); |
| 1008 | |
| 1009 | TRACE_EVENT(drv_get_antenna, |
| 1010 | TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret), |
| 1011 | |
| 1012 | TP_ARGS(local, tx_ant, rx_ant, ret), |
| 1013 | |
| 1014 | TP_STRUCT__entry( |
| 1015 | LOCAL_ENTRY |
| 1016 | __field(u32, tx_ant) |
| 1017 | __field(u32, rx_ant) |
| 1018 | __field(int, ret) |
| 1019 | ), |
| 1020 | |
| 1021 | TP_fast_assign( |
| 1022 | LOCAL_ASSIGN; |
| 1023 | __entry->tx_ant = tx_ant; |
| 1024 | __entry->rx_ant = rx_ant; |
| 1025 | __entry->ret = ret; |
| 1026 | ), |
| 1027 | |
| 1028 | TP_printk( |
| 1029 | LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d", |
| 1030 | LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret |
| 1031 | ) |
| 1032 | ); |
| 1033 | |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1034 | TRACE_EVENT(drv_remain_on_channel, |
Eliad Peller | 4988456 | 2012-11-19 17:05:09 +0200 | [diff] [blame] | 1035 | TP_PROTO(struct ieee80211_local *local, |
| 1036 | struct ieee80211_sub_if_data *sdata, |
| 1037 | struct ieee80211_channel *chan, |
Johannes Berg | 42d97a5 | 2012-11-08 18:31:02 +0100 | [diff] [blame] | 1038 | unsigned int duration), |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1039 | |
Johannes Berg | 42d97a5 | 2012-11-08 18:31:02 +0100 | [diff] [blame] | 1040 | TP_ARGS(local, sdata, chan, duration), |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1041 | |
| 1042 | TP_STRUCT__entry( |
| 1043 | LOCAL_ENTRY |
Eliad Peller | 4988456 | 2012-11-19 17:05:09 +0200 | [diff] [blame] | 1044 | VIF_ENTRY |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1045 | __field(int, center_freq) |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1046 | __field(unsigned int, duration) |
| 1047 | ), |
| 1048 | |
| 1049 | TP_fast_assign( |
| 1050 | LOCAL_ASSIGN; |
Eliad Peller | 4988456 | 2012-11-19 17:05:09 +0200 | [diff] [blame] | 1051 | VIF_ASSIGN; |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1052 | __entry->center_freq = chan->center_freq; |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1053 | __entry->duration = duration; |
| 1054 | ), |
| 1055 | |
| 1056 | TP_printk( |
Eliad Peller | 4988456 | 2012-11-19 17:05:09 +0200 | [diff] [blame] | 1057 | LOCAL_PR_FMT VIF_PR_FMT " freq:%dMHz duration:%dms", |
| 1058 | LOCAL_PR_ARG, VIF_PR_ARG, |
| 1059 | __entry->center_freq, __entry->duration |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1060 | ) |
| 1061 | ); |
| 1062 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1063 | DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel, |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1064 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1065 | TP_ARGS(local) |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1066 | ); |
| 1067 | |
John W. Linville | 38c0915 | 2011-03-07 16:19:18 -0500 | [diff] [blame] | 1068 | TRACE_EVENT(drv_set_ringparam, |
| 1069 | TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx), |
| 1070 | |
| 1071 | TP_ARGS(local, tx, rx), |
| 1072 | |
| 1073 | TP_STRUCT__entry( |
| 1074 | LOCAL_ENTRY |
| 1075 | __field(u32, tx) |
| 1076 | __field(u32, rx) |
| 1077 | ), |
| 1078 | |
| 1079 | TP_fast_assign( |
| 1080 | LOCAL_ASSIGN; |
| 1081 | __entry->tx = tx; |
| 1082 | __entry->rx = rx; |
| 1083 | ), |
| 1084 | |
| 1085 | TP_printk( |
| 1086 | LOCAL_PR_FMT " tx:%d rx %d", |
| 1087 | LOCAL_PR_ARG, __entry->tx, __entry->rx |
| 1088 | ) |
| 1089 | ); |
| 1090 | |
| 1091 | TRACE_EVENT(drv_get_ringparam, |
| 1092 | TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max, |
| 1093 | u32 *rx, u32 *rx_max), |
| 1094 | |
| 1095 | TP_ARGS(local, tx, tx_max, rx, rx_max), |
| 1096 | |
| 1097 | TP_STRUCT__entry( |
| 1098 | LOCAL_ENTRY |
| 1099 | __field(u32, tx) |
| 1100 | __field(u32, tx_max) |
| 1101 | __field(u32, rx) |
| 1102 | __field(u32, rx_max) |
| 1103 | ), |
| 1104 | |
| 1105 | TP_fast_assign( |
| 1106 | LOCAL_ASSIGN; |
| 1107 | __entry->tx = *tx; |
| 1108 | __entry->tx_max = *tx_max; |
| 1109 | __entry->rx = *rx; |
| 1110 | __entry->rx_max = *rx_max; |
| 1111 | ), |
| 1112 | |
| 1113 | TP_printk( |
| 1114 | LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d", |
| 1115 | LOCAL_PR_ARG, |
| 1116 | __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max |
| 1117 | ) |
| 1118 | ); |
| 1119 | |
Vivek Natarajan | e8306f9 | 2011-04-06 11:41:10 +0530 | [diff] [blame] | 1120 | DEFINE_EVENT(local_only_evt, drv_tx_frames_pending, |
| 1121 | TP_PROTO(struct ieee80211_local *local), |
| 1122 | TP_ARGS(local) |
| 1123 | ); |
| 1124 | |
Johannes Berg | 5f16a43 | 2011-02-25 15:36:57 +0100 | [diff] [blame] | 1125 | DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait, |
| 1126 | TP_PROTO(struct ieee80211_local *local), |
| 1127 | TP_ARGS(local) |
| 1128 | ); |
| 1129 | |
Sujith Manoharan | bdbfd6b | 2011-04-27 16:56:51 +0530 | [diff] [blame] | 1130 | TRACE_EVENT(drv_set_bitrate_mask, |
| 1131 | TP_PROTO(struct ieee80211_local *local, |
| 1132 | struct ieee80211_sub_if_data *sdata, |
| 1133 | const struct cfg80211_bitrate_mask *mask), |
| 1134 | |
| 1135 | TP_ARGS(local, sdata, mask), |
| 1136 | |
| 1137 | TP_STRUCT__entry( |
| 1138 | LOCAL_ENTRY |
| 1139 | VIF_ENTRY |
| 1140 | __field(u32, legacy_2g) |
| 1141 | __field(u32, legacy_5g) |
| 1142 | ), |
| 1143 | |
| 1144 | TP_fast_assign( |
| 1145 | LOCAL_ASSIGN; |
| 1146 | VIF_ASSIGN; |
| 1147 | __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy; |
| 1148 | __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy; |
| 1149 | ), |
| 1150 | |
| 1151 | TP_printk( |
| 1152 | LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x", |
| 1153 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g |
| 1154 | ) |
| 1155 | ); |
| 1156 | |
Johannes Berg | c68f4b8 | 2011-07-05 16:35:41 +0200 | [diff] [blame] | 1157 | TRACE_EVENT(drv_set_rekey_data, |
| 1158 | TP_PROTO(struct ieee80211_local *local, |
| 1159 | struct ieee80211_sub_if_data *sdata, |
| 1160 | struct cfg80211_gtk_rekey_data *data), |
| 1161 | |
| 1162 | TP_ARGS(local, sdata, data), |
| 1163 | |
| 1164 | TP_STRUCT__entry( |
| 1165 | LOCAL_ENTRY |
| 1166 | VIF_ENTRY |
| 1167 | __array(u8, kek, NL80211_KEK_LEN) |
| 1168 | __array(u8, kck, NL80211_KCK_LEN) |
| 1169 | __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN) |
| 1170 | ), |
| 1171 | |
| 1172 | TP_fast_assign( |
| 1173 | LOCAL_ASSIGN; |
| 1174 | VIF_ASSIGN; |
| 1175 | memcpy(__entry->kek, data->kek, NL80211_KEK_LEN); |
| 1176 | memcpy(__entry->kck, data->kck, NL80211_KCK_LEN); |
| 1177 | memcpy(__entry->replay_ctr, data->replay_ctr, |
| 1178 | NL80211_REPLAY_CTR_LEN); |
| 1179 | ), |
| 1180 | |
| 1181 | TP_printk(LOCAL_PR_FMT VIF_PR_FMT, |
| 1182 | LOCAL_PR_ARG, VIF_PR_ARG) |
| 1183 | ); |
| 1184 | |
Meenakshi Venkataraman | 615f7b9 | 2011-07-08 08:46:22 -0700 | [diff] [blame] | 1185 | TRACE_EVENT(drv_rssi_callback, |
| 1186 | TP_PROTO(struct ieee80211_local *local, |
| 1187 | enum ieee80211_rssi_event rssi_event), |
| 1188 | |
| 1189 | TP_ARGS(local, rssi_event), |
| 1190 | |
| 1191 | TP_STRUCT__entry( |
| 1192 | LOCAL_ENTRY |
| 1193 | __field(u32, rssi_event) |
| 1194 | ), |
| 1195 | |
| 1196 | TP_fast_assign( |
| 1197 | LOCAL_ASSIGN; |
| 1198 | __entry->rssi_event = rssi_event; |
| 1199 | ), |
| 1200 | |
| 1201 | TP_printk( |
| 1202 | LOCAL_PR_FMT " rssi_event:%d", |
| 1203 | LOCAL_PR_ARG, __entry->rssi_event |
| 1204 | ) |
| 1205 | ); |
| 1206 | |
Johannes Berg | 40b9640 | 2011-09-29 16:04:38 +0200 | [diff] [blame] | 1207 | DECLARE_EVENT_CLASS(release_evt, |
Johannes Berg | 4049e09 | 2011-09-29 16:04:32 +0200 | [diff] [blame] | 1208 | TP_PROTO(struct ieee80211_local *local, |
| 1209 | struct ieee80211_sta *sta, |
| 1210 | u16 tids, int num_frames, |
| 1211 | enum ieee80211_frame_release_type reason, |
| 1212 | bool more_data), |
| 1213 | |
| 1214 | TP_ARGS(local, sta, tids, num_frames, reason, more_data), |
| 1215 | |
| 1216 | TP_STRUCT__entry( |
| 1217 | LOCAL_ENTRY |
| 1218 | STA_ENTRY |
| 1219 | __field(u16, tids) |
| 1220 | __field(int, num_frames) |
| 1221 | __field(int, reason) |
| 1222 | __field(bool, more_data) |
| 1223 | ), |
| 1224 | |
| 1225 | TP_fast_assign( |
| 1226 | LOCAL_ASSIGN; |
| 1227 | STA_ASSIGN; |
| 1228 | __entry->tids = tids; |
| 1229 | __entry->num_frames = num_frames; |
| 1230 | __entry->reason = reason; |
| 1231 | __entry->more_data = more_data; |
| 1232 | ), |
| 1233 | |
| 1234 | TP_printk( |
| 1235 | LOCAL_PR_FMT STA_PR_FMT |
| 1236 | " TIDs:0x%.4x frames:%d reason:%d more:%d", |
| 1237 | LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames, |
| 1238 | __entry->reason, __entry->more_data |
| 1239 | ) |
| 1240 | ); |
| 1241 | |
Johannes Berg | 40b9640 | 2011-09-29 16:04:38 +0200 | [diff] [blame] | 1242 | DEFINE_EVENT(release_evt, drv_release_buffered_frames, |
| 1243 | TP_PROTO(struct ieee80211_local *local, |
| 1244 | struct ieee80211_sta *sta, |
| 1245 | u16 tids, int num_frames, |
| 1246 | enum ieee80211_frame_release_type reason, |
| 1247 | bool more_data), |
| 1248 | |
| 1249 | TP_ARGS(local, sta, tids, num_frames, reason, more_data) |
| 1250 | ); |
| 1251 | |
| 1252 | DEFINE_EVENT(release_evt, drv_allow_buffered_frames, |
| 1253 | TP_PROTO(struct ieee80211_local *local, |
| 1254 | struct ieee80211_sta *sta, |
| 1255 | u16 tids, int num_frames, |
| 1256 | enum ieee80211_frame_release_type reason, |
| 1257 | bool more_data), |
| 1258 | |
| 1259 | TP_ARGS(local, sta, tids, num_frames, reason, more_data) |
| 1260 | ); |
| 1261 | |
Victor Goldenshtein | 66572cf | 2012-06-21 10:56:46 +0300 | [diff] [blame] | 1262 | TRACE_EVENT(drv_get_rssi, |
| 1263 | TP_PROTO(struct ieee80211_local *local, struct ieee80211_sta *sta, |
| 1264 | s8 rssi, int ret), |
| 1265 | |
| 1266 | TP_ARGS(local, sta, rssi, ret), |
| 1267 | |
| 1268 | TP_STRUCT__entry( |
| 1269 | LOCAL_ENTRY |
| 1270 | STA_ENTRY |
| 1271 | __field(s8, rssi) |
| 1272 | __field(int, ret) |
| 1273 | ), |
| 1274 | |
| 1275 | TP_fast_assign( |
| 1276 | LOCAL_ASSIGN; |
| 1277 | STA_ASSIGN; |
| 1278 | __entry->rssi = rssi; |
| 1279 | __entry->ret = ret; |
| 1280 | ), |
| 1281 | |
| 1282 | TP_printk( |
| 1283 | LOCAL_PR_FMT STA_PR_FMT " rssi:%d ret:%d", |
| 1284 | LOCAL_PR_ARG, STA_PR_ARG, __entry->rssi, __entry->ret |
| 1285 | ) |
| 1286 | ); |
| 1287 | |
Johannes Berg | a1845fc | 2012-06-27 13:18:36 +0200 | [diff] [blame] | 1288 | DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx, |
| 1289 | TP_PROTO(struct ieee80211_local *local, |
| 1290 | struct ieee80211_sub_if_data *sdata), |
| 1291 | |
| 1292 | TP_ARGS(local, sdata) |
| 1293 | ); |
| 1294 | |
Michal Kazior | c3645ea | 2012-06-26 14:37:17 +0200 | [diff] [blame] | 1295 | DECLARE_EVENT_CLASS(local_chanctx, |
| 1296 | TP_PROTO(struct ieee80211_local *local, |
| 1297 | struct ieee80211_chanctx *ctx), |
| 1298 | |
| 1299 | TP_ARGS(local, ctx), |
| 1300 | |
| 1301 | TP_STRUCT__entry( |
| 1302 | LOCAL_ENTRY |
| 1303 | CHANCTX_ENTRY |
| 1304 | ), |
| 1305 | |
| 1306 | TP_fast_assign( |
| 1307 | LOCAL_ASSIGN; |
| 1308 | CHANCTX_ASSIGN; |
| 1309 | ), |
| 1310 | |
| 1311 | TP_printk( |
| 1312 | LOCAL_PR_FMT CHANCTX_PR_FMT, |
| 1313 | LOCAL_PR_ARG, CHANCTX_PR_ARG |
| 1314 | ) |
| 1315 | ); |
| 1316 | |
| 1317 | DEFINE_EVENT(local_chanctx, drv_add_chanctx, |
| 1318 | TP_PROTO(struct ieee80211_local *local, |
| 1319 | struct ieee80211_chanctx *ctx), |
| 1320 | TP_ARGS(local, ctx) |
| 1321 | ); |
| 1322 | |
| 1323 | DEFINE_EVENT(local_chanctx, drv_remove_chanctx, |
| 1324 | TP_PROTO(struct ieee80211_local *local, |
| 1325 | struct ieee80211_chanctx *ctx), |
| 1326 | TP_ARGS(local, ctx) |
| 1327 | ); |
| 1328 | |
| 1329 | TRACE_EVENT(drv_change_chanctx, |
| 1330 | TP_PROTO(struct ieee80211_local *local, |
| 1331 | struct ieee80211_chanctx *ctx, |
| 1332 | u32 changed), |
| 1333 | |
| 1334 | TP_ARGS(local, ctx, changed), |
| 1335 | |
| 1336 | TP_STRUCT__entry( |
| 1337 | LOCAL_ENTRY |
| 1338 | CHANCTX_ENTRY |
| 1339 | __field(u32, changed) |
| 1340 | ), |
| 1341 | |
| 1342 | TP_fast_assign( |
| 1343 | LOCAL_ASSIGN; |
| 1344 | CHANCTX_ASSIGN; |
| 1345 | __entry->changed = changed; |
| 1346 | ), |
| 1347 | |
| 1348 | TP_printk( |
| 1349 | LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x", |
| 1350 | LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed |
| 1351 | ) |
| 1352 | ); |
| 1353 | |
| 1354 | DECLARE_EVENT_CLASS(local_sdata_chanctx, |
| 1355 | TP_PROTO(struct ieee80211_local *local, |
| 1356 | struct ieee80211_sub_if_data *sdata, |
| 1357 | struct ieee80211_chanctx *ctx), |
| 1358 | |
| 1359 | TP_ARGS(local, sdata, ctx), |
| 1360 | |
| 1361 | TP_STRUCT__entry( |
| 1362 | LOCAL_ENTRY |
| 1363 | VIF_ENTRY |
| 1364 | CHANCTX_ENTRY |
| 1365 | ), |
| 1366 | |
| 1367 | TP_fast_assign( |
| 1368 | LOCAL_ASSIGN; |
| 1369 | VIF_ASSIGN; |
| 1370 | CHANCTX_ASSIGN; |
| 1371 | ), |
| 1372 | |
| 1373 | TP_printk( |
| 1374 | LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT, |
| 1375 | LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG |
| 1376 | ) |
| 1377 | ); |
| 1378 | |
| 1379 | DEFINE_EVENT(local_sdata_chanctx, drv_assign_vif_chanctx, |
| 1380 | TP_PROTO(struct ieee80211_local *local, |
| 1381 | struct ieee80211_sub_if_data *sdata, |
| 1382 | struct ieee80211_chanctx *ctx), |
| 1383 | TP_ARGS(local, sdata, ctx) |
| 1384 | ); |
| 1385 | |
| 1386 | DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx, |
| 1387 | TP_PROTO(struct ieee80211_local *local, |
| 1388 | struct ieee80211_sub_if_data *sdata, |
| 1389 | struct ieee80211_chanctx *ctx), |
| 1390 | TP_ARGS(local, sdata, ctx) |
| 1391 | ); |
| 1392 | |
Johannes Berg | 1041638 | 2012-10-19 15:44:42 +0200 | [diff] [blame] | 1393 | TRACE_EVENT(drv_start_ap, |
| 1394 | TP_PROTO(struct ieee80211_local *local, |
| 1395 | struct ieee80211_sub_if_data *sdata, |
| 1396 | struct ieee80211_bss_conf *info), |
| 1397 | |
| 1398 | TP_ARGS(local, sdata, info), |
| 1399 | |
| 1400 | TP_STRUCT__entry( |
| 1401 | LOCAL_ENTRY |
| 1402 | VIF_ENTRY |
| 1403 | __field(u8, dtimper) |
| 1404 | __field(u16, bcnint) |
| 1405 | __dynamic_array(u8, ssid, info->ssid_len); |
| 1406 | __field(bool, hidden_ssid); |
| 1407 | ), |
| 1408 | |
| 1409 | TP_fast_assign( |
| 1410 | LOCAL_ASSIGN; |
| 1411 | VIF_ASSIGN; |
| 1412 | __entry->dtimper = info->dtim_period; |
| 1413 | __entry->bcnint = info->beacon_int; |
| 1414 | memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len); |
| 1415 | __entry->hidden_ssid = info->hidden_ssid; |
| 1416 | ), |
| 1417 | |
| 1418 | TP_printk( |
| 1419 | LOCAL_PR_FMT VIF_PR_FMT, |
| 1420 | LOCAL_PR_ARG, VIF_PR_ARG |
| 1421 | ) |
| 1422 | ); |
| 1423 | |
| 1424 | DEFINE_EVENT(local_sdata_evt, drv_stop_ap, |
| 1425 | TP_PROTO(struct ieee80211_local *local, |
| 1426 | struct ieee80211_sub_if_data *sdata), |
| 1427 | TP_ARGS(local, sdata) |
| 1428 | ); |
| 1429 | |
Johannes Berg | 9214ad7 | 2012-11-06 19:18:13 +0100 | [diff] [blame] | 1430 | DEFINE_EVENT(local_only_evt, drv_restart_complete, |
| 1431 | TP_PROTO(struct ieee80211_local *local), |
| 1432 | TP_ARGS(local) |
| 1433 | ); |
| 1434 | |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1435 | /* |
| 1436 | * Tracing for API calls that drivers call. |
| 1437 | */ |
| 1438 | |
| 1439 | TRACE_EVENT(api_start_tx_ba_session, |
| 1440 | TP_PROTO(struct ieee80211_sta *sta, u16 tid), |
| 1441 | |
| 1442 | TP_ARGS(sta, tid), |
| 1443 | |
| 1444 | TP_STRUCT__entry( |
| 1445 | STA_ENTRY |
| 1446 | __field(u16, tid) |
| 1447 | ), |
| 1448 | |
| 1449 | TP_fast_assign( |
| 1450 | STA_ASSIGN; |
| 1451 | __entry->tid = tid; |
| 1452 | ), |
| 1453 | |
| 1454 | TP_printk( |
| 1455 | STA_PR_FMT " tid:%d", |
| 1456 | STA_PR_ARG, __entry->tid |
| 1457 | ) |
| 1458 | ); |
| 1459 | |
| 1460 | TRACE_EVENT(api_start_tx_ba_cb, |
| 1461 | TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid), |
| 1462 | |
| 1463 | TP_ARGS(sdata, ra, tid), |
| 1464 | |
| 1465 | TP_STRUCT__entry( |
| 1466 | VIF_ENTRY |
| 1467 | __array(u8, ra, ETH_ALEN) |
| 1468 | __field(u16, tid) |
| 1469 | ), |
| 1470 | |
| 1471 | TP_fast_assign( |
| 1472 | VIF_ASSIGN; |
| 1473 | memcpy(__entry->ra, ra, ETH_ALEN); |
| 1474 | __entry->tid = tid; |
| 1475 | ), |
| 1476 | |
| 1477 | TP_printk( |
| 1478 | VIF_PR_FMT " ra:%pM tid:%d", |
| 1479 | VIF_PR_ARG, __entry->ra, __entry->tid |
| 1480 | ) |
| 1481 | ); |
| 1482 | |
| 1483 | TRACE_EVENT(api_stop_tx_ba_session, |
Johannes Berg | 6a8579d | 2010-05-27 14:41:07 +0200 | [diff] [blame] | 1484 | TP_PROTO(struct ieee80211_sta *sta, u16 tid), |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1485 | |
Johannes Berg | 6a8579d | 2010-05-27 14:41:07 +0200 | [diff] [blame] | 1486 | TP_ARGS(sta, tid), |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1487 | |
| 1488 | TP_STRUCT__entry( |
| 1489 | STA_ENTRY |
| 1490 | __field(u16, tid) |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1491 | ), |
| 1492 | |
| 1493 | TP_fast_assign( |
| 1494 | STA_ASSIGN; |
| 1495 | __entry->tid = tid; |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1496 | ), |
| 1497 | |
| 1498 | TP_printk( |
Johannes Berg | 6a8579d | 2010-05-27 14:41:07 +0200 | [diff] [blame] | 1499 | STA_PR_FMT " tid:%d", |
| 1500 | STA_PR_ARG, __entry->tid |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1501 | ) |
| 1502 | ); |
| 1503 | |
| 1504 | TRACE_EVENT(api_stop_tx_ba_cb, |
| 1505 | TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid), |
| 1506 | |
| 1507 | TP_ARGS(sdata, ra, tid), |
| 1508 | |
| 1509 | TP_STRUCT__entry( |
| 1510 | VIF_ENTRY |
| 1511 | __array(u8, ra, ETH_ALEN) |
| 1512 | __field(u16, tid) |
| 1513 | ), |
| 1514 | |
| 1515 | TP_fast_assign( |
| 1516 | VIF_ASSIGN; |
| 1517 | memcpy(__entry->ra, ra, ETH_ALEN); |
| 1518 | __entry->tid = tid; |
| 1519 | ), |
| 1520 | |
| 1521 | TP_printk( |
| 1522 | VIF_PR_FMT " ra:%pM tid:%d", |
| 1523 | VIF_PR_ARG, __entry->ra, __entry->tid |
| 1524 | ) |
| 1525 | ); |
| 1526 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1527 | DEFINE_EVENT(local_only_evt, api_restart_hw, |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1528 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1529 | TP_ARGS(local) |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1530 | ); |
| 1531 | |
| 1532 | TRACE_EVENT(api_beacon_loss, |
| 1533 | TP_PROTO(struct ieee80211_sub_if_data *sdata), |
| 1534 | |
| 1535 | TP_ARGS(sdata), |
| 1536 | |
| 1537 | TP_STRUCT__entry( |
| 1538 | VIF_ENTRY |
| 1539 | ), |
| 1540 | |
| 1541 | TP_fast_assign( |
| 1542 | VIF_ASSIGN; |
| 1543 | ), |
| 1544 | |
| 1545 | TP_printk( |
| 1546 | VIF_PR_FMT, |
| 1547 | VIF_PR_ARG |
| 1548 | ) |
| 1549 | ); |
| 1550 | |
| 1551 | TRACE_EVENT(api_connection_loss, |
| 1552 | TP_PROTO(struct ieee80211_sub_if_data *sdata), |
| 1553 | |
| 1554 | TP_ARGS(sdata), |
| 1555 | |
| 1556 | TP_STRUCT__entry( |
| 1557 | VIF_ENTRY |
| 1558 | ), |
| 1559 | |
| 1560 | TP_fast_assign( |
| 1561 | VIF_ASSIGN; |
| 1562 | ), |
| 1563 | |
| 1564 | TP_printk( |
| 1565 | VIF_PR_FMT, |
| 1566 | VIF_PR_ARG |
| 1567 | ) |
| 1568 | ); |
| 1569 | |
| 1570 | TRACE_EVENT(api_cqm_rssi_notify, |
| 1571 | TP_PROTO(struct ieee80211_sub_if_data *sdata, |
| 1572 | enum nl80211_cqm_rssi_threshold_event rssi_event), |
| 1573 | |
| 1574 | TP_ARGS(sdata, rssi_event), |
| 1575 | |
| 1576 | TP_STRUCT__entry( |
| 1577 | VIF_ENTRY |
| 1578 | __field(u32, rssi_event) |
| 1579 | ), |
| 1580 | |
| 1581 | TP_fast_assign( |
| 1582 | VIF_ASSIGN; |
| 1583 | __entry->rssi_event = rssi_event; |
| 1584 | ), |
| 1585 | |
| 1586 | TP_printk( |
| 1587 | VIF_PR_FMT " event:%d", |
| 1588 | VIF_PR_ARG, __entry->rssi_event |
| 1589 | ) |
| 1590 | ); |
| 1591 | |
| 1592 | TRACE_EVENT(api_scan_completed, |
| 1593 | TP_PROTO(struct ieee80211_local *local, bool aborted), |
| 1594 | |
| 1595 | TP_ARGS(local, aborted), |
| 1596 | |
| 1597 | TP_STRUCT__entry( |
| 1598 | LOCAL_ENTRY |
| 1599 | __field(bool, aborted) |
| 1600 | ), |
| 1601 | |
| 1602 | TP_fast_assign( |
| 1603 | LOCAL_ASSIGN; |
| 1604 | __entry->aborted = aborted; |
| 1605 | ), |
| 1606 | |
| 1607 | TP_printk( |
| 1608 | LOCAL_PR_FMT " aborted:%d", |
| 1609 | LOCAL_PR_ARG, __entry->aborted |
| 1610 | ) |
| 1611 | ); |
| 1612 | |
Luciano Coelho | 79f460c | 2011-05-11 17:09:36 +0300 | [diff] [blame] | 1613 | TRACE_EVENT(api_sched_scan_results, |
| 1614 | TP_PROTO(struct ieee80211_local *local), |
| 1615 | |
| 1616 | TP_ARGS(local), |
| 1617 | |
| 1618 | TP_STRUCT__entry( |
| 1619 | LOCAL_ENTRY |
| 1620 | ), |
| 1621 | |
| 1622 | TP_fast_assign( |
| 1623 | LOCAL_ASSIGN; |
| 1624 | ), |
| 1625 | |
| 1626 | TP_printk( |
| 1627 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 1628 | ) |
| 1629 | ); |
| 1630 | |
| 1631 | TRACE_EVENT(api_sched_scan_stopped, |
| 1632 | TP_PROTO(struct ieee80211_local *local), |
| 1633 | |
| 1634 | TP_ARGS(local), |
| 1635 | |
| 1636 | TP_STRUCT__entry( |
| 1637 | LOCAL_ENTRY |
| 1638 | ), |
| 1639 | |
| 1640 | TP_fast_assign( |
| 1641 | LOCAL_ASSIGN; |
| 1642 | ), |
| 1643 | |
| 1644 | TP_printk( |
| 1645 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 1646 | ) |
| 1647 | ); |
| 1648 | |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1649 | TRACE_EVENT(api_sta_block_awake, |
| 1650 | TP_PROTO(struct ieee80211_local *local, |
| 1651 | struct ieee80211_sta *sta, bool block), |
| 1652 | |
| 1653 | TP_ARGS(local, sta, block), |
| 1654 | |
| 1655 | TP_STRUCT__entry( |
| 1656 | LOCAL_ENTRY |
| 1657 | STA_ENTRY |
| 1658 | __field(bool, block) |
| 1659 | ), |
| 1660 | |
| 1661 | TP_fast_assign( |
| 1662 | LOCAL_ASSIGN; |
| 1663 | STA_ASSIGN; |
| 1664 | __entry->block = block; |
| 1665 | ), |
| 1666 | |
| 1667 | TP_printk( |
| 1668 | LOCAL_PR_FMT STA_PR_FMT " block:%d", |
| 1669 | LOCAL_PR_ARG, STA_PR_FMT, __entry->block |
| 1670 | ) |
| 1671 | ); |
| 1672 | |
Johannes Berg | 5ce6e43 | 2010-05-11 16:20:57 +0200 | [diff] [blame] | 1673 | TRACE_EVENT(api_chswitch_done, |
| 1674 | TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success), |
| 1675 | |
| 1676 | TP_ARGS(sdata, success), |
| 1677 | |
| 1678 | TP_STRUCT__entry( |
| 1679 | VIF_ENTRY |
| 1680 | __field(bool, success) |
| 1681 | ), |
| 1682 | |
| 1683 | TP_fast_assign( |
| 1684 | VIF_ASSIGN; |
| 1685 | __entry->success = success; |
| 1686 | ), |
| 1687 | |
| 1688 | TP_printk( |
| 1689 | VIF_PR_FMT " success=%d", |
| 1690 | VIF_PR_ARG, __entry->success |
| 1691 | ) |
| 1692 | ); |
| 1693 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1694 | DEFINE_EVENT(local_only_evt, api_ready_on_channel, |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1695 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1696 | TP_ARGS(local) |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1697 | ); |
| 1698 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1699 | DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired, |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1700 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1701 | TP_ARGS(local) |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1702 | ); |
| 1703 | |
Johannes Berg | c68f4b8 | 2011-07-05 16:35:41 +0200 | [diff] [blame] | 1704 | TRACE_EVENT(api_gtk_rekey_notify, |
| 1705 | TP_PROTO(struct ieee80211_sub_if_data *sdata, |
| 1706 | const u8 *bssid, const u8 *replay_ctr), |
| 1707 | |
| 1708 | TP_ARGS(sdata, bssid, replay_ctr), |
| 1709 | |
| 1710 | TP_STRUCT__entry( |
| 1711 | VIF_ENTRY |
| 1712 | __array(u8, bssid, ETH_ALEN) |
| 1713 | __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN) |
| 1714 | ), |
| 1715 | |
| 1716 | TP_fast_assign( |
| 1717 | VIF_ASSIGN; |
| 1718 | memcpy(__entry->bssid, bssid, ETH_ALEN); |
| 1719 | memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN); |
| 1720 | ), |
| 1721 | |
| 1722 | TP_printk(VIF_PR_FMT, VIF_PR_ARG) |
| 1723 | ); |
| 1724 | |
Meenakshi Venkataraman | 615f7b9 | 2011-07-08 08:46:22 -0700 | [diff] [blame] | 1725 | TRACE_EVENT(api_enable_rssi_reports, |
| 1726 | TP_PROTO(struct ieee80211_sub_if_data *sdata, |
| 1727 | int rssi_min_thold, int rssi_max_thold), |
| 1728 | |
| 1729 | TP_ARGS(sdata, rssi_min_thold, rssi_max_thold), |
| 1730 | |
| 1731 | TP_STRUCT__entry( |
| 1732 | VIF_ENTRY |
| 1733 | __field(int, rssi_min_thold) |
| 1734 | __field(int, rssi_max_thold) |
| 1735 | ), |
| 1736 | |
| 1737 | TP_fast_assign( |
| 1738 | VIF_ASSIGN; |
| 1739 | __entry->rssi_min_thold = rssi_min_thold; |
| 1740 | __entry->rssi_max_thold = rssi_max_thold; |
| 1741 | ), |
| 1742 | |
| 1743 | TP_printk( |
| 1744 | VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d", |
| 1745 | VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold |
| 1746 | ) |
| 1747 | ); |
| 1748 | |
Johannes Berg | 37fbd90 | 2011-09-29 16:04:39 +0200 | [diff] [blame] | 1749 | TRACE_EVENT(api_eosp, |
| 1750 | TP_PROTO(struct ieee80211_local *local, |
| 1751 | struct ieee80211_sta *sta), |
| 1752 | |
| 1753 | TP_ARGS(local, sta), |
| 1754 | |
| 1755 | TP_STRUCT__entry( |
| 1756 | LOCAL_ENTRY |
| 1757 | STA_ENTRY |
| 1758 | ), |
| 1759 | |
| 1760 | TP_fast_assign( |
| 1761 | LOCAL_ASSIGN; |
| 1762 | STA_ASSIGN; |
| 1763 | ), |
| 1764 | |
| 1765 | TP_printk( |
| 1766 | LOCAL_PR_FMT STA_PR_FMT, |
| 1767 | LOCAL_PR_ARG, STA_PR_FMT |
| 1768 | ) |
| 1769 | ); |
| 1770 | |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1771 | /* |
| 1772 | * Tracing for internal functions |
| 1773 | * (which may also be called in response to driver calls) |
| 1774 | */ |
| 1775 | |
| 1776 | TRACE_EVENT(wake_queue, |
| 1777 | TP_PROTO(struct ieee80211_local *local, u16 queue, |
| 1778 | enum queue_stop_reason reason), |
| 1779 | |
| 1780 | TP_ARGS(local, queue, reason), |
| 1781 | |
| 1782 | TP_STRUCT__entry( |
| 1783 | LOCAL_ENTRY |
| 1784 | __field(u16, queue) |
| 1785 | __field(u32, reason) |
| 1786 | ), |
| 1787 | |
| 1788 | TP_fast_assign( |
| 1789 | LOCAL_ASSIGN; |
| 1790 | __entry->queue = queue; |
| 1791 | __entry->reason = reason; |
| 1792 | ), |
| 1793 | |
| 1794 | TP_printk( |
| 1795 | LOCAL_PR_FMT " queue:%d, reason:%d", |
| 1796 | LOCAL_PR_ARG, __entry->queue, __entry->reason |
| 1797 | ) |
| 1798 | ); |
| 1799 | |
| 1800 | TRACE_EVENT(stop_queue, |
| 1801 | TP_PROTO(struct ieee80211_local *local, u16 queue, |
| 1802 | enum queue_stop_reason reason), |
| 1803 | |
| 1804 | TP_ARGS(local, queue, reason), |
| 1805 | |
| 1806 | TP_STRUCT__entry( |
| 1807 | LOCAL_ENTRY |
| 1808 | __field(u16, queue) |
| 1809 | __field(u32, reason) |
| 1810 | ), |
| 1811 | |
| 1812 | TP_fast_assign( |
| 1813 | LOCAL_ASSIGN; |
| 1814 | __entry->queue = queue; |
| 1815 | __entry->reason = reason; |
| 1816 | ), |
| 1817 | |
| 1818 | TP_printk( |
| 1819 | LOCAL_PR_FMT " queue:%d, reason:%d", |
| 1820 | LOCAL_PR_ARG, __entry->queue, __entry->reason |
| 1821 | ) |
| 1822 | ); |
Johannes Berg | 3fae027 | 2012-06-22 13:36:25 +0200 | [diff] [blame] | 1823 | |
| 1824 | #ifdef CONFIG_MAC80211_MESSAGE_TRACING |
| 1825 | #undef TRACE_SYSTEM |
| 1826 | #define TRACE_SYSTEM mac80211_msg |
| 1827 | |
| 1828 | #define MAX_MSG_LEN 100 |
| 1829 | |
| 1830 | DECLARE_EVENT_CLASS(mac80211_msg_event, |
| 1831 | TP_PROTO(struct va_format *vaf), |
| 1832 | |
| 1833 | TP_ARGS(vaf), |
| 1834 | |
| 1835 | TP_STRUCT__entry( |
| 1836 | __dynamic_array(char, msg, MAX_MSG_LEN) |
| 1837 | ), |
| 1838 | |
| 1839 | TP_fast_assign( |
| 1840 | WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg), |
| 1841 | MAX_MSG_LEN, vaf->fmt, |
| 1842 | *vaf->va) >= MAX_MSG_LEN); |
| 1843 | ), |
| 1844 | |
| 1845 | TP_printk("%s", __get_str(msg)) |
| 1846 | ); |
| 1847 | |
| 1848 | DEFINE_EVENT(mac80211_msg_event, mac80211_info, |
| 1849 | TP_PROTO(struct va_format *vaf), |
| 1850 | TP_ARGS(vaf) |
| 1851 | ); |
| 1852 | DEFINE_EVENT(mac80211_msg_event, mac80211_dbg, |
| 1853 | TP_PROTO(struct va_format *vaf), |
| 1854 | TP_ARGS(vaf) |
| 1855 | ); |
| 1856 | DEFINE_EVENT(mac80211_msg_event, mac80211_err, |
| 1857 | TP_PROTO(struct va_format *vaf), |
| 1858 | TP_ARGS(vaf) |
| 1859 | ); |
| 1860 | #endif |
| 1861 | |
Christian Lamparter | f742880 | 2009-07-19 23:21:07 +0200 | [diff] [blame] | 1862 | #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 1863 | |
| 1864 | #undef TRACE_INCLUDE_PATH |
| 1865 | #define TRACE_INCLUDE_PATH . |
| 1866 | #undef TRACE_INCLUDE_FILE |
Johannes Berg | 011ad0e | 2012-06-22 12:55:52 +0200 | [diff] [blame] | 1867 | #define TRACE_INCLUDE_FILE trace |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 1868 | #include <trace/define_trace.h> |