diff --git a/net/ip/Kconfig.debug b/net/ip/Kconfig.debug index 7bbf4b7c8dd..91ef145984b 100644 --- a/net/ip/Kconfig.debug +++ b/net/ip/Kconfig.debug @@ -93,6 +93,13 @@ config NETWORK_IP_STACK_DEBUG_IPV6_ROUTE help Enables IPv6 route code part to output debug messages +config NETWORK_IP_STACK_DEBUG_15_4_MAC + bool "Debug 802.15.4 MAC layer" + depends on NETWORKING_WITH_15_4 + default n + help + Enables 802.15.4 MAC layer to output debug messages + config NETWORK_IP_STACK_DEBUG_15_4_6LOWPAN_FRAG bool "Debug 802.15.4 6LoWPAN fragmentation" depends on NETWORKING_WITH_15_4 diff --git a/net/ip/contiki/mac/csma.c b/net/ip/contiki/mac/csma.c index 498281185a0..e439b28bfbe 100644 --- a/net/ip/contiki/mac/csma.c +++ b/net/ip/contiki/mac/csma.c @@ -65,7 +65,9 @@ void uip_log(char *msg); #define UIP_LOG(m) #endif -#define DEBUG 0 +#ifdef CONFIG_NETWORK_IP_STACK_DEBUG_15_4_MAC +#define DEBUG 1 +#endif #include "contiki/ip/uip-debug.h" #if UIP_LOGGING diff --git a/net/ip/contiki/mac/handler-802154.c b/net/ip/contiki/mac/handler-802154.c index 8bb00d26ded..3226bf31545 100644 --- a/net/ip/contiki/mac/handler-802154.c +++ b/net/ip/contiki/mac/handler-802154.c @@ -48,7 +48,9 @@ #include #include -#define DEBUG DEBUG_NONE +#ifdef CONFIG_NETWORK_IP_STACK_DEBUG_15_4_MAC +#define DEBUG 1 +#endif #include "contiki/ip/uip-debug.h" #define CHANNEL_LOW 11 diff --git a/net/ip/contiki/mac/nullrdc.c b/net/ip/contiki/mac/nullrdc.c index b6658de8c30..4f31ee02f28 100644 --- a/net/ip/contiki/mac/nullrdc.c +++ b/net/ip/contiki/mac/nullrdc.c @@ -52,7 +52,9 @@ #include "lib/simEnvChange.h" #endif /* CONTIKI_TARGET_COOJA */ -#define DEBUG DEBUG_NONE +#ifdef CONFIG_NETWORK_IP_STACK_DEBUG_15_4_MAC +#define DEBUG 1 +#endif #include "contiki/ip/uip-debug.h" #ifdef NULLRDC_CONF_ADDRESS_FILTER diff --git a/net/ip/contiki/mac/sicslowmac/sicslowmac.c b/net/ip/contiki/mac/sicslowmac/sicslowmac.c index e6d077a3ff7..f2fa1ba29b6 100644 --- a/net/ip/contiki/mac/sicslowmac/sicslowmac.c +++ b/net/ip/contiki/mac/sicslowmac/sicslowmac.c @@ -54,7 +54,9 @@ #include "contiki/netstack.h" #include "lib/random.h" -#define DEBUG 0 +#ifdef CONFIG_NETWORK_IP_STACK_DEBUG_15_4_MAC +#define DEBUG 1 +#endif #include "contiki/ip/uip-debug.h" #if UIP_LOGGING