mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 06:23:53 +01:00
gnrc/rpl: Move GNRC_RPL_DEFAULT_MIN_HOP_RANK_INCREASE to 'CONFIG_'
This commit is contained in:
parent
cd50686eb6
commit
1b6f915e0c
@ -181,8 +181,8 @@ extern "C" {
|
||||
* RFC 6550, section 17
|
||||
* </a>
|
||||
*/
|
||||
#ifndef GNRC_RPL_DEFAULT_MIN_HOP_RANK_INCREASE
|
||||
#define GNRC_RPL_DEFAULT_MIN_HOP_RANK_INCREASE (256)
|
||||
#ifndef CONFIG_GNRC_RPL_DEFAULT_MIN_HOP_RANK_INCREASE
|
||||
#define CONFIG_GNRC_RPL_DEFAULT_MIN_HOP_RANK_INCREASE (256)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -403,7 +403,7 @@ static inline bool GNRC_RPL_COUNTER_GREATER_THAN(uint8_t A, uint8_t B)
|
||||
/**
|
||||
* @brief Rank of the root node
|
||||
*/
|
||||
#define GNRC_RPL_ROOT_RANK (GNRC_RPL_DEFAULT_MIN_HOP_RANK_INCREASE)
|
||||
#define GNRC_RPL_ROOT_RANK (CONFIG_GNRC_RPL_DEFAULT_MIN_HOP_RANK_INCREASE)
|
||||
|
||||
/**
|
||||
* @brief DIS ICMPv6 code
|
||||
|
||||
@ -88,7 +88,7 @@ bool gnrc_rpl_instance_add(uint8_t instance_id, gnrc_rpl_instance_t **inst)
|
||||
(*inst)->id = instance_id;
|
||||
(*inst)->state = 1;
|
||||
(*inst)->max_rank_inc = GNRC_RPL_DEFAULT_MAX_RANK_INCREASE;
|
||||
(*inst)->min_hop_rank_inc = GNRC_RPL_DEFAULT_MIN_HOP_RANK_INCREASE;
|
||||
(*inst)->min_hop_rank_inc = CONFIG_GNRC_RPL_DEFAULT_MIN_HOP_RANK_INCREASE;
|
||||
(*inst)->dodag.parents = NULL;
|
||||
(*inst)->cleanup_event.msg.content.ptr = (*inst);
|
||||
return true;
|
||||
@ -388,7 +388,7 @@ gnrc_rpl_instance_t *gnrc_rpl_root_instance_init(uint8_t instance_id, ipv6_addr_
|
||||
if (gnrc_rpl_instance_add(instance_id, &inst)) {
|
||||
inst->of = (gnrc_rpl_of_t *) gnrc_rpl_get_of_for_ocp(GNRC_RPL_DEFAULT_OCP);
|
||||
inst->mop = mop;
|
||||
inst->min_hop_rank_inc = GNRC_RPL_DEFAULT_MIN_HOP_RANK_INCREASE;
|
||||
inst->min_hop_rank_inc = CONFIG_GNRC_RPL_DEFAULT_MIN_HOP_RANK_INCREASE;
|
||||
inst->max_rank_inc = GNRC_RPL_DEFAULT_MAX_RANK_INCREASE;
|
||||
}
|
||||
else if (inst == NULL) {
|
||||
|
||||
@ -66,7 +66,7 @@ uint16_t calc_rank(gnrc_rpl_dodag_t *dodag, uint16_t base_rank)
|
||||
add = dodag->instance->min_hop_rank_inc;
|
||||
}
|
||||
else {
|
||||
add = GNRC_RPL_DEFAULT_MIN_HOP_RANK_INCREASE;
|
||||
add = CONFIG_GNRC_RPL_DEFAULT_MIN_HOP_RANK_INCREASE;
|
||||
}
|
||||
|
||||
if ((base_rank + add) < base_rank) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user