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