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