From 34c3267bfe25cdcf99a48bcea0ad42f4226a012d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cenk=20G=C3=BCndo=C4=9Fan?= <cnkgndgn@gmail.com> Date: Tue, 3 Nov 2015 12:02:13 +0100 Subject: [PATCH] ndp: timex_t -> uint32_t --- sys/net/gnrc/network_layer/ndp/host/gnrc_ndp_host.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/net/gnrc/network_layer/ndp/host/gnrc_ndp_host.c b/sys/net/gnrc/network_layer/ndp/host/gnrc_ndp_host.c index 19c410e1f8..743dc9b0ee 100644 --- a/sys/net/gnrc/network_layer/ndp/host/gnrc_ndp_host.c +++ b/sys/net/gnrc/network_layer/ndp/host/gnrc_ndp_host.c @@ -24,13 +24,12 @@ #define ENABLE_DEBUG (0) #include "debug.h" -static inline void _reschedule_rtr_sol(gnrc_ipv6_netif_t *iface, timex_t delay) +static inline void _reschedule_rtr_sol(gnrc_ipv6_netif_t *iface, uint32_t delay) { xtimer_remove(&iface->rtr_sol_timer); iface->rtr_sol_msg.type = GNRC_NDP_MSG_RTR_SOL_RETRANS; iface->rtr_sol_msg.content.ptr = (char *) iface; - xtimer_set_msg(&iface->rtr_sol_timer, (uint32_t) timex_uint64(delay), &iface->rtr_sol_msg, - gnrc_ipv6_pid); + xtimer_set_msg(&iface->rtr_sol_timer, delay, &iface->rtr_sol_msg, gnrc_ipv6_pid); } void gnrc_ndp_host_init(gnrc_ipv6_netif_t *iface) @@ -39,7 +38,7 @@ void gnrc_ndp_host_init(gnrc_ipv6_netif_t *iface) mutex_lock(&iface->mutex); iface->rtr_sol_count = GNRC_NDP_MAX_RTR_SOL_NUMOF; DEBUG("ndp host: delayed initial router solicitation by %" PRIu32 " usec.\n", interval); - _reschedule_rtr_sol(iface, timex_set(0, interval)); + _reschedule_rtr_sol(iface, interval); mutex_unlock(&iface->mutex); } @@ -49,7 +48,7 @@ void gnrc_ndp_host_retrans_rtr_sol(gnrc_ipv6_netif_t *iface) if (iface->rtr_sol_count > 1) { /* regard off-by-one error */ DEBUG("ndp hst: retransmit rtr sol in %d sec\n", GNRC_NDP_MAX_RTR_SOL_INT); iface->rtr_sol_count--; - _reschedule_rtr_sol(iface, timex_set(GNRC_NDP_MAX_RTR_SOL_INT, 0)); + _reschedule_rtr_sol(iface, GNRC_NDP_MAX_RTR_SOL_INT * SEC_IN_USEC); } mutex_unlock(&iface->mutex); gnrc_ndp_internal_send_rtr_sol(iface->pid, NULL); -- GitLab