summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/eswin/ecrnx_debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/eswin/ecrnx_debug.c')
-rw-r--r--drivers/net/wireless/eswin/ecrnx_debug.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/drivers/net/wireless/eswin/ecrnx_debug.c b/drivers/net/wireless/eswin/ecrnx_debug.c
new file mode 100644
index 000000000000..d3dcd6183d5c
--- /dev/null
+++ b/drivers/net/wireless/eswin/ecrnx_debug.c
@@ -0,0 +1,46 @@
+/**
+ ****************************************************************************************
+ *
+ * @file ecrnx_debug.c
+ *
+ * @brief ecrnx driver debug functions;
+ *
+ * Copyright (C) ESWIN 2015-2020
+ *
+ ****************************************************************************************
+ */
+#include <stdarg.h>
+#include <linux/init.h>
+#include "ecrnx_defs.h"
+#include "eswin_utils.h"
+
+#ifdef CONFIG_ECRNX_DBG_LEVEL
+int ecrnx_dbg_level = CONFIG_ECRNX_DBG_LEVEL; //defined in the 6600u_feature file
+#else
+int ecrnx_dbg_level = DRV_DBG_TYPE_NONE;
+#endif
+
+LOG_CTL_ST log_ctl={
+ .level = 2,
+ .dir = 0,
+};
+
+#ifndef CONFIG_ECRNX_DEBUGFS_CUSTOM
+int ecrnx_fw_log_level_set(u32 level, u32 dir)
+{
+ uint32_t dbg_info[3] = {0};
+
+ dbg_info[0] = 0x01; //SLAVE_LOG_LEVEL
+ dbg_info[1] = level;
+ dbg_info[2] = dir;
+
+ ECRNX_PRINT("%s: fstype:%d, level:%d, dir:%d \n", __func__, dbg_info[0], dbg_info[1], dbg_info[2]);
+ ECRNX_PRINT("info_len:%d \n", sizeof(dbg_info));
+ return host_send(dbg_info, sizeof(dbg_info), TX_FLAG_MSG_DEBUGFS_IE);
+}
+
+#endif
+
+// #endif
+
+