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