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