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