driver-trace.h
Go to the documentation of this file.
00001 #if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
00002 #define __MAC80211_DRIVER_TRACE
00003 
00004 #include <linux/tracepoint.h>
00005 #include <net/mac80211.h>
00006 #include "ieee80211_i.h"
00007 
00008 #if !defined(CONFIG_MAC80211_DRIVER_API_TRACER) || defined(__CHECKER__)
00009 #undef TRACE_EVENT
00010 #define TRACE_EVENT(name, proto, ...) \
00011 static inline void trace_ ## name(proto) {}
00012 #undef DECLARE_EVENT_CLASS
00013 #define DECLARE_EVENT_CLASS(...)
00014 #undef DEFINE_EVENT
00015 #define DEFINE_EVENT(evt_class, name, proto, ...) \
00016 static inline void trace_ ## name(proto) {}
00017 #endif
00018 
00019 #undef TRACE_SYSTEM
00020 #define TRACE_SYSTEM mac80211
00021 
00022 #define MAXNAME         32
00023 #define LOCAL_ENTRY     __array(char, wiphy_name, 32)
00024 #define LOCAL_ASSIGN    strlcpy(__entry->wiphy_name, wiphy_name(local->hw.wiphy), MAXNAME)
00025 #define LOCAL_PR_FMT    "%s"
00026 #define LOCAL_PR_ARG    __entry->wiphy_name
00027 
00028 #define STA_ENTRY       __array(char, sta_addr, ETH_ALEN)
00029 #define STA_ASSIGN      (sta ? memcpy(__entry->sta_addr, sta->addr, ETH_ALEN) : memset(__entry->sta_addr, 0, ETH_ALEN))
00030 #define STA_PR_FMT      " sta:%pM"
00031 #define STA_PR_ARG      __entry->sta_addr
00032 
00033 #define VIF_ENTRY       __field(enum nl80211_iftype, vif_type) __field(void *, sdata)   \
00034                         __field(bool, p2p)                                              \
00035                         __string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
00036 #define VIF_ASSIGN      __entry->vif_type = sdata->vif.type; __entry->sdata = sdata;    \
00037                         __entry->p2p = sdata->vif.p2p;                                  \
00038                         __assign_str(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
00039 #define VIF_PR_FMT      " vif:%s(%d%s)"
00040 #define VIF_PR_ARG      __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
00041 
00042 /*
00043  * Tracing for driver callbacks.
00044  */
00045 
00046 DECLARE_EVENT_CLASS(local_only_evt,
00047         TP_PROTO(struct ieee80211_local *local),
00048         TP_ARGS(local),
00049         TP_STRUCT__entry(
00050                 LOCAL_ENTRY
00051         ),
00052         TP_fast_assign(
00053                 LOCAL_ASSIGN;
00054         ),
00055         TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
00056 );
00057 
00058 DECLARE_EVENT_CLASS(local_sdata_addr_evt,
00059         TP_PROTO(struct ieee80211_local *local,
00060                  struct ieee80211_sub_if_data *sdata),
00061         TP_ARGS(local, sdata),
00062 
00063         TP_STRUCT__entry(
00064                 LOCAL_ENTRY
00065                 VIF_ENTRY
00066                 __array(char, addr, 6)
00067         ),
00068 
00069         TP_fast_assign(
00070                 LOCAL_ASSIGN;
00071                 VIF_ASSIGN;
00072                 memcpy(__entry->addr, sdata->vif.addr, 6);
00073         ),
00074 
00075         TP_printk(
00076                 LOCAL_PR_FMT  VIF_PR_FMT " addr:%pM",
00077                 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
00078         )
00079 );
00080 
00081 DECLARE_EVENT_CLASS(local_u32_evt,
00082         TP_PROTO(struct ieee80211_local *local, u32 value),
00083         TP_ARGS(local, value),
00084 
00085         TP_STRUCT__entry(
00086                 LOCAL_ENTRY
00087                 __field(u32, value)
00088         ),
00089 
00090         TP_fast_assign(
00091                 LOCAL_ASSIGN;
00092                 __entry->value = value;
00093         ),
00094 
00095         TP_printk(
00096                 LOCAL_PR_FMT " value:%d",
00097                 LOCAL_PR_ARG, __entry->value
00098         )
00099 );
00100 
00101 DECLARE_EVENT_CLASS(local_sdata_evt,
00102         TP_PROTO(struct ieee80211_local *local,
00103                  struct ieee80211_sub_if_data *sdata),
00104         TP_ARGS(local, sdata),
00105 
00106         TP_STRUCT__entry(
00107                 LOCAL_ENTRY
00108                 VIF_ENTRY
00109         ),
00110 
00111         TP_fast_assign(
00112                 LOCAL_ASSIGN;
00113                 VIF_ASSIGN;
00114         ),
00115 
00116         TP_printk(
00117                 LOCAL_PR_FMT VIF_PR_FMT,
00118                 LOCAL_PR_ARG, VIF_PR_ARG
00119         )
00120 );
00121 
00122 DEFINE_EVENT(local_only_evt, drv_return_void,
00123         TP_PROTO(struct ieee80211_local *local),
00124         TP_ARGS(local)
00125 );
00126 
00127 TRACE_EVENT(drv_return_int,
00128         TP_PROTO(struct ieee80211_local *local, int ret),
00129         TP_ARGS(local, ret),
00130         TP_STRUCT__entry(
00131                 LOCAL_ENTRY
00132                 __field(int, ret)
00133         ),
00134         TP_fast_assign(
00135                 LOCAL_ASSIGN;
00136                 __entry->ret = ret;
00137         ),
00138         TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
00139 );
00140 
00141 TRACE_EVENT(drv_return_bool,
00142         TP_PROTO(struct ieee80211_local *local, bool ret),
00143         TP_ARGS(local, ret),
00144         TP_STRUCT__entry(
00145                 LOCAL_ENTRY
00146                 __field(bool, ret)
00147         ),
00148         TP_fast_assign(
00149                 LOCAL_ASSIGN;
00150                 __entry->ret = ret;
00151         ),
00152         TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
00153                   "true" : "false")
00154 );
00155 
00156 TRACE_EVENT(drv_return_u64,
00157         TP_PROTO(struct ieee80211_local *local, u64 ret),
00158         TP_ARGS(local, ret),
00159         TP_STRUCT__entry(
00160                 LOCAL_ENTRY
00161                 __field(u64, ret)
00162         ),
00163         TP_fast_assign(
00164                 LOCAL_ASSIGN;
00165                 __entry->ret = ret;
00166         ),
00167         TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
00168 );
00169 
00170 DEFINE_EVENT(local_only_evt, drv_start,
00171         TP_PROTO(struct ieee80211_local *local),
00172         TP_ARGS(local)
00173 );
00174 
00175 DEFINE_EVENT(local_only_evt, drv_suspend,
00176         TP_PROTO(struct ieee80211_local *local),
00177         TP_ARGS(local)
00178 );
00179 
00180 DEFINE_EVENT(local_only_evt, drv_resume,
00181         TP_PROTO(struct ieee80211_local *local),
00182         TP_ARGS(local)
00183 );
00184 
00185 DEFINE_EVENT(local_only_evt, drv_stop,
00186         TP_PROTO(struct ieee80211_local *local),
00187         TP_ARGS(local)
00188 );
00189 
00190 DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
00191         TP_PROTO(struct ieee80211_local *local,
00192                  struct ieee80211_sub_if_data *sdata),
00193         TP_ARGS(local, sdata)
00194 );
00195 
00196 TRACE_EVENT(drv_change_interface,
00197         TP_PROTO(struct ieee80211_local *local,
00198                  struct ieee80211_sub_if_data *sdata,
00199                  enum nl80211_iftype type, bool p2p),
00200 
00201         TP_ARGS(local, sdata, type, p2p),
00202 
00203         TP_STRUCT__entry(
00204                 LOCAL_ENTRY
00205                 VIF_ENTRY
00206                 __field(u32, new_type)
00207                 __field(bool, new_p2p)
00208         ),
00209 
00210         TP_fast_assign(
00211                 LOCAL_ASSIGN;
00212                 VIF_ASSIGN;
00213                 __entry->new_type = type;
00214                 __entry->new_p2p = p2p;
00215         ),
00216 
00217         TP_printk(
00218                 LOCAL_PR_FMT  VIF_PR_FMT " new type:%d%s",
00219                 LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
00220                 __entry->new_p2p ? "/p2p" : ""
00221         )
00222 );
00223 
00224 DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
00225         TP_PROTO(struct ieee80211_local *local,
00226                  struct ieee80211_sub_if_data *sdata),
00227         TP_ARGS(local, sdata)
00228 );
00229 
00230 TRACE_EVENT(drv_config,
00231         TP_PROTO(struct ieee80211_local *local,
00232                  u32 changed),
00233 
00234         TP_ARGS(local, changed),
00235 
00236         TP_STRUCT__entry(
00237                 LOCAL_ENTRY
00238                 __field(u32, changed)
00239                 __field(u32, flags)
00240                 __field(int, power_level)
00241                 __field(int, dynamic_ps_timeout)
00242                 __field(int, max_sleep_period)
00243                 __field(u16, listen_interval)
00244                 __field(u8, long_frame_max_tx_count)
00245                 __field(u8, short_frame_max_tx_count)
00246                 __field(int, center_freq)
00247                 __field(int, channel_type)
00248                 __field(int, smps)
00249         ),
00250 
00251         TP_fast_assign(
00252                 LOCAL_ASSIGN;
00253                 __entry->changed = changed;
00254                 __entry->flags = local->hw.conf.flags;
00255                 __entry->power_level = local->hw.conf.power_level;
00256                 __entry->dynamic_ps_timeout = local->hw.conf.dynamic_ps_timeout;
00257                 __entry->max_sleep_period = local->hw.conf.max_sleep_period;
00258                 __entry->listen_interval = local->hw.conf.listen_interval;
00259                 __entry->long_frame_max_tx_count = local->hw.conf.long_frame_max_tx_count;
00260                 __entry->short_frame_max_tx_count = local->hw.conf.short_frame_max_tx_count;
00261                 __entry->center_freq = local->hw.conf.channel->center_freq;
00262                 __entry->channel_type = local->hw.conf.channel_type;
00263                 __entry->smps = local->hw.conf.smps_mode;
00264         ),
00265 
00266         TP_printk(
00267                 LOCAL_PR_FMT " ch:%#x freq:%d",
00268                 LOCAL_PR_ARG, __entry->changed, __entry->center_freq
00269         )
00270 );
00271 
00272 TRACE_EVENT(drv_bss_info_changed,
00273         TP_PROTO(struct ieee80211_local *local,
00274                  struct ieee80211_sub_if_data *sdata,
00275                  struct ieee80211_bss_conf *info,
00276                  u32 changed),
00277 
00278         TP_ARGS(local, sdata, info, changed),
00279 
00280         TP_STRUCT__entry(
00281                 LOCAL_ENTRY
00282                 VIF_ENTRY
00283                 __field(bool, assoc)
00284                 __field(u16, aid)
00285                 __field(bool, cts)
00286                 __field(bool, shortpre)
00287                 __field(bool, shortslot)
00288                 __field(u8, dtimper)
00289                 __field(u16, bcnint)
00290                 __field(u16, assoc_cap)
00291                 __field(u64, timestamp)
00292                 __field(u32, basic_rates)
00293                 __field(u32, changed)
00294                 __field(bool, enable_beacon)
00295                 __field(u16, ht_operation_mode)
00296         ),
00297 
00298         TP_fast_assign(
00299                 LOCAL_ASSIGN;
00300                 VIF_ASSIGN;
00301                 __entry->changed = changed;
00302                 __entry->aid = info->aid;
00303                 __entry->assoc = info->assoc;
00304                 __entry->shortpre = info->use_short_preamble;
00305                 __entry->cts = info->use_cts_prot;
00306                 __entry->shortslot = info->use_short_slot;
00307                 __entry->dtimper = info->dtim_period;
00308                 __entry->bcnint = info->beacon_int;
00309                 __entry->assoc_cap = info->assoc_capability;
00310                 __entry->timestamp = info->timestamp;
00311                 __entry->basic_rates = info->basic_rates;
00312                 __entry->enable_beacon = info->enable_beacon;
00313                 __entry->ht_operation_mode = info->ht_operation_mode;
00314         ),
00315 
00316         TP_printk(
00317                 LOCAL_PR_FMT  VIF_PR_FMT " changed:%#x",
00318                 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
00319         )
00320 );
00321 
00322 DECLARE_EVENT_CLASS(tx_sync_evt,
00323         TP_PROTO(struct ieee80211_local *local,
00324                  struct ieee80211_sub_if_data *sdata,
00325                  const u8 *bssid,
00326                  enum ieee80211_tx_sync_type type),
00327         TP_ARGS(local, sdata, bssid, type),
00328 
00329         TP_STRUCT__entry(
00330                 LOCAL_ENTRY
00331                 VIF_ENTRY
00332                 __array(char, bssid, ETH_ALEN)
00333                 __field(u32, sync_type)
00334         ),
00335 
00336         TP_fast_assign(
00337                 LOCAL_ASSIGN;
00338                 VIF_ASSIGN;
00339                 memcpy(__entry->bssid, bssid, ETH_ALEN);
00340                 __entry->sync_type = type;
00341         ),
00342 
00343         TP_printk(
00344                 LOCAL_PR_FMT  VIF_PR_FMT " bssid:%pM type:%d",
00345                 LOCAL_PR_ARG, VIF_PR_ARG, __entry->bssid, __entry->sync_type
00346         )
00347 );
00348 
00349 DEFINE_EVENT(tx_sync_evt, drv_tx_sync,
00350         TP_PROTO(struct ieee80211_local *local,
00351                  struct ieee80211_sub_if_data *sdata,
00352                  const u8 *bssid,
00353                  enum ieee80211_tx_sync_type type),
00354         TP_ARGS(local, sdata, bssid, type)
00355 );
00356 
00357 DEFINE_EVENT(tx_sync_evt, drv_finish_tx_sync,
00358         TP_PROTO(struct ieee80211_local *local,
00359                  struct ieee80211_sub_if_data *sdata,
00360                  const u8 *bssid,
00361                  enum ieee80211_tx_sync_type type),
00362         TP_ARGS(local, sdata, bssid, type)
00363 );
00364 
00365 TRACE_EVENT(drv_prepare_multicast,
00366         TP_PROTO(struct ieee80211_local *local, int mc_count),
00367 
00368         TP_ARGS(local, mc_count),
00369 
00370         TP_STRUCT__entry(
00371                 LOCAL_ENTRY
00372                 __field(int, mc_count)
00373         ),
00374 
00375         TP_fast_assign(
00376                 LOCAL_ASSIGN;
00377                 __entry->mc_count = mc_count;
00378         ),
00379 
00380         TP_printk(
00381                 LOCAL_PR_FMT " prepare mc (%d)",
00382                 LOCAL_PR_ARG, __entry->mc_count
00383         )
00384 );
00385 
00386 TRACE_EVENT(drv_configure_filter,
00387         TP_PROTO(struct ieee80211_local *local,
00388                  unsigned int changed_flags,
00389                  unsigned int *total_flags,
00390                  u64 multicast),
00391 
00392         TP_ARGS(local, changed_flags, total_flags, multicast),
00393 
00394         TP_STRUCT__entry(
00395                 LOCAL_ENTRY
00396                 __field(unsigned int, changed)
00397                 __field(unsigned int, total)
00398                 __field(u64, multicast)
00399         ),
00400 
00401         TP_fast_assign(
00402                 LOCAL_ASSIGN;
00403                 __entry->changed = changed_flags;
00404                 __entry->total = *total_flags;
00405                 __entry->multicast = multicast;
00406         ),
00407 
00408         TP_printk(
00409                 LOCAL_PR_FMT " changed:%#x total:%#x",
00410                 LOCAL_PR_ARG, __entry->changed, __entry->total
00411         )
00412 );
00413 
00414 TRACE_EVENT(drv_set_tim,
00415         TP_PROTO(struct ieee80211_local *local,
00416                  struct ieee80211_sta *sta, bool set),
00417 
00418         TP_ARGS(local, sta, set),
00419 
00420         TP_STRUCT__entry(
00421                 LOCAL_ENTRY
00422                 STA_ENTRY
00423                 __field(bool, set)
00424         ),
00425 
00426         TP_fast_assign(
00427                 LOCAL_ASSIGN;
00428                 STA_ASSIGN;
00429                 __entry->set = set;
00430         ),
00431 
00432         TP_printk(
00433                 LOCAL_PR_FMT STA_PR_FMT " set:%d",
00434                 LOCAL_PR_ARG, STA_PR_FMT, __entry->set
00435         )
00436 );
00437 
00438 TRACE_EVENT(drv_set_key,
00439         TP_PROTO(struct ieee80211_local *local,
00440                  enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
00441                  struct ieee80211_sta *sta,
00442                  struct ieee80211_key_conf *key),
00443 
00444         TP_ARGS(local, cmd, sdata, sta, key),
00445 
00446         TP_STRUCT__entry(
00447                 LOCAL_ENTRY
00448                 VIF_ENTRY
00449                 STA_ENTRY
00450                 __field(u32, cipher)
00451                 __field(u8, hw_key_idx)
00452                 __field(u8, flags)
00453                 __field(s8, keyidx)
00454         ),
00455 
00456         TP_fast_assign(
00457                 LOCAL_ASSIGN;
00458                 VIF_ASSIGN;
00459                 STA_ASSIGN;
00460                 __entry->cipher = key->cipher;
00461                 __entry->flags = key->flags;
00462                 __entry->keyidx = key->keyidx;
00463                 __entry->hw_key_idx = key->hw_key_idx;
00464         ),
00465 
00466         TP_printk(
00467                 LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT,
00468                 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
00469         )
00470 );
00471 
00472 TRACE_EVENT(drv_update_tkip_key,
00473         TP_PROTO(struct ieee80211_local *local,
00474                  struct ieee80211_sub_if_data *sdata,
00475                  struct ieee80211_key_conf *conf,
00476                  struct ieee80211_sta *sta, u32 iv32),
00477 
00478         TP_ARGS(local, sdata, conf, sta, iv32),
00479 
00480         TP_STRUCT__entry(
00481                 LOCAL_ENTRY
00482                 VIF_ENTRY
00483                 STA_ENTRY
00484                 __field(u32, iv32)
00485         ),
00486 
00487         TP_fast_assign(
00488                 LOCAL_ASSIGN;
00489                 VIF_ASSIGN;
00490                 STA_ASSIGN;
00491                 __entry->iv32 = iv32;
00492         ),
00493 
00494         TP_printk(
00495                 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
00496                 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
00497         )
00498 );
00499 
00500 DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
00501         TP_PROTO(struct ieee80211_local *local,
00502                  struct ieee80211_sub_if_data *sdata),
00503         TP_ARGS(local, sdata)
00504 );
00505 
00506 DEFINE_EVENT(local_sdata_evt, drv_cancel_hw_scan,
00507         TP_PROTO(struct ieee80211_local *local,
00508                  struct ieee80211_sub_if_data *sdata),
00509         TP_ARGS(local, sdata)
00510 );
00511 
00512 DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
00513         TP_PROTO(struct ieee80211_local *local,
00514                  struct ieee80211_sub_if_data *sdata),
00515         TP_ARGS(local, sdata)
00516 );
00517 
00518 DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
00519         TP_PROTO(struct ieee80211_local *local,
00520                  struct ieee80211_sub_if_data *sdata),
00521         TP_ARGS(local, sdata)
00522 );
00523 
00524 DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
00525         TP_PROTO(struct ieee80211_local *local),
00526         TP_ARGS(local)
00527 );
00528 
00529 DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
00530         TP_PROTO(struct ieee80211_local *local),
00531         TP_ARGS(local)
00532 );
00533 
00534 TRACE_EVENT(drv_get_stats,
00535         TP_PROTO(struct ieee80211_local *local,
00536                  struct ieee80211_low_level_stats *stats,
00537                  int ret),
00538 
00539         TP_ARGS(local, stats, ret),
00540 
00541         TP_STRUCT__entry(
00542                 LOCAL_ENTRY
00543                 __field(int, ret)
00544                 __field(unsigned int, ackfail)
00545                 __field(unsigned int, rtsfail)
00546                 __field(unsigned int, fcserr)
00547                 __field(unsigned int, rtssucc)
00548         ),
00549 
00550         TP_fast_assign(
00551                 LOCAL_ASSIGN;
00552                 __entry->ret = ret;
00553                 __entry->ackfail = stats->dot11ACKFailureCount;
00554                 __entry->rtsfail = stats->dot11RTSFailureCount;
00555                 __entry->fcserr = stats->dot11FCSErrorCount;
00556                 __entry->rtssucc = stats->dot11RTSSuccessCount;
00557         ),
00558 
00559         TP_printk(
00560                 LOCAL_PR_FMT " ret:%d",
00561                 LOCAL_PR_ARG, __entry->ret
00562         )
00563 );
00564 
00565 TRACE_EVENT(drv_get_tkip_seq,
00566         TP_PROTO(struct ieee80211_local *local,
00567                  u8 hw_key_idx, u32 *iv32, u16 *iv16),
00568 
00569         TP_ARGS(local, hw_key_idx, iv32, iv16),
00570 
00571         TP_STRUCT__entry(
00572                 LOCAL_ENTRY
00573                 __field(u8, hw_key_idx)
00574                 __field(u32, iv32)
00575                 __field(u16, iv16)
00576         ),
00577 
00578         TP_fast_assign(
00579                 LOCAL_ASSIGN;
00580                 __entry->hw_key_idx = hw_key_idx;
00581                 __entry->iv32 = *iv32;
00582                 __entry->iv16 = *iv16;
00583         ),
00584 
00585         TP_printk(
00586                 LOCAL_PR_FMT, LOCAL_PR_ARG
00587         )
00588 );
00589 
00590 DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
00591         TP_PROTO(struct ieee80211_local *local, u32 value),
00592         TP_ARGS(local, value)
00593 );
00594 
00595 DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
00596         TP_PROTO(struct ieee80211_local *local, u32 value),
00597         TP_ARGS(local, value)
00598 );
00599 
00600 TRACE_EVENT(drv_set_coverage_class,
00601         TP_PROTO(struct ieee80211_local *local, u8 value),
00602 
00603         TP_ARGS(local, value),
00604 
00605         TP_STRUCT__entry(
00606                 LOCAL_ENTRY
00607                 __field(u8, value)
00608         ),
00609 
00610         TP_fast_assign(
00611                 LOCAL_ASSIGN;
00612                 __entry->value = value;
00613         ),
00614 
00615         TP_printk(
00616                 LOCAL_PR_FMT " value:%d",
00617                 LOCAL_PR_ARG, __entry->value
00618         )
00619 );
00620 
00621 TRACE_EVENT(drv_sta_notify,
00622         TP_PROTO(struct ieee80211_local *local,
00623                  struct ieee80211_sub_if_data *sdata,
00624                  enum sta_notify_cmd cmd,
00625                  struct ieee80211_sta *sta),
00626 
00627         TP_ARGS(local, sdata, cmd, sta),
00628 
00629         TP_STRUCT__entry(
00630                 LOCAL_ENTRY
00631                 VIF_ENTRY
00632                 STA_ENTRY
00633                 __field(u32, cmd)
00634         ),
00635 
00636         TP_fast_assign(
00637                 LOCAL_ASSIGN;
00638                 VIF_ASSIGN;
00639                 STA_ASSIGN;
00640                 __entry->cmd = cmd;
00641         ),
00642 
00643         TP_printk(
00644                 LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT " cmd:%d",
00645                 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
00646         )
00647 );
00648 
00649 TRACE_EVENT(drv_sta_add,
00650         TP_PROTO(struct ieee80211_local *local,
00651                  struct ieee80211_sub_if_data *sdata,
00652                  struct ieee80211_sta *sta),
00653 
00654         TP_ARGS(local, sdata, sta),
00655 
00656         TP_STRUCT__entry(
00657                 LOCAL_ENTRY
00658                 VIF_ENTRY
00659                 STA_ENTRY
00660         ),
00661 
00662         TP_fast_assign(
00663                 LOCAL_ASSIGN;
00664                 VIF_ASSIGN;
00665                 STA_ASSIGN;
00666         ),
00667 
00668         TP_printk(
00669                 LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT,
00670                 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
00671         )
00672 );
00673 
00674 TRACE_EVENT(drv_sta_remove,
00675         TP_PROTO(struct ieee80211_local *local,
00676                  struct ieee80211_sub_if_data *sdata,
00677                  struct ieee80211_sta *sta),
00678 
00679         TP_ARGS(local, sdata, sta),
00680 
00681         TP_STRUCT__entry(
00682                 LOCAL_ENTRY
00683                 VIF_ENTRY
00684                 STA_ENTRY
00685         ),
00686 
00687         TP_fast_assign(
00688                 LOCAL_ASSIGN;
00689                 VIF_ASSIGN;
00690                 STA_ASSIGN;
00691         ),
00692 
00693         TP_printk(
00694                 LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT,
00695                 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
00696         )
00697 );
00698 
00699 TRACE_EVENT(drv_conf_tx,
00700         TP_PROTO(struct ieee80211_local *local,
00701                  struct ieee80211_sub_if_data *sdata,
00702                  u16 queue,
00703                  const struct ieee80211_tx_queue_params *params),
00704 
00705         TP_ARGS(local, sdata, queue, params),
00706 
00707         TP_STRUCT__entry(
00708                 LOCAL_ENTRY
00709                 VIF_ENTRY
00710                 __field(u16, queue)
00711                 __field(u16, txop)
00712                 __field(u16, cw_min)
00713                 __field(u16, cw_max)
00714                 __field(u8, aifs)
00715                 __field(bool, uapsd)
00716         ),
00717 
00718         TP_fast_assign(
00719                 LOCAL_ASSIGN;
00720                 VIF_ASSIGN;
00721                 __entry->queue = queue;
00722                 __entry->txop = params->txop;
00723                 __entry->cw_max = params->cw_max;
00724                 __entry->cw_min = params->cw_min;
00725                 __entry->aifs = params->aifs;
00726                 __entry->uapsd = params->uapsd;
00727         ),
00728 
00729         TP_printk(
00730                 LOCAL_PR_FMT  VIF_PR_FMT  " queue:%d",
00731                 LOCAL_PR_ARG, VIF_PR_ARG, __entry->queue
00732         )
00733 );
00734 
00735 DEFINE_EVENT(local_sdata_evt, drv_get_tsf,
00736         TP_PROTO(struct ieee80211_local *local,
00737                  struct ieee80211_sub_if_data *sdata),
00738         TP_ARGS(local, sdata)
00739 );
00740 
00741 TRACE_EVENT(drv_set_tsf,
00742         TP_PROTO(struct ieee80211_local *local,
00743                  struct ieee80211_sub_if_data *sdata,
00744                  u64 tsf),
00745 
00746         TP_ARGS(local, sdata, tsf),
00747 
00748         TP_STRUCT__entry(
00749                 LOCAL_ENTRY
00750                 VIF_ENTRY
00751                 __field(u64, tsf)
00752         ),
00753 
00754         TP_fast_assign(
00755                 LOCAL_ASSIGN;
00756                 VIF_ASSIGN;
00757                 __entry->tsf = tsf;
00758         ),
00759 
00760         TP_printk(
00761                 LOCAL_PR_FMT  VIF_PR_FMT  " tsf:%llu",
00762                 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
00763         )
00764 );
00765 
00766 DEFINE_EVENT(local_sdata_evt, drv_reset_tsf,
00767         TP_PROTO(struct ieee80211_local *local,
00768                  struct ieee80211_sub_if_data *sdata),
00769         TP_ARGS(local, sdata)
00770 );
00771 
00772 DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
00773         TP_PROTO(struct ieee80211_local *local),
00774         TP_ARGS(local)
00775 );
00776 
00777 TRACE_EVENT(drv_ampdu_action,
00778         TP_PROTO(struct ieee80211_local *local,
00779                  struct ieee80211_sub_if_data *sdata,
00780                  enum ieee80211_ampdu_mlme_action action,
00781                  struct ieee80211_sta *sta, u16 tid,
00782                  u16 *ssn, u8 buf_size),
00783 
00784         TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
00785 
00786         TP_STRUCT__entry(
00787                 LOCAL_ENTRY
00788                 STA_ENTRY
00789                 __field(u32, action)
00790                 __field(u16, tid)
00791                 __field(u16, ssn)
00792                 __field(u8, buf_size)
00793                 VIF_ENTRY
00794         ),
00795 
00796         TP_fast_assign(
00797                 LOCAL_ASSIGN;
00798                 VIF_ASSIGN;
00799                 STA_ASSIGN;
00800                 __entry->action = action;
00801                 __entry->tid = tid;
00802                 __entry->ssn = ssn ? *ssn : 0;
00803                 __entry->buf_size = buf_size;
00804         ),
00805 
00806         TP_printk(
00807                 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d",
00808                 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
00809                 __entry->tid, __entry->buf_size
00810         )
00811 );
00812 
00813 TRACE_EVENT(drv_get_survey,
00814         TP_PROTO(struct ieee80211_local *local, int idx,
00815                  struct survey_info *survey),
00816 
00817         TP_ARGS(local, idx, survey),
00818 
00819         TP_STRUCT__entry(
00820                 LOCAL_ENTRY
00821                 __field(int, idx)
00822         ),
00823 
00824         TP_fast_assign(
00825                 LOCAL_ASSIGN;
00826                 __entry->idx = idx;
00827         ),
00828 
00829         TP_printk(
00830                 LOCAL_PR_FMT " idx:%d",
00831                 LOCAL_PR_ARG, __entry->idx
00832         )
00833 );
00834 
00835 TRACE_EVENT(drv_flush,
00836         TP_PROTO(struct ieee80211_local *local, bool drop),
00837 
00838         TP_ARGS(local, drop),
00839 
00840         TP_STRUCT__entry(
00841                 LOCAL_ENTRY
00842                 __field(bool, drop)
00843         ),
00844 
00845         TP_fast_assign(
00846                 LOCAL_ASSIGN;
00847                 __entry->drop = drop;
00848         ),
00849 
00850         TP_printk(
00851                 LOCAL_PR_FMT " drop:%d",
00852                 LOCAL_PR_ARG, __entry->drop
00853         )
00854 );
00855 
00856 TRACE_EVENT(drv_channel_switch,
00857         TP_PROTO(struct ieee80211_local *local,
00858                  struct ieee80211_channel_switch *ch_switch),
00859 
00860         TP_ARGS(local, ch_switch),
00861 
00862         TP_STRUCT__entry(
00863                 LOCAL_ENTRY
00864                 __field(u64, timestamp)
00865                 __field(bool, block_tx)
00866                 __field(u16, freq)
00867                 __field(u8, count)
00868         ),
00869 
00870         TP_fast_assign(
00871                 LOCAL_ASSIGN;
00872                 __entry->timestamp = ch_switch->timestamp;
00873                 __entry->block_tx = ch_switch->block_tx;
00874                 __entry->freq = ch_switch->channel->center_freq;
00875                 __entry->count = ch_switch->count;
00876         ),
00877 
00878         TP_printk(
00879                 LOCAL_PR_FMT " new freq:%u count:%d",
00880                 LOCAL_PR_ARG, __entry->freq, __entry->count
00881         )
00882 );
00883 
00884 TRACE_EVENT(drv_set_antenna,
00885         TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
00886 
00887         TP_ARGS(local, tx_ant, rx_ant, ret),
00888 
00889         TP_STRUCT__entry(
00890                 LOCAL_ENTRY
00891                 __field(u32, tx_ant)
00892                 __field(u32, rx_ant)
00893                 __field(int, ret)
00894         ),
00895 
00896         TP_fast_assign(
00897                 LOCAL_ASSIGN;
00898                 __entry->tx_ant = tx_ant;
00899                 __entry->rx_ant = rx_ant;
00900                 __entry->ret = ret;
00901         ),
00902 
00903         TP_printk(
00904                 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
00905                 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
00906         )
00907 );
00908 
00909 TRACE_EVENT(drv_get_antenna,
00910         TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
00911 
00912         TP_ARGS(local, tx_ant, rx_ant, ret),
00913 
00914         TP_STRUCT__entry(
00915                 LOCAL_ENTRY
00916                 __field(u32, tx_ant)
00917                 __field(u32, rx_ant)
00918                 __field(int, ret)
00919         ),
00920 
00921         TP_fast_assign(
00922                 LOCAL_ASSIGN;
00923                 __entry->tx_ant = tx_ant;
00924                 __entry->rx_ant = rx_ant;
00925                 __entry->ret = ret;
00926         ),
00927 
00928         TP_printk(
00929                 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
00930                 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
00931         )
00932 );
00933 
00934 TRACE_EVENT(drv_remain_on_channel,
00935         TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan,
00936                  enum nl80211_channel_type chantype, unsigned int duration),
00937 
00938         TP_ARGS(local, chan, chantype, duration),
00939 
00940         TP_STRUCT__entry(
00941                 LOCAL_ENTRY
00942                 __field(int, center_freq)
00943                 __field(int, channel_type)
00944                 __field(unsigned int, duration)
00945         ),
00946 
00947         TP_fast_assign(
00948                 LOCAL_ASSIGN;
00949                 __entry->center_freq = chan->center_freq;
00950                 __entry->channel_type = chantype;
00951                 __entry->duration = duration;
00952         ),
00953 
00954         TP_printk(
00955                 LOCAL_PR_FMT " freq:%dMHz duration:%dms",
00956                 LOCAL_PR_ARG, __entry->center_freq, __entry->duration
00957         )
00958 );
00959 
00960 DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
00961         TP_PROTO(struct ieee80211_local *local),
00962         TP_ARGS(local)
00963 );
00964 
00965 TRACE_EVENT(drv_offchannel_tx,
00966         TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb,
00967                  struct ieee80211_channel *chan,
00968                  enum nl80211_channel_type channel_type,
00969                  unsigned int wait),
00970 
00971         TP_ARGS(local, skb, chan, channel_type, wait),
00972 
00973         TP_STRUCT__entry(
00974                 LOCAL_ENTRY
00975                 __field(int, center_freq)
00976                 __field(int, channel_type)
00977                 __field(unsigned int, wait)
00978         ),
00979 
00980         TP_fast_assign(
00981                 LOCAL_ASSIGN;
00982                 __entry->center_freq = chan->center_freq;
00983                 __entry->channel_type = channel_type;
00984                 __entry->wait = wait;
00985         ),
00986 
00987         TP_printk(
00988                 LOCAL_PR_FMT " freq:%dMHz, wait:%dms",
00989                 LOCAL_PR_ARG, __entry->center_freq, __entry->wait
00990         )
00991 );
00992 
00993 TRACE_EVENT(drv_set_ringparam,
00994         TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
00995 
00996         TP_ARGS(local, tx, rx),
00997 
00998         TP_STRUCT__entry(
00999                 LOCAL_ENTRY
01000                 __field(u32, tx)
01001                 __field(u32, rx)
01002         ),
01003 
01004         TP_fast_assign(
01005                 LOCAL_ASSIGN;
01006                 __entry->tx = tx;
01007                 __entry->rx = rx;
01008         ),
01009 
01010         TP_printk(
01011                 LOCAL_PR_FMT " tx:%d rx %d",
01012                 LOCAL_PR_ARG, __entry->tx, __entry->rx
01013         )
01014 );
01015 
01016 TRACE_EVENT(drv_get_ringparam,
01017         TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
01018                  u32 *rx, u32 *rx_max),
01019 
01020         TP_ARGS(local, tx, tx_max, rx, rx_max),
01021 
01022         TP_STRUCT__entry(
01023                 LOCAL_ENTRY
01024                 __field(u32, tx)
01025                 __field(u32, tx_max)
01026                 __field(u32, rx)
01027                 __field(u32, rx_max)
01028         ),
01029 
01030         TP_fast_assign(
01031                 LOCAL_ASSIGN;
01032                 __entry->tx = *tx;
01033                 __entry->tx_max = *tx_max;
01034                 __entry->rx = *rx;
01035                 __entry->rx_max = *rx_max;
01036         ),
01037 
01038         TP_printk(
01039                 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
01040                 LOCAL_PR_ARG,
01041                 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
01042         )
01043 );
01044 
01045 DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
01046         TP_PROTO(struct ieee80211_local *local),
01047         TP_ARGS(local)
01048 );
01049 
01050 DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
01051         TP_PROTO(struct ieee80211_local *local),
01052         TP_ARGS(local)
01053 );
01054 
01055 TRACE_EVENT(drv_set_bitrate_mask,
01056         TP_PROTO(struct ieee80211_local *local,
01057                  struct ieee80211_sub_if_data *sdata,
01058                  const struct cfg80211_bitrate_mask *mask),
01059 
01060         TP_ARGS(local, sdata, mask),
01061 
01062         TP_STRUCT__entry(
01063                 LOCAL_ENTRY
01064                 VIF_ENTRY
01065                 __field(u32, legacy_2g)
01066                 __field(u32, legacy_5g)
01067         ),
01068 
01069         TP_fast_assign(
01070                 LOCAL_ASSIGN;
01071                 VIF_ASSIGN;
01072                 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
01073                 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
01074         ),
01075 
01076         TP_printk(
01077                 LOCAL_PR_FMT  VIF_PR_FMT " 2G Mask:0x%x 5G Mask:0x%x",
01078                 LOCAL_PR_ARG, VIF_PR_ARG, __entry->legacy_2g, __entry->legacy_5g
01079         )
01080 );
01081 
01082 TRACE_EVENT(drv_set_rekey_data,
01083         TP_PROTO(struct ieee80211_local *local,
01084                  struct ieee80211_sub_if_data *sdata,
01085                  struct cfg80211_gtk_rekey_data *data),
01086 
01087         TP_ARGS(local, sdata, data),
01088 
01089         TP_STRUCT__entry(
01090                 LOCAL_ENTRY
01091                 VIF_ENTRY
01092                 __array(u8, kek, NL80211_KEK_LEN)
01093                 __array(u8, kck, NL80211_KCK_LEN)
01094                 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
01095         ),
01096 
01097         TP_fast_assign(
01098                 LOCAL_ASSIGN;
01099                 VIF_ASSIGN;
01100                 memcpy(__entry->kek, data->kek, NL80211_KEK_LEN);
01101                 memcpy(__entry->kck, data->kck, NL80211_KCK_LEN);
01102                 memcpy(__entry->replay_ctr, data->replay_ctr,
01103                        NL80211_REPLAY_CTR_LEN);
01104         ),
01105 
01106         TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
01107                   LOCAL_PR_ARG, VIF_PR_ARG)
01108 );
01109 
01110 TRACE_EVENT(drv_rssi_callback,
01111         TP_PROTO(struct ieee80211_local *local,
01112                  enum ieee80211_rssi_event rssi_event),
01113 
01114         TP_ARGS(local, rssi_event),
01115 
01116         TP_STRUCT__entry(
01117                 LOCAL_ENTRY
01118                 __field(u32, rssi_event)
01119         ),
01120 
01121         TP_fast_assign(
01122                 LOCAL_ASSIGN;
01123                 __entry->rssi_event = rssi_event;
01124         ),
01125 
01126         TP_printk(
01127                 LOCAL_PR_FMT " rssi_event:%d",
01128                 LOCAL_PR_ARG, __entry->rssi_event
01129         )
01130 );
01131 
01132 DECLARE_EVENT_CLASS(release_evt,
01133         TP_PROTO(struct ieee80211_local *local,
01134                  struct ieee80211_sta *sta,
01135                  u16 tids, int num_frames,
01136                  enum ieee80211_frame_release_type reason,
01137                  bool more_data),
01138 
01139         TP_ARGS(local, sta, tids, num_frames, reason, more_data),
01140 
01141         TP_STRUCT__entry(
01142                 LOCAL_ENTRY
01143                 STA_ENTRY
01144                 __field(u16, tids)
01145                 __field(int, num_frames)
01146                 __field(int, reason)
01147                 __field(bool, more_data)
01148         ),
01149 
01150         TP_fast_assign(
01151                 LOCAL_ASSIGN;
01152                 STA_ASSIGN;
01153                 __entry->tids = tids;
01154                 __entry->num_frames = num_frames;
01155                 __entry->reason = reason;
01156                 __entry->more_data = more_data;
01157         ),
01158 
01159         TP_printk(
01160                 LOCAL_PR_FMT STA_PR_FMT
01161                 " TIDs:0x%.4x frames:%d reason:%d more:%d",
01162                 LOCAL_PR_ARG, STA_PR_ARG, __entry->tids, __entry->num_frames,
01163                 __entry->reason, __entry->more_data
01164         )
01165 );
01166 
01167 DEFINE_EVENT(release_evt, drv_release_buffered_frames,
01168         TP_PROTO(struct ieee80211_local *local,
01169                  struct ieee80211_sta *sta,
01170                  u16 tids, int num_frames,
01171                  enum ieee80211_frame_release_type reason,
01172                  bool more_data),
01173 
01174         TP_ARGS(local, sta, tids, num_frames, reason, more_data)
01175 );
01176 
01177 DEFINE_EVENT(release_evt, drv_allow_buffered_frames,
01178         TP_PROTO(struct ieee80211_local *local,
01179                  struct ieee80211_sta *sta,
01180                  u16 tids, int num_frames,
01181                  enum ieee80211_frame_release_type reason,
01182                  bool more_data),
01183 
01184         TP_ARGS(local, sta, tids, num_frames, reason, more_data)
01185 );
01186 
01187 /*
01188  * Tracing for API calls that drivers call.
01189  */
01190 
01191 TRACE_EVENT(api_start_tx_ba_session,
01192         TP_PROTO(struct ieee80211_sta *sta, u16 tid),
01193 
01194         TP_ARGS(sta, tid),
01195 
01196         TP_STRUCT__entry(
01197                 STA_ENTRY
01198                 __field(u16, tid)
01199         ),
01200 
01201         TP_fast_assign(
01202                 STA_ASSIGN;
01203                 __entry->tid = tid;
01204         ),
01205 
01206         TP_printk(
01207                 STA_PR_FMT " tid:%d",
01208                 STA_PR_ARG, __entry->tid
01209         )
01210 );
01211 
01212 TRACE_EVENT(api_start_tx_ba_cb,
01213         TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
01214 
01215         TP_ARGS(sdata, ra, tid),
01216 
01217         TP_STRUCT__entry(
01218                 VIF_ENTRY
01219                 __array(u8, ra, ETH_ALEN)
01220                 __field(u16, tid)
01221         ),
01222 
01223         TP_fast_assign(
01224                 VIF_ASSIGN;
01225                 memcpy(__entry->ra, ra, ETH_ALEN);
01226                 __entry->tid = tid;
01227         ),
01228 
01229         TP_printk(
01230                 VIF_PR_FMT " ra:%pM tid:%d",
01231                 VIF_PR_ARG, __entry->ra, __entry->tid
01232         )
01233 );
01234 
01235 TRACE_EVENT(api_stop_tx_ba_session,
01236         TP_PROTO(struct ieee80211_sta *sta, u16 tid),
01237 
01238         TP_ARGS(sta, tid),
01239 
01240         TP_STRUCT__entry(
01241                 STA_ENTRY
01242                 __field(u16, tid)
01243         ),
01244 
01245         TP_fast_assign(
01246                 STA_ASSIGN;
01247                 __entry->tid = tid;
01248         ),
01249 
01250         TP_printk(
01251                 STA_PR_FMT " tid:%d",
01252                 STA_PR_ARG, __entry->tid
01253         )
01254 );
01255 
01256 TRACE_EVENT(api_stop_tx_ba_cb,
01257         TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
01258 
01259         TP_ARGS(sdata, ra, tid),
01260 
01261         TP_STRUCT__entry(
01262                 VIF_ENTRY
01263                 __array(u8, ra, ETH_ALEN)
01264                 __field(u16, tid)
01265         ),
01266 
01267         TP_fast_assign(
01268                 VIF_ASSIGN;
01269                 memcpy(__entry->ra, ra, ETH_ALEN);
01270                 __entry->tid = tid;
01271         ),
01272 
01273         TP_printk(
01274                 VIF_PR_FMT " ra:%pM tid:%d",
01275                 VIF_PR_ARG, __entry->ra, __entry->tid
01276         )
01277 );
01278 
01279 DEFINE_EVENT(local_only_evt, api_restart_hw,
01280         TP_PROTO(struct ieee80211_local *local),
01281         TP_ARGS(local)
01282 );
01283 
01284 TRACE_EVENT(api_beacon_loss,
01285         TP_PROTO(struct ieee80211_sub_if_data *sdata),
01286 
01287         TP_ARGS(sdata),
01288 
01289         TP_STRUCT__entry(
01290                 VIF_ENTRY
01291         ),
01292 
01293         TP_fast_assign(
01294                 VIF_ASSIGN;
01295         ),
01296 
01297         TP_printk(
01298                 VIF_PR_FMT,
01299                 VIF_PR_ARG
01300         )
01301 );
01302 
01303 TRACE_EVENT(api_connection_loss,
01304         TP_PROTO(struct ieee80211_sub_if_data *sdata),
01305 
01306         TP_ARGS(sdata),
01307 
01308         TP_STRUCT__entry(
01309                 VIF_ENTRY
01310         ),
01311 
01312         TP_fast_assign(
01313                 VIF_ASSIGN;
01314         ),
01315 
01316         TP_printk(
01317                 VIF_PR_FMT,
01318                 VIF_PR_ARG
01319         )
01320 );
01321 
01322 TRACE_EVENT(api_cqm_rssi_notify,
01323         TP_PROTO(struct ieee80211_sub_if_data *sdata,
01324                  enum nl80211_cqm_rssi_threshold_event rssi_event),
01325 
01326         TP_ARGS(sdata, rssi_event),
01327 
01328         TP_STRUCT__entry(
01329                 VIF_ENTRY
01330                 __field(u32, rssi_event)
01331         ),
01332 
01333         TP_fast_assign(
01334                 VIF_ASSIGN;
01335                 __entry->rssi_event = rssi_event;
01336         ),
01337 
01338         TP_printk(
01339                 VIF_PR_FMT " event:%d",
01340                 VIF_PR_ARG, __entry->rssi_event
01341         )
01342 );
01343 
01344 TRACE_EVENT(api_scan_completed,
01345         TP_PROTO(struct ieee80211_local *local, bool aborted),
01346 
01347         TP_ARGS(local, aborted),
01348 
01349         TP_STRUCT__entry(
01350                 LOCAL_ENTRY
01351                 __field(bool, aborted)
01352         ),
01353 
01354         TP_fast_assign(
01355                 LOCAL_ASSIGN;
01356                 __entry->aborted = aborted;
01357         ),
01358 
01359         TP_printk(
01360                 LOCAL_PR_FMT " aborted:%d",
01361                 LOCAL_PR_ARG, __entry->aborted
01362         )
01363 );
01364 
01365 TRACE_EVENT(api_sched_scan_results,
01366         TP_PROTO(struct ieee80211_local *local),
01367 
01368         TP_ARGS(local),
01369 
01370         TP_STRUCT__entry(
01371                 LOCAL_ENTRY
01372         ),
01373 
01374         TP_fast_assign(
01375                 LOCAL_ASSIGN;
01376         ),
01377 
01378         TP_printk(
01379                 LOCAL_PR_FMT, LOCAL_PR_ARG
01380         )
01381 );
01382 
01383 TRACE_EVENT(api_sched_scan_stopped,
01384         TP_PROTO(struct ieee80211_local *local),
01385 
01386         TP_ARGS(local),
01387 
01388         TP_STRUCT__entry(
01389                 LOCAL_ENTRY
01390         ),
01391 
01392         TP_fast_assign(
01393                 LOCAL_ASSIGN;
01394         ),
01395 
01396         TP_printk(
01397                 LOCAL_PR_FMT, LOCAL_PR_ARG
01398         )
01399 );
01400 
01401 TRACE_EVENT(api_sta_block_awake,
01402         TP_PROTO(struct ieee80211_local *local,
01403                  struct ieee80211_sta *sta, bool block),
01404 
01405         TP_ARGS(local, sta, block),
01406 
01407         TP_STRUCT__entry(
01408                 LOCAL_ENTRY
01409                 STA_ENTRY
01410                 __field(bool, block)
01411         ),
01412 
01413         TP_fast_assign(
01414                 LOCAL_ASSIGN;
01415                 STA_ASSIGN;
01416                 __entry->block = block;
01417         ),
01418 
01419         TP_printk(
01420                 LOCAL_PR_FMT STA_PR_FMT " block:%d",
01421                 LOCAL_PR_ARG, STA_PR_FMT, __entry->block
01422         )
01423 );
01424 
01425 TRACE_EVENT(api_chswitch_done,
01426         TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
01427 
01428         TP_ARGS(sdata, success),
01429 
01430         TP_STRUCT__entry(
01431                 VIF_ENTRY
01432                 __field(bool, success)
01433         ),
01434 
01435         TP_fast_assign(
01436                 VIF_ASSIGN;
01437                 __entry->success = success;
01438         ),
01439 
01440         TP_printk(
01441                 VIF_PR_FMT " success=%d",
01442                 VIF_PR_ARG, __entry->success
01443         )
01444 );
01445 
01446 DEFINE_EVENT(local_only_evt, api_ready_on_channel,
01447         TP_PROTO(struct ieee80211_local *local),
01448         TP_ARGS(local)
01449 );
01450 
01451 DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
01452         TP_PROTO(struct ieee80211_local *local),
01453         TP_ARGS(local)
01454 );
01455 
01456 TRACE_EVENT(api_gtk_rekey_notify,
01457         TP_PROTO(struct ieee80211_sub_if_data *sdata,
01458                  const u8 *bssid, const u8 *replay_ctr),
01459 
01460         TP_ARGS(sdata, bssid, replay_ctr),
01461 
01462         TP_STRUCT__entry(
01463                 VIF_ENTRY
01464                 __array(u8, bssid, ETH_ALEN)
01465                 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
01466         ),
01467 
01468         TP_fast_assign(
01469                 VIF_ASSIGN;
01470                 memcpy(__entry->bssid, bssid, ETH_ALEN);
01471                 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
01472         ),
01473 
01474         TP_printk(VIF_PR_FMT, VIF_PR_ARG)
01475 );
01476 
01477 TRACE_EVENT(api_enable_rssi_reports,
01478         TP_PROTO(struct ieee80211_sub_if_data *sdata,
01479                  int rssi_min_thold, int rssi_max_thold),
01480 
01481         TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
01482 
01483         TP_STRUCT__entry(
01484                 VIF_ENTRY
01485                 __field(int, rssi_min_thold)
01486                 __field(int, rssi_max_thold)
01487         ),
01488 
01489         TP_fast_assign(
01490                 VIF_ASSIGN;
01491                 __entry->rssi_min_thold = rssi_min_thold;
01492                 __entry->rssi_max_thold = rssi_max_thold;
01493         ),
01494 
01495         TP_printk(
01496                 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
01497                 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
01498         )
01499 );
01500 
01501 TRACE_EVENT(api_eosp,
01502         TP_PROTO(struct ieee80211_local *local,
01503                  struct ieee80211_sta *sta),
01504 
01505         TP_ARGS(local, sta),
01506 
01507         TP_STRUCT__entry(
01508                 LOCAL_ENTRY
01509                 STA_ENTRY
01510         ),
01511 
01512         TP_fast_assign(
01513                 LOCAL_ASSIGN;
01514                 STA_ASSIGN;
01515         ),
01516 
01517         TP_printk(
01518                 LOCAL_PR_FMT STA_PR_FMT,
01519                 LOCAL_PR_ARG, STA_PR_FMT
01520         )
01521 );
01522 
01523 /*
01524  * Tracing for internal functions
01525  * (which may also be called in response to driver calls)
01526  */
01527 
01528 TRACE_EVENT(wake_queue,
01529         TP_PROTO(struct ieee80211_local *local, u16 queue,
01530                  enum queue_stop_reason reason),
01531 
01532         TP_ARGS(local, queue, reason),
01533 
01534         TP_STRUCT__entry(
01535                 LOCAL_ENTRY
01536                 __field(u16, queue)
01537                 __field(u32, reason)
01538         ),
01539 
01540         TP_fast_assign(
01541                 LOCAL_ASSIGN;
01542                 __entry->queue = queue;
01543                 __entry->reason = reason;
01544         ),
01545 
01546         TP_printk(
01547                 LOCAL_PR_FMT " queue:%d, reason:%d",
01548                 LOCAL_PR_ARG, __entry->queue, __entry->reason
01549         )
01550 );
01551 
01552 TRACE_EVENT(stop_queue,
01553         TP_PROTO(struct ieee80211_local *local, u16 queue,
01554                  enum queue_stop_reason reason),
01555 
01556         TP_ARGS(local, queue, reason),
01557 
01558         TP_STRUCT__entry(
01559                 LOCAL_ENTRY
01560                 __field(u16, queue)
01561                 __field(u32, reason)
01562         ),
01563 
01564         TP_fast_assign(
01565                 LOCAL_ASSIGN;
01566                 __entry->queue = queue;
01567                 __entry->reason = reason;
01568         ),
01569 
01570         TP_printk(
01571                 LOCAL_PR_FMT " queue:%d, reason:%d",
01572                 LOCAL_PR_ARG, __entry->queue, __entry->reason
01573         )
01574 );
01575 #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
01576 
01577 #undef TRACE_INCLUDE_PATH
01578 #define TRACE_INCLUDE_PATH .
01579 #undef TRACE_INCLUDE_FILE
01580 #define TRACE_INCLUDE_FILE driver-trace
01581 #include <trace/define_trace.h>


ros_rt_wmp
Author(s): Danilo Tardioli, dantard@unizar.es
autogenerated on Fri Jan 3 2014 12:07:54