net:wireless:Support eswin usb wifi ECR6600U
[platform/kernel/linux-starfive.git] / drivers / net / wireless / eswin / ecrnx_debug.c
1 /**
2  ****************************************************************************************
3  *
4  * @file ecrnx_debug.c
5  *
6  * @brief ecrnx driver debug functions;
7  *
8  * Copyright (C) ESWIN 2015-2020
9  *
10  ****************************************************************************************
11  */
12 #include <stdarg.h>
13 #include <linux/init.h>
14 #include "ecrnx_defs.h"
15 #include "eswin_utils.h"
16
17 #ifdef CONFIG_ECRNX_DBG_LEVEL
18 int ecrnx_dbg_level = CONFIG_ECRNX_DBG_LEVEL; //defined in the 6600u_feature file
19 #else
20 int ecrnx_dbg_level = DRV_DBG_TYPE_NONE;
21 #endif
22
23 LOG_CTL_ST log_ctl={
24     .level = 2,
25     .dir = 0,
26 };
27
28 #ifndef CONFIG_ECRNX_DEBUGFS_CUSTOM
29 int ecrnx_fw_log_level_set(u32 level, u32 dir)
30 {
31     uint32_t dbg_info[3] = {0};
32
33     dbg_info[0] = 0x01; //SLAVE_LOG_LEVEL
34     dbg_info[1] = level;
35     dbg_info[2] = dir;
36
37     ECRNX_PRINT("%s: fstype:%d, level:%d, dir:%d \n", __func__, dbg_info[0], dbg_info[1], dbg_info[2]);
38     ECRNX_PRINT("info_len:%d \n", sizeof(dbg_info));
39     return host_send(dbg_info, sizeof(dbg_info), TX_FLAG_MSG_DEBUGFS_IE);
40 }
41
42 #endif
43
44 // #endif
45
46