gnrc/rpl: Move GNRC_RPL_DEFAULT_NETIF to 'CONFIG_' namespace

This commit is contained in:
Leandro Lanzieri 2020-04-24 13:21:21 +02:00
parent d075b4dfe9
commit 2c04f54d28
No known key found for this signature in database
GPG Key ID: 13559905E2EBEAA5
2 changed files with 13 additions and 13 deletions

View File

@ -37,9 +37,9 @@
* *
* If the application defines several interfaces (@ref gnrc_netif_highlander() * If the application defines several interfaces (@ref gnrc_netif_highlander()
* returns false), then RPL will be initialized on the interface * returns false), then RPL will be initialized on the interface
* `GNRC_RPL_DEFAULT_NETIF`. * `CONFIG_GNRC_RPL_DEFAULT_NETIF`.
* Your application is responsible for setting `GNRC_RPL_DEFAULT_NETIF` to a * Your application is responsible for setting `CONFIG_GNRC_RPL_DEFAULT_NETIF`
* valid interface PID, e.g. via `CFLAGS`. * to a valid interface PID, e.g. via `CFLAGS` or menuconfig.
* *
* Initializing RPL on multiple interfaces automatically is currently not supported. * Initializing RPL on multiple interfaces automatically is currently not supported.
* Call `gnrc_rpl_init()` manually from your application for the desired interfaces in this case. * Call `gnrc_rpl_init()` manually from your application for the desired interfaces in this case.
@ -72,7 +72,7 @@
* - Set interface for auto-initialization if more than one * - Set interface for auto-initialization if more than one
* interface exists (@ref gnrc_netif_highlander() returns false) * interface exists (@ref gnrc_netif_highlander() returns false)
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.mk} * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.mk}
* CFLAGS += -DGNRC_RPL_DEFAULT_NETIF=6 * CFLAGS += -DCONFIG_GNRC_RPL_DEFAULT_NETIF=6
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* *
* - By default, all incoming control messages get checked for validation. * - By default, all incoming control messages get checked for validation.
@ -503,8 +503,8 @@ extern netstats_rpl_t gnrc_rpl_netstats;
/** /**
* @brief Default network interface for GNRC RPL * @brief Default network interface for GNRC RPL
*/ */
#ifndef GNRC_RPL_DEFAULT_NETIF #ifndef CONFIG_GNRC_RPL_DEFAULT_NETIF
#define GNRC_RPL_DEFAULT_NETIF (KERNEL_PID_UNDEF) #define CONFIG_GNRC_RPL_DEFAULT_NETIF (KERNEL_PID_UNDEF)
#endif #endif
/** /**

View File

@ -41,24 +41,24 @@ void auto_init_gnrc_rpl(void)
gnrc_rpl_init(netif->pid); gnrc_rpl_init(netif->pid);
return; return;
} }
else if (GNRC_RPL_DEFAULT_NETIF != KERNEL_PID_UNDEF) { else if (CONFIG_GNRC_RPL_DEFAULT_NETIF != KERNEL_PID_UNDEF) {
if (gnrc_netif_get_by_pid(GNRC_RPL_DEFAULT_NETIF) != NULL) { if (gnrc_netif_get_by_pid(CONFIG_GNRC_RPL_DEFAULT_NETIF) != NULL) {
DEBUG("auto_init_gnrc_rpl: initializing RPL on interface %" PRIkernel_pid "\n", DEBUG("auto_init_gnrc_rpl: initializing RPL on interface %" PRIkernel_pid "\n",
(kernel_pid_t) GNRC_RPL_DEFAULT_NETIF); (kernel_pid_t) CONFIG_GNRC_RPL_DEFAULT_NETIF);
gnrc_rpl_init(GNRC_RPL_DEFAULT_NETIF); gnrc_rpl_init(CONFIG_GNRC_RPL_DEFAULT_NETIF);
return; return;
} }
/* XXX this is just a work-around ideally this would happen with /* XXX this is just a work-around ideally this would happen with
* an `up` event of the GNRC_RPL_DEFAULT_NETIF */ * an `up` event of the CONFIG_GNRC_RPL_DEFAULT_NETIF */
DEBUG("auto_init_gnrc_rpl: could not initialize RPL on interface %" PRIkernel_pid" - " DEBUG("auto_init_gnrc_rpl: could not initialize RPL on interface %" PRIkernel_pid" - "
"interface does not exist\n", (kernel_pid_t) GNRC_RPL_DEFAULT_NETIF); "interface does not exist\n", (kernel_pid_t) CONFIG_GNRC_RPL_DEFAULT_NETIF);
return; return;
} }
else { else {
/* XXX this is just a work-around ideally this should be defined in some /* XXX this is just a work-around ideally this should be defined in some
* run-time interface configuration */ * run-time interface configuration */
DEBUG("auto_init_gnrc_rpl: please specify an interface " DEBUG("auto_init_gnrc_rpl: please specify an interface "
"by setting GNRC_RPL_DEFAULT_NETIF\n"); "by setting CONFIG_GNRC_RPL_DEFAULT_NETIF\n");
} }
} }
#else #else