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