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 19c410e1f800352484811a1c8a5ba47feebb5ce0..743dc9b0ee41d226cf34eb2244ac74d597684431 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);