xref: /linux/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.c (revision 06d07429858317ded2db7986113a9e0129cd599b)
1 // SPDX-License-Identifier: GPL-2.0-only
2 /******************************************************************************
3  *
4  * Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
5  * Copyright (C) 2018, 2023 Intel Corporation
6  *****************************************************************************/
7 
8 #include <linux/module.h>
9 
10 /* sparse doesn't like tracepoint macros */
11 #ifndef __CHECKER__
12 #include "iwl-trans.h"
13 
14 #define CREATE_TRACE_POINTS
15 #ifdef CONFIG_CC_IS_GCC
16 #pragma GCC diagnostic ignored "-Wsuggest-attribute=format"
17 #endif
18 #include "iwl-devtrace.h"
19 
20 EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_ucode_event);
21 EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_ucode_cont_event);
22 EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_ucode_wrap_event);
23 #else
24 #include "iwl-devtrace.h"
25 #endif /* __CHECKER__ */
26 
__trace_iwlwifi_dev_rx(struct iwl_trans * trans,void * pkt,size_t len)27 void __trace_iwlwifi_dev_rx(struct iwl_trans *trans, void *pkt, size_t len)
28 {
29 	size_t hdr_offset = 0, trace_len;
30 
31 	trace_len = iwl_rx_trace_len(trans, pkt, len, &hdr_offset);
32 	trace_iwlwifi_dev_rx(trans->dev, pkt, len, trace_len, hdr_offset);
33 
34 	if (trace_len < len)
35 		trace_iwlwifi_dev_rx_data(trans->dev, pkt, len, trace_len);
36 }
37