gnrc/rpl: Move GNRC_RPL_DEFAULT_INSTANCE to 'CONFIG_' namespace
This commit is contained in:
parent
5a28e7cad4
commit
e547061d19
@ -205,8 +205,8 @@ extern "C" {
|
|||||||
/**
|
/**
|
||||||
* @brief Default Instance ID
|
* @brief Default Instance ID
|
||||||
*/
|
*/
|
||||||
#ifndef GNRC_RPL_DEFAULT_INSTANCE
|
#ifndef CONFIG_GNRC_RPL_DEFAULT_INSTANCE
|
||||||
#define GNRC_RPL_DEFAULT_INSTANCE (0)
|
#define CONFIG_GNRC_RPL_DEFAULT_INSTANCE (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -164,12 +164,12 @@ void dhcpv6_client_conf_prefix(unsigned iface, const ipv6_addr_t *pfx,
|
|||||||
if (IS_USED(MODULE_GNRC_RPL)) {
|
if (IS_USED(MODULE_GNRC_RPL)) {
|
||||||
gnrc_rpl_init(netif->pid);
|
gnrc_rpl_init(netif->pid);
|
||||||
gnrc_rpl_instance_t *inst = gnrc_rpl_instance_get(
|
gnrc_rpl_instance_t *inst = gnrc_rpl_instance_get(
|
||||||
GNRC_RPL_DEFAULT_INSTANCE
|
CONFIG_GNRC_RPL_DEFAULT_INSTANCE
|
||||||
);
|
);
|
||||||
if (inst) {
|
if (inst) {
|
||||||
gnrc_rpl_instance_remove(inst);
|
gnrc_rpl_instance_remove(inst);
|
||||||
}
|
}
|
||||||
gnrc_rpl_root_init(GNRC_RPL_DEFAULT_INSTANCE, &addr, false, false);
|
gnrc_rpl_root_init(CONFIG_GNRC_RPL_DEFAULT_INSTANCE, &addr, false, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -188,11 +188,11 @@ void uhcp_handle_prefix(uint8_t *prefix, uint8_t prefix_len, uint16_t lifetime,
|
|||||||
#ifdef MODULE_GNRC_RPL
|
#ifdef MODULE_GNRC_RPL
|
||||||
gnrc_rpl_init(gnrc_wireless_interface);
|
gnrc_rpl_init(gnrc_wireless_interface);
|
||||||
gnrc_rpl_instance_t *inst = gnrc_rpl_instance_get(
|
gnrc_rpl_instance_t *inst = gnrc_rpl_instance_get(
|
||||||
GNRC_RPL_DEFAULT_INSTANCE);
|
CONFIG_GNRC_RPL_DEFAULT_INSTANCE);
|
||||||
if (inst) {
|
if (inst) {
|
||||||
gnrc_rpl_instance_remove(inst);
|
gnrc_rpl_instance_remove(inst);
|
||||||
}
|
}
|
||||||
gnrc_rpl_root_init(GNRC_RPL_DEFAULT_INSTANCE, (ipv6_addr_t*)prefix, false,
|
gnrc_rpl_root_init(CONFIG_GNRC_RPL_DEFAULT_INSTANCE, (ipv6_addr_t*)prefix, false,
|
||||||
false);
|
false);
|
||||||
#endif
|
#endif
|
||||||
LOG_INFO("gnrc_uhcpc: uhcp_handle_prefix(): configured new prefix %s/%u\n",
|
LOG_INFO("gnrc_uhcpc: uhcp_handle_prefix(): configured new prefix %s/%u\n",
|
||||||
|
|||||||
@ -371,7 +371,7 @@ void _dao_handle_send(gnrc_rpl_dodag_t *dodag)
|
|||||||
uint8_t gnrc_rpl_gen_instance_id(bool local)
|
uint8_t gnrc_rpl_gen_instance_id(bool local)
|
||||||
{
|
{
|
||||||
mutex_lock(&_inst_id_mutex);
|
mutex_lock(&_inst_id_mutex);
|
||||||
uint8_t instance_id = GNRC_RPL_DEFAULT_INSTANCE;
|
uint8_t instance_id = CONFIG_GNRC_RPL_DEFAULT_INSTANCE;
|
||||||
|
|
||||||
if (local) {
|
if (local) {
|
||||||
instance_id = ((_instance_id++) | GNRC_RPL_INSTANCE_ID_MSB);
|
instance_id = ((_instance_id++) | GNRC_RPL_INSTANCE_ID_MSB);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user