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