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 | a344d67 | 2014-06-12 22:24:31 +0200 | [diff] [blame] | 599 | TRACE_EVENT(drv_sw_scan_start, |
| 600 | TP_PROTO(struct ieee80211_local *local, |
| 601 | struct ieee80211_sub_if_data *sdata, |
| 602 | const u8 *mac_addr), |
| 603 | |
| 604 | TP_ARGS(local, sdata, mac_addr), |
| 605 | |
| 606 | TP_STRUCT__entry( |
| 607 | LOCAL_ENTRY |
| 608 | VIF_ENTRY |
| 609 | __array(char, mac_addr, ETH_ALEN) |
| 610 | ), |
| 611 | |
| 612 | TP_fast_assign( |
| 613 | LOCAL_ASSIGN; |
| 614 | VIF_ASSIGN; |
| 615 | memcpy(__entry->mac_addr, mac_addr, ETH_ALEN); |
| 616 | ), |
| 617 | |
| 618 | TP_printk(LOCAL_PR_FMT ", " VIF_PR_FMT ", addr:%pM", |
| 619 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->mac_addr) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 620 | ); |
| 621 | |
Johannes Berg | a344d67 | 2014-06-12 22:24:31 +0200 | [diff] [blame] | 622 | DEFINE_EVENT(local_sdata_evt, drv_sw_scan_complete, |
| 623 | TP_PROTO(struct ieee80211_local *local, |
| 624 | struct ieee80211_sub_if_data *sdata), |
| 625 | TP_ARGS(local, sdata) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 626 | ); |
| 627 | |
| 628 | TRACE_EVENT(drv_get_stats, |
| 629 | TP_PROTO(struct ieee80211_local *local, |
| 630 | struct ieee80211_low_level_stats *stats, |
| 631 | int ret), |
| 632 | |
| 633 | TP_ARGS(local, stats, ret), |
| 634 | |
| 635 | TP_STRUCT__entry( |
| 636 | LOCAL_ENTRY |
| 637 | __field(int, ret) |
| 638 | __field(unsigned int, ackfail) |
| 639 | __field(unsigned int, rtsfail) |
| 640 | __field(unsigned int, fcserr) |
| 641 | __field(unsigned int, rtssucc) |
| 642 | ), |
| 643 | |
| 644 | TP_fast_assign( |
| 645 | LOCAL_ASSIGN; |
| 646 | __entry->ret = ret; |
| 647 | __entry->ackfail = stats->dot11ACKFailureCount; |
| 648 | __entry->rtsfail = stats->dot11RTSFailureCount; |
| 649 | __entry->fcserr = stats->dot11FCSErrorCount; |
| 650 | __entry->rtssucc = stats->dot11RTSSuccessCount; |
| 651 | ), |
| 652 | |
| 653 | TP_printk( |
| 654 | LOCAL_PR_FMT " ret:%d", |
| 655 | LOCAL_PR_ARG, __entry->ret |
| 656 | ) |
| 657 | ); |
| 658 | |
| 659 | TRACE_EVENT(drv_get_tkip_seq, |
| 660 | TP_PROTO(struct ieee80211_local *local, |
| 661 | u8 hw_key_idx, u32 *iv32, u16 *iv16), |
| 662 | |
| 663 | TP_ARGS(local, hw_key_idx, iv32, iv16), |
| 664 | |
| 665 | TP_STRUCT__entry( |
| 666 | LOCAL_ENTRY |
| 667 | __field(u8, hw_key_idx) |
| 668 | __field(u32, iv32) |
| 669 | __field(u16, iv16) |
| 670 | ), |
| 671 | |
| 672 | TP_fast_assign( |
| 673 | LOCAL_ASSIGN; |
| 674 | __entry->hw_key_idx = hw_key_idx; |
| 675 | __entry->iv32 = *iv32; |
| 676 | __entry->iv16 = *iv16; |
| 677 | ), |
| 678 | |
| 679 | TP_printk( |
| 680 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 681 | ) |
| 682 | ); |
| 683 | |
Luciano Coelho | 92ddc11 | 2011-05-09 14:40:06 +0300 | [diff] [blame] | 684 | DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold, |
Arik Nemtsov | f23a478 | 2010-11-08 11:51:06 +0200 | [diff] [blame] | 685 | TP_PROTO(struct ieee80211_local *local, u32 value), |
Luciano Coelho | 92ddc11 | 2011-05-09 14:40:06 +0300 | [diff] [blame] | 686 | TP_ARGS(local, value) |
Arik Nemtsov | f23a478 | 2010-11-08 11:51:06 +0200 | [diff] [blame] | 687 | ); |
| 688 | |
Luciano Coelho | 92ddc11 | 2011-05-09 14:40:06 +0300 | [diff] [blame] | 689 | DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 690 | TP_PROTO(struct ieee80211_local *local, u32 value), |
Luciano Coelho | 92ddc11 | 2011-05-09 14:40:06 +0300 | [diff] [blame] | 691 | TP_ARGS(local, value) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 692 | ); |
| 693 | |
Lukáš Turek | 310bc67 | 2009-12-21 22:50:48 +0100 | [diff] [blame] | 694 | TRACE_EVENT(drv_set_coverage_class, |
Lorenzo Bianconi | a4bcaf5 | 2014-09-04 23:57:41 +0200 | [diff] [blame] | 695 | TP_PROTO(struct ieee80211_local *local, s16 value), |
Lukáš Turek | 310bc67 | 2009-12-21 22:50:48 +0100 | [diff] [blame] | 696 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 697 | TP_ARGS(local, value), |
Lukáš Turek | 310bc67 | 2009-12-21 22:50:48 +0100 | [diff] [blame] | 698 | |
| 699 | TP_STRUCT__entry( |
| 700 | LOCAL_ENTRY |
Lorenzo Bianconi | a4bcaf5 | 2014-09-04 23:57:41 +0200 | [diff] [blame] | 701 | __field(s16, value) |
Lukáš Turek | 310bc67 | 2009-12-21 22:50:48 +0100 | [diff] [blame] | 702 | ), |
| 703 | |
| 704 | TP_fast_assign( |
| 705 | LOCAL_ASSIGN; |
Lukáš Turek | 310bc67 | 2009-12-21 22:50:48 +0100 | [diff] [blame] | 706 | __entry->value = value; |
| 707 | ), |
| 708 | |
| 709 | TP_printk( |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 710 | LOCAL_PR_FMT " value:%d", |
| 711 | LOCAL_PR_ARG, __entry->value |
Lukáš Turek | 310bc67 | 2009-12-21 22:50:48 +0100 | [diff] [blame] | 712 | ) |
| 713 | ); |
| 714 | |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 715 | TRACE_EVENT(drv_sta_notify, |
| 716 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 717 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 718 | enum sta_notify_cmd cmd, |
| 719 | struct ieee80211_sta *sta), |
| 720 | |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 721 | TP_ARGS(local, sdata, cmd, sta), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 722 | |
| 723 | TP_STRUCT__entry( |
| 724 | LOCAL_ENTRY |
| 725 | VIF_ENTRY |
| 726 | STA_ENTRY |
| 727 | __field(u32, cmd) |
| 728 | ), |
| 729 | |
| 730 | TP_fast_assign( |
| 731 | LOCAL_ASSIGN; |
| 732 | VIF_ASSIGN; |
| 733 | STA_ASSIGN; |
| 734 | __entry->cmd = cmd; |
| 735 | ), |
| 736 | |
| 737 | TP_printk( |
| 738 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d", |
| 739 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd |
| 740 | ) |
| 741 | ); |
| 742 | |
Johannes Berg | f09603a | 2012-01-20 13:55:21 +0100 | [diff] [blame] | 743 | TRACE_EVENT(drv_sta_state, |
| 744 | TP_PROTO(struct ieee80211_local *local, |
| 745 | struct ieee80211_sub_if_data *sdata, |
| 746 | struct ieee80211_sta *sta, |
| 747 | enum ieee80211_sta_state old_state, |
| 748 | enum ieee80211_sta_state new_state), |
| 749 | |
| 750 | TP_ARGS(local, sdata, sta, old_state, new_state), |
| 751 | |
| 752 | TP_STRUCT__entry( |
| 753 | LOCAL_ENTRY |
| 754 | VIF_ENTRY |
| 755 | STA_ENTRY |
| 756 | __field(u32, old_state) |
| 757 | __field(u32, new_state) |
| 758 | ), |
| 759 | |
| 760 | TP_fast_assign( |
| 761 | LOCAL_ASSIGN; |
| 762 | VIF_ASSIGN; |
| 763 | STA_ASSIGN; |
| 764 | __entry->old_state = old_state; |
| 765 | __entry->new_state = new_state; |
| 766 | ), |
| 767 | |
| 768 | TP_printk( |
| 769 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " state: %d->%d", |
| 770 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, |
| 771 | __entry->old_state, __entry->new_state |
| 772 | ) |
| 773 | ); |
| 774 | |
Johannes Berg | 8f727ef | 2012-03-30 08:43:32 +0200 | [diff] [blame] | 775 | TRACE_EVENT(drv_sta_rc_update, |
| 776 | TP_PROTO(struct ieee80211_local *local, |
| 777 | struct ieee80211_sub_if_data *sdata, |
| 778 | struct ieee80211_sta *sta, |
| 779 | u32 changed), |
| 780 | |
| 781 | TP_ARGS(local, sdata, sta, changed), |
| 782 | |
| 783 | TP_STRUCT__entry( |
| 784 | LOCAL_ENTRY |
| 785 | VIF_ENTRY |
| 786 | STA_ENTRY |
| 787 | __field(u32, changed) |
| 788 | ), |
| 789 | |
| 790 | TP_fast_assign( |
| 791 | LOCAL_ASSIGN; |
| 792 | VIF_ASSIGN; |
| 793 | STA_ASSIGN; |
| 794 | __entry->changed = changed; |
| 795 | ), |
| 796 | |
| 797 | TP_printk( |
| 798 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " changed: 0x%x", |
| 799 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->changed |
| 800 | ) |
| 801 | ); |
| 802 | |
Johannes Berg | 6a9d1b9 | 2013-12-04 22:39:17 +0100 | [diff] [blame] | 803 | DECLARE_EVENT_CLASS(sta_event, |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 804 | TP_PROTO(struct ieee80211_local *local, |
| 805 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 806 | struct ieee80211_sta *sta), |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 807 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 808 | TP_ARGS(local, sdata, sta), |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 809 | |
| 810 | TP_STRUCT__entry( |
| 811 | LOCAL_ENTRY |
| 812 | VIF_ENTRY |
| 813 | STA_ENTRY |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 814 | ), |
| 815 | |
| 816 | TP_fast_assign( |
| 817 | LOCAL_ASSIGN; |
| 818 | VIF_ASSIGN; |
| 819 | STA_ASSIGN; |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 820 | ), |
| 821 | |
| 822 | TP_printk( |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 823 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT, |
| 824 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 825 | ) |
| 826 | ); |
| 827 | |
Johannes Berg | 2b9a7e1 | 2014-11-17 11:35:23 +0100 | [diff] [blame] | 828 | DEFINE_EVENT(sta_event, drv_sta_statistics, |
| 829 | TP_PROTO(struct ieee80211_local *local, |
| 830 | struct ieee80211_sub_if_data *sdata, |
| 831 | struct ieee80211_sta *sta), |
| 832 | TP_ARGS(local, sdata, sta) |
| 833 | ); |
| 834 | |
Johannes Berg | 6a9d1b9 | 2013-12-04 22:39:17 +0100 | [diff] [blame] | 835 | DEFINE_EVENT(sta_event, drv_sta_add, |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 836 | TP_PROTO(struct ieee80211_local *local, |
| 837 | struct ieee80211_sub_if_data *sdata, |
| 838 | struct ieee80211_sta *sta), |
Johannes Berg | 6a9d1b9 | 2013-12-04 22:39:17 +0100 | [diff] [blame] | 839 | TP_ARGS(local, sdata, sta) |
| 840 | ); |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 841 | |
Johannes Berg | 6a9d1b9 | 2013-12-04 22:39:17 +0100 | [diff] [blame] | 842 | DEFINE_EVENT(sta_event, drv_sta_remove, |
| 843 | TP_PROTO(struct ieee80211_local *local, |
| 844 | struct ieee80211_sub_if_data *sdata, |
| 845 | struct ieee80211_sta *sta), |
| 846 | TP_ARGS(local, sdata, sta) |
| 847 | ); |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 848 | |
Johannes Berg | 6a9d1b9 | 2013-12-04 22:39:17 +0100 | [diff] [blame] | 849 | DEFINE_EVENT(sta_event, drv_sta_pre_rcu_remove, |
| 850 | TP_PROTO(struct ieee80211_local *local, |
| 851 | struct ieee80211_sub_if_data *sdata, |
| 852 | struct ieee80211_sta *sta), |
| 853 | TP_ARGS(local, sdata, sta) |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 854 | ); |
| 855 | |
Johannes Berg | f815e2b | 2014-11-19 00:10:42 +0100 | [diff] [blame] | 856 | DEFINE_EVENT(sta_event, drv_sta_rate_tbl_update, |
| 857 | TP_PROTO(struct ieee80211_local *local, |
| 858 | struct ieee80211_sub_if_data *sdata, |
| 859 | struct ieee80211_sta *sta), |
| 860 | TP_ARGS(local, sdata, sta) |
| 861 | ); |
| 862 | |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 863 | TRACE_EVENT(drv_conf_tx, |
Eliad Peller | f6f3def | 2011-09-25 20:06:54 +0300 | [diff] [blame] | 864 | TP_PROTO(struct ieee80211_local *local, |
| 865 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | a3304b0 | 2012-03-28 11:04:24 +0200 | [diff] [blame] | 866 | u16 ac, const struct ieee80211_tx_queue_params *params), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 867 | |
Johannes Berg | a3304b0 | 2012-03-28 11:04:24 +0200 | [diff] [blame] | 868 | TP_ARGS(local, sdata, ac, params), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 869 | |
| 870 | TP_STRUCT__entry( |
| 871 | LOCAL_ENTRY |
Eliad Peller | f6f3def | 2011-09-25 20:06:54 +0300 | [diff] [blame] | 872 | VIF_ENTRY |
Johannes Berg | a3304b0 | 2012-03-28 11:04:24 +0200 | [diff] [blame] | 873 | __field(u16, ac) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 874 | __field(u16, txop) |
| 875 | __field(u16, cw_min) |
| 876 | __field(u16, cw_max) |
| 877 | __field(u8, aifs) |
Eliad Peller | f6f3def | 2011-09-25 20:06:54 +0300 | [diff] [blame] | 878 | __field(bool, uapsd) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 879 | ), |
| 880 | |
| 881 | TP_fast_assign( |
| 882 | LOCAL_ASSIGN; |
Eliad Peller | f6f3def | 2011-09-25 20:06:54 +0300 | [diff] [blame] | 883 | VIF_ASSIGN; |
Johannes Berg | a3304b0 | 2012-03-28 11:04:24 +0200 | [diff] [blame] | 884 | __entry->ac = ac; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 885 | __entry->txop = params->txop; |
| 886 | __entry->cw_max = params->cw_max; |
| 887 | __entry->cw_min = params->cw_min; |
| 888 | __entry->aifs = params->aifs; |
Eliad Peller | f6f3def | 2011-09-25 20:06:54 +0300 | [diff] [blame] | 889 | __entry->uapsd = params->uapsd; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 890 | ), |
| 891 | |
| 892 | TP_printk( |
Johannes Berg | a3304b0 | 2012-03-28 11:04:24 +0200 | [diff] [blame] | 893 | LOCAL_PR_FMT VIF_PR_FMT " AC:%d", |
| 894 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->ac |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 895 | ) |
| 896 | ); |
| 897 | |
Eliad Peller | 37a41b4 | 2011-09-21 14:06:11 +0300 | [diff] [blame] | 898 | DEFINE_EVENT(local_sdata_evt, drv_get_tsf, |
| 899 | TP_PROTO(struct ieee80211_local *local, |
| 900 | struct ieee80211_sub_if_data *sdata), |
| 901 | TP_ARGS(local, sdata) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 902 | ); |
| 903 | |
| 904 | TRACE_EVENT(drv_set_tsf, |
Eliad Peller | 37a41b4 | 2011-09-21 14:06:11 +0300 | [diff] [blame] | 905 | TP_PROTO(struct ieee80211_local *local, |
| 906 | struct ieee80211_sub_if_data *sdata, |
| 907 | u64 tsf), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 908 | |
Eliad Peller | 37a41b4 | 2011-09-21 14:06:11 +0300 | [diff] [blame] | 909 | TP_ARGS(local, sdata, tsf), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 910 | |
| 911 | TP_STRUCT__entry( |
| 912 | LOCAL_ENTRY |
Eliad Peller | 37a41b4 | 2011-09-21 14:06:11 +0300 | [diff] [blame] | 913 | VIF_ENTRY |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 914 | __field(u64, tsf) |
| 915 | ), |
| 916 | |
| 917 | TP_fast_assign( |
| 918 | LOCAL_ASSIGN; |
Eliad Peller | 37a41b4 | 2011-09-21 14:06:11 +0300 | [diff] [blame] | 919 | VIF_ASSIGN; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 920 | __entry->tsf = tsf; |
| 921 | ), |
| 922 | |
| 923 | TP_printk( |
Eliad Peller | 37a41b4 | 2011-09-21 14:06:11 +0300 | [diff] [blame] | 924 | LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu", |
| 925 | LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 926 | ) |
| 927 | ); |
| 928 | |
Eliad Peller | 37a41b4 | 2011-09-21 14:06:11 +0300 | [diff] [blame] | 929 | DEFINE_EVENT(local_sdata_evt, drv_reset_tsf, |
| 930 | TP_PROTO(struct ieee80211_local *local, |
| 931 | struct ieee80211_sub_if_data *sdata), |
| 932 | TP_ARGS(local, sdata) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 933 | ); |
| 934 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 935 | DEFINE_EVENT(local_only_evt, drv_tx_last_beacon, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 936 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 937 | TP_ARGS(local) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 938 | ); |
| 939 | |
| 940 | TRACE_EVENT(drv_ampdu_action, |
| 941 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 942 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 943 | enum ieee80211_ampdu_mlme_action action, |
| 944 | struct ieee80211_sta *sta, u16 tid, |
Johannes Berg | 0b01f03 | 2011-01-18 13:51:05 +0100 | [diff] [blame] | 945 | u16 *ssn, u8 buf_size), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 946 | |
Johannes Berg | 0b01f03 | 2011-01-18 13:51:05 +0100 | [diff] [blame] | 947 | TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 948 | |
| 949 | TP_STRUCT__entry( |
| 950 | LOCAL_ENTRY |
| 951 | STA_ENTRY |
| 952 | __field(u32, action) |
| 953 | __field(u16, tid) |
| 954 | __field(u16, ssn) |
Johannes Berg | 0b01f03 | 2011-01-18 13:51:05 +0100 | [diff] [blame] | 955 | __field(u8, buf_size) |
Johannes Berg | c951ad3 | 2009-11-16 12:00:38 +0100 | [diff] [blame] | 956 | VIF_ENTRY |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 957 | ), |
| 958 | |
| 959 | TP_fast_assign( |
| 960 | LOCAL_ASSIGN; |
Johannes Berg | c951ad3 | 2009-11-16 12:00:38 +0100 | [diff] [blame] | 961 | VIF_ASSIGN; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 962 | STA_ASSIGN; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 963 | __entry->action = action; |
| 964 | __entry->tid = tid; |
Zhu Yi | 3092ad0 | 2010-01-26 15:58:57 +0800 | [diff] [blame] | 965 | __entry->ssn = ssn ? *ssn : 0; |
Johannes Berg | 0b01f03 | 2011-01-18 13:51:05 +0100 | [diff] [blame] | 966 | __entry->buf_size = buf_size; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 967 | ), |
| 968 | |
| 969 | TP_printk( |
Johannes Berg | 0b01f03 | 2011-01-18 13:51:05 +0100 | [diff] [blame] | 970 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d", |
| 971 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action, |
| 972 | __entry->tid, __entry->buf_size |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 973 | ) |
| 974 | ); |
Johannes Berg | a80f7c0 | 2009-12-23 13:15:32 +0100 | [diff] [blame] | 975 | |
John W. Linville | c466d4e | 2010-06-29 14:51:23 -0400 | [diff] [blame] | 976 | TRACE_EVENT(drv_get_survey, |
| 977 | TP_PROTO(struct ieee80211_local *local, int idx, |
| 978 | struct survey_info *survey), |
| 979 | |
| 980 | TP_ARGS(local, idx, survey), |
| 981 | |
| 982 | TP_STRUCT__entry( |
| 983 | LOCAL_ENTRY |
| 984 | __field(int, idx) |
| 985 | ), |
| 986 | |
| 987 | TP_fast_assign( |
| 988 | LOCAL_ASSIGN; |
| 989 | __entry->idx = idx; |
| 990 | ), |
| 991 | |
| 992 | TP_printk( |
| 993 | LOCAL_PR_FMT " idx:%d", |
| 994 | LOCAL_PR_ARG, __entry->idx |
| 995 | ) |
| 996 | ); |
| 997 | |
Johannes Berg | a80f7c0 | 2009-12-23 13:15:32 +0100 | [diff] [blame] | 998 | TRACE_EVENT(drv_flush, |
Johannes Berg | 39ecc01 | 2013-02-13 12:11:00 +0100 | [diff] [blame] | 999 | TP_PROTO(struct ieee80211_local *local, |
| 1000 | u32 queues, bool drop), |
Johannes Berg | a80f7c0 | 2009-12-23 13:15:32 +0100 | [diff] [blame] | 1001 | |
Johannes Berg | 39ecc01 | 2013-02-13 12:11:00 +0100 | [diff] [blame] | 1002 | TP_ARGS(local, queues, drop), |
Johannes Berg | a80f7c0 | 2009-12-23 13:15:32 +0100 | [diff] [blame] | 1003 | |
| 1004 | TP_STRUCT__entry( |
| 1005 | LOCAL_ENTRY |
| 1006 | __field(bool, drop) |
Johannes Berg | 39ecc01 | 2013-02-13 12:11:00 +0100 | [diff] [blame] | 1007 | __field(u32, queues) |
Johannes Berg | a80f7c0 | 2009-12-23 13:15:32 +0100 | [diff] [blame] | 1008 | ), |
| 1009 | |
| 1010 | TP_fast_assign( |
| 1011 | LOCAL_ASSIGN; |
| 1012 | __entry->drop = drop; |
Johannes Berg | 39ecc01 | 2013-02-13 12:11:00 +0100 | [diff] [blame] | 1013 | __entry->queues = queues; |
Johannes Berg | a80f7c0 | 2009-12-23 13:15:32 +0100 | [diff] [blame] | 1014 | ), |
| 1015 | |
| 1016 | TP_printk( |
Johannes Berg | 39ecc01 | 2013-02-13 12:11:00 +0100 | [diff] [blame] | 1017 | LOCAL_PR_FMT " queues:0x%x drop:%d", |
| 1018 | LOCAL_PR_ARG, __entry->queues, __entry->drop |
Johannes Berg | a80f7c0 | 2009-12-23 13:15:32 +0100 | [diff] [blame] | 1019 | ) |
| 1020 | ); |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1021 | |
Johannes Berg | 5ce6e43 | 2010-05-11 16:20:57 +0200 | [diff] [blame] | 1022 | TRACE_EVENT(drv_channel_switch, |
| 1023 | TP_PROTO(struct ieee80211_local *local, |
Luciano Coelho | 0f791eb4 | 2014-10-08 09:48:40 +0300 | [diff] [blame] | 1024 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 5ce6e43 | 2010-05-11 16:20:57 +0200 | [diff] [blame] | 1025 | struct ieee80211_channel_switch *ch_switch), |
| 1026 | |
Luciano Coelho | 0f791eb4 | 2014-10-08 09:48:40 +0300 | [diff] [blame] | 1027 | TP_ARGS(local, sdata, ch_switch), |
Johannes Berg | 5ce6e43 | 2010-05-11 16:20:57 +0200 | [diff] [blame] | 1028 | |
| 1029 | TP_STRUCT__entry( |
| 1030 | LOCAL_ENTRY |
Luciano Coelho | 0f791eb4 | 2014-10-08 09:48:40 +0300 | [diff] [blame] | 1031 | VIF_ENTRY |
Johannes Berg | 85220d7 | 2013-03-25 18:29:27 +0100 | [diff] [blame] | 1032 | CHANDEF_ENTRY |
Johannes Berg | 5ce6e43 | 2010-05-11 16:20:57 +0200 | [diff] [blame] | 1033 | __field(u64, timestamp) |
Luciano Coelho | 2ba4538 | 2014-10-08 09:48:35 +0300 | [diff] [blame] | 1034 | __field(u32, device_timestamp) |
Johannes Berg | 5ce6e43 | 2010-05-11 16:20:57 +0200 | [diff] [blame] | 1035 | __field(bool, block_tx) |
Johannes Berg | 5ce6e43 | 2010-05-11 16:20:57 +0200 | [diff] [blame] | 1036 | __field(u8, count) |
| 1037 | ), |
| 1038 | |
| 1039 | TP_fast_assign( |
| 1040 | LOCAL_ASSIGN; |
Luciano Coelho | 0f791eb4 | 2014-10-08 09:48:40 +0300 | [diff] [blame] | 1041 | VIF_ASSIGN; |
Johannes Berg | 85220d7 | 2013-03-25 18:29:27 +0100 | [diff] [blame] | 1042 | CHANDEF_ASSIGN(&ch_switch->chandef) |
Johannes Berg | 5ce6e43 | 2010-05-11 16:20:57 +0200 | [diff] [blame] | 1043 | __entry->timestamp = ch_switch->timestamp; |
Luciano Coelho | 2ba4538 | 2014-10-08 09:48:35 +0300 | [diff] [blame] | 1044 | __entry->device_timestamp = ch_switch->device_timestamp; |
Johannes Berg | 5ce6e43 | 2010-05-11 16:20:57 +0200 | [diff] [blame] | 1045 | __entry->block_tx = ch_switch->block_tx; |
Johannes Berg | 5ce6e43 | 2010-05-11 16:20:57 +0200 | [diff] [blame] | 1046 | __entry->count = ch_switch->count; |
| 1047 | ), |
| 1048 | |
| 1049 | TP_printk( |
Luciano Coelho | 0f791eb4 | 2014-10-08 09:48:40 +0300 | [diff] [blame] | 1050 | LOCAL_PR_FMT VIF_PR_FMT " new " CHANDEF_PR_FMT " count:%d", |
| 1051 | LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count |
Johannes Berg | 5ce6e43 | 2010-05-11 16:20:57 +0200 | [diff] [blame] | 1052 | ) |
| 1053 | ); |
| 1054 | |
Bruno Randolf | 15d9675 | 2010-11-10 12:50:56 +0900 | [diff] [blame] | 1055 | TRACE_EVENT(drv_set_antenna, |
| 1056 | TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret), |
| 1057 | |
| 1058 | TP_ARGS(local, tx_ant, rx_ant, ret), |
| 1059 | |
| 1060 | TP_STRUCT__entry( |
| 1061 | LOCAL_ENTRY |
| 1062 | __field(u32, tx_ant) |
| 1063 | __field(u32, rx_ant) |
| 1064 | __field(int, ret) |
| 1065 | ), |
| 1066 | |
| 1067 | TP_fast_assign( |
| 1068 | LOCAL_ASSIGN; |
| 1069 | __entry->tx_ant = tx_ant; |
| 1070 | __entry->rx_ant = rx_ant; |
| 1071 | __entry->ret = ret; |
| 1072 | ), |
| 1073 | |
| 1074 | TP_printk( |
| 1075 | LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d", |
| 1076 | LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret |
| 1077 | ) |
| 1078 | ); |
| 1079 | |
| 1080 | TRACE_EVENT(drv_get_antenna, |
| 1081 | TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret), |
| 1082 | |
| 1083 | TP_ARGS(local, tx_ant, rx_ant, ret), |
| 1084 | |
| 1085 | TP_STRUCT__entry( |
| 1086 | LOCAL_ENTRY |
| 1087 | __field(u32, tx_ant) |
| 1088 | __field(u32, rx_ant) |
| 1089 | __field(int, ret) |
| 1090 | ), |
| 1091 | |
| 1092 | TP_fast_assign( |
| 1093 | LOCAL_ASSIGN; |
| 1094 | __entry->tx_ant = tx_ant; |
| 1095 | __entry->rx_ant = rx_ant; |
| 1096 | __entry->ret = ret; |
| 1097 | ), |
| 1098 | |
| 1099 | TP_printk( |
| 1100 | LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d", |
| 1101 | LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret |
| 1102 | ) |
| 1103 | ); |
| 1104 | |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1105 | TRACE_EVENT(drv_remain_on_channel, |
Eliad Peller | 4988456 | 2012-11-19 17:05:09 +0200 | [diff] [blame] | 1106 | TP_PROTO(struct ieee80211_local *local, |
| 1107 | struct ieee80211_sub_if_data *sdata, |
| 1108 | struct ieee80211_channel *chan, |
Ilan Peer | d339d5c | 2013-02-12 09:34:13 +0200 | [diff] [blame] | 1109 | unsigned int duration, |
| 1110 | enum ieee80211_roc_type type), |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1111 | |
Ilan Peer | d339d5c | 2013-02-12 09:34:13 +0200 | [diff] [blame] | 1112 | TP_ARGS(local, sdata, chan, duration, type), |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1113 | |
| 1114 | TP_STRUCT__entry( |
| 1115 | LOCAL_ENTRY |
Eliad Peller | 4988456 | 2012-11-19 17:05:09 +0200 | [diff] [blame] | 1116 | VIF_ENTRY |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1117 | __field(int, center_freq) |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1118 | __field(unsigned int, duration) |
Ilan Peer | d339d5c | 2013-02-12 09:34:13 +0200 | [diff] [blame] | 1119 | __field(u32, type) |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1120 | ), |
| 1121 | |
| 1122 | TP_fast_assign( |
| 1123 | LOCAL_ASSIGN; |
Eliad Peller | 4988456 | 2012-11-19 17:05:09 +0200 | [diff] [blame] | 1124 | VIF_ASSIGN; |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1125 | __entry->center_freq = chan->center_freq; |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1126 | __entry->duration = duration; |
Ilan Peer | d339d5c | 2013-02-12 09:34:13 +0200 | [diff] [blame] | 1127 | __entry->type = type; |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1128 | ), |
| 1129 | |
| 1130 | TP_printk( |
Ilan Peer | d339d5c | 2013-02-12 09:34:13 +0200 | [diff] [blame] | 1131 | LOCAL_PR_FMT VIF_PR_FMT " freq:%dMHz duration:%dms type=%d", |
Eliad Peller | 4988456 | 2012-11-19 17:05:09 +0200 | [diff] [blame] | 1132 | LOCAL_PR_ARG, VIF_PR_ARG, |
Ilan Peer | d339d5c | 2013-02-12 09:34:13 +0200 | [diff] [blame] | 1133 | __entry->center_freq, __entry->duration, __entry->type |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1134 | ) |
| 1135 | ); |
| 1136 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1137 | DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel, |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1138 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1139 | TP_ARGS(local) |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1140 | ); |
| 1141 | |
John W. Linville | 38c0915 | 2011-03-07 16:19:18 -0500 | [diff] [blame] | 1142 | TRACE_EVENT(drv_set_ringparam, |
| 1143 | TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx), |
| 1144 | |
| 1145 | TP_ARGS(local, tx, rx), |
| 1146 | |
| 1147 | TP_STRUCT__entry( |
| 1148 | LOCAL_ENTRY |
| 1149 | __field(u32, tx) |
| 1150 | __field(u32, rx) |
| 1151 | ), |
| 1152 | |
| 1153 | TP_fast_assign( |
| 1154 | LOCAL_ASSIGN; |
| 1155 | __entry->tx = tx; |
| 1156 | __entry->rx = rx; |
| 1157 | ), |
| 1158 | |
| 1159 | TP_printk( |
| 1160 | LOCAL_PR_FMT " tx:%d rx %d", |
| 1161 | LOCAL_PR_ARG, __entry->tx, __entry->rx |
| 1162 | ) |
| 1163 | ); |
| 1164 | |
| 1165 | TRACE_EVENT(drv_get_ringparam, |
| 1166 | TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max, |
| 1167 | u32 *rx, u32 *rx_max), |
| 1168 | |
| 1169 | TP_ARGS(local, tx, tx_max, rx, rx_max), |
| 1170 | |
| 1171 | TP_STRUCT__entry( |
| 1172 | LOCAL_ENTRY |
| 1173 | __field(u32, tx) |
| 1174 | __field(u32, tx_max) |
| 1175 | __field(u32, rx) |
| 1176 | __field(u32, rx_max) |
| 1177 | ), |
| 1178 | |
| 1179 | TP_fast_assign( |
| 1180 | LOCAL_ASSIGN; |
| 1181 | __entry->tx = *tx; |
| 1182 | __entry->tx_max = *tx_max; |
| 1183 | __entry->rx = *rx; |
| 1184 | __entry->rx_max = *rx_max; |
| 1185 | ), |
| 1186 | |
| 1187 | TP_printk( |
| 1188 | LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d", |
| 1189 | LOCAL_PR_ARG, |
| 1190 | __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max |
| 1191 | ) |
| 1192 | ); |
| 1193 | |
Vivek Natarajan | e8306f9 | 2011-04-06 11:41:10 +0530 | [diff] [blame] | 1194 | DEFINE_EVENT(local_only_evt, drv_tx_frames_pending, |
| 1195 | TP_PROTO(struct ieee80211_local *local), |
| 1196 | TP_ARGS(local) |
| 1197 | ); |
| 1198 | |
Johannes Berg | 5f16a43 | 2011-02-25 15:36:57 +0100 | [diff] [blame] | 1199 | DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait, |
| 1200 | TP_PROTO(struct ieee80211_local *local), |
| 1201 | TP_ARGS(local) |
| 1202 | ); |
| 1203 | |
Sujith Manoharan | bdbfd6b | 2011-04-27 16:56:51 +0530 | [diff] [blame] | 1204 | TRACE_EVENT(drv_set_bitrate_mask, |
| 1205 | TP_PROTO(struct ieee80211_local *local, |
| 1206 | struct ieee80211_sub_if_data *sdata, |
| 1207 | const struct cfg80211_bitrate_mask *mask), |
| 1208 | |
| 1209 | TP_ARGS(local, sdata, mask), |
| 1210 | |
| 1211 | TP_STRUCT__entry( |
| 1212 | LOCAL_ENTRY |
| 1213 | VIF_ENTRY |
| 1214 | __field(u32, legacy_2g) |
| 1215 | __field(u32, legacy_5g) |
| 1216 | ), |
| 1217 | |
| 1218 | TP_fast_assign( |
| 1219 | LOCAL_ASSIGN; |
| 1220 | VIF_ASSIGN; |
| 1221 | __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy; |
| 1222 | __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy; |
| 1223 | ), |
| 1224 | |
| 1225 | TP_printk( |
| 1226 | LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x", |
| 1227 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g |
| 1228 | ) |
| 1229 | ); |
| 1230 | |
Johannes Berg | c68f4b8 | 2011-07-05 16:35:41 +0200 | [diff] [blame] | 1231 | TRACE_EVENT(drv_set_rekey_data, |
| 1232 | TP_PROTO(struct ieee80211_local *local, |
| 1233 | struct ieee80211_sub_if_data *sdata, |
| 1234 | struct cfg80211_gtk_rekey_data *data), |
| 1235 | |
| 1236 | TP_ARGS(local, sdata, data), |
| 1237 | |
| 1238 | TP_STRUCT__entry( |
| 1239 | LOCAL_ENTRY |
| 1240 | VIF_ENTRY |
| 1241 | __array(u8, kek, NL80211_KEK_LEN) |
| 1242 | __array(u8, kck, NL80211_KCK_LEN) |
| 1243 | __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN) |
| 1244 | ), |
| 1245 | |
| 1246 | TP_fast_assign( |
| 1247 | LOCAL_ASSIGN; |
| 1248 | VIF_ASSIGN; |
| 1249 | memcpy(__entry->kek, data->kek, NL80211_KEK_LEN); |
| 1250 | memcpy(__entry->kck, data->kck, NL80211_KCK_LEN); |
| 1251 | memcpy(__entry->replay_ctr, data->replay_ctr, |
| 1252 | NL80211_REPLAY_CTR_LEN); |
| 1253 | ), |
| 1254 | |
| 1255 | TP_printk(LOCAL_PR_FMT VIF_PR_FMT, |
| 1256 | LOCAL_PR_ARG, VIF_PR_ARG) |
| 1257 | ); |
| 1258 | |
Emmanuel Grumbach | a818292 | 2015-03-16 23:23:34 +0200 | [diff] [blame] | 1259 | TRACE_EVENT(drv_event_callback, |
Meenakshi Venkataraman | 615f7b9 | 2011-07-08 08:46:22 -0700 | [diff] [blame] | 1260 | TP_PROTO(struct ieee80211_local *local, |
Emmanuel Grumbach | 887da91 | 2013-01-20 17:32:41 +0200 | [diff] [blame] | 1261 | struct ieee80211_sub_if_data *sdata, |
Emmanuel Grumbach | a818292 | 2015-03-16 23:23:34 +0200 | [diff] [blame] | 1262 | const struct ieee80211_event *_event), |
Meenakshi Venkataraman | 615f7b9 | 2011-07-08 08:46:22 -0700 | [diff] [blame] | 1263 | |
Emmanuel Grumbach | a818292 | 2015-03-16 23:23:34 +0200 | [diff] [blame] | 1264 | TP_ARGS(local, sdata, _event), |
Meenakshi Venkataraman | 615f7b9 | 2011-07-08 08:46:22 -0700 | [diff] [blame] | 1265 | |
| 1266 | TP_STRUCT__entry( |
| 1267 | LOCAL_ENTRY |
Emmanuel Grumbach | 887da91 | 2013-01-20 17:32:41 +0200 | [diff] [blame] | 1268 | VIF_ENTRY |
Emmanuel Grumbach | a818292 | 2015-03-16 23:23:34 +0200 | [diff] [blame] | 1269 | __field(u32, type) |
Meenakshi Venkataraman | 615f7b9 | 2011-07-08 08:46:22 -0700 | [diff] [blame] | 1270 | ), |
| 1271 | |
| 1272 | TP_fast_assign( |
| 1273 | LOCAL_ASSIGN; |
Emmanuel Grumbach | 887da91 | 2013-01-20 17:32:41 +0200 | [diff] [blame] | 1274 | VIF_ASSIGN; |
Emmanuel Grumbach | a818292 | 2015-03-16 23:23:34 +0200 | [diff] [blame] | 1275 | __entry->type = _event->type; |
Meenakshi Venkataraman | 615f7b9 | 2011-07-08 08:46:22 -0700 | [diff] [blame] | 1276 | ), |
| 1277 | |
| 1278 | TP_printk( |
Emmanuel Grumbach | a818292 | 2015-03-16 23:23:34 +0200 | [diff] [blame] | 1279 | LOCAL_PR_FMT VIF_PR_FMT " event:%d", |
| 1280 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->type |
Meenakshi Venkataraman | 615f7b9 | 2011-07-08 08:46:22 -0700 | [diff] [blame] | 1281 | ) |
| 1282 | ); |
| 1283 | |
Johannes Berg | 40b9640 | 2011-09-29 16:04:38 +0200 | [diff] [blame] | 1284 | DECLARE_EVENT_CLASS(release_evt, |
Johannes Berg | 4049e09 | 2011-09-29 16:04:32 +0200 | [diff] [blame] | 1285 | TP_PROTO(struct ieee80211_local *local, |
| 1286 | struct ieee80211_sta *sta, |
| 1287 | u16 tids, int num_frames, |
| 1288 | enum ieee80211_frame_release_type reason, |
| 1289 | bool more_data), |
| 1290 | |
| 1291 | TP_ARGS(local, sta, tids, num_frames, reason, more_data), |
| 1292 | |
| 1293 | TP_STRUCT__entry( |
| 1294 | LOCAL_ENTRY |
| 1295 | STA_ENTRY |
| 1296 | __field(u16, tids) |
| 1297 | __field(int, num_frames) |
| 1298 | __field(int, reason) |
| 1299 | __field(bool, more_data) |
| 1300 | ), |
| 1301 | |
| 1302 | TP_fast_assign( |
| 1303 | LOCAL_ASSIGN; |
| 1304 | STA_ASSIGN; |
| 1305 | __entry->tids = tids; |
| 1306 | __entry->num_frames = num_frames; |
| 1307 | __entry->reason = reason; |
| 1308 | __entry->more_data = more_data; |
| 1309 | ), |
| 1310 | |
| 1311 | TP_printk( |
| 1312 | LOCAL_PR_FMT STA_PR_FMT |
| 1313 | " TIDs:0x%.4x frames:%d reason:%d more:%d", |
| 1314 | LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames, |
| 1315 | __entry->reason, __entry->more_data |
| 1316 | ) |
| 1317 | ); |
| 1318 | |
Johannes Berg | 40b9640 | 2011-09-29 16:04:38 +0200 | [diff] [blame] | 1319 | DEFINE_EVENT(release_evt, drv_release_buffered_frames, |
| 1320 | TP_PROTO(struct ieee80211_local *local, |
| 1321 | struct ieee80211_sta *sta, |
| 1322 | u16 tids, int num_frames, |
| 1323 | enum ieee80211_frame_release_type reason, |
| 1324 | bool more_data), |
| 1325 | |
| 1326 | TP_ARGS(local, sta, tids, num_frames, reason, more_data) |
| 1327 | ); |
| 1328 | |
| 1329 | DEFINE_EVENT(release_evt, drv_allow_buffered_frames, |
| 1330 | TP_PROTO(struct ieee80211_local *local, |
| 1331 | struct ieee80211_sta *sta, |
| 1332 | u16 tids, int num_frames, |
| 1333 | enum ieee80211_frame_release_type reason, |
| 1334 | bool more_data), |
| 1335 | |
| 1336 | TP_ARGS(local, sta, tids, num_frames, reason, more_data) |
| 1337 | ); |
| 1338 | |
Johannes Berg | a1845fc | 2012-06-27 13:18:36 +0200 | [diff] [blame] | 1339 | DEFINE_EVENT(local_sdata_evt, drv_mgd_prepare_tx, |
| 1340 | TP_PROTO(struct ieee80211_local *local, |
| 1341 | struct ieee80211_sub_if_data *sdata), |
| 1342 | |
| 1343 | TP_ARGS(local, sdata) |
| 1344 | ); |
| 1345 | |
Arik Nemtsov | ee10f2c | 2014-06-11 17:18:27 +0300 | [diff] [blame] | 1346 | DEFINE_EVENT(local_sdata_evt, drv_mgd_protect_tdls_discover, |
| 1347 | TP_PROTO(struct ieee80211_local *local, |
| 1348 | struct ieee80211_sub_if_data *sdata), |
| 1349 | |
| 1350 | TP_ARGS(local, sdata) |
| 1351 | ); |
| 1352 | |
Michal Kazior | c3645ea | 2012-06-26 14:37:17 +0200 | [diff] [blame] | 1353 | DECLARE_EVENT_CLASS(local_chanctx, |
| 1354 | TP_PROTO(struct ieee80211_local *local, |
| 1355 | struct ieee80211_chanctx *ctx), |
| 1356 | |
| 1357 | TP_ARGS(local, ctx), |
| 1358 | |
| 1359 | TP_STRUCT__entry( |
| 1360 | LOCAL_ENTRY |
| 1361 | CHANCTX_ENTRY |
| 1362 | ), |
| 1363 | |
| 1364 | TP_fast_assign( |
| 1365 | LOCAL_ASSIGN; |
| 1366 | CHANCTX_ASSIGN; |
| 1367 | ), |
| 1368 | |
| 1369 | TP_printk( |
| 1370 | LOCAL_PR_FMT CHANCTX_PR_FMT, |
| 1371 | LOCAL_PR_ARG, CHANCTX_PR_ARG |
| 1372 | ) |
| 1373 | ); |
| 1374 | |
| 1375 | DEFINE_EVENT(local_chanctx, drv_add_chanctx, |
| 1376 | TP_PROTO(struct ieee80211_local *local, |
| 1377 | struct ieee80211_chanctx *ctx), |
| 1378 | TP_ARGS(local, ctx) |
| 1379 | ); |
| 1380 | |
| 1381 | DEFINE_EVENT(local_chanctx, drv_remove_chanctx, |
| 1382 | TP_PROTO(struct ieee80211_local *local, |
| 1383 | struct ieee80211_chanctx *ctx), |
| 1384 | TP_ARGS(local, ctx) |
| 1385 | ); |
| 1386 | |
| 1387 | TRACE_EVENT(drv_change_chanctx, |
| 1388 | TP_PROTO(struct ieee80211_local *local, |
| 1389 | struct ieee80211_chanctx *ctx, |
| 1390 | u32 changed), |
| 1391 | |
| 1392 | TP_ARGS(local, ctx, changed), |
| 1393 | |
| 1394 | TP_STRUCT__entry( |
| 1395 | LOCAL_ENTRY |
| 1396 | CHANCTX_ENTRY |
| 1397 | __field(u32, changed) |
| 1398 | ), |
| 1399 | |
| 1400 | TP_fast_assign( |
| 1401 | LOCAL_ASSIGN; |
| 1402 | CHANCTX_ASSIGN; |
| 1403 | __entry->changed = changed; |
| 1404 | ), |
| 1405 | |
| 1406 | TP_printk( |
| 1407 | LOCAL_PR_FMT CHANCTX_PR_FMT " changed:%#x", |
| 1408 | LOCAL_PR_ARG, CHANCTX_PR_ARG, __entry->changed |
| 1409 | ) |
| 1410 | ); |
| 1411 | |
Luciano Coelho | 1a5f0c1 | 2014-05-23 14:33:12 +0300 | [diff] [blame] | 1412 | #if !defined(__TRACE_VIF_ENTRY) |
| 1413 | #define __TRACE_VIF_ENTRY |
| 1414 | struct trace_vif_entry { |
| 1415 | enum nl80211_iftype vif_type; |
| 1416 | bool p2p; |
| 1417 | char vif_name[IFNAMSIZ]; |
| 1418 | } __packed; |
| 1419 | |
| 1420 | struct trace_chandef_entry { |
| 1421 | u32 control_freq; |
| 1422 | u32 chan_width; |
| 1423 | u32 center_freq1; |
| 1424 | u32 center_freq2; |
| 1425 | } __packed; |
| 1426 | |
| 1427 | struct trace_switch_entry { |
| 1428 | struct trace_vif_entry vif; |
| 1429 | struct trace_chandef_entry old_chandef; |
| 1430 | struct trace_chandef_entry new_chandef; |
| 1431 | } __packed; |
| 1432 | |
| 1433 | #define SWITCH_ENTRY_ASSIGN(to, from) local_vifs[i].to = vifs[i].from |
| 1434 | #endif |
| 1435 | |
| 1436 | TRACE_EVENT(drv_switch_vif_chanctx, |
| 1437 | TP_PROTO(struct ieee80211_local *local, |
| 1438 | struct ieee80211_vif_chanctx_switch *vifs, |
| 1439 | int n_vifs, enum ieee80211_chanctx_switch_mode mode), |
| 1440 | TP_ARGS(local, vifs, n_vifs, mode), |
| 1441 | |
| 1442 | TP_STRUCT__entry( |
| 1443 | LOCAL_ENTRY |
| 1444 | __field(int, n_vifs) |
| 1445 | __field(u32, mode) |
| 1446 | __dynamic_array(u8, vifs, |
| 1447 | sizeof(struct trace_switch_entry) * n_vifs) |
| 1448 | ), |
| 1449 | |
| 1450 | TP_fast_assign( |
| 1451 | LOCAL_ASSIGN; |
| 1452 | __entry->n_vifs = n_vifs; |
| 1453 | __entry->mode = mode; |
| 1454 | { |
| 1455 | struct trace_switch_entry *local_vifs = |
| 1456 | __get_dynamic_array(vifs); |
| 1457 | int i; |
| 1458 | |
| 1459 | for (i = 0; i < n_vifs; i++) { |
| 1460 | struct ieee80211_sub_if_data *sdata; |
| 1461 | |
| 1462 | sdata = container_of(vifs[i].vif, |
| 1463 | struct ieee80211_sub_if_data, |
| 1464 | vif); |
| 1465 | |
| 1466 | SWITCH_ENTRY_ASSIGN(vif.vif_type, vif->type); |
| 1467 | SWITCH_ENTRY_ASSIGN(vif.p2p, vif->p2p); |
| 1468 | strncpy(local_vifs[i].vif.vif_name, |
| 1469 | sdata->name, |
| 1470 | sizeof(local_vifs[i].vif.vif_name)); |
| 1471 | SWITCH_ENTRY_ASSIGN(old_chandef.control_freq, |
| 1472 | old_ctx->def.chan->center_freq); |
| 1473 | SWITCH_ENTRY_ASSIGN(old_chandef.chan_width, |
| 1474 | old_ctx->def.width); |
| 1475 | SWITCH_ENTRY_ASSIGN(old_chandef.center_freq1, |
| 1476 | old_ctx->def.center_freq1); |
| 1477 | SWITCH_ENTRY_ASSIGN(old_chandef.center_freq2, |
| 1478 | old_ctx->def.center_freq2); |
| 1479 | SWITCH_ENTRY_ASSIGN(new_chandef.control_freq, |
| 1480 | new_ctx->def.chan->center_freq); |
| 1481 | SWITCH_ENTRY_ASSIGN(new_chandef.chan_width, |
| 1482 | new_ctx->def.width); |
| 1483 | SWITCH_ENTRY_ASSIGN(new_chandef.center_freq1, |
| 1484 | new_ctx->def.center_freq1); |
| 1485 | SWITCH_ENTRY_ASSIGN(new_chandef.center_freq2, |
| 1486 | new_ctx->def.center_freq2); |
| 1487 | } |
| 1488 | } |
| 1489 | ), |
| 1490 | |
| 1491 | TP_printk( |
| 1492 | LOCAL_PR_FMT " n_vifs:%d mode:%d", |
| 1493 | LOCAL_PR_ARG, __entry->n_vifs, __entry->mode |
| 1494 | ) |
| 1495 | ); |
| 1496 | |
Michal Kazior | c3645ea | 2012-06-26 14:37:17 +0200 | [diff] [blame] | 1497 | DECLARE_EVENT_CLASS(local_sdata_chanctx, |
| 1498 | TP_PROTO(struct ieee80211_local *local, |
| 1499 | struct ieee80211_sub_if_data *sdata, |
| 1500 | struct ieee80211_chanctx *ctx), |
| 1501 | |
| 1502 | TP_ARGS(local, sdata, ctx), |
| 1503 | |
| 1504 | TP_STRUCT__entry( |
| 1505 | LOCAL_ENTRY |
| 1506 | VIF_ENTRY |
| 1507 | CHANCTX_ENTRY |
| 1508 | ), |
| 1509 | |
| 1510 | TP_fast_assign( |
| 1511 | LOCAL_ASSIGN; |
| 1512 | VIF_ASSIGN; |
| 1513 | CHANCTX_ASSIGN; |
| 1514 | ), |
| 1515 | |
| 1516 | TP_printk( |
| 1517 | LOCAL_PR_FMT VIF_PR_FMT CHANCTX_PR_FMT, |
| 1518 | LOCAL_PR_ARG, VIF_PR_ARG, CHANCTX_PR_ARG |
| 1519 | ) |
| 1520 | ); |
| 1521 | |
| 1522 | DEFINE_EVENT(local_sdata_chanctx, drv_assign_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 | |
| 1529 | DEFINE_EVENT(local_sdata_chanctx, drv_unassign_vif_chanctx, |
| 1530 | TP_PROTO(struct ieee80211_local *local, |
| 1531 | struct ieee80211_sub_if_data *sdata, |
| 1532 | struct ieee80211_chanctx *ctx), |
| 1533 | TP_ARGS(local, sdata, ctx) |
| 1534 | ); |
| 1535 | |
Johannes Berg | 1041638 | 2012-10-19 15:44:42 +0200 | [diff] [blame] | 1536 | TRACE_EVENT(drv_start_ap, |
| 1537 | TP_PROTO(struct ieee80211_local *local, |
| 1538 | struct ieee80211_sub_if_data *sdata, |
| 1539 | struct ieee80211_bss_conf *info), |
| 1540 | |
| 1541 | TP_ARGS(local, sdata, info), |
| 1542 | |
| 1543 | TP_STRUCT__entry( |
| 1544 | LOCAL_ENTRY |
| 1545 | VIF_ENTRY |
| 1546 | __field(u8, dtimper) |
| 1547 | __field(u16, bcnint) |
| 1548 | __dynamic_array(u8, ssid, info->ssid_len); |
| 1549 | __field(bool, hidden_ssid); |
| 1550 | ), |
| 1551 | |
| 1552 | TP_fast_assign( |
| 1553 | LOCAL_ASSIGN; |
| 1554 | VIF_ASSIGN; |
| 1555 | __entry->dtimper = info->dtim_period; |
| 1556 | __entry->bcnint = info->beacon_int; |
| 1557 | memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len); |
| 1558 | __entry->hidden_ssid = info->hidden_ssid; |
| 1559 | ), |
| 1560 | |
| 1561 | TP_printk( |
| 1562 | LOCAL_PR_FMT VIF_PR_FMT, |
| 1563 | LOCAL_PR_ARG, VIF_PR_ARG |
| 1564 | ) |
| 1565 | ); |
| 1566 | |
| 1567 | DEFINE_EVENT(local_sdata_evt, drv_stop_ap, |
| 1568 | TP_PROTO(struct ieee80211_local *local, |
| 1569 | struct ieee80211_sub_if_data *sdata), |
| 1570 | TP_ARGS(local, sdata) |
| 1571 | ); |
| 1572 | |
Eliad Peller | cf2c92d | 2014-11-04 11:43:54 +0200 | [diff] [blame] | 1573 | TRACE_EVENT(drv_reconfig_complete, |
| 1574 | TP_PROTO(struct ieee80211_local *local, |
| 1575 | enum ieee80211_reconfig_type reconfig_type), |
| 1576 | TP_ARGS(local, reconfig_type), |
| 1577 | |
| 1578 | TP_STRUCT__entry( |
| 1579 | LOCAL_ENTRY |
| 1580 | __field(u8, reconfig_type) |
| 1581 | ), |
| 1582 | |
| 1583 | TP_fast_assign( |
| 1584 | LOCAL_ASSIGN; |
| 1585 | __entry->reconfig_type = reconfig_type; |
| 1586 | ), |
| 1587 | |
| 1588 | TP_printk( |
| 1589 | LOCAL_PR_FMT " reconfig_type:%d", |
| 1590 | LOCAL_PR_ARG, __entry->reconfig_type |
| 1591 | ) |
| 1592 | |
Johannes Berg | 9214ad7 | 2012-11-06 19:18:13 +0100 | [diff] [blame] | 1593 | ); |
| 1594 | |
Johannes Berg | a65240c | 2013-01-14 15:14:34 +0100 | [diff] [blame] | 1595 | #if IS_ENABLED(CONFIG_IPV6) |
| 1596 | DEFINE_EVENT(local_sdata_evt, drv_ipv6_addr_change, |
| 1597 | TP_PROTO(struct ieee80211_local *local, |
| 1598 | struct ieee80211_sub_if_data *sdata), |
| 1599 | TP_ARGS(local, sdata) |
| 1600 | ); |
| 1601 | #endif |
| 1602 | |
Johannes Berg | 55fff50 | 2013-08-19 18:48:41 +0200 | [diff] [blame] | 1603 | TRACE_EVENT(drv_join_ibss, |
| 1604 | TP_PROTO(struct ieee80211_local *local, |
| 1605 | struct ieee80211_sub_if_data *sdata, |
| 1606 | struct ieee80211_bss_conf *info), |
| 1607 | |
| 1608 | TP_ARGS(local, sdata, info), |
| 1609 | |
| 1610 | TP_STRUCT__entry( |
| 1611 | LOCAL_ENTRY |
| 1612 | VIF_ENTRY |
| 1613 | __field(u8, dtimper) |
| 1614 | __field(u16, bcnint) |
| 1615 | __dynamic_array(u8, ssid, info->ssid_len); |
| 1616 | ), |
| 1617 | |
| 1618 | TP_fast_assign( |
| 1619 | LOCAL_ASSIGN; |
| 1620 | VIF_ASSIGN; |
| 1621 | __entry->dtimper = info->dtim_period; |
| 1622 | __entry->bcnint = info->beacon_int; |
| 1623 | memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len); |
| 1624 | ), |
| 1625 | |
| 1626 | TP_printk( |
| 1627 | LOCAL_PR_FMT VIF_PR_FMT, |
| 1628 | LOCAL_PR_ARG, VIF_PR_ARG |
| 1629 | ) |
| 1630 | ); |
| 1631 | |
| 1632 | DEFINE_EVENT(local_sdata_evt, drv_leave_ibss, |
| 1633 | TP_PROTO(struct ieee80211_local *local, |
| 1634 | struct ieee80211_sub_if_data *sdata), |
| 1635 | TP_ARGS(local, sdata) |
| 1636 | ); |
| 1637 | |
Antonio Quartulli | cca674d | 2014-05-19 21:53:20 +0200 | [diff] [blame] | 1638 | TRACE_EVENT(drv_get_expected_throughput, |
| 1639 | TP_PROTO(struct ieee80211_sta *sta), |
| 1640 | |
| 1641 | TP_ARGS(sta), |
| 1642 | |
| 1643 | TP_STRUCT__entry( |
| 1644 | STA_ENTRY |
| 1645 | ), |
| 1646 | |
| 1647 | TP_fast_assign( |
| 1648 | STA_ASSIGN; |
| 1649 | ), |
| 1650 | |
| 1651 | TP_printk( |
| 1652 | STA_PR_FMT, STA_PR_ARG |
| 1653 | ) |
| 1654 | ); |
| 1655 | |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1656 | /* |
| 1657 | * Tracing for API calls that drivers call. |
| 1658 | */ |
| 1659 | |
| 1660 | TRACE_EVENT(api_start_tx_ba_session, |
| 1661 | TP_PROTO(struct ieee80211_sta *sta, u16 tid), |
| 1662 | |
| 1663 | TP_ARGS(sta, tid), |
| 1664 | |
| 1665 | TP_STRUCT__entry( |
| 1666 | STA_ENTRY |
| 1667 | __field(u16, tid) |
| 1668 | ), |
| 1669 | |
| 1670 | TP_fast_assign( |
| 1671 | STA_ASSIGN; |
| 1672 | __entry->tid = tid; |
| 1673 | ), |
| 1674 | |
| 1675 | TP_printk( |
| 1676 | STA_PR_FMT " tid:%d", |
| 1677 | STA_PR_ARG, __entry->tid |
| 1678 | ) |
| 1679 | ); |
| 1680 | |
| 1681 | TRACE_EVENT(api_start_tx_ba_cb, |
| 1682 | TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid), |
| 1683 | |
| 1684 | TP_ARGS(sdata, ra, tid), |
| 1685 | |
| 1686 | TP_STRUCT__entry( |
| 1687 | VIF_ENTRY |
| 1688 | __array(u8, ra, ETH_ALEN) |
| 1689 | __field(u16, tid) |
| 1690 | ), |
| 1691 | |
| 1692 | TP_fast_assign( |
| 1693 | VIF_ASSIGN; |
| 1694 | memcpy(__entry->ra, ra, ETH_ALEN); |
| 1695 | __entry->tid = tid; |
| 1696 | ), |
| 1697 | |
| 1698 | TP_printk( |
| 1699 | VIF_PR_FMT " ra:%pM tid:%d", |
| 1700 | VIF_PR_ARG, __entry->ra, __entry->tid |
| 1701 | ) |
| 1702 | ); |
| 1703 | |
| 1704 | TRACE_EVENT(api_stop_tx_ba_session, |
Johannes Berg | 6a8579d | 2010-05-27 14:41:07 +0200 | [diff] [blame] | 1705 | TP_PROTO(struct ieee80211_sta *sta, u16 tid), |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1706 | |
Johannes Berg | 6a8579d | 2010-05-27 14:41:07 +0200 | [diff] [blame] | 1707 | TP_ARGS(sta, tid), |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1708 | |
| 1709 | TP_STRUCT__entry( |
| 1710 | STA_ENTRY |
| 1711 | __field(u16, tid) |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1712 | ), |
| 1713 | |
| 1714 | TP_fast_assign( |
| 1715 | STA_ASSIGN; |
| 1716 | __entry->tid = tid; |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1717 | ), |
| 1718 | |
| 1719 | TP_printk( |
Johannes Berg | 6a8579d | 2010-05-27 14:41:07 +0200 | [diff] [blame] | 1720 | STA_PR_FMT " tid:%d", |
| 1721 | STA_PR_ARG, __entry->tid |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1722 | ) |
| 1723 | ); |
| 1724 | |
| 1725 | TRACE_EVENT(api_stop_tx_ba_cb, |
| 1726 | TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid), |
| 1727 | |
| 1728 | TP_ARGS(sdata, ra, tid), |
| 1729 | |
| 1730 | TP_STRUCT__entry( |
| 1731 | VIF_ENTRY |
| 1732 | __array(u8, ra, ETH_ALEN) |
| 1733 | __field(u16, tid) |
| 1734 | ), |
| 1735 | |
| 1736 | TP_fast_assign( |
| 1737 | VIF_ASSIGN; |
| 1738 | memcpy(__entry->ra, ra, ETH_ALEN); |
| 1739 | __entry->tid = tid; |
| 1740 | ), |
| 1741 | |
| 1742 | TP_printk( |
| 1743 | VIF_PR_FMT " ra:%pM tid:%d", |
| 1744 | VIF_PR_ARG, __entry->ra, __entry->tid |
| 1745 | ) |
| 1746 | ); |
| 1747 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1748 | DEFINE_EVENT(local_only_evt, api_restart_hw, |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1749 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1750 | TP_ARGS(local) |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1751 | ); |
| 1752 | |
| 1753 | TRACE_EVENT(api_beacon_loss, |
| 1754 | TP_PROTO(struct ieee80211_sub_if_data *sdata), |
| 1755 | |
| 1756 | TP_ARGS(sdata), |
| 1757 | |
| 1758 | TP_STRUCT__entry( |
| 1759 | VIF_ENTRY |
| 1760 | ), |
| 1761 | |
| 1762 | TP_fast_assign( |
| 1763 | VIF_ASSIGN; |
| 1764 | ), |
| 1765 | |
| 1766 | TP_printk( |
| 1767 | VIF_PR_FMT, |
| 1768 | VIF_PR_ARG |
| 1769 | ) |
| 1770 | ); |
| 1771 | |
| 1772 | TRACE_EVENT(api_connection_loss, |
| 1773 | TP_PROTO(struct ieee80211_sub_if_data *sdata), |
| 1774 | |
| 1775 | TP_ARGS(sdata), |
| 1776 | |
| 1777 | TP_STRUCT__entry( |
| 1778 | VIF_ENTRY |
| 1779 | ), |
| 1780 | |
| 1781 | TP_fast_assign( |
| 1782 | VIF_ASSIGN; |
| 1783 | ), |
| 1784 | |
| 1785 | TP_printk( |
| 1786 | VIF_PR_FMT, |
| 1787 | VIF_PR_ARG |
| 1788 | ) |
| 1789 | ); |
| 1790 | |
| 1791 | TRACE_EVENT(api_cqm_rssi_notify, |
| 1792 | TP_PROTO(struct ieee80211_sub_if_data *sdata, |
| 1793 | enum nl80211_cqm_rssi_threshold_event rssi_event), |
| 1794 | |
| 1795 | TP_ARGS(sdata, rssi_event), |
| 1796 | |
| 1797 | TP_STRUCT__entry( |
| 1798 | VIF_ENTRY |
| 1799 | __field(u32, rssi_event) |
| 1800 | ), |
| 1801 | |
| 1802 | TP_fast_assign( |
| 1803 | VIF_ASSIGN; |
| 1804 | __entry->rssi_event = rssi_event; |
| 1805 | ), |
| 1806 | |
| 1807 | TP_printk( |
| 1808 | VIF_PR_FMT " event:%d", |
| 1809 | VIF_PR_ARG, __entry->rssi_event |
| 1810 | ) |
| 1811 | ); |
| 1812 | |
Johannes Berg | 98f0334 | 2014-11-26 12:42:02 +0100 | [diff] [blame] | 1813 | DEFINE_EVENT(local_sdata_evt, api_cqm_beacon_loss_notify, |
| 1814 | TP_PROTO(struct ieee80211_local *local, |
| 1815 | struct ieee80211_sub_if_data *sdata), |
| 1816 | TP_ARGS(local, sdata) |
| 1817 | ); |
| 1818 | |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1819 | TRACE_EVENT(api_scan_completed, |
| 1820 | TP_PROTO(struct ieee80211_local *local, bool aborted), |
| 1821 | |
| 1822 | TP_ARGS(local, aborted), |
| 1823 | |
| 1824 | TP_STRUCT__entry( |
| 1825 | LOCAL_ENTRY |
| 1826 | __field(bool, aborted) |
| 1827 | ), |
| 1828 | |
| 1829 | TP_fast_assign( |
| 1830 | LOCAL_ASSIGN; |
| 1831 | __entry->aborted = aborted; |
| 1832 | ), |
| 1833 | |
| 1834 | TP_printk( |
| 1835 | LOCAL_PR_FMT " aborted:%d", |
| 1836 | LOCAL_PR_ARG, __entry->aborted |
| 1837 | ) |
| 1838 | ); |
| 1839 | |
Luciano Coelho | 79f460c | 2011-05-11 17:09:36 +0300 | [diff] [blame] | 1840 | TRACE_EVENT(api_sched_scan_results, |
| 1841 | TP_PROTO(struct ieee80211_local *local), |
| 1842 | |
| 1843 | TP_ARGS(local), |
| 1844 | |
| 1845 | TP_STRUCT__entry( |
| 1846 | LOCAL_ENTRY |
| 1847 | ), |
| 1848 | |
| 1849 | TP_fast_assign( |
| 1850 | LOCAL_ASSIGN; |
| 1851 | ), |
| 1852 | |
| 1853 | TP_printk( |
| 1854 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 1855 | ) |
| 1856 | ); |
| 1857 | |
| 1858 | TRACE_EVENT(api_sched_scan_stopped, |
| 1859 | TP_PROTO(struct ieee80211_local *local), |
| 1860 | |
| 1861 | TP_ARGS(local), |
| 1862 | |
| 1863 | TP_STRUCT__entry( |
| 1864 | LOCAL_ENTRY |
| 1865 | ), |
| 1866 | |
| 1867 | TP_fast_assign( |
| 1868 | LOCAL_ASSIGN; |
| 1869 | ), |
| 1870 | |
| 1871 | TP_printk( |
| 1872 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 1873 | ) |
| 1874 | ); |
| 1875 | |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1876 | TRACE_EVENT(api_sta_block_awake, |
| 1877 | TP_PROTO(struct ieee80211_local *local, |
| 1878 | struct ieee80211_sta *sta, bool block), |
| 1879 | |
| 1880 | TP_ARGS(local, sta, block), |
| 1881 | |
| 1882 | TP_STRUCT__entry( |
| 1883 | LOCAL_ENTRY |
| 1884 | STA_ENTRY |
| 1885 | __field(bool, block) |
| 1886 | ), |
| 1887 | |
| 1888 | TP_fast_assign( |
| 1889 | LOCAL_ASSIGN; |
| 1890 | STA_ASSIGN; |
| 1891 | __entry->block = block; |
| 1892 | ), |
| 1893 | |
| 1894 | TP_printk( |
| 1895 | LOCAL_PR_FMT STA_PR_FMT " block:%d", |
Seth Forshee | 15ac7c4 | 2013-02-15 13:15:48 -0600 | [diff] [blame] | 1896 | LOCAL_PR_ARG, STA_PR_ARG, __entry->block |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1897 | ) |
| 1898 | ); |
| 1899 | |
Johannes Berg | 5ce6e43 | 2010-05-11 16:20:57 +0200 | [diff] [blame] | 1900 | TRACE_EVENT(api_chswitch_done, |
| 1901 | TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success), |
| 1902 | |
| 1903 | TP_ARGS(sdata, success), |
| 1904 | |
| 1905 | TP_STRUCT__entry( |
| 1906 | VIF_ENTRY |
| 1907 | __field(bool, success) |
| 1908 | ), |
| 1909 | |
| 1910 | TP_fast_assign( |
| 1911 | VIF_ASSIGN; |
| 1912 | __entry->success = success; |
| 1913 | ), |
| 1914 | |
| 1915 | TP_printk( |
| 1916 | VIF_PR_FMT " success=%d", |
| 1917 | VIF_PR_ARG, __entry->success |
| 1918 | ) |
| 1919 | ); |
| 1920 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1921 | DEFINE_EVENT(local_only_evt, api_ready_on_channel, |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1922 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1923 | TP_ARGS(local) |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1924 | ); |
| 1925 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1926 | DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired, |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1927 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1928 | TP_ARGS(local) |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1929 | ); |
| 1930 | |
Johannes Berg | c68f4b8 | 2011-07-05 16:35:41 +0200 | [diff] [blame] | 1931 | TRACE_EVENT(api_gtk_rekey_notify, |
| 1932 | TP_PROTO(struct ieee80211_sub_if_data *sdata, |
| 1933 | const u8 *bssid, const u8 *replay_ctr), |
| 1934 | |
| 1935 | TP_ARGS(sdata, bssid, replay_ctr), |
| 1936 | |
| 1937 | TP_STRUCT__entry( |
| 1938 | VIF_ENTRY |
| 1939 | __array(u8, bssid, ETH_ALEN) |
| 1940 | __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN) |
| 1941 | ), |
| 1942 | |
| 1943 | TP_fast_assign( |
| 1944 | VIF_ASSIGN; |
| 1945 | memcpy(__entry->bssid, bssid, ETH_ALEN); |
| 1946 | memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN); |
| 1947 | ), |
| 1948 | |
| 1949 | TP_printk(VIF_PR_FMT, VIF_PR_ARG) |
| 1950 | ); |
| 1951 | |
Meenakshi Venkataraman | 615f7b9 | 2011-07-08 08:46:22 -0700 | [diff] [blame] | 1952 | TRACE_EVENT(api_enable_rssi_reports, |
| 1953 | TP_PROTO(struct ieee80211_sub_if_data *sdata, |
| 1954 | int rssi_min_thold, int rssi_max_thold), |
| 1955 | |
| 1956 | TP_ARGS(sdata, rssi_min_thold, rssi_max_thold), |
| 1957 | |
| 1958 | TP_STRUCT__entry( |
| 1959 | VIF_ENTRY |
| 1960 | __field(int, rssi_min_thold) |
| 1961 | __field(int, rssi_max_thold) |
| 1962 | ), |
| 1963 | |
| 1964 | TP_fast_assign( |
| 1965 | VIF_ASSIGN; |
| 1966 | __entry->rssi_min_thold = rssi_min_thold; |
| 1967 | __entry->rssi_max_thold = rssi_max_thold; |
| 1968 | ), |
| 1969 | |
| 1970 | TP_printk( |
| 1971 | VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d", |
| 1972 | VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold |
| 1973 | ) |
| 1974 | ); |
| 1975 | |
Johannes Berg | 37fbd90 | 2011-09-29 16:04:39 +0200 | [diff] [blame] | 1976 | TRACE_EVENT(api_eosp, |
| 1977 | TP_PROTO(struct ieee80211_local *local, |
| 1978 | struct ieee80211_sta *sta), |
| 1979 | |
| 1980 | TP_ARGS(local, sta), |
| 1981 | |
| 1982 | TP_STRUCT__entry( |
| 1983 | LOCAL_ENTRY |
| 1984 | STA_ENTRY |
| 1985 | ), |
| 1986 | |
| 1987 | TP_fast_assign( |
| 1988 | LOCAL_ASSIGN; |
| 1989 | STA_ASSIGN; |
| 1990 | ), |
| 1991 | |
| 1992 | TP_printk( |
| 1993 | LOCAL_PR_FMT STA_PR_FMT, |
Seth Forshee | 15ac7c4 | 2013-02-15 13:15:48 -0600 | [diff] [blame] | 1994 | LOCAL_PR_ARG, STA_PR_ARG |
Johannes Berg | 37fbd90 | 2011-09-29 16:04:39 +0200 | [diff] [blame] | 1995 | ) |
| 1996 | ); |
| 1997 | |
Johannes Berg | 1b00078 | 2013-12-19 10:47:48 +0100 | [diff] [blame] | 1998 | TRACE_EVENT(api_sta_set_buffered, |
| 1999 | TP_PROTO(struct ieee80211_local *local, |
| 2000 | struct ieee80211_sta *sta, |
| 2001 | u8 tid, bool buffered), |
| 2002 | |
| 2003 | TP_ARGS(local, sta, tid, buffered), |
| 2004 | |
| 2005 | TP_STRUCT__entry( |
| 2006 | LOCAL_ENTRY |
| 2007 | STA_ENTRY |
| 2008 | __field(u8, tid) |
| 2009 | __field(bool, buffered) |
| 2010 | ), |
| 2011 | |
| 2012 | TP_fast_assign( |
| 2013 | LOCAL_ASSIGN; |
| 2014 | STA_ASSIGN; |
| 2015 | __entry->tid = tid; |
| 2016 | __entry->buffered = buffered; |
| 2017 | ), |
| 2018 | |
| 2019 | TP_printk( |
| 2020 | LOCAL_PR_FMT STA_PR_FMT " tid:%d buffered:%d", |
| 2021 | LOCAL_PR_ARG, STA_PR_ARG, __entry->tid, __entry->buffered |
| 2022 | ) |
| 2023 | ); |
| 2024 | |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 2025 | /* |
| 2026 | * Tracing for internal functions |
| 2027 | * (which may also be called in response to driver calls) |
| 2028 | */ |
| 2029 | |
| 2030 | TRACE_EVENT(wake_queue, |
| 2031 | TP_PROTO(struct ieee80211_local *local, u16 queue, |
| 2032 | enum queue_stop_reason reason), |
| 2033 | |
| 2034 | TP_ARGS(local, queue, reason), |
| 2035 | |
| 2036 | TP_STRUCT__entry( |
| 2037 | LOCAL_ENTRY |
| 2038 | __field(u16, queue) |
| 2039 | __field(u32, reason) |
| 2040 | ), |
| 2041 | |
| 2042 | TP_fast_assign( |
| 2043 | LOCAL_ASSIGN; |
| 2044 | __entry->queue = queue; |
| 2045 | __entry->reason = reason; |
| 2046 | ), |
| 2047 | |
| 2048 | TP_printk( |
| 2049 | LOCAL_PR_FMT " queue:%d, reason:%d", |
| 2050 | LOCAL_PR_ARG, __entry->queue, __entry->reason |
| 2051 | ) |
| 2052 | ); |
| 2053 | |
| 2054 | TRACE_EVENT(stop_queue, |
| 2055 | TP_PROTO(struct ieee80211_local *local, u16 queue, |
| 2056 | enum queue_stop_reason reason), |
| 2057 | |
| 2058 | TP_ARGS(local, queue, reason), |
| 2059 | |
| 2060 | TP_STRUCT__entry( |
| 2061 | LOCAL_ENTRY |
| 2062 | __field(u16, queue) |
| 2063 | __field(u32, reason) |
| 2064 | ), |
| 2065 | |
| 2066 | TP_fast_assign( |
| 2067 | LOCAL_ASSIGN; |
| 2068 | __entry->queue = queue; |
| 2069 | __entry->reason = reason; |
| 2070 | ), |
| 2071 | |
| 2072 | TP_printk( |
| 2073 | LOCAL_PR_FMT " queue:%d, reason:%d", |
| 2074 | LOCAL_PR_ARG, __entry->queue, __entry->reason |
| 2075 | ) |
| 2076 | ); |
Johannes Berg | 3fae027 | 2012-06-22 13:36:25 +0200 | [diff] [blame] | 2077 | |
Yoni Divinsky | de5fad8 | 2012-05-30 11:36:39 +0300 | [diff] [blame] | 2078 | TRACE_EVENT(drv_set_default_unicast_key, |
| 2079 | TP_PROTO(struct ieee80211_local *local, |
| 2080 | struct ieee80211_sub_if_data *sdata, |
| 2081 | int key_idx), |
| 2082 | |
| 2083 | TP_ARGS(local, sdata, key_idx), |
| 2084 | |
| 2085 | TP_STRUCT__entry( |
| 2086 | LOCAL_ENTRY |
| 2087 | VIF_ENTRY |
| 2088 | __field(int, key_idx) |
| 2089 | ), |
| 2090 | |
| 2091 | TP_fast_assign( |
| 2092 | LOCAL_ASSIGN; |
| 2093 | VIF_ASSIGN; |
| 2094 | __entry->key_idx = key_idx; |
| 2095 | ), |
| 2096 | |
| 2097 | TP_printk(LOCAL_PR_FMT VIF_PR_FMT " key_idx:%d", |
| 2098 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->key_idx) |
| 2099 | ); |
| 2100 | |
Simon Wunderlich | 164eb02 | 2013-02-08 18:16:20 +0100 | [diff] [blame] | 2101 | TRACE_EVENT(api_radar_detected, |
| 2102 | TP_PROTO(struct ieee80211_local *local), |
| 2103 | |
| 2104 | TP_ARGS(local), |
| 2105 | |
| 2106 | TP_STRUCT__entry( |
| 2107 | LOCAL_ENTRY |
| 2108 | ), |
| 2109 | |
| 2110 | TP_fast_assign( |
| 2111 | LOCAL_ASSIGN; |
| 2112 | ), |
| 2113 | |
| 2114 | TP_printk( |
| 2115 | LOCAL_PR_FMT " radar detected", |
| 2116 | LOCAL_PR_ARG |
| 2117 | ) |
| 2118 | ); |
| 2119 | |
Simon Wunderlich | 73da7d5 | 2013-07-11 16:09:06 +0200 | [diff] [blame] | 2120 | TRACE_EVENT(drv_channel_switch_beacon, |
| 2121 | TP_PROTO(struct ieee80211_local *local, |
| 2122 | struct ieee80211_sub_if_data *sdata, |
| 2123 | struct cfg80211_chan_def *chandef), |
| 2124 | |
| 2125 | TP_ARGS(local, sdata, chandef), |
| 2126 | |
| 2127 | TP_STRUCT__entry( |
| 2128 | LOCAL_ENTRY |
| 2129 | VIF_ENTRY |
| 2130 | CHANDEF_ENTRY |
| 2131 | ), |
| 2132 | |
| 2133 | TP_fast_assign( |
| 2134 | LOCAL_ASSIGN; |
| 2135 | VIF_ASSIGN; |
| 2136 | CHANDEF_ASSIGN(chandef); |
| 2137 | ), |
| 2138 | |
| 2139 | TP_printk( |
| 2140 | LOCAL_PR_FMT VIF_PR_FMT " channel switch to " CHANDEF_PR_FMT, |
| 2141 | LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG |
| 2142 | ) |
| 2143 | ); |
| 2144 | |
Luciano Coelho | 6d027bc | 2014-10-08 09:48:37 +0300 | [diff] [blame] | 2145 | TRACE_EVENT(drv_pre_channel_switch, |
| 2146 | TP_PROTO(struct ieee80211_local *local, |
| 2147 | struct ieee80211_sub_if_data *sdata, |
| 2148 | struct ieee80211_channel_switch *ch_switch), |
| 2149 | |
| 2150 | TP_ARGS(local, sdata, ch_switch), |
| 2151 | |
| 2152 | TP_STRUCT__entry( |
| 2153 | LOCAL_ENTRY |
| 2154 | VIF_ENTRY |
| 2155 | CHANDEF_ENTRY |
| 2156 | __field(u64, timestamp) |
Luciano Coelho | 127f10e | 2014-11-07 15:28:34 +0200 | [diff] [blame] | 2157 | __field(u32, device_timestamp) |
Luciano Coelho | 6d027bc | 2014-10-08 09:48:37 +0300 | [diff] [blame] | 2158 | __field(bool, block_tx) |
| 2159 | __field(u8, count) |
| 2160 | ), |
| 2161 | |
| 2162 | TP_fast_assign( |
| 2163 | LOCAL_ASSIGN; |
| 2164 | VIF_ASSIGN; |
| 2165 | CHANDEF_ASSIGN(&ch_switch->chandef) |
| 2166 | __entry->timestamp = ch_switch->timestamp; |
Luciano Coelho | 127f10e | 2014-11-07 15:28:34 +0200 | [diff] [blame] | 2167 | __entry->device_timestamp = ch_switch->device_timestamp; |
Luciano Coelho | 6d027bc | 2014-10-08 09:48:37 +0300 | [diff] [blame] | 2168 | __entry->block_tx = ch_switch->block_tx; |
| 2169 | __entry->count = ch_switch->count; |
| 2170 | ), |
| 2171 | |
| 2172 | TP_printk( |
| 2173 | LOCAL_PR_FMT VIF_PR_FMT " prepare channel switch to " |
| 2174 | CHANDEF_PR_FMT " count:%d block_tx:%d timestamp:%llu", |
| 2175 | LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->count, |
| 2176 | __entry->block_tx, __entry->timestamp |
| 2177 | ) |
| 2178 | ); |
| 2179 | |
Luciano Coelho | f1d6558 | 2014-10-08 09:48:38 +0300 | [diff] [blame] | 2180 | DEFINE_EVENT(local_sdata_evt, drv_post_channel_switch, |
| 2181 | TP_PROTO(struct ieee80211_local *local, |
| 2182 | struct ieee80211_sub_if_data *sdata), |
| 2183 | TP_ARGS(local, sdata) |
| 2184 | ); |
| 2185 | |
Felix Fietkau | 5b3dc42 | 2014-10-26 00:32:53 +0200 | [diff] [blame] | 2186 | TRACE_EVENT(drv_get_txpower, |
| 2187 | TP_PROTO(struct ieee80211_local *local, |
| 2188 | struct ieee80211_sub_if_data *sdata, |
| 2189 | int dbm, int ret), |
| 2190 | |
| 2191 | TP_ARGS(local, sdata, dbm, ret), |
| 2192 | |
| 2193 | TP_STRUCT__entry( |
| 2194 | LOCAL_ENTRY |
| 2195 | VIF_ENTRY |
| 2196 | __field(int, dbm) |
| 2197 | __field(int, ret) |
| 2198 | ), |
| 2199 | |
| 2200 | TP_fast_assign( |
| 2201 | LOCAL_ASSIGN; |
| 2202 | VIF_ASSIGN; |
| 2203 | __entry->dbm = dbm; |
| 2204 | __entry->ret = ret; |
| 2205 | ), |
| 2206 | |
| 2207 | TP_printk( |
| 2208 | LOCAL_PR_FMT VIF_PR_FMT " dbm:%d ret:%d", |
| 2209 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->dbm, __entry->ret |
| 2210 | ) |
| 2211 | ); |
| 2212 | |
Arik Nemtsov | a7a6bdd | 2014-11-09 18:50:19 +0200 | [diff] [blame] | 2213 | TRACE_EVENT(drv_tdls_channel_switch, |
| 2214 | TP_PROTO(struct ieee80211_local *local, |
| 2215 | struct ieee80211_sub_if_data *sdata, |
| 2216 | struct ieee80211_sta *sta, u8 oper_class, |
| 2217 | struct cfg80211_chan_def *chandef), |
| 2218 | |
| 2219 | TP_ARGS(local, sdata, sta, oper_class, chandef), |
| 2220 | |
| 2221 | TP_STRUCT__entry( |
| 2222 | LOCAL_ENTRY |
| 2223 | VIF_ENTRY |
| 2224 | STA_ENTRY |
| 2225 | __field(u8, oper_class) |
| 2226 | CHANDEF_ENTRY |
| 2227 | ), |
| 2228 | |
| 2229 | TP_fast_assign( |
| 2230 | LOCAL_ASSIGN; |
| 2231 | VIF_ASSIGN; |
| 2232 | STA_ASSIGN; |
| 2233 | __entry->oper_class = oper_class; |
| 2234 | CHANDEF_ASSIGN(chandef) |
| 2235 | ), |
| 2236 | |
| 2237 | TP_printk( |
| 2238 | LOCAL_PR_FMT VIF_PR_FMT " tdls channel switch to" |
| 2239 | CHANDEF_PR_FMT " oper_class:%d " STA_PR_FMT, |
| 2240 | LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG, __entry->oper_class, |
| 2241 | STA_PR_ARG |
| 2242 | ) |
| 2243 | ); |
| 2244 | |
| 2245 | TRACE_EVENT(drv_tdls_cancel_channel_switch, |
| 2246 | TP_PROTO(struct ieee80211_local *local, |
| 2247 | struct ieee80211_sub_if_data *sdata, |
| 2248 | struct ieee80211_sta *sta), |
| 2249 | |
| 2250 | TP_ARGS(local, sdata, sta), |
| 2251 | |
| 2252 | TP_STRUCT__entry( |
| 2253 | LOCAL_ENTRY |
| 2254 | VIF_ENTRY |
| 2255 | STA_ENTRY |
| 2256 | ), |
| 2257 | |
| 2258 | TP_fast_assign( |
| 2259 | LOCAL_ASSIGN; |
| 2260 | VIF_ASSIGN; |
| 2261 | STA_ASSIGN; |
| 2262 | ), |
| 2263 | |
| 2264 | TP_printk( |
| 2265 | LOCAL_PR_FMT VIF_PR_FMT |
| 2266 | " tdls cancel channel switch with " STA_PR_FMT, |
| 2267 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG |
| 2268 | ) |
| 2269 | ); |
Simon Wunderlich | 73da7d5 | 2013-07-11 16:09:06 +0200 | [diff] [blame] | 2270 | |
Arik Nemtsov | 8a4d32f | 2014-11-09 18:50:20 +0200 | [diff] [blame] | 2271 | TRACE_EVENT(drv_tdls_recv_channel_switch, |
| 2272 | TP_PROTO(struct ieee80211_local *local, |
| 2273 | struct ieee80211_sub_if_data *sdata, |
| 2274 | struct ieee80211_tdls_ch_sw_params *params), |
| 2275 | |
| 2276 | TP_ARGS(local, sdata, params), |
| 2277 | |
| 2278 | TP_STRUCT__entry( |
| 2279 | LOCAL_ENTRY |
| 2280 | VIF_ENTRY |
| 2281 | __field(u8, action_code) |
| 2282 | STA_ENTRY |
| 2283 | CHANDEF_ENTRY |
| 2284 | __field(u32, status) |
| 2285 | __field(bool, peer_initiator) |
| 2286 | __field(u32, timestamp) |
| 2287 | __field(u16, switch_time) |
| 2288 | __field(u16, switch_timeout) |
| 2289 | ), |
| 2290 | |
| 2291 | TP_fast_assign( |
| 2292 | LOCAL_ASSIGN; |
| 2293 | VIF_ASSIGN; |
| 2294 | STA_NAMED_ASSIGN(params->sta); |
| 2295 | CHANDEF_ASSIGN(params->chandef) |
| 2296 | __entry->peer_initiator = params->sta->tdls_initiator; |
| 2297 | __entry->action_code = params->action_code; |
| 2298 | __entry->status = params->status; |
| 2299 | __entry->timestamp = params->timestamp; |
| 2300 | __entry->switch_time = params->switch_time; |
| 2301 | __entry->switch_timeout = params->switch_timeout; |
| 2302 | ), |
| 2303 | |
| 2304 | TP_printk( |
| 2305 | LOCAL_PR_FMT VIF_PR_FMT " received tdls channel switch packet" |
| 2306 | " action:%d status:%d time:%d switch time:%d switch" |
| 2307 | " timeout:%d initiator: %d chan:" CHANDEF_PR_FMT STA_PR_FMT, |
| 2308 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->action_code, __entry->status, |
| 2309 | __entry->timestamp, __entry->switch_time, |
| 2310 | __entry->switch_timeout, __entry->peer_initiator, |
| 2311 | CHANDEF_PR_ARG, STA_PR_ARG |
| 2312 | ) |
| 2313 | ); |
| 2314 | |
Felix Fietkau | ba8c3d6 | 2015-03-27 21:30:37 +0100 | [diff] [blame] | 2315 | TRACE_EVENT(drv_wake_tx_queue, |
| 2316 | TP_PROTO(struct ieee80211_local *local, |
| 2317 | struct ieee80211_sub_if_data *sdata, |
| 2318 | struct txq_info *txq), |
| 2319 | |
| 2320 | TP_ARGS(local, sdata, txq), |
| 2321 | |
| 2322 | TP_STRUCT__entry( |
| 2323 | LOCAL_ENTRY |
| 2324 | VIF_ENTRY |
| 2325 | STA_ENTRY |
| 2326 | __field(u8, ac) |
| 2327 | __field(u8, tid) |
| 2328 | ), |
| 2329 | |
| 2330 | TP_fast_assign( |
| 2331 | struct ieee80211_sta *sta = txq->txq.sta; |
| 2332 | |
| 2333 | LOCAL_ASSIGN; |
| 2334 | VIF_ASSIGN; |
| 2335 | STA_ASSIGN; |
| 2336 | __entry->ac = txq->txq.ac; |
| 2337 | __entry->tid = txq->txq.tid; |
| 2338 | ), |
| 2339 | |
| 2340 | TP_printk( |
| 2341 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ac:%d tid:%d", |
| 2342 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ac, __entry->tid |
| 2343 | ) |
| 2344 | ); |
| 2345 | |
Christian Lamparter | f742880 | 2009-07-19 23:21:07 +0200 | [diff] [blame] | 2346 | #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 2347 | |
| 2348 | #undef TRACE_INCLUDE_PATH |
| 2349 | #define TRACE_INCLUDE_PATH . |
| 2350 | #undef TRACE_INCLUDE_FILE |
Johannes Berg | 011ad0e | 2012-06-22 12:55:52 +0200 | [diff] [blame] | 2351 | #define TRACE_INCLUDE_FILE trace |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 2352 | #include <trace/define_trace.h> |