also this error:
/home/exars/workspace/legatoAF/legato-19.02.0/drivers/wf200/wfx-linux-driver/debug.c: In function ‘get_symbol’:
/home/exars/workspace/legatoAF/legato-19.02.0/drivers/wf200/wfx-linux-driver/debug.c:62:26: error: invalid use of undefined type ‘struct trace_print_flags’
for (i = 0; symbol_array[i].mask != -1; i++) {
debug.c:
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <linux/version.h>
#if (KERNEL_VERSION(4, 17, 0) > LINUX_VERSION_CODE)
#define DEFINE_SHOW_ATTRIBUTE(__name)
static int __name ## _open(struct inode *inode, struct file *file)
{
return single_open(file, __name ## _show, inode->i_private);
}
static const struct file_operations __name ## _fops = {
.owner = THIS_MODULE,
.open = __name ## _open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
}
#endif
#include “debug.h”
#include “wfx.h”
#include “wsm_tx.h”
#include “sta.h”
#define CREATE_TRACE_POINTS
#include “traces.h”
static const struct trace_print_flags wsm_msg_print_map = {
wsm_msg_list,
};
static const struct trace_print_flags wsm_mib_print_map = {
wsm_mib_list,
};
static const struct trace_print_flags wfx_reg_print_map = {
wfx_reg_list,
};
static const struct trace_print_flags wfx_fw_types_print_map = {
{ 0, “ETF” },
{ 1, “WFM” },
{ 2, “WSM” },
{ 3, “HI test” },
{ 4, “Platform test” },
{ -1, NULL }
};
static const char *get_symbol(unsigned long val,
const struct trace_print_flags *symbol_array)
{
int i;
for (i = 0; symbol_array[i].mask != -1; i++) {
if (val == symbol_array[i].mask)
return symbol_array[i].name;
}
return "unknown";
}
const char *get_wsm_name(unsigned long id)
{
return get_symbol(id, wsm_msg_print_map);
}
const char *get_mib_name(unsigned long id)
{
return get_symbol(id, wsm_mib_print_map);
}
const char *get_reg_name(unsigned long id)
{
return get_symbol(id, wfx_reg_print_map);
}
const char *get_fw_type(unsigned long id)
{
return get_symbol(id, wfx_fw_types_print_map);
}