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