From 1f20ffc15082e4adb0898e9124e9f58a1de2f91f Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Thu, 12 Mar 2020 17:12:07 +0100 Subject: [PATCH] gnrc/nib: Move GNRC_IPV6_NIB_CONF_NO_RTR_SOL to 'CONFIG_' namespace Also evaluate using IS_ACTIVE macro. --- sys/include/net/gnrc/ipv6/nib/conf.h | 4 ++-- sys/net/gnrc/network_layer/ipv6/nib/nib.c | 4 ++-- tests/gnrc_netif/Makefile | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/include/net/gnrc/ipv6/nib/conf.h b/sys/include/net/gnrc/ipv6/nib/conf.h index 8d4182701f..6256646708 100644 --- a/sys/include/net/gnrc/ipv6/nib/conf.h +++ b/sys/include/net/gnrc/ipv6/nib/conf.h @@ -227,8 +227,8 @@ extern "C" { * * @warning Only do this if you know what you're doing */ -#ifndef GNRC_IPV6_NIB_CONF_NO_RTR_SOL -#define GNRC_IPV6_NIB_CONF_NO_RTR_SOL 0 +#ifndef CONFIG_GNRC_IPV6_NIB_NO_RTR_SOL +#define CONFIG_GNRC_IPV6_NIB_NO_RTR_SOL 0 #endif /** diff --git a/sys/net/gnrc/network_layer/ipv6/nib/nib.c b/sys/net/gnrc/network_layer/ipv6/nib/nib.c index 48c7ab3fa3..4f5ef53f14 100644 --- a/sys/net/gnrc/network_layer/ipv6/nib/nib.c +++ b/sys/net/gnrc/network_layer/ipv6/nib/nib.c @@ -1318,7 +1318,7 @@ static void _handle_rtr_timeout(_nib_dr_entry_t *router) void _handle_search_rtr(gnrc_netif_t *netif) { -#if !GNRC_IPV6_NIB_CONF_NO_RTR_SOL +#if !IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_NO_RTR_SOL) gnrc_netif_acquire(netif); if (!(gnrc_netif_is_rtr_adv(netif)) || gnrc_netif_is_6ln(netif)) { uint32_t next_rs = _evtimer_lookup(netif, GNRC_IPV6_NIB_SEARCH_RTR); @@ -1343,7 +1343,7 @@ void _handle_search_rtr(gnrc_netif_t *netif) gnrc_netif_release(netif); #else (void)netif; -#endif /* !GNRC_IPV6_NIB_CONF_NO_RTR_SOL */ +#endif /* !CONFIG_GNRC_IPV6_NIB_NO_RTR_SOL */ } #if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_DNS) diff --git a/tests/gnrc_netif/Makefile b/tests/gnrc_netif/Makefile index 70663e00b5..2e91ce872a 100644 --- a/tests/gnrc_netif/Makefile +++ b/tests/gnrc_netif/Makefile @@ -14,7 +14,7 @@ USEMODULE += od # deactivate automatically emitted packets from IPv6 neighbor discovery CFLAGS += -DCONFIG_GNRC_IPV6_NIB_ARSM=0 CFLAGS += -DCONFIG_GNRC_IPV6_NIB_SLAAC=0 -CFLAGS += -DGNRC_IPV6_NIB_CONF_NO_RTR_SOL=1 +CFLAGS += -DCONFIG_GNRC_IPV6_NIB_NO_RTR_SOL=1 CFLAGS += -DGNRC_NETIF_ADDRS_NUMOF=16 CFLAGS += -DGNRC_NETIF_GROUPS_NUMOF=8 CFLAGS += -DLOG_LEVEL=LOG_NONE