1 #if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
2 #define __MAC80211_DRIVER_TRACE
4 #include <linux/tracepoint.h>
5 #include <net/mac80211.h>
6 #include "ieee80211_i.h"
9 #define TRACE_SYSTEM mac80211
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
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
22 #define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
24 __string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
25 #define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
26 __entry->p2p = sdata->vif.p2p; \
27 __assign_str(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
28 #define VIF_PR_FMT " vif:%s(%d%s)"
29 #define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : ""
32 * Tracing for driver callbacks.
35 DECLARE_EVENT_CLASS(local_only_evt,
36 TP_PROTO(struct ieee80211_local *local),
44 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
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),
55 __array(char, addr, 6)
61 memcpy(__entry->addr, sdata->vif.addr, 6);
65 LOCAL_PR_FMT VIF_PR_FMT " addr:%pM",
66 LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
70 DECLARE_EVENT_CLASS(local_u32_evt,
71 TP_PROTO(struct ieee80211_local *local, u32 value),
72 TP_ARGS(local, value),
81 __entry->value = value;
85 LOCAL_PR_FMT " value:%d",
86 LOCAL_PR_ARG, __entry->value
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),
106 LOCAL_PR_FMT VIF_PR_FMT,
107 LOCAL_PR_ARG, VIF_PR_ARG
111 DEFINE_EVENT(local_only_evt, drv_return_void,
112 TP_PROTO(struct ieee80211_local *local),
116 TRACE_EVENT(drv_return_int,
117 TP_PROTO(struct ieee80211_local *local, int ret),
127 TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
130 TRACE_EVENT(drv_return_bool,
131 TP_PROTO(struct ieee80211_local *local, bool ret),
141 TP_printk(LOCAL_PR_FMT " - %s", LOCAL_PR_ARG, (__entry->ret) ?
145 TRACE_EVENT(drv_return_u64,
146 TP_PROTO(struct ieee80211_local *local, u64 ret),
156 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
159 DEFINE_EVENT(local_only_evt, drv_start,
160 TP_PROTO(struct ieee80211_local *local),
164 DEFINE_EVENT(local_only_evt, drv_suspend,
165 TP_PROTO(struct ieee80211_local *local),
169 DEFINE_EVENT(local_only_evt, drv_resume,
170 TP_PROTO(struct ieee80211_local *local),
174 DEFINE_EVENT(local_only_evt, drv_stop,
175 TP_PROTO(struct ieee80211_local *local),
179 DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
180 TP_PROTO(struct ieee80211_local *local,
181 struct ieee80211_sub_if_data *sdata),
182 TP_ARGS(local, sdata)
185 TRACE_EVENT(drv_change_interface,
186 TP_PROTO(struct ieee80211_local *local,
187 struct ieee80211_sub_if_data *sdata,
188 enum nl80211_iftype type, bool p2p),
190 TP_ARGS(local, sdata, type, p2p),
195 __field(u32, new_type)
196 __field(bool, new_p2p)
202 __entry->new_type = type;
203 __entry->new_p2p = p2p;
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" : ""
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)
219 TRACE_EVENT(drv_config,
220 TP_PROTO(struct ieee80211_local *local,
223 TP_ARGS(local, changed),
227 __field(u32, changed)
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)
242 __entry->changed = changed;
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;
252 __entry->smps = local->hw.conf.smps_mode;
256 LOCAL_PR_FMT " ch:%#x freq:%d",
257 LOCAL_PR_ARG, __entry->changed, __entry->center_freq
261 TRACE_EVENT(drv_bss_info_changed,
262 TP_PROTO(struct ieee80211_local *local,
263 struct ieee80211_sub_if_data *sdata,
264 struct ieee80211_bss_conf *info,
267 TP_ARGS(local, sdata, info, changed),
275 __field(bool, shortpre)
276 __field(bool, shortslot)
279 __field(u16, assoc_cap)
280 __field(u64, timestamp)
281 __field(u32, basic_rates)
282 __field(u32, changed)
283 __field(bool, enable_beacon)
284 __field(u16, ht_operation_mode)
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;
299 __entry->timestamp = info->last_tsf;
300 __entry->basic_rates = info->basic_rates;
301 __entry->enable_beacon = info->enable_beacon;
302 __entry->ht_operation_mode = info->ht_operation_mode;
306 LOCAL_PR_FMT VIF_PR_FMT " changed:%#x",
307 LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
311 TRACE_EVENT(drv_prepare_multicast,
312 TP_PROTO(struct ieee80211_local *local, int mc_count),
314 TP_ARGS(local, mc_count),
318 __field(int, mc_count)
323 __entry->mc_count = mc_count;
327 LOCAL_PR_FMT " prepare mc (%d)",
328 LOCAL_PR_ARG, __entry->mc_count
332 TRACE_EVENT(drv_configure_filter,
333 TP_PROTO(struct ieee80211_local *local,
334 unsigned int changed_flags,
335 unsigned int *total_flags,
338 TP_ARGS(local, changed_flags, total_flags, multicast),
342 __field(unsigned int, changed)
343 __field(unsigned int, total)
344 __field(u64, multicast)
349 __entry->changed = changed_flags;
350 __entry->total = *total_flags;
351 __entry->multicast = multicast;
355 LOCAL_PR_FMT " changed:%#x total:%#x",
356 LOCAL_PR_ARG, __entry->changed, __entry->total
360 TRACE_EVENT(drv_set_tim,
361 TP_PROTO(struct ieee80211_local *local,
362 struct ieee80211_sta *sta, bool set),
364 TP_ARGS(local, sta, set),
379 LOCAL_PR_FMT STA_PR_FMT " set:%d",
380 LOCAL_PR_ARG, STA_PR_FMT, __entry->set
384 TRACE_EVENT(drv_set_key,
385 TP_PROTO(struct ieee80211_local *local,
386 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
387 struct ieee80211_sta *sta,
388 struct ieee80211_key_conf *key),
390 TP_ARGS(local, cmd, sdata, sta, key),
397 __field(u8, hw_key_idx)
406 __entry->cipher = key->cipher;
407 __entry->flags = key->flags;
408 __entry->keyidx = key->keyidx;
409 __entry->hw_key_idx = key->hw_key_idx;
413 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
414 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
418 TRACE_EVENT(drv_update_tkip_key,
419 TP_PROTO(struct ieee80211_local *local,
420 struct ieee80211_sub_if_data *sdata,
421 struct ieee80211_key_conf *conf,
422 struct ieee80211_sta *sta, u32 iv32),
424 TP_ARGS(local, sdata, conf, sta, iv32),
437 __entry->iv32 = iv32;
441 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
442 LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
446 DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
447 TP_PROTO(struct ieee80211_local *local,
448 struct ieee80211_sub_if_data *sdata),
449 TP_ARGS(local, sdata)
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)
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)
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)
470 DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
471 TP_PROTO(struct ieee80211_local *local),
475 DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
476 TP_PROTO(struct ieee80211_local *local),
480 TRACE_EVENT(drv_get_stats,
481 TP_PROTO(struct ieee80211_local *local,
482 struct ieee80211_low_level_stats *stats,
485 TP_ARGS(local, stats, ret),
490 __field(unsigned int, ackfail)
491 __field(unsigned int, rtsfail)
492 __field(unsigned int, fcserr)
493 __field(unsigned int, rtssucc)
499 __entry->ackfail = stats->dot11ACKFailureCount;
500 __entry->rtsfail = stats->dot11RTSFailureCount;
501 __entry->fcserr = stats->dot11FCSErrorCount;
502 __entry->rtssucc = stats->dot11RTSSuccessCount;
506 LOCAL_PR_FMT " ret:%d",
507 LOCAL_PR_ARG, __entry->ret
511 TRACE_EVENT(drv_get_tkip_seq,
512 TP_PROTO(struct ieee80211_local *local,
513 u8 hw_key_idx, u32 *iv32, u16 *iv16),
515 TP_ARGS(local, hw_key_idx, iv32, iv16),
519 __field(u8, hw_key_idx)
526 __entry->hw_key_idx = hw_key_idx;
527 __entry->iv32 = *iv32;
528 __entry->iv16 = *iv16;
532 LOCAL_PR_FMT, LOCAL_PR_ARG
536 DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
537 TP_PROTO(struct ieee80211_local *local, u32 value),
538 TP_ARGS(local, value)
541 DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
542 TP_PROTO(struct ieee80211_local *local, u32 value),
543 TP_ARGS(local, value)
546 TRACE_EVENT(drv_set_coverage_class,
547 TP_PROTO(struct ieee80211_local *local, u8 value),
549 TP_ARGS(local, value),
558 __entry->value = value;
562 LOCAL_PR_FMT " value:%d",
563 LOCAL_PR_ARG, __entry->value
567 TRACE_EVENT(drv_sta_notify,
568 TP_PROTO(struct ieee80211_local *local,
569 struct ieee80211_sub_if_data *sdata,
570 enum sta_notify_cmd cmd,
571 struct ieee80211_sta *sta),
573 TP_ARGS(local, sdata, cmd, sta),
590 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " cmd:%d",
591 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
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),
602 TP_ARGS(local, sdata, sta, old_state, new_state),
608 __field(u32, old_state)
609 __field(u32, new_state)
616 __entry->old_state = old_state;
617 __entry->new_state = new_state;
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
627 TRACE_EVENT(drv_sta_add,
628 TP_PROTO(struct ieee80211_local *local,
629 struct ieee80211_sub_if_data *sdata,
630 struct ieee80211_sta *sta),
632 TP_ARGS(local, sdata, sta),
647 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
648 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
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),
657 TP_ARGS(local, sdata, sta),
672 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
673 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
677 TRACE_EVENT(drv_conf_tx,
678 TP_PROTO(struct ieee80211_local *local,
679 struct ieee80211_sub_if_data *sdata,
681 const struct ieee80211_tx_queue_params *params),
683 TP_ARGS(local, sdata, queue, params),
699 __entry->queue = queue;
700 __entry->txop = params->txop;
701 __entry->cw_max = params->cw_max;
702 __entry->cw_min = params->cw_min;
703 __entry->aifs = params->aifs;
704 __entry->uapsd = params->uapsd;
708 LOCAL_PR_FMT VIF_PR_FMT " queue:%d",
709 LOCAL_PR_ARG, VIF_PR_ARG, __entry->queue
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)
719 TRACE_EVENT(drv_set_tsf,
720 TP_PROTO(struct ieee80211_local *local,
721 struct ieee80211_sub_if_data *sdata,
724 TP_ARGS(local, sdata, tsf),
739 LOCAL_PR_FMT VIF_PR_FMT " tsf:%llu",
740 LOCAL_PR_ARG, VIF_PR_ARG, (unsigned long long)__entry->tsf
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)
750 DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
751 TP_PROTO(struct ieee80211_local *local),
755 TRACE_EVENT(drv_ampdu_action,
756 TP_PROTO(struct ieee80211_local *local,
757 struct ieee80211_sub_if_data *sdata,
758 enum ieee80211_ampdu_mlme_action action,
759 struct ieee80211_sta *sta, u16 tid,
760 u16 *ssn, u8 buf_size),
762 TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size),
770 __field(u8, buf_size)
778 __entry->action = action;
780 __entry->ssn = ssn ? *ssn : 0;
781 __entry->buf_size = buf_size;
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
791 TRACE_EVENT(drv_get_survey,
792 TP_PROTO(struct ieee80211_local *local, int idx,
793 struct survey_info *survey),
795 TP_ARGS(local, idx, survey),
808 LOCAL_PR_FMT " idx:%d",
809 LOCAL_PR_ARG, __entry->idx
813 TRACE_EVENT(drv_flush,
814 TP_PROTO(struct ieee80211_local *local, bool drop),
816 TP_ARGS(local, drop),
825 __entry->drop = drop;
829 LOCAL_PR_FMT " drop:%d",
830 LOCAL_PR_ARG, __entry->drop
834 TRACE_EVENT(drv_channel_switch,
835 TP_PROTO(struct ieee80211_local *local,
836 struct ieee80211_channel_switch *ch_switch),
838 TP_ARGS(local, ch_switch),
842 __field(u64, timestamp)
843 __field(bool, block_tx)
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;
857 LOCAL_PR_FMT " new freq:%u count:%d",
858 LOCAL_PR_ARG, __entry->freq, __entry->count
862 TRACE_EVENT(drv_set_antenna,
863 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
865 TP_ARGS(local, tx_ant, rx_ant, ret),
876 __entry->tx_ant = tx_ant;
877 __entry->rx_ant = rx_ant;
882 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
883 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
887 TRACE_EVENT(drv_get_antenna,
888 TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
890 TP_ARGS(local, tx_ant, rx_ant, ret),
901 __entry->tx_ant = tx_ant;
902 __entry->rx_ant = rx_ant;
907 LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
908 LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
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),
916 TP_ARGS(local, chan, chantype, duration),
920 __field(int, center_freq)
921 __field(int, channel_type)
922 __field(unsigned int, duration)
927 __entry->center_freq = chan->center_freq;
928 __entry->channel_type = chantype;
929 __entry->duration = duration;
933 LOCAL_PR_FMT " freq:%dMHz duration:%dms",
934 LOCAL_PR_ARG, __entry->center_freq, __entry->duration
938 DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
939 TP_PROTO(struct ieee80211_local *local),
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,
949 TP_ARGS(local, skb, chan, channel_type, wait),
953 __field(int, center_freq)
954 __field(int, channel_type)
955 __field(unsigned int, wait)
960 __entry->center_freq = chan->center_freq;
961 __entry->channel_type = channel_type;
962 __entry->wait = wait;
966 LOCAL_PR_FMT " freq:%dMHz, wait:%dms",
967 LOCAL_PR_ARG, __entry->center_freq, __entry->wait
971 TRACE_EVENT(drv_set_ringparam,
972 TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
974 TP_ARGS(local, tx, rx),
989 LOCAL_PR_FMT " tx:%d rx %d",
990 LOCAL_PR_ARG, __entry->tx, __entry->rx
994 TRACE_EVENT(drv_get_ringparam,
995 TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
996 u32 *rx, u32 *rx_max),
998 TP_ARGS(local, tx, tx_max, rx, rx_max),
1003 __field(u32, tx_max)
1005 __field(u32, rx_max)
1011 __entry->tx_max = *tx_max;
1013 __entry->rx_max = *rx_max;
1017 LOCAL_PR_FMT " tx:%d tx_max %d rx %d rx_max %d",
1019 __entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
1023 DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
1024 TP_PROTO(struct ieee80211_local *local),
1028 DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
1029 TP_PROTO(struct ieee80211_local *local),
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),
1038 TP_ARGS(local, sdata, mask),
1043 __field(u32, legacy_2g)
1044 __field(u32, legacy_5g)
1050 __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1051 __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
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
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),
1065 TP_ARGS(local, sdata, data),
1070 __array(u8, kek, NL80211_KEK_LEN)
1071 __array(u8, kck, NL80211_KCK_LEN)
1072 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
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);
1084 TP_printk(LOCAL_PR_FMT VIF_PR_FMT,
1085 LOCAL_PR_ARG, VIF_PR_ARG)
1088 TRACE_EVENT(drv_rssi_callback,
1089 TP_PROTO(struct ieee80211_local *local,
1090 enum ieee80211_rssi_event rssi_event),
1092 TP_ARGS(local, rssi_event),
1096 __field(u32, rssi_event)
1101 __entry->rssi_event = rssi_event;
1105 LOCAL_PR_FMT " rssi_event:%d",
1106 LOCAL_PR_ARG, __entry->rssi_event
1110 DECLARE_EVENT_CLASS(release_evt,
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,
1117 TP_ARGS(local, sta, tids, num_frames, reason, more_data),
1123 __field(int, num_frames)
1124 __field(int, reason)
1125 __field(bool, more_data)
1131 __entry->tids = tids;
1132 __entry->num_frames = num_frames;
1133 __entry->reason = reason;
1134 __entry->more_data = more_data;
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
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,
1152 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
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,
1162 TP_ARGS(local, sta, tids, num_frames, reason, more_data)
1166 * Tracing for API calls that drivers call.
1169 TRACE_EVENT(api_start_tx_ba_session,
1170 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1185 STA_PR_FMT " tid:%d",
1186 STA_PR_ARG, __entry->tid
1190 TRACE_EVENT(api_start_tx_ba_cb,
1191 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1193 TP_ARGS(sdata, ra, tid),
1197 __array(u8, ra, ETH_ALEN)
1203 memcpy(__entry->ra, ra, ETH_ALEN);
1208 VIF_PR_FMT " ra:%pM tid:%d",
1209 VIF_PR_ARG, __entry->ra, __entry->tid
1213 TRACE_EVENT(api_stop_tx_ba_session,
1214 TP_PROTO(struct ieee80211_sta *sta, u16 tid),
1229 STA_PR_FMT " tid:%d",
1230 STA_PR_ARG, __entry->tid
1234 TRACE_EVENT(api_stop_tx_ba_cb,
1235 TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
1237 TP_ARGS(sdata, ra, tid),
1241 __array(u8, ra, ETH_ALEN)
1247 memcpy(__entry->ra, ra, ETH_ALEN);
1252 VIF_PR_FMT " ra:%pM tid:%d",
1253 VIF_PR_ARG, __entry->ra, __entry->tid
1257 DEFINE_EVENT(local_only_evt, api_restart_hw,
1258 TP_PROTO(struct ieee80211_local *local),
1262 TRACE_EVENT(api_beacon_loss,
1263 TP_PROTO(struct ieee80211_sub_if_data *sdata),
1281 TRACE_EVENT(api_connection_loss,
1282 TP_PROTO(struct ieee80211_sub_if_data *sdata),
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),
1304 TP_ARGS(sdata, rssi_event),
1308 __field(u32, rssi_event)
1313 __entry->rssi_event = rssi_event;
1317 VIF_PR_FMT " event:%d",
1318 VIF_PR_ARG, __entry->rssi_event
1322 TRACE_EVENT(api_scan_completed,
1323 TP_PROTO(struct ieee80211_local *local, bool aborted),
1325 TP_ARGS(local, aborted),
1329 __field(bool, aborted)
1334 __entry->aborted = aborted;
1338 LOCAL_PR_FMT " aborted:%d",
1339 LOCAL_PR_ARG, __entry->aborted
1343 TRACE_EVENT(api_sched_scan_results,
1344 TP_PROTO(struct ieee80211_local *local),
1357 LOCAL_PR_FMT, LOCAL_PR_ARG
1361 TRACE_EVENT(api_sched_scan_stopped,
1362 TP_PROTO(struct ieee80211_local *local),
1375 LOCAL_PR_FMT, LOCAL_PR_ARG
1379 TRACE_EVENT(api_sta_block_awake,
1380 TP_PROTO(struct ieee80211_local *local,
1381 struct ieee80211_sta *sta, bool block),
1383 TP_ARGS(local, sta, block),
1388 __field(bool, block)
1394 __entry->block = block;
1398 LOCAL_PR_FMT STA_PR_FMT " block:%d",
1399 LOCAL_PR_ARG, STA_PR_FMT, __entry->block
1403 TRACE_EVENT(api_chswitch_done,
1404 TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
1406 TP_ARGS(sdata, success),
1410 __field(bool, success)
1415 __entry->success = success;
1419 VIF_PR_FMT " success=%d",
1420 VIF_PR_ARG, __entry->success
1424 DEFINE_EVENT(local_only_evt, api_ready_on_channel,
1425 TP_PROTO(struct ieee80211_local *local),
1429 DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
1430 TP_PROTO(struct ieee80211_local *local),
1434 TRACE_EVENT(api_gtk_rekey_notify,
1435 TP_PROTO(struct ieee80211_sub_if_data *sdata,
1436 const u8 *bssid, const u8 *replay_ctr),
1438 TP_ARGS(sdata, bssid, replay_ctr),
1442 __array(u8, bssid, ETH_ALEN)
1443 __array(u8, replay_ctr, NL80211_REPLAY_CTR_LEN)
1448 memcpy(__entry->bssid, bssid, ETH_ALEN);
1449 memcpy(__entry->replay_ctr, replay_ctr, NL80211_REPLAY_CTR_LEN);
1452 TP_printk(VIF_PR_FMT, VIF_PR_ARG)
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),
1459 TP_ARGS(sdata, rssi_min_thold, rssi_max_thold),
1463 __field(int, rssi_min_thold)
1464 __field(int, rssi_max_thold)
1469 __entry->rssi_min_thold = rssi_min_thold;
1470 __entry->rssi_max_thold = rssi_max_thold;
1474 VIF_PR_FMT " rssi_min_thold =%d, rssi_max_thold = %d",
1475 VIF_PR_ARG, __entry->rssi_min_thold, __entry->rssi_max_thold
1479 TRACE_EVENT(api_eosp,
1480 TP_PROTO(struct ieee80211_local *local,
1481 struct ieee80211_sta *sta),
1483 TP_ARGS(local, sta),
1496 LOCAL_PR_FMT STA_PR_FMT,
1497 LOCAL_PR_ARG, STA_PR_FMT
1502 * Tracing for internal functions
1503 * (which may also be called in response to driver calls)
1506 TRACE_EVENT(wake_queue,
1507 TP_PROTO(struct ieee80211_local *local, u16 queue,
1508 enum queue_stop_reason reason),
1510 TP_ARGS(local, queue, reason),
1515 __field(u32, reason)
1520 __entry->queue = queue;
1521 __entry->reason = reason;
1525 LOCAL_PR_FMT " queue:%d, reason:%d",
1526 LOCAL_PR_ARG, __entry->queue, __entry->reason
1530 TRACE_EVENT(stop_queue,
1531 TP_PROTO(struct ieee80211_local *local, u16 queue,
1532 enum queue_stop_reason reason),
1534 TP_ARGS(local, queue, reason),
1539 __field(u32, reason)
1544 __entry->queue = queue;
1545 __entry->reason = reason;
1549 LOCAL_PR_FMT " queue:%d, reason:%d",
1550 LOCAL_PR_ARG, __entry->queue, __entry->reason
1553 #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
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>