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