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