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 void *data
, size_t data_len
),
39 TP_ARGS(dev
, skb
, data
, data_len
),
43 __dynamic_array(u8
, data
, iwl_trace_data(skb
) ? data_len
: 0)
47 if (iwl_trace_data(skb
))
48 memcpy(__get_dynamic_array(data
), data
, data_len
);
50 TP_printk("[%s] TX frame data", __get_str(dev
))
53 TRACE_EVENT(iwlwifi_dev_rx_data
,
54 TP_PROTO(const struct device
*dev
,
55 const struct iwl_trans
*trans
,
56 void *rxbuf
, size_t len
),
57 TP_ARGS(dev
, trans
, rxbuf
, len
),
61 __dynamic_array(u8
, data
,
62 len
- iwl_rx_trace_len(trans
, rxbuf
, len
))
65 size_t offs
= iwl_rx_trace_len(trans
, rxbuf
, len
);
68 memcpy(__get_dynamic_array(data
),
69 ((u8
*)rxbuf
) + offs
, len
- offs
);
71 TP_printk("[%s] RX frame data", __get_str(dev
))
73 #endif /* __IWLWIFI_DEVICE_TRACE_DATA */
75 #undef TRACE_INCLUDE_PATH
76 #define TRACE_INCLUDE_PATH .
77 #undef TRACE_INCLUDE_FILE
78 #define TRACE_INCLUDE_FILE iwl-devtrace-data
79 #include <trace/define_trace.h>