diff --git a/sys/include/net/gnrc/csma_sender.h b/sys/include/net/gnrc/csma_sender.h index 7612c6a276..51da0dc8f8 100644 --- a/sys/include/net/gnrc/csma_sender.h +++ b/sys/include/net/gnrc/csma_sender.h @@ -22,8 +22,8 @@ #ifndef GNRC_CSMA_SENDER_H_ #define GNRC_CSMA_SENDER_H_ +#include -#include "kernel.h" #include "net/gnrc.h" diff --git a/sys/net/gnrc/link_layer/csma_sender/gnrc_csma_sender.c b/sys/net/gnrc/link_layer/csma_sender/gnrc_csma_sender.c index 44dda08106..6a71653f58 100644 --- a/sys/net/gnrc/link_layer/csma_sender/gnrc_csma_sender.c +++ b/sys/net/gnrc/link_layer/csma_sender/gnrc_csma_sender.c @@ -19,7 +19,6 @@ #include #include -#include "kernel.h" #include "xtimer.h" #include "random.h" #include "net/gnrc/csma_sender.h" @@ -65,7 +64,7 @@ static inline uint32_t choose_backoff_period(int be) } uint32_t max_backoff = ((1 << be) - 1) * A_UNIT_BACKOFF_PERIOD_MICROSEC; - uint32_t period = genrand_uint32() % max_backoff; + uint32_t period = random_uint32() % max_backoff; if (period < A_UNIT_BACKOFF_PERIOD_MICROSEC) { period = A_UNIT_BACKOFF_PERIOD_MICROSEC; } @@ -167,7 +166,7 @@ int csma_ca_send(gnrc_netdev_t *dev, gnrc_pktsnip_t *pkt) /* if we arrive here, then we must perform the CSMA/CA procedure ourselves by software */ - genrand_init(xtimer_now()); + random_init(xtimer_now()); DEBUG("csma: Starting software CSMA/CA....\n"); int nb = 0, be = mac_min_be;