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