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