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