1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright(c) 2021 Intel Corporation
6 #if !defined(CONFIG_IWLWIFI_DEVICE_TRACING)
8 #define trace_iwlmei_sap_cmd(...)
9 #define trace_iwlmei_me_msg(...)
13 #if !defined(__IWLWIFI_DEVICE_TRACE_IWLWIFI_SAP_CMD) || defined(TRACE_HEADER_MULTI_READ)
14 #define __IWLWIFI_DEVICE_TRACE_IWLWIFI_SAP_CMD
16 #include <linux/tracepoint.h>
19 #define TRACE_SYSTEM iwlmei_sap_cmd
23 TRACE_EVENT(iwlmei_sap_cmd
,
24 TP_PROTO(const struct iwl_sap_hdr
*sap_cmd
, bool tx
),
27 __dynamic_array(u8
, cmd
,
28 le16_to_cpu(sap_cmd
->len
) + sizeof(*sap_cmd
))
35 memcpy(__get_dynamic_array(cmd
), sap_cmd
,
36 le16_to_cpu(sap_cmd
->len
) + sizeof(*sap_cmd
));
38 __entry
->type
= le16_to_cpu(sap_cmd
->type
);
39 __entry
->len
= le16_to_cpu(sap_cmd
->len
);
40 __entry
->seq
= le32_to_cpu(sap_cmd
->seq_num
);
42 TP_printk("sap_cmd %s: type %d len %d seq %d", __entry
->tx
? "Tx" : "Rx",
43 __entry
->type
, __entry
->len
, __entry
->seq
)
46 TRACE_EVENT(iwlmei_me_msg
,
47 TP_PROTO(const struct iwl_sap_me_msg_hdr
*hdr
, bool tx
),
55 __entry
->type
= le32_to_cpu(hdr
->type
);
56 __entry
->seq_num
= le32_to_cpu(hdr
->seq_num
);
59 TP_printk("ME message: %s: type %d seq %d", __entry
->tx
? "Tx" : "Rx",
60 __entry
->type
, __entry
->seq_num
)
64 * If you add something here, add a stub in case
65 * !defined(CONFIG_IWLWIFI_DEVICE_TRACING)
68 #endif /* __IWLWIFI_DEVICE_TRACE_IWLWIFI_SAP_CMD */
70 #undef TRACE_INCLUDE_PATH
71 #define TRACE_INCLUDE_PATH .
72 #undef TRACE_INCLUDE_FILE
73 #define TRACE_INCLUDE_FILE trace
74 #include <trace/define_trace.h>
76 #endif /* CONFIG_IWLWIFI_DEVICE_TRACING */