From 8ab2a90231328a25829ea51acf9d7d5985ad7d7c Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Wed, 28 Dec 2016 16:25:05 +0100 Subject: [PATCH] net: rpl: Fix a build issue s/energy_est/estimation when using net_rpl_node_energy_object. Change-Id: I4b326a0dbbca11d48de0c595dfe843495fe10e04 Signed-off-by: Tomasz Bursztyka --- subsys/net/ip/rpl-mrhof.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subsys/net/ip/rpl-mrhof.c b/subsys/net/ip/rpl-mrhof.c index 6d4e5f1d76b..a45e798c19c 100644 --- a/subsys/net/ip/rpl-mrhof.c +++ b/subsys/net/ip/rpl-mrhof.c @@ -199,7 +199,7 @@ static uint16_t calculate_path_metric(struct net_rpl_parent *parent) return parent->mc.obj.etx + net_ipv6_nbr_data(nbr)->link_metric; #elif defined(CONFIG_NET_RPL_MC_ENERGY) - return parent->mc.obj.energy.energy_est + + return parent->mc.obj.energy.estimation + net_ipv6_nbr_data(nbr)->link_metric; #else #error "Unsupported routing metric configured" @@ -361,7 +361,7 @@ static int net_rpl_mrhof_update_mc(struct net_rpl_instance *instance) } instance->mc.obj.energy.flags = type << NET_RPL_MC_ENERGY_TYPE; - instance->mc.obj.energy.energy_est = path_metric; + instance->mc.obj.energy.estimation = path_metric; #endif return 0;