forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h
....@@ -1,23 +1,9 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /******************************************************************************
23 *
34 * Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
4
- * Copyright(C) 2016 Intel Deutschland GmbH
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms of version 2 of the GNU General Public License as
8
- * published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful, but WITHOUT
11
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13
- * more details.
14
- *
15
- * You should have received a copy of the GNU General Public License along with
16
- * this program; if not, write to the Free Software Foundation, Inc.,
17
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18
- *
19
- * The full GNU General Public License is included in this distribution in the
20
- * file called LICENSE.
5
+ * Copyright(C) 2016 Intel Deutschland GmbH
6
+ * Copyright(c) 2018 Intel Corporation
217 *
228 * Contact Information:
239 * Intel Linux Wireless <linuxwifi@intel.com>
....@@ -60,16 +46,23 @@
6046 }
6147
6248 static inline size_t iwl_rx_trace_len(const struct iwl_trans *trans,
63
- void *rxbuf, size_t len)
49
+ void *rxbuf, size_t len,
50
+ size_t *out_hdr_offset)
6451 {
6552 struct iwl_cmd_header *cmd = (void *)((u8 *)rxbuf + sizeof(__le32));
66
- struct ieee80211_hdr *hdr;
53
+ struct ieee80211_hdr *hdr = NULL;
54
+ size_t hdr_offset;
6755
6856 if (cmd->cmd != trans->rx_mpdu_cmd)
6957 return len;
7058
71
- hdr = (void *)((u8 *)cmd + sizeof(struct iwl_cmd_header) +
72
- trans->rx_mpdu_cmd_hdr_size);
59
+ hdr_offset = sizeof(struct iwl_cmd_header) +
60
+ trans->rx_mpdu_cmd_hdr_size;
61
+
62
+ if (out_hdr_offset)
63
+ *out_hdr_offset = hdr_offset;
64
+
65
+ hdr = (void *)((u8 *)cmd + hdr_offset);
7366 if (!ieee80211_is_data(hdr->frame_control))
7467 return len;
7568 /* maybe try to identify EAPOL frames? */
....@@ -82,7 +75,6 @@
8275
8376 #include <linux/tracepoint.h>
8477 #include <linux/device.h>
85
-#include "iwl-trans.h"
8678
8779
8880 #if !defined(CONFIG_IWLWIFI_DEVICE_TRACING) || defined(__CHECKER__)