1 /******************************************************************************
3 * Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18 * The full GNU General Public License is included in this distribution in the
19 * file called LICENSE.
21 * Contact Information:
22 * Intel Linux Wireless <ilw@linux.intel.com>
23 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
25 *****************************************************************************/
27 #if !defined(__IWLWIFI_DEVICE_TRACE_DATA) || defined(TRACE_HEADER_MULTI_READ)
28 #define __IWLWIFI_DEVICE_TRACE_DATA
30 #include <linux/tracepoint.h>
33 #define TRACE_SYSTEM iwlwifi_data
35 TRACE_EVENT(iwlwifi_dev_tx_data
,
36 TP_PROTO(const struct device
*dev
,
38 u8 hdr_len
, size_t data_len
),
39 TP_ARGS(dev
, skb
, hdr_len
, data_len
),
43 __dynamic_array(u8
, data
, iwl_trace_data(skb
) ? data_len
: 0)
47 if (iwl_trace_data(skb
))
48 skb_copy_bits(skb
, hdr_len
,
49 __get_dynamic_array(data
), data_len
);
51 TP_printk("[%s] TX frame data", __get_str(dev
))
54 TRACE_EVENT(iwlwifi_dev_rx_data
,
55 TP_PROTO(const struct device
*dev
,
56 const struct iwl_trans
*trans
,
57 void *rxbuf
, size_t len
),
58 TP_ARGS(dev
, trans
, rxbuf
, len
),
62 __dynamic_array(u8
, data
,
63 len
- iwl_rx_trace_len(trans
, rxbuf
, len
))
66 size_t offs
= iwl_rx_trace_len(trans
, rxbuf
, len
);
69 memcpy(__get_dynamic_array(data
),
70 ((u8
*)rxbuf
) + offs
, len
- offs
);
72 TP_printk("[%s] RX frame data", __get_str(dev
))
74 #endif /* __IWLWIFI_DEVICE_TRACE_DATA */
76 #undef TRACE_INCLUDE_PATH
77 #define TRACE_INCLUDE_PATH .
78 #undef TRACE_INCLUDE_FILE
79 #define TRACE_INCLUDE_FILE iwl-devtrace-data
80 #include <trace/define_trace.h>