Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix debug flag #97

Open
rom-dim opened this issue Jul 9, 2020 · 1 comment
Open

Fix debug flag #97

rom-dim opened this issue Jul 9, 2020 · 1 comment

Comments

@rom-dim
Copy link

rom-dim commented Jul 9, 2020

Hello,

please remove debug output as default parameter. As second part of patch small fix: if debug is disabled function wilc_debugfs_init and wilc_debugfs_remove are not available in wilc_wfi_cfgoperations.

Best Regards


diff --git a/wilc/Makefile b/wilc/Makefile
index 7eb8cf0..5891dfc 100644
--- a/wilc/Makefile
+++ b/wilc/Makefile
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
-ccflags-y += -I$(src)/ -DWILC_ASIC_A0 -DWILC_DEBUGFS
+ccflags-y += -I$(src)/ -DWILC_ASIC_A0
 
 wilc-objs := wilc_wfi_cfgoperations.o wilc_netdev.o wilc_mon.o \
 			wilc_hif.o wilc_wlan_cfg.o wilc_debugfs.o \
diff --git a/wilc/wilc_wfi_cfgoperations.c b/wilc/wilc_wfi_cfgoperations.c
index 4553637..94c197d 100644
--- a/wilc/wilc_wfi_cfgoperations.c
+++ b/wilc/wilc_wfi_cfgoperations.c
@@ -2390,8 +2390,9 @@ int wilc_cfg80211_init(struct wilc **wilc, struct device *dev, int io_type,
 	ret = cfg_init(wl);
 	if (ret)
 		goto free_wl;
-
+#if defined(WILC_DEBUGFS)
 	wilc_debugfs_init();
+#endif    
 	*wilc = wl;
 	wl->io_type = io_type;
 	wl->hif_func = ops;
@@ -2419,7 +2420,9 @@ int wilc_cfg80211_init(struct wilc **wilc, struct device *dev, int io_type,
 free_wq:
 	destroy_workqueue(wl->hif_workqueue);
 free_debug_fs:
+#if defined(WILC_DEBUGFS)
 	wilc_debugfs_remove();
+#endif    
 	cfg_deinit(wl);
 free_wl:
 	wlan_deinit_locks(wl);
@ajaykathat
Copy link
Contributor

yes, correct the use of wilc_debugfs_init()/wilc_debugfs_remove() call should be under the macro definition. However, WILC_DEBUGFS should be defined by default so that enough information is captured during the test. Anyway, if anyone wants to disable WILC_DEBUGFS , it can be done locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants