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 | |
Christian Lamparter | f742880 | 2009-07-19 23:21:07 +0200 | [diff] [blame] | 8 | #if !defined(CONFIG_MAC80211_DRIVER_API_TRACER) || defined(__CHECKER__) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 9 | #undef TRACE_EVENT |
| 10 | #define TRACE_EVENT(name, proto, ...) \ |
| 11 | static inline void trace_ ## name(proto) {} |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 12 | #undef DECLARE_EVENT_CLASS |
| 13 | #define DECLARE_EVENT_CLASS(...) |
| 14 | #undef DEFINE_EVENT |
| 15 | #define DEFINE_EVENT(evt_class, name, proto, ...) \ |
| 16 | static inline void trace_ ## name(proto) {} |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 17 | #endif |
| 18 | |
| 19 | #undef TRACE_SYSTEM |
| 20 | #define TRACE_SYSTEM mac80211 |
| 21 | |
| 22 | #define MAXNAME 32 |
| 23 | #define LOCAL_ENTRY __array(char, wiphy_name, 32) |
| 24 | #define LOCAL_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME) |
| 25 | #define LOCAL_PR_FMT "%s" |
| 26 | #define LOCAL_PR_ARG __entry->wiphy_name |
| 27 | |
| 28 | #define STA_ENTRY __array(char, sta_addr, ETH_ALEN) |
| 29 | #define STA_ASSIGN (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN)) |
| 30 | #define STA_PR_FMT " sta:%pM" |
| 31 | #define STA_PR_ARG __entry->sta_addr |
| 32 | |
Johannes Berg | 2ca27bc | 2010-09-16 14:58:23 +0200 | [diff] [blame] | 33 | #define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \ |
| 34 | __field(bool, p2p) \ |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 35 | __string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>") |
Johannes Berg | 2ca27bc | 2010-09-16 14:58:23 +0200 | [diff] [blame] | 36 | #define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \ |
| 37 | __entry->p2p = sdata->vif.p2p; \ |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 38 | __assign_str(vif_name, sdata->dev ? sdata->dev->name : "<nodev>") |
Johannes Berg | 2ca27bc | 2010-09-16 14:58:23 +0200 | [diff] [blame] | 39 | #define VIF_PR_FMT " vif:%s(%d%s)" |
| 40 | #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] | 41 | |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 42 | /* |
| 43 | * Tracing for driver callbacks. |
| 44 | */ |
| 45 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 46 | DECLARE_EVENT_CLASS(local_only_evt, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 47 | TP_PROTO(struct ieee80211_local *local), |
| 48 | TP_ARGS(local), |
| 49 | TP_STRUCT__entry( |
| 50 | LOCAL_ENTRY |
| 51 | ), |
| 52 | TP_fast_assign( |
| 53 | LOCAL_ASSIGN; |
| 54 | ), |
| 55 | TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG) |
| 56 | ); |
| 57 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 58 | DEFINE_EVENT(local_only_evt, drv_return_void, |
| 59 | TP_PROTO(struct ieee80211_local *local), |
| 60 | TP_ARGS(local) |
| 61 | ); |
| 62 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 63 | TRACE_EVENT(drv_return_int, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 64 | TP_PROTO(struct ieee80211_local *local, int ret), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 65 | TP_ARGS(local, ret), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 66 | TP_STRUCT__entry( |
| 67 | LOCAL_ENTRY |
| 68 | __field(int, ret) |
| 69 | ), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 70 | TP_fast_assign( |
| 71 | LOCAL_ASSIGN; |
| 72 | __entry->ret = ret; |
| 73 | ), |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 74 | TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret) |
| 75 | ); |
| 76 | |
Vivek Natarajan | e8306f9 | 2011-04-06 11:41:10 +0530 | [diff] [blame] | 77 | TRACE_EVENT(drv_return_bool, |
| 78 | TP_PROTO(struct ieee80211_local *local, bool ret), |
| 79 | TP_ARGS(local, ret), |
| 80 | TP_STRUCT__entry( |
| 81 | LOCAL_ENTRY |
| 82 | __field(bool, ret) |
| 83 | ), |
| 84 | TP_fast_assign( |
| 85 | LOCAL_ASSIGN; |
| 86 | __entry->ret = ret; |
| 87 | ), |
| 88 | TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ? |
| 89 | "true" : "false") |
| 90 | ); |
| 91 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 92 | TRACE_EVENT(drv_return_u64, |
| 93 | TP_PROTO(struct ieee80211_local *local, u64 ret), |
| 94 | TP_ARGS(local, ret), |
| 95 | TP_STRUCT__entry( |
| 96 | LOCAL_ENTRY |
| 97 | __field(u64, ret) |
| 98 | ), |
| 99 | TP_fast_assign( |
| 100 | LOCAL_ASSIGN; |
| 101 | __entry->ret = ret; |
| 102 | ), |
| 103 | TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret) |
| 104 | ); |
| 105 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 106 | DEFINE_EVENT(local_only_evt, drv_start, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 107 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 108 | TP_ARGS(local) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 109 | ); |
| 110 | |
Johannes Berg | eecc480 | 2011-05-04 15:37:29 +0200 | [diff] [blame] | 111 | DEFINE_EVENT(local_only_evt, drv_suspend, |
| 112 | TP_PROTO(struct ieee80211_local *local), |
| 113 | TP_ARGS(local) |
| 114 | ); |
| 115 | |
| 116 | DEFINE_EVENT(local_only_evt, drv_resume, |
| 117 | TP_PROTO(struct ieee80211_local *local), |
| 118 | TP_ARGS(local) |
| 119 | ); |
| 120 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 121 | DEFINE_EVENT(local_only_evt, drv_stop, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 122 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 123 | TP_ARGS(local) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 124 | ); |
| 125 | |
| 126 | TRACE_EVENT(drv_add_interface, |
| 127 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 128 | struct ieee80211_sub_if_data *sdata), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 129 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 130 | TP_ARGS(local, sdata), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 131 | |
| 132 | TP_STRUCT__entry( |
| 133 | LOCAL_ENTRY |
| 134 | VIF_ENTRY |
| 135 | __array(char, addr, 6) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 136 | ), |
| 137 | |
| 138 | TP_fast_assign( |
| 139 | LOCAL_ASSIGN; |
| 140 | VIF_ASSIGN; |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 141 | memcpy(__entry->addr, sdata->vif.addr, 6); |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 142 | ), |
| 143 | |
| 144 | TP_printk( |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 145 | LOCAL_PR_FMT VIF_PR_FMT " addr:%pM", |
| 146 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 147 | ) |
| 148 | ); |
| 149 | |
Johannes Berg | 34d4bc4 | 2010-08-27 12:35:58 +0200 | [diff] [blame] | 150 | TRACE_EVENT(drv_change_interface, |
| 151 | TP_PROTO(struct ieee80211_local *local, |
| 152 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 2ca27bc | 2010-09-16 14:58:23 +0200 | [diff] [blame] | 153 | enum nl80211_iftype type, bool p2p), |
Johannes Berg | 34d4bc4 | 2010-08-27 12:35:58 +0200 | [diff] [blame] | 154 | |
Johannes Berg | 2ca27bc | 2010-09-16 14:58:23 +0200 | [diff] [blame] | 155 | TP_ARGS(local, sdata, type, p2p), |
Johannes Berg | 34d4bc4 | 2010-08-27 12:35:58 +0200 | [diff] [blame] | 156 | |
| 157 | TP_STRUCT__entry( |
| 158 | LOCAL_ENTRY |
| 159 | VIF_ENTRY |
| 160 | __field(u32, new_type) |
Johannes Berg | 2ca27bc | 2010-09-16 14:58:23 +0200 | [diff] [blame] | 161 | __field(bool, new_p2p) |
Johannes Berg | 34d4bc4 | 2010-08-27 12:35:58 +0200 | [diff] [blame] | 162 | ), |
| 163 | |
| 164 | TP_fast_assign( |
| 165 | LOCAL_ASSIGN; |
| 166 | VIF_ASSIGN; |
| 167 | __entry->new_type = type; |
Johannes Berg | 2ca27bc | 2010-09-16 14:58:23 +0200 | [diff] [blame] | 168 | __entry->new_p2p = p2p; |
Johannes Berg | 34d4bc4 | 2010-08-27 12:35:58 +0200 | [diff] [blame] | 169 | ), |
| 170 | |
| 171 | TP_printk( |
Johannes Berg | 2ca27bc | 2010-09-16 14:58:23 +0200 | [diff] [blame] | 172 | LOCAL_PR_FMT VIF_PR_FMT " new type:%d%s", |
| 173 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type, |
| 174 | __entry->new_p2p ? "/p2p" : "" |
Johannes Berg | 34d4bc4 | 2010-08-27 12:35:58 +0200 | [diff] [blame] | 175 | ) |
| 176 | ); |
| 177 | |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 178 | TRACE_EVENT(drv_remove_interface, |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 179 | TP_PROTO(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 180 | |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 181 | TP_ARGS(local, sdata), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 182 | |
| 183 | TP_STRUCT__entry( |
| 184 | LOCAL_ENTRY |
| 185 | VIF_ENTRY |
| 186 | __array(char, addr, 6) |
| 187 | ), |
| 188 | |
| 189 | TP_fast_assign( |
| 190 | LOCAL_ASSIGN; |
| 191 | VIF_ASSIGN; |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 192 | memcpy(__entry->addr, sdata->vif.addr, 6); |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 193 | ), |
| 194 | |
| 195 | TP_printk( |
| 196 | LOCAL_PR_FMT VIF_PR_FMT " addr:%pM", |
| 197 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr |
| 198 | ) |
| 199 | ); |
| 200 | |
| 201 | TRACE_EVENT(drv_config, |
| 202 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 203 | u32 changed), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 204 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 205 | TP_ARGS(local, changed), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 206 | |
| 207 | TP_STRUCT__entry( |
| 208 | LOCAL_ENTRY |
| 209 | __field(u32, changed) |
Johannes Berg | f911ab8 | 2009-11-25 19:07:20 +0100 | [diff] [blame] | 210 | __field(u32, flags) |
| 211 | __field(int, power_level) |
| 212 | __field(int, dynamic_ps_timeout) |
| 213 | __field(int, max_sleep_period) |
| 214 | __field(u16, listen_interval) |
| 215 | __field(u8, long_frame_max_tx_count) |
| 216 | __field(u8, short_frame_max_tx_count) |
| 217 | __field(int, center_freq) |
| 218 | __field(int, channel_type) |
Johannes Berg | 0f78231 | 2009-12-01 13:37:02 +0100 | [diff] [blame] | 219 | __field(int, smps) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 220 | ), |
| 221 | |
| 222 | TP_fast_assign( |
| 223 | LOCAL_ASSIGN; |
| 224 | __entry->changed = changed; |
Johannes Berg | f911ab8 | 2009-11-25 19:07:20 +0100 | [diff] [blame] | 225 | __entry->flags = local->hw.conf.flags; |
| 226 | __entry->power_level = local->hw.conf.power_level; |
| 227 | __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout; |
| 228 | __entry->max_sleep_period = local->hw.conf.max_sleep_period; |
| 229 | __entry->listen_interval = local->hw.conf.listen_interval; |
| 230 | __entry->long_frame_max_tx_count = local->hw.conf.long_frame_max_tx_count; |
| 231 | __entry->short_frame_max_tx_count = local->hw.conf.short_frame_max_tx_count; |
| 232 | __entry->center_freq = local->hw.conf.channel->center_freq; |
| 233 | __entry->channel_type = local->hw.conf.channel_type; |
Johannes Berg | 0f78231 | 2009-12-01 13:37:02 +0100 | [diff] [blame] | 234 | __entry->smps = local->hw.conf.smps_mode; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 235 | ), |
| 236 | |
| 237 | TP_printk( |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 238 | LOCAL_PR_FMT " ch:%#x freq:%d", |
| 239 | LOCAL_PR_ARG, __entry->changed, __entry->center_freq |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 240 | ) |
| 241 | ); |
| 242 | |
| 243 | TRACE_EVENT(drv_bss_info_changed, |
| 244 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 245 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 246 | struct ieee80211_bss_conf *info, |
| 247 | u32 changed), |
| 248 | |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 249 | TP_ARGS(local, sdata, info, changed), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 250 | |
| 251 | TP_STRUCT__entry( |
| 252 | LOCAL_ENTRY |
| 253 | VIF_ENTRY |
| 254 | __field(bool, assoc) |
| 255 | __field(u16, aid) |
| 256 | __field(bool, cts) |
| 257 | __field(bool, shortpre) |
| 258 | __field(bool, shortslot) |
| 259 | __field(u8, dtimper) |
| 260 | __field(u16, bcnint) |
| 261 | __field(u16, assoc_cap) |
| 262 | __field(u64, timestamp) |
| 263 | __field(u32, basic_rates) |
| 264 | __field(u32, changed) |
Johannes Berg | f911ab8 | 2009-11-25 19:07:20 +0100 | [diff] [blame] | 265 | __field(bool, enable_beacon) |
| 266 | __field(u16, ht_operation_mode) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 267 | ), |
| 268 | |
| 269 | TP_fast_assign( |
| 270 | LOCAL_ASSIGN; |
| 271 | VIF_ASSIGN; |
| 272 | __entry->changed = changed; |
| 273 | __entry->aid = info->aid; |
| 274 | __entry->assoc = info->assoc; |
| 275 | __entry->shortpre = info->use_short_preamble; |
| 276 | __entry->cts = info->use_cts_prot; |
| 277 | __entry->shortslot = info->use_short_slot; |
| 278 | __entry->dtimper = info->dtim_period; |
| 279 | __entry->bcnint = info->beacon_int; |
| 280 | __entry->assoc_cap = info->assoc_capability; |
| 281 | __entry->timestamp = info->timestamp; |
| 282 | __entry->basic_rates = info->basic_rates; |
Johannes Berg | f911ab8 | 2009-11-25 19:07:20 +0100 | [diff] [blame] | 283 | __entry->enable_beacon = info->enable_beacon; |
| 284 | __entry->ht_operation_mode = info->ht_operation_mode; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 285 | ), |
| 286 | |
| 287 | TP_printk( |
| 288 | LOCAL_PR_FMT VIF_PR_FMT " changed:%#x", |
| 289 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed |
| 290 | ) |
| 291 | ); |
| 292 | |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 293 | TRACE_EVENT(drv_prepare_multicast, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 294 | TP_PROTO(struct ieee80211_local *local, int mc_count), |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 295 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 296 | TP_ARGS(local, mc_count), |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 297 | |
| 298 | TP_STRUCT__entry( |
| 299 | LOCAL_ENTRY |
| 300 | __field(int, mc_count) |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 301 | ), |
| 302 | |
| 303 | TP_fast_assign( |
| 304 | LOCAL_ASSIGN; |
| 305 | __entry->mc_count = mc_count; |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 306 | ), |
| 307 | |
| 308 | TP_printk( |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 309 | LOCAL_PR_FMT " prepare mc (%d)", |
| 310 | LOCAL_PR_ARG, __entry->mc_count |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 311 | ) |
| 312 | ); |
| 313 | |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 314 | TRACE_EVENT(drv_configure_filter, |
| 315 | TP_PROTO(struct ieee80211_local *local, |
| 316 | unsigned int changed_flags, |
| 317 | unsigned int *total_flags, |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 318 | u64 multicast), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 319 | |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 320 | TP_ARGS(local, changed_flags, total_flags, multicast), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 321 | |
| 322 | TP_STRUCT__entry( |
| 323 | LOCAL_ENTRY |
| 324 | __field(unsigned int, changed) |
| 325 | __field(unsigned int, total) |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 326 | __field(u64, multicast) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 327 | ), |
| 328 | |
| 329 | TP_fast_assign( |
| 330 | LOCAL_ASSIGN; |
| 331 | __entry->changed = changed_flags; |
| 332 | __entry->total = *total_flags; |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 333 | __entry->multicast = multicast; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 334 | ), |
| 335 | |
| 336 | TP_printk( |
Johannes Berg | 3ac64be | 2009-08-17 16:16:53 +0200 | [diff] [blame] | 337 | LOCAL_PR_FMT " changed:%#x total:%#x", |
| 338 | LOCAL_PR_ARG, __entry->changed, __entry->total |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 339 | ) |
| 340 | ); |
| 341 | |
| 342 | TRACE_EVENT(drv_set_tim, |
| 343 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 344 | struct ieee80211_sta *sta, bool set), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 345 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 346 | TP_ARGS(local, sta, set), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 347 | |
| 348 | TP_STRUCT__entry( |
| 349 | LOCAL_ENTRY |
| 350 | STA_ENTRY |
| 351 | __field(bool, set) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 352 | ), |
| 353 | |
| 354 | TP_fast_assign( |
| 355 | LOCAL_ASSIGN; |
| 356 | STA_ASSIGN; |
| 357 | __entry->set = set; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 358 | ), |
| 359 | |
| 360 | TP_printk( |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 361 | LOCAL_PR_FMT STA_PR_FMT " set:%d", |
| 362 | LOCAL_PR_ARG, STA_PR_FMT, __entry->set |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 363 | ) |
| 364 | ); |
| 365 | |
| 366 | TRACE_EVENT(drv_set_key, |
| 367 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 368 | enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 369 | struct ieee80211_sta *sta, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 370 | struct ieee80211_key_conf *key), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 371 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 372 | TP_ARGS(local, cmd, sdata, sta, key), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 373 | |
| 374 | TP_STRUCT__entry( |
| 375 | LOCAL_ENTRY |
| 376 | VIF_ENTRY |
| 377 | STA_ENTRY |
Johannes Berg | 97359d1 | 2010-08-10 09:46:38 +0200 | [diff] [blame] | 378 | __field(u32, cipher) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 379 | __field(u8, hw_key_idx) |
| 380 | __field(u8, flags) |
| 381 | __field(s8, keyidx) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 382 | ), |
| 383 | |
| 384 | TP_fast_assign( |
| 385 | LOCAL_ASSIGN; |
| 386 | VIF_ASSIGN; |
| 387 | STA_ASSIGN; |
Johannes Berg | 97359d1 | 2010-08-10 09:46:38 +0200 | [diff] [blame] | 388 | __entry->cipher = key->cipher; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 389 | __entry->flags = key->flags; |
| 390 | __entry->keyidx = key->keyidx; |
| 391 | __entry->hw_key_idx = key->hw_key_idx; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 392 | ), |
| 393 | |
| 394 | TP_printk( |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 395 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT, |
| 396 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 397 | ) |
| 398 | ); |
| 399 | |
| 400 | TRACE_EVENT(drv_update_tkip_key, |
| 401 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | b3fbdcf | 2010-01-21 11:40:47 +0100 | [diff] [blame] | 402 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 403 | struct ieee80211_key_conf *conf, |
Johannes Berg | b3fbdcf | 2010-01-21 11:40:47 +0100 | [diff] [blame] | 404 | struct ieee80211_sta *sta, u32 iv32), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 405 | |
Johannes Berg | b3fbdcf | 2010-01-21 11:40:47 +0100 | [diff] [blame] | 406 | TP_ARGS(local, sdata, conf, sta, iv32), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 407 | |
| 408 | TP_STRUCT__entry( |
| 409 | LOCAL_ENTRY |
Johannes Berg | b3fbdcf | 2010-01-21 11:40:47 +0100 | [diff] [blame] | 410 | VIF_ENTRY |
| 411 | STA_ENTRY |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 412 | __field(u32, iv32) |
| 413 | ), |
| 414 | |
| 415 | TP_fast_assign( |
| 416 | LOCAL_ASSIGN; |
Johannes Berg | b3fbdcf | 2010-01-21 11:40:47 +0100 | [diff] [blame] | 417 | VIF_ASSIGN; |
| 418 | STA_ASSIGN; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 419 | __entry->iv32 = iv32; |
| 420 | ), |
| 421 | |
| 422 | TP_printk( |
Johannes Berg | b3fbdcf | 2010-01-21 11:40:47 +0100 | [diff] [blame] | 423 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x", |
| 424 | LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32 |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 425 | ) |
| 426 | ); |
| 427 | |
| 428 | TRACE_EVENT(drv_hw_scan, |
| 429 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | a060bbf | 2010-04-27 11:59:34 +0200 | [diff] [blame] | 430 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 431 | struct cfg80211_scan_request *req), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 432 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 433 | TP_ARGS(local, sdata, req), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 434 | |
| 435 | TP_STRUCT__entry( |
| 436 | LOCAL_ENTRY |
Johannes Berg | a060bbf | 2010-04-27 11:59:34 +0200 | [diff] [blame] | 437 | VIF_ENTRY |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 438 | ), |
| 439 | |
| 440 | TP_fast_assign( |
| 441 | LOCAL_ASSIGN; |
Johannes Berg | a060bbf | 2010-04-27 11:59:34 +0200 | [diff] [blame] | 442 | VIF_ASSIGN; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 443 | ), |
| 444 | |
| 445 | TP_printk( |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 446 | LOCAL_PR_FMT VIF_PR_FMT, |
| 447 | LOCAL_PR_ARG,VIF_PR_ARG |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 448 | ) |
| 449 | ); |
| 450 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 451 | DEFINE_EVENT(local_only_evt, drv_sw_scan_start, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 452 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 453 | TP_ARGS(local) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 454 | ); |
| 455 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 456 | DEFINE_EVENT(local_only_evt, drv_sw_scan_complete, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 457 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 458 | TP_ARGS(local) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 459 | ); |
| 460 | |
| 461 | TRACE_EVENT(drv_get_stats, |
| 462 | TP_PROTO(struct ieee80211_local *local, |
| 463 | struct ieee80211_low_level_stats *stats, |
| 464 | int ret), |
| 465 | |
| 466 | TP_ARGS(local, stats, ret), |
| 467 | |
| 468 | TP_STRUCT__entry( |
| 469 | LOCAL_ENTRY |
| 470 | __field(int, ret) |
| 471 | __field(unsigned int, ackfail) |
| 472 | __field(unsigned int, rtsfail) |
| 473 | __field(unsigned int, fcserr) |
| 474 | __field(unsigned int, rtssucc) |
| 475 | ), |
| 476 | |
| 477 | TP_fast_assign( |
| 478 | LOCAL_ASSIGN; |
| 479 | __entry->ret = ret; |
| 480 | __entry->ackfail = stats->dot11ACKFailureCount; |
| 481 | __entry->rtsfail = stats->dot11RTSFailureCount; |
| 482 | __entry->fcserr = stats->dot11FCSErrorCount; |
| 483 | __entry->rtssucc = stats->dot11RTSSuccessCount; |
| 484 | ), |
| 485 | |
| 486 | TP_printk( |
| 487 | LOCAL_PR_FMT " ret:%d", |
| 488 | LOCAL_PR_ARG, __entry->ret |
| 489 | ) |
| 490 | ); |
| 491 | |
| 492 | TRACE_EVENT(drv_get_tkip_seq, |
| 493 | TP_PROTO(struct ieee80211_local *local, |
| 494 | u8 hw_key_idx, u32 *iv32, u16 *iv16), |
| 495 | |
| 496 | TP_ARGS(local, hw_key_idx, iv32, iv16), |
| 497 | |
| 498 | TP_STRUCT__entry( |
| 499 | LOCAL_ENTRY |
| 500 | __field(u8, hw_key_idx) |
| 501 | __field(u32, iv32) |
| 502 | __field(u16, iv16) |
| 503 | ), |
| 504 | |
| 505 | TP_fast_assign( |
| 506 | LOCAL_ASSIGN; |
| 507 | __entry->hw_key_idx = hw_key_idx; |
| 508 | __entry->iv32 = *iv32; |
| 509 | __entry->iv16 = *iv16; |
| 510 | ), |
| 511 | |
| 512 | TP_printk( |
| 513 | LOCAL_PR_FMT, LOCAL_PR_ARG |
| 514 | ) |
| 515 | ); |
| 516 | |
Arik Nemtsov | f23a478 | 2010-11-08 11:51:06 +0200 | [diff] [blame] | 517 | TRACE_EVENT(drv_set_frag_threshold, |
| 518 | TP_PROTO(struct ieee80211_local *local, u32 value), |
| 519 | |
| 520 | TP_ARGS(local, value), |
| 521 | |
| 522 | TP_STRUCT__entry( |
| 523 | LOCAL_ENTRY |
| 524 | __field(u32, value) |
| 525 | ), |
| 526 | |
| 527 | TP_fast_assign( |
| 528 | LOCAL_ASSIGN; |
| 529 | __entry->value = value; |
| 530 | ), |
| 531 | |
| 532 | TP_printk( |
| 533 | LOCAL_PR_FMT " value:%d", |
| 534 | LOCAL_PR_ARG, __entry->value |
| 535 | ) |
| 536 | ); |
| 537 | |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 538 | TRACE_EVENT(drv_set_rts_threshold, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 539 | TP_PROTO(struct ieee80211_local *local, u32 value), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 540 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 541 | TP_ARGS(local, value), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 542 | |
| 543 | TP_STRUCT__entry( |
| 544 | LOCAL_ENTRY |
| 545 | __field(u32, value) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 546 | ), |
| 547 | |
| 548 | TP_fast_assign( |
| 549 | LOCAL_ASSIGN; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 550 | __entry->value = value; |
| 551 | ), |
| 552 | |
| 553 | TP_printk( |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 554 | LOCAL_PR_FMT " value:%d", |
| 555 | LOCAL_PR_ARG, __entry->value |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 556 | ) |
| 557 | ); |
| 558 | |
Lukáš Turek | 310bc67 | 2009-12-21 22:50:48 +0100 | [diff] [blame] | 559 | TRACE_EVENT(drv_set_coverage_class, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 560 | TP_PROTO(struct ieee80211_local *local, u8 value), |
Lukáš Turek | 310bc67 | 2009-12-21 22:50:48 +0100 | [diff] [blame] | 561 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 562 | TP_ARGS(local, value), |
Lukáš Turek | 310bc67 | 2009-12-21 22:50:48 +0100 | [diff] [blame] | 563 | |
| 564 | TP_STRUCT__entry( |
| 565 | LOCAL_ENTRY |
| 566 | __field(u8, value) |
Lukáš Turek | 310bc67 | 2009-12-21 22:50:48 +0100 | [diff] [blame] | 567 | ), |
| 568 | |
| 569 | TP_fast_assign( |
| 570 | LOCAL_ASSIGN; |
Lukáš Turek | 310bc67 | 2009-12-21 22:50:48 +0100 | [diff] [blame] | 571 | __entry->value = value; |
| 572 | ), |
| 573 | |
| 574 | TP_printk( |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 575 | LOCAL_PR_FMT " value:%d", |
| 576 | LOCAL_PR_ARG, __entry->value |
Lukáš Turek | 310bc67 | 2009-12-21 22:50:48 +0100 | [diff] [blame] | 577 | ) |
| 578 | ); |
| 579 | |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 580 | TRACE_EVENT(drv_sta_notify, |
| 581 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 582 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 583 | enum sta_notify_cmd cmd, |
| 584 | struct ieee80211_sta *sta), |
| 585 | |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 586 | TP_ARGS(local, sdata, cmd, sta), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 587 | |
| 588 | TP_STRUCT__entry( |
| 589 | LOCAL_ENTRY |
| 590 | VIF_ENTRY |
| 591 | STA_ENTRY |
| 592 | __field(u32, cmd) |
| 593 | ), |
| 594 | |
| 595 | TP_fast_assign( |
| 596 | LOCAL_ASSIGN; |
| 597 | VIF_ASSIGN; |
| 598 | STA_ASSIGN; |
| 599 | __entry->cmd = cmd; |
| 600 | ), |
| 601 | |
| 602 | TP_printk( |
| 603 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d", |
| 604 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd |
| 605 | ) |
| 606 | ); |
| 607 | |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 608 | TRACE_EVENT(drv_sta_add, |
| 609 | TP_PROTO(struct ieee80211_local *local, |
| 610 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 611 | struct ieee80211_sta *sta), |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 612 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 613 | TP_ARGS(local, sdata, sta), |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 614 | |
| 615 | TP_STRUCT__entry( |
| 616 | LOCAL_ENTRY |
| 617 | VIF_ENTRY |
| 618 | STA_ENTRY |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 619 | ), |
| 620 | |
| 621 | TP_fast_assign( |
| 622 | LOCAL_ASSIGN; |
| 623 | VIF_ASSIGN; |
| 624 | STA_ASSIGN; |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 625 | ), |
| 626 | |
| 627 | TP_printk( |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 628 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT, |
| 629 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG |
Johannes Berg | 34e8950 | 2010-02-03 13:59:58 +0100 | [diff] [blame] | 630 | ) |
| 631 | ); |
| 632 | |
| 633 | TRACE_EVENT(drv_sta_remove, |
| 634 | TP_PROTO(struct ieee80211_local *local, |
| 635 | struct ieee80211_sub_if_data *sdata, |
| 636 | struct ieee80211_sta *sta), |
| 637 | |
| 638 | TP_ARGS(local, sdata, sta), |
| 639 | |
| 640 | TP_STRUCT__entry( |
| 641 | LOCAL_ENTRY |
| 642 | VIF_ENTRY |
| 643 | STA_ENTRY |
| 644 | ), |
| 645 | |
| 646 | TP_fast_assign( |
| 647 | LOCAL_ASSIGN; |
| 648 | VIF_ASSIGN; |
| 649 | STA_ASSIGN; |
| 650 | ), |
| 651 | |
| 652 | TP_printk( |
| 653 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT, |
| 654 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG |
| 655 | ) |
| 656 | ); |
| 657 | |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 658 | TRACE_EVENT(drv_conf_tx, |
| 659 | TP_PROTO(struct ieee80211_local *local, u16 queue, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 660 | const struct ieee80211_tx_queue_params *params), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 661 | |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 662 | TP_ARGS(local, queue, params), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 663 | |
| 664 | TP_STRUCT__entry( |
| 665 | LOCAL_ENTRY |
| 666 | __field(u16, queue) |
| 667 | __field(u16, txop) |
| 668 | __field(u16, cw_min) |
| 669 | __field(u16, cw_max) |
| 670 | __field(u8, aifs) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 671 | ), |
| 672 | |
| 673 | TP_fast_assign( |
| 674 | LOCAL_ASSIGN; |
| 675 | __entry->queue = queue; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 676 | __entry->txop = params->txop; |
| 677 | __entry->cw_max = params->cw_max; |
| 678 | __entry->cw_min = params->cw_min; |
| 679 | __entry->aifs = params->aifs; |
| 680 | ), |
| 681 | |
| 682 | TP_printk( |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 683 | LOCAL_PR_FMT " queue:%d", |
| 684 | LOCAL_PR_ARG, __entry->queue |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 685 | ) |
| 686 | ); |
| 687 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 688 | DEFINE_EVENT(local_only_evt, drv_get_tsf, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 689 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 690 | TP_ARGS(local) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 691 | ); |
| 692 | |
| 693 | TRACE_EVENT(drv_set_tsf, |
| 694 | TP_PROTO(struct ieee80211_local *local, u64 tsf), |
| 695 | |
| 696 | TP_ARGS(local, tsf), |
| 697 | |
| 698 | TP_STRUCT__entry( |
| 699 | LOCAL_ENTRY |
| 700 | __field(u64, tsf) |
| 701 | ), |
| 702 | |
| 703 | TP_fast_assign( |
| 704 | LOCAL_ASSIGN; |
| 705 | __entry->tsf = tsf; |
| 706 | ), |
| 707 | |
| 708 | TP_printk( |
| 709 | LOCAL_PR_FMT " tsf:%llu", |
| 710 | LOCAL_PR_ARG, (unsigned long long)__entry->tsf |
| 711 | ) |
| 712 | ); |
| 713 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 714 | DEFINE_EVENT(local_only_evt, drv_reset_tsf, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 715 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 716 | TP_ARGS(local) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 717 | ); |
| 718 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 719 | DEFINE_EVENT(local_only_evt, drv_tx_last_beacon, |
Johannes Berg | 4efc76b | 2010-06-10 10:56:20 +0200 | [diff] [blame] | 720 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 721 | TP_ARGS(local) |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 722 | ); |
| 723 | |
| 724 | TRACE_EVENT(drv_ampdu_action, |
| 725 | TP_PROTO(struct ieee80211_local *local, |
Johannes Berg | 12375ef | 2009-11-25 20:30:31 +0100 | [diff] [blame] | 726 | struct ieee80211_sub_if_data *sdata, |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 727 | enum ieee80211_ampdu_mlme_action action, |
| 728 | struct ieee80211_sta *sta, u16 tid, |
Johannes Berg | 0b01f03 | 2011-01-18 13:51:05 +0100 | [diff] [blame] | 729 | u16 *ssn, u8 buf_size), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 730 | |
Johannes Berg | 0b01f03 | 2011-01-18 13:51:05 +0100 | [diff] [blame] | 731 | TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size), |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 732 | |
| 733 | TP_STRUCT__entry( |
| 734 | LOCAL_ENTRY |
| 735 | STA_ENTRY |
| 736 | __field(u32, action) |
| 737 | __field(u16, tid) |
| 738 | __field(u16, ssn) |
Johannes Berg | 0b01f03 | 2011-01-18 13:51:05 +0100 | [diff] [blame] | 739 | __field(u8, buf_size) |
Johannes Berg | c951ad3 | 2009-11-16 12:00:38 +0100 | [diff] [blame] | 740 | VIF_ENTRY |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 741 | ), |
| 742 | |
| 743 | TP_fast_assign( |
| 744 | LOCAL_ASSIGN; |
Johannes Berg | c951ad3 | 2009-11-16 12:00:38 +0100 | [diff] [blame] | 745 | VIF_ASSIGN; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 746 | STA_ASSIGN; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 747 | __entry->action = action; |
| 748 | __entry->tid = tid; |
Zhu Yi | 3092ad0 | 2010-01-26 15:58:57 +0800 | [diff] [blame] | 749 | __entry->ssn = ssn ? *ssn : 0; |
Johannes Berg | 0b01f03 | 2011-01-18 13:51:05 +0100 | [diff] [blame] | 750 | __entry->buf_size = buf_size; |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 751 | ), |
| 752 | |
| 753 | TP_printk( |
Johannes Berg | 0b01f03 | 2011-01-18 13:51:05 +0100 | [diff] [blame] | 754 | LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d", |
| 755 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action, |
| 756 | __entry->tid, __entry->buf_size |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 757 | ) |
| 758 | ); |
Johannes Berg | a80f7c0 | 2009-12-23 13:15:32 +0100 | [diff] [blame] | 759 | |
John W. Linville | c466d4e | 2010-06-29 14:51:23 -0400 | [diff] [blame] | 760 | TRACE_EVENT(drv_get_survey, |
| 761 | TP_PROTO(struct ieee80211_local *local, int idx, |
| 762 | struct survey_info *survey), |
| 763 | |
| 764 | TP_ARGS(local, idx, survey), |
| 765 | |
| 766 | TP_STRUCT__entry( |
| 767 | LOCAL_ENTRY |
| 768 | __field(int, idx) |
| 769 | ), |
| 770 | |
| 771 | TP_fast_assign( |
| 772 | LOCAL_ASSIGN; |
| 773 | __entry->idx = idx; |
| 774 | ), |
| 775 | |
| 776 | TP_printk( |
| 777 | LOCAL_PR_FMT " idx:%d", |
| 778 | LOCAL_PR_ARG, __entry->idx |
| 779 | ) |
| 780 | ); |
| 781 | |
Johannes Berg | a80f7c0 | 2009-12-23 13:15:32 +0100 | [diff] [blame] | 782 | TRACE_EVENT(drv_flush, |
| 783 | TP_PROTO(struct ieee80211_local *local, bool drop), |
| 784 | |
| 785 | TP_ARGS(local, drop), |
| 786 | |
| 787 | TP_STRUCT__entry( |
| 788 | LOCAL_ENTRY |
| 789 | __field(bool, drop) |
| 790 | ), |
| 791 | |
| 792 | TP_fast_assign( |
| 793 | LOCAL_ASSIGN; |
| 794 | __entry->drop = drop; |
| 795 | ), |
| 796 | |
| 797 | TP_printk( |
| 798 | LOCAL_PR_FMT " drop:%d", |
| 799 | LOCAL_PR_ARG, __entry->drop |
| 800 | ) |
| 801 | ); |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 802 | |
Johannes Berg | 5ce6e43 | 2010-05-11 16:20:57 +0200 | [diff] [blame] | 803 | TRACE_EVENT(drv_channel_switch, |
| 804 | TP_PROTO(struct ieee80211_local *local, |
| 805 | struct ieee80211_channel_switch *ch_switch), |
| 806 | |
| 807 | TP_ARGS(local, ch_switch), |
| 808 | |
| 809 | TP_STRUCT__entry( |
| 810 | LOCAL_ENTRY |
| 811 | __field(u64, timestamp) |
| 812 | __field(bool, block_tx) |
| 813 | __field(u16, freq) |
| 814 | __field(u8, count) |
| 815 | ), |
| 816 | |
| 817 | TP_fast_assign( |
| 818 | LOCAL_ASSIGN; |
| 819 | __entry->timestamp = ch_switch->timestamp; |
| 820 | __entry->block_tx = ch_switch->block_tx; |
| 821 | __entry->freq = ch_switch->channel->center_freq; |
| 822 | __entry->count = ch_switch->count; |
| 823 | ), |
| 824 | |
| 825 | TP_printk( |
| 826 | LOCAL_PR_FMT " new freq:%u count:%d", |
| 827 | LOCAL_PR_ARG, __entry->freq, __entry->count |
| 828 | ) |
| 829 | ); |
| 830 | |
Bruno Randolf | 15d9675 | 2010-11-10 12:50:56 +0900 | [diff] [blame] | 831 | TRACE_EVENT(drv_set_antenna, |
| 832 | TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret), |
| 833 | |
| 834 | TP_ARGS(local, tx_ant, rx_ant, ret), |
| 835 | |
| 836 | TP_STRUCT__entry( |
| 837 | LOCAL_ENTRY |
| 838 | __field(u32, tx_ant) |
| 839 | __field(u32, rx_ant) |
| 840 | __field(int, ret) |
| 841 | ), |
| 842 | |
| 843 | TP_fast_assign( |
| 844 | LOCAL_ASSIGN; |
| 845 | __entry->tx_ant = tx_ant; |
| 846 | __entry->rx_ant = rx_ant; |
| 847 | __entry->ret = ret; |
| 848 | ), |
| 849 | |
| 850 | TP_printk( |
| 851 | LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d", |
| 852 | LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret |
| 853 | ) |
| 854 | ); |
| 855 | |
| 856 | TRACE_EVENT(drv_get_antenna, |
| 857 | TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret), |
| 858 | |
| 859 | TP_ARGS(local, tx_ant, rx_ant, ret), |
| 860 | |
| 861 | TP_STRUCT__entry( |
| 862 | LOCAL_ENTRY |
| 863 | __field(u32, tx_ant) |
| 864 | __field(u32, rx_ant) |
| 865 | __field(int, ret) |
| 866 | ), |
| 867 | |
| 868 | TP_fast_assign( |
| 869 | LOCAL_ASSIGN; |
| 870 | __entry->tx_ant = tx_ant; |
| 871 | __entry->rx_ant = rx_ant; |
| 872 | __entry->ret = ret; |
| 873 | ), |
| 874 | |
| 875 | TP_printk( |
| 876 | LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d", |
| 877 | LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret |
| 878 | ) |
| 879 | ); |
| 880 | |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 881 | TRACE_EVENT(drv_remain_on_channel, |
| 882 | TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan, |
| 883 | enum nl80211_channel_type chantype, unsigned int duration), |
| 884 | |
| 885 | TP_ARGS(local, chan, chantype, duration), |
| 886 | |
| 887 | TP_STRUCT__entry( |
| 888 | LOCAL_ENTRY |
| 889 | __field(int, center_freq) |
| 890 | __field(int, channel_type) |
| 891 | __field(unsigned int, duration) |
| 892 | ), |
| 893 | |
| 894 | TP_fast_assign( |
| 895 | LOCAL_ASSIGN; |
| 896 | __entry->center_freq = chan->center_freq; |
| 897 | __entry->channel_type = chantype; |
| 898 | __entry->duration = duration; |
| 899 | ), |
| 900 | |
| 901 | TP_printk( |
| 902 | LOCAL_PR_FMT " freq:%dMHz duration:%dms", |
| 903 | LOCAL_PR_ARG, __entry->center_freq, __entry->duration |
| 904 | ) |
| 905 | ); |
| 906 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 907 | DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel, |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 908 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 909 | TP_ARGS(local) |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 910 | ); |
| 911 | |
Johannes Berg | 5f16a43 | 2011-02-25 15:36:57 +0100 | [diff] [blame] | 912 | TRACE_EVENT(drv_offchannel_tx, |
| 913 | TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb, |
| 914 | struct ieee80211_channel *chan, |
| 915 | enum nl80211_channel_type channel_type, |
| 916 | unsigned int wait), |
| 917 | |
| 918 | TP_ARGS(local, skb, chan, channel_type, wait), |
| 919 | |
| 920 | TP_STRUCT__entry( |
| 921 | LOCAL_ENTRY |
| 922 | __field(int, center_freq) |
| 923 | __field(int, channel_type) |
| 924 | __field(unsigned int, wait) |
| 925 | ), |
| 926 | |
| 927 | TP_fast_assign( |
| 928 | LOCAL_ASSIGN; |
| 929 | __entry->center_freq = chan->center_freq; |
| 930 | __entry->channel_type = channel_type; |
| 931 | __entry->wait = wait; |
| 932 | ), |
| 933 | |
| 934 | TP_printk( |
| 935 | LOCAL_PR_FMT " freq:%dMHz, wait:%dms", |
| 936 | LOCAL_PR_ARG, __entry->center_freq, __entry->wait |
| 937 | ) |
| 938 | ); |
| 939 | |
John W. Linville | 38c0915 | 2011-03-07 16:19:18 -0500 | [diff] [blame] | 940 | TRACE_EVENT(drv_set_ringparam, |
| 941 | TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx), |
| 942 | |
| 943 | TP_ARGS(local, tx, rx), |
| 944 | |
| 945 | TP_STRUCT__entry( |
| 946 | LOCAL_ENTRY |
| 947 | __field(u32, tx) |
| 948 | __field(u32, rx) |
| 949 | ), |
| 950 | |
| 951 | TP_fast_assign( |
| 952 | LOCAL_ASSIGN; |
| 953 | __entry->tx = tx; |
| 954 | __entry->rx = rx; |
| 955 | ), |
| 956 | |
| 957 | TP_printk( |
| 958 | LOCAL_PR_FMT " tx:%d rx %d", |
| 959 | LOCAL_PR_ARG, __entry->tx, __entry->rx |
| 960 | ) |
| 961 | ); |
| 962 | |
| 963 | TRACE_EVENT(drv_get_ringparam, |
| 964 | TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max, |
| 965 | u32 *rx, u32 *rx_max), |
| 966 | |
| 967 | TP_ARGS(local, tx, tx_max, rx, rx_max), |
| 968 | |
| 969 | TP_STRUCT__entry( |
| 970 | LOCAL_ENTRY |
| 971 | __field(u32, tx) |
| 972 | __field(u32, tx_max) |
| 973 | __field(u32, rx) |
| 974 | __field(u32, rx_max) |
| 975 | ), |
| 976 | |
| 977 | TP_fast_assign( |
| 978 | LOCAL_ASSIGN; |
| 979 | __entry->tx = *tx; |
| 980 | __entry->tx_max = *tx_max; |
| 981 | __entry->rx = *rx; |
| 982 | __entry->rx_max = *rx_max; |
| 983 | ), |
| 984 | |
| 985 | TP_printk( |
| 986 | LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d", |
| 987 | LOCAL_PR_ARG, |
| 988 | __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max |
| 989 | ) |
| 990 | ); |
| 991 | |
Vivek Natarajan | e8306f9 | 2011-04-06 11:41:10 +0530 | [diff] [blame] | 992 | DEFINE_EVENT(local_only_evt, drv_tx_frames_pending, |
| 993 | TP_PROTO(struct ieee80211_local *local), |
| 994 | TP_ARGS(local) |
| 995 | ); |
| 996 | |
Johannes Berg | 5f16a43 | 2011-02-25 15:36:57 +0100 | [diff] [blame] | 997 | DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait, |
| 998 | TP_PROTO(struct ieee80211_local *local), |
| 999 | TP_ARGS(local) |
| 1000 | ); |
| 1001 | |
Sujith Manoharan | bdbfd6b | 2011-04-27 16:56:51 +0530 | [diff] [blame] | 1002 | TRACE_EVENT(drv_set_bitrate_mask, |
| 1003 | TP_PROTO(struct ieee80211_local *local, |
| 1004 | struct ieee80211_sub_if_data *sdata, |
| 1005 | const struct cfg80211_bitrate_mask *mask), |
| 1006 | |
| 1007 | TP_ARGS(local, sdata, mask), |
| 1008 | |
| 1009 | TP_STRUCT__entry( |
| 1010 | LOCAL_ENTRY |
| 1011 | VIF_ENTRY |
| 1012 | __field(u32, legacy_2g) |
| 1013 | __field(u32, legacy_5g) |
| 1014 | ), |
| 1015 | |
| 1016 | TP_fast_assign( |
| 1017 | LOCAL_ASSIGN; |
| 1018 | VIF_ASSIGN; |
| 1019 | __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy; |
| 1020 | __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy; |
| 1021 | ), |
| 1022 | |
| 1023 | TP_printk( |
| 1024 | LOCAL_PR_FMT VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x", |
| 1025 | LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g |
| 1026 | ) |
| 1027 | ); |
| 1028 | |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1029 | /* |
| 1030 | * Tracing for API calls that drivers call. |
| 1031 | */ |
| 1032 | |
| 1033 | TRACE_EVENT(api_start_tx_ba_session, |
| 1034 | TP_PROTO(struct ieee80211_sta *sta, u16 tid), |
| 1035 | |
| 1036 | TP_ARGS(sta, tid), |
| 1037 | |
| 1038 | TP_STRUCT__entry( |
| 1039 | STA_ENTRY |
| 1040 | __field(u16, tid) |
| 1041 | ), |
| 1042 | |
| 1043 | TP_fast_assign( |
| 1044 | STA_ASSIGN; |
| 1045 | __entry->tid = tid; |
| 1046 | ), |
| 1047 | |
| 1048 | TP_printk( |
| 1049 | STA_PR_FMT " tid:%d", |
| 1050 | STA_PR_ARG, __entry->tid |
| 1051 | ) |
| 1052 | ); |
| 1053 | |
| 1054 | TRACE_EVENT(api_start_tx_ba_cb, |
| 1055 | TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid), |
| 1056 | |
| 1057 | TP_ARGS(sdata, ra, tid), |
| 1058 | |
| 1059 | TP_STRUCT__entry( |
| 1060 | VIF_ENTRY |
| 1061 | __array(u8, ra, ETH_ALEN) |
| 1062 | __field(u16, tid) |
| 1063 | ), |
| 1064 | |
| 1065 | TP_fast_assign( |
| 1066 | VIF_ASSIGN; |
| 1067 | memcpy(__entry->ra, ra, ETH_ALEN); |
| 1068 | __entry->tid = tid; |
| 1069 | ), |
| 1070 | |
| 1071 | TP_printk( |
| 1072 | VIF_PR_FMT " ra:%pM tid:%d", |
| 1073 | VIF_PR_ARG, __entry->ra, __entry->tid |
| 1074 | ) |
| 1075 | ); |
| 1076 | |
| 1077 | TRACE_EVENT(api_stop_tx_ba_session, |
Johannes Berg | 6a8579d | 2010-05-27 14:41:07 +0200 | [diff] [blame] | 1078 | TP_PROTO(struct ieee80211_sta *sta, u16 tid), |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1079 | |
Johannes Berg | 6a8579d | 2010-05-27 14:41:07 +0200 | [diff] [blame] | 1080 | TP_ARGS(sta, tid), |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1081 | |
| 1082 | TP_STRUCT__entry( |
| 1083 | STA_ENTRY |
| 1084 | __field(u16, tid) |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1085 | ), |
| 1086 | |
| 1087 | TP_fast_assign( |
| 1088 | STA_ASSIGN; |
| 1089 | __entry->tid = tid; |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1090 | ), |
| 1091 | |
| 1092 | TP_printk( |
Johannes Berg | 6a8579d | 2010-05-27 14:41:07 +0200 | [diff] [blame] | 1093 | STA_PR_FMT " tid:%d", |
| 1094 | STA_PR_ARG, __entry->tid |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1095 | ) |
| 1096 | ); |
| 1097 | |
| 1098 | TRACE_EVENT(api_stop_tx_ba_cb, |
| 1099 | TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid), |
| 1100 | |
| 1101 | TP_ARGS(sdata, ra, tid), |
| 1102 | |
| 1103 | TP_STRUCT__entry( |
| 1104 | VIF_ENTRY |
| 1105 | __array(u8, ra, ETH_ALEN) |
| 1106 | __field(u16, tid) |
| 1107 | ), |
| 1108 | |
| 1109 | TP_fast_assign( |
| 1110 | VIF_ASSIGN; |
| 1111 | memcpy(__entry->ra, ra, ETH_ALEN); |
| 1112 | __entry->tid = tid; |
| 1113 | ), |
| 1114 | |
| 1115 | TP_printk( |
| 1116 | VIF_PR_FMT " ra:%pM tid:%d", |
| 1117 | VIF_PR_ARG, __entry->ra, __entry->tid |
| 1118 | ) |
| 1119 | ); |
| 1120 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1121 | DEFINE_EVENT(local_only_evt, api_restart_hw, |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1122 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1123 | TP_ARGS(local) |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1124 | ); |
| 1125 | |
| 1126 | TRACE_EVENT(api_beacon_loss, |
| 1127 | TP_PROTO(struct ieee80211_sub_if_data *sdata), |
| 1128 | |
| 1129 | TP_ARGS(sdata), |
| 1130 | |
| 1131 | TP_STRUCT__entry( |
| 1132 | VIF_ENTRY |
| 1133 | ), |
| 1134 | |
| 1135 | TP_fast_assign( |
| 1136 | VIF_ASSIGN; |
| 1137 | ), |
| 1138 | |
| 1139 | TP_printk( |
| 1140 | VIF_PR_FMT, |
| 1141 | VIF_PR_ARG |
| 1142 | ) |
| 1143 | ); |
| 1144 | |
| 1145 | TRACE_EVENT(api_connection_loss, |
| 1146 | TP_PROTO(struct ieee80211_sub_if_data *sdata), |
| 1147 | |
| 1148 | TP_ARGS(sdata), |
| 1149 | |
| 1150 | TP_STRUCT__entry( |
| 1151 | VIF_ENTRY |
| 1152 | ), |
| 1153 | |
| 1154 | TP_fast_assign( |
| 1155 | VIF_ASSIGN; |
| 1156 | ), |
| 1157 | |
| 1158 | TP_printk( |
| 1159 | VIF_PR_FMT, |
| 1160 | VIF_PR_ARG |
| 1161 | ) |
| 1162 | ); |
| 1163 | |
| 1164 | TRACE_EVENT(api_cqm_rssi_notify, |
| 1165 | TP_PROTO(struct ieee80211_sub_if_data *sdata, |
| 1166 | enum nl80211_cqm_rssi_threshold_event rssi_event), |
| 1167 | |
| 1168 | TP_ARGS(sdata, rssi_event), |
| 1169 | |
| 1170 | TP_STRUCT__entry( |
| 1171 | VIF_ENTRY |
| 1172 | __field(u32, rssi_event) |
| 1173 | ), |
| 1174 | |
| 1175 | TP_fast_assign( |
| 1176 | VIF_ASSIGN; |
| 1177 | __entry->rssi_event = rssi_event; |
| 1178 | ), |
| 1179 | |
| 1180 | TP_printk( |
| 1181 | VIF_PR_FMT " event:%d", |
| 1182 | VIF_PR_ARG, __entry->rssi_event |
| 1183 | ) |
| 1184 | ); |
| 1185 | |
| 1186 | TRACE_EVENT(api_scan_completed, |
| 1187 | TP_PROTO(struct ieee80211_local *local, bool aborted), |
| 1188 | |
| 1189 | TP_ARGS(local, aborted), |
| 1190 | |
| 1191 | TP_STRUCT__entry( |
| 1192 | LOCAL_ENTRY |
| 1193 | __field(bool, aborted) |
| 1194 | ), |
| 1195 | |
| 1196 | TP_fast_assign( |
| 1197 | LOCAL_ASSIGN; |
| 1198 | __entry->aborted = aborted; |
| 1199 | ), |
| 1200 | |
| 1201 | TP_printk( |
| 1202 | LOCAL_PR_FMT " aborted:%d", |
| 1203 | LOCAL_PR_ARG, __entry->aborted |
| 1204 | ) |
| 1205 | ); |
| 1206 | |
| 1207 | TRACE_EVENT(api_sta_block_awake, |
| 1208 | TP_PROTO(struct ieee80211_local *local, |
| 1209 | struct ieee80211_sta *sta, bool block), |
| 1210 | |
| 1211 | TP_ARGS(local, sta, block), |
| 1212 | |
| 1213 | TP_STRUCT__entry( |
| 1214 | LOCAL_ENTRY |
| 1215 | STA_ENTRY |
| 1216 | __field(bool, block) |
| 1217 | ), |
| 1218 | |
| 1219 | TP_fast_assign( |
| 1220 | LOCAL_ASSIGN; |
| 1221 | STA_ASSIGN; |
| 1222 | __entry->block = block; |
| 1223 | ), |
| 1224 | |
| 1225 | TP_printk( |
| 1226 | LOCAL_PR_FMT STA_PR_FMT " block:%d", |
| 1227 | LOCAL_PR_ARG, STA_PR_FMT, __entry->block |
| 1228 | ) |
| 1229 | ); |
| 1230 | |
Johannes Berg | 5ce6e43 | 2010-05-11 16:20:57 +0200 | [diff] [blame] | 1231 | TRACE_EVENT(api_chswitch_done, |
| 1232 | TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success), |
| 1233 | |
| 1234 | TP_ARGS(sdata, success), |
| 1235 | |
| 1236 | TP_STRUCT__entry( |
| 1237 | VIF_ENTRY |
| 1238 | __field(bool, success) |
| 1239 | ), |
| 1240 | |
| 1241 | TP_fast_assign( |
| 1242 | VIF_ASSIGN; |
| 1243 | __entry->success = success; |
| 1244 | ), |
| 1245 | |
| 1246 | TP_printk( |
| 1247 | VIF_PR_FMT " success=%d", |
| 1248 | VIF_PR_ARG, __entry->success |
| 1249 | ) |
| 1250 | ); |
| 1251 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1252 | DEFINE_EVENT(local_only_evt, api_ready_on_channel, |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1253 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1254 | TP_ARGS(local) |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1255 | ); |
| 1256 | |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1257 | DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired, |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1258 | TP_PROTO(struct ieee80211_local *local), |
Johannes Berg | ba99d93 | 2011-01-26 09:22:15 +0100 | [diff] [blame] | 1259 | TP_ARGS(local) |
Johannes Berg | 21f8358 | 2010-12-18 17:20:47 +0100 | [diff] [blame] | 1260 | ); |
| 1261 | |
Johannes Berg | b5878a2 | 2010-04-07 16:48:40 +0200 | [diff] [blame] | 1262 | /* |
| 1263 | * Tracing for internal functions |
| 1264 | * (which may also be called in response to driver calls) |
| 1265 | */ |
| 1266 | |
| 1267 | TRACE_EVENT(wake_queue, |
| 1268 | TP_PROTO(struct ieee80211_local *local, u16 queue, |
| 1269 | enum queue_stop_reason reason), |
| 1270 | |
| 1271 | TP_ARGS(local, queue, reason), |
| 1272 | |
| 1273 | TP_STRUCT__entry( |
| 1274 | LOCAL_ENTRY |
| 1275 | __field(u16, queue) |
| 1276 | __field(u32, reason) |
| 1277 | ), |
| 1278 | |
| 1279 | TP_fast_assign( |
| 1280 | LOCAL_ASSIGN; |
| 1281 | __entry->queue = queue; |
| 1282 | __entry->reason = reason; |
| 1283 | ), |
| 1284 | |
| 1285 | TP_printk( |
| 1286 | LOCAL_PR_FMT " queue:%d, reason:%d", |
| 1287 | LOCAL_PR_ARG, __entry->queue, __entry->reason |
| 1288 | ) |
| 1289 | ); |
| 1290 | |
| 1291 | TRACE_EVENT(stop_queue, |
| 1292 | TP_PROTO(struct ieee80211_local *local, u16 queue, |
| 1293 | enum queue_stop_reason reason), |
| 1294 | |
| 1295 | TP_ARGS(local, queue, reason), |
| 1296 | |
| 1297 | TP_STRUCT__entry( |
| 1298 | LOCAL_ENTRY |
| 1299 | __field(u16, queue) |
| 1300 | __field(u32, reason) |
| 1301 | ), |
| 1302 | |
| 1303 | TP_fast_assign( |
| 1304 | LOCAL_ASSIGN; |
| 1305 | __entry->queue = queue; |
| 1306 | __entry->reason = reason; |
| 1307 | ), |
| 1308 | |
| 1309 | TP_printk( |
| 1310 | LOCAL_PR_FMT " queue:%d, reason:%d", |
| 1311 | LOCAL_PR_ARG, __entry->queue, __entry->reason |
| 1312 | ) |
| 1313 | ); |
Christian Lamparter | f742880 | 2009-07-19 23:21:07 +0200 | [diff] [blame] | 1314 | #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ |
Johannes Berg | 0a2b8bb | 2009-07-07 13:46:22 +0200 | [diff] [blame] | 1315 | |
| 1316 | #undef TRACE_INCLUDE_PATH |
| 1317 | #define TRACE_INCLUDE_PATH . |
| 1318 | #undef TRACE_INCLUDE_FILE |
| 1319 | #define TRACE_INCLUDE_FILE driver-trace |
| 1320 | #include <trace/define_trace.h> |