linux/drivers/net/wireless/mediatek/mt76/mt7996/coredump.h

/* SPDX-License-Identifier: ISC */
/* Copyright (C) 2023 MediaTek Inc. */

#ifndef _COREDUMP_H_
#define _COREDUMP_H_

#include "mt7996.h"

struct mt7996_coredump {} __packed;

struct mt7996_coredump_mem {} __packed;

struct mt7996_mem_hdr {};

struct mt7996_mem_region {};

#ifdef CONFIG_DEV_COREDUMP

const struct mt7996_mem_region *
mt7996_coredump_get_mem_layout(struct mt7996_dev *dev, u32 *num);
struct mt7996_crash_data *mt7996_coredump_new(struct mt7996_dev *dev);
int mt7996_coredump_submit(struct mt7996_dev *dev);
int mt7996_coredump_register(struct mt7996_dev *dev);
void mt7996_coredump_unregister(struct mt7996_dev *dev);

#else /* CONFIG_DEV_COREDUMP */

static inline const struct mt7996_mem_region *
mt7996_coredump_get_mem_layout(struct mt7996_dev *dev, u32 *num)
{
	return NULL;
}

static inline int mt7996_coredump_submit(struct mt7996_dev *dev)
{
	return 0;
}

static inline struct
mt7996_crash_data *mt7996_coredump_new(struct mt7996_dev *dev)
{
	return NULL;
}

static inline int mt7996_coredump_register(struct mt7996_dev *dev)
{
	return 0;
}

static inline void mt7996_coredump_unregister(struct mt7996_dev *dev)
{
}

#endif /* CONFIG_DEV_COREDUMP */

#endif /* _COREDUMP_H_ */