1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /******************************************************************************
4 * Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
5 * Copyright(c) 2015 Intel Deutschland GmbH
6 * Copyright(c) 2018 - 2019, 2023-2024 Intel Corporation
7 *****************************************************************************/
9 #if !defined(__IWLWIFI_DEVICE_TRACE_DATA) || defined(TRACE_HEADER_MULTI_READ)
10 #define __IWLWIFI_DEVICE_TRACE_DATA
12 #include <linux/tracepoint.h>
15 #define TRACE_SYSTEM iwlwifi_data
17 TRACE_EVENT(iwlwifi_dev_tx_tb
,
18 TP_PROTO(const struct device
*dev
, struct sk_buff
*skb
,
19 u8
*data_src
, dma_addr_t phys
, size_t data_len
),
20 TP_ARGS(dev
, skb
, data_src
, phys
, data_len
),
25 __dynamic_array(u8
, data
,
26 iwl_trace_data(skb
) ? data_len
: 0)
31 if (__get_dynamic_array_len(data
))
32 memcpy(__get_dynamic_array(data
), data_src
, data_len
);
34 TP_printk("[%s] TX frame data", __get_str(dev
))
37 TRACE_EVENT(iwlwifi_dev_rx_data
,
38 TP_PROTO(const struct device
*dev
,
39 void *rxbuf
, size_t len
, size_t start
),
40 TP_ARGS(dev
, rxbuf
, len
, start
),
43 __dynamic_array(u8
, data
, len
- start
)
48 memcpy(__get_dynamic_array(data
),
49 ((u8
*)rxbuf
) + start
, len
- start
);
51 TP_printk("[%s] RX frame data", __get_str(dev
))
53 #endif /* __IWLWIFI_DEVICE_TRACE_DATA */
55 #undef TRACE_INCLUDE_PATH
56 #define TRACE_INCLUDE_PATH .
57 #undef TRACE_INCLUDE_FILE
58 #define TRACE_INCLUDE_FILE iwl-devtrace-data
59 #include <trace/define_trace.h>