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