Search Linux Wireless

[RFC v1 049/256] cl8k: add coredump.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Viktor Barna <viktor.barna@xxxxxxxxxx>

(Part of the split. Please, take a look at the cover letter for more
details).

Signed-off-by: Viktor Barna <viktor.barna@xxxxxxxxxx>
---
 drivers/net/wireless/celeno/cl8k/coredump.h | 76 +++++++++++++++++++++
 1 file changed, 76 insertions(+)
 create mode 100644 drivers/net/wireless/celeno/cl8k/coredump.h

diff --git a/drivers/net/wireless/celeno/cl8k/coredump.h b/drivers/net/wireless/celeno/cl8k/coredump.h
new file mode 100644
index 000000000000..d24f97b8f5de
--- /dev/null
+++ b/drivers/net/wireless/celeno/cl8k/coredump.h
@@ -0,0 +1,76 @@
+/* SPDX-License-Identifier: MIT */
+/* Copyright(c) 2019-2021, Celeno Communications Ltd. */
+
+#ifndef CL_COREDUMP_H
+#define CL_COREDUMP_H
+
+#include "hw.h"
+
+#define CL_COREDUMP_V1 1
+#define CL_COREDUMP_MAGIC_LEN 16
+
+struct cl_coredump {
+       char magic[CL_COREDUMP_MAGIC_LEN];
+       __le32 len;
+
+       /* 28 bits of self sizes + 4 bits of CL_COREDUMP_V* indicators */
+       __le32 self_version;
+
+       /* timings */
+       __le64 trig_tv_sec;
+       __le64 trig_tv_nsec;
+
+       /* dump info */
+       __le32 dump_mask;
+
+       u8 reserved[256];
+
+       /* Consists of multiple NLEV elements */
+       u8 data[];
+} __packed;
+
+/* NLEV - Name-Length-Error-Value element */
+struct cl_nlev {
+       char n[CL_COREDUMP_MAGIC_LEN];
+       __le32 l;
+       __le32 e;
+       u8 v[];
+} __packed;
+
+#ifdef CONFIG_CL_DEBUGFS
+
+int cl_coredump_trigger(struct cl_hw *cl_hw);
+bool cl_coredump_recovery(struct cl_hw *cl_hw, int reason);
+bool cl_coredump_is_scheduled(struct cl_hw *cl_hw);
+void cl_coredump_reset_trace(struct cl_hw *cl_hw);
+void cl_coredump_init(struct cl_hw *cl_hw, struct dentry *dir_drv);
+void cl_coredump_close(struct cl_hw *cl_hw);
+
+#else
+
+static inline int cl_coredump_trigger(struct cl_hw *cl_hw)
+{
+       return 0;
+}
+
+static inline bool cl_coredump_recovery(struct cl_hw *cl_hw, int reason)
+{
+       return false;
+}
+
+static inline bool cl_coredump_is_scheduled(struct cl_hw *cl_hw)
+{
+       return false;
+}
+
+static inline void cl_coredump_reset_trace(struct cl_hw *cl_hw)
+{}
+
+static inline void cl_coredump_init(struct cl_hw *cl_hw, struct dentry *dir_drv)
+{}
+
+static inline void cl_coredump_close(struct cl_hw *cl_hw)
+{}
+#endif /* CONFIG_CL_DEBUGFS */
+
+#endif /* CL_COREDUMP_H */
--
2.30.0

________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any retransmission, dissemination, copying or other use of, or taking of any action in reliance upon this information is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Nothing contained herein shall be deemed as a representation, warranty or a commitment by Celeno. No warranties are expressed or implied, including, but not limited to, any implied warranties of non-infringement, merchantability and fitness for a particular purpose.
________________________________





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux