From a1f72c744de12b47446bcc1afade1264e94a9187 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Sun, 5 Aug 2018 20:40:03 +0200 Subject: [PATCH] Use DEBUG=1 to enable debug messages, DEBUG=2 to enable trace messages --- Makefile | 11 +++++++++++ include/autoconf.h | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3b74c34..fc167d8 100755 --- a/Makefile +++ b/Makefile @@ -196,6 +196,17 @@ ifeq ($(CONFIG_PCI_HCI), y) HCI_NAME = pci endif +ifeq ($(DEBUG), 1) +EXTRA_CFLAGS += -DDBG=1 -DCONFIG_RTW_DEBUG -DCONFIG_DBG_COUNTER -DRTW_LOG_LEVEL=5 +EXTRA_CFLAGS += -DCONFIG_RADIOTAP_WITH_RXDESC +else ifeq ($(DEBUG), 2) +EXTRA_CFLAGS += -DDBG=1 -DCONFIG_RTW_DEBUG -DCONFIG_DBG_COUNTER -DRTW_LOG_LEVEL=5 +EXTRA_CFLAGS += -DCONFIG_DEBUG_RTL871X +EXTRA_CFLAGS += -DCONFIG_RADIOTAP_WITH_RXDESC +else +EXTRA_CFLAGS += -DDBG=0 +endif + ifeq ($(CONFIG_RTL8812A)_$(CONFIG_RTL8821A)_$(CONFIG_RTL8814A), y_y_y) EXTRA_CFLAGS += -DDRV_NAME=\"rtl88xxau\" diff --git a/include/autoconf.h b/include/autoconf.h index bc57c41..927b0be 100644 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -323,7 +323,7 @@ /* * Debug Related Config */ -#define DBG 1 +// #define DBG 1 #define CONFIG_PROC_DEBUG