diff --git a/sys/include/net/gnrc/netif.h b/sys/include/net/gnrc/netif.h index 7b5ccbb212..6f2978a3fd 100644 --- a/sys/include/net/gnrc/netif.h +++ b/sys/include/net/gnrc/netif.h @@ -184,6 +184,10 @@ typedef struct { */ gnrc_netif_pktq_t send_queue; #endif + /** + * @brief Message queue for the netif thread + */ + msg_t msg_queue[GNRC_NETIF_MSG_QUEUE_SIZE]; uint8_t cur_hl; /**< Current hop-limit for out-going packets */ uint8_t device_type; /**< Device type */ kernel_pid_t pid; /**< PID of the network interface's thread */ diff --git a/sys/net/gnrc/netif/gnrc_netif.c b/sys/net/gnrc/netif/gnrc_netif.c index 2eed989ff5..696f19ce8f 100644 --- a/sys/net/gnrc/netif/gnrc_netif.c +++ b/sys/net/gnrc/netif/gnrc_netif.c @@ -1834,7 +1834,6 @@ static void *_gnrc_netif_thread(void *args) netdev_t *dev; int res; msg_t reply = { .type = GNRC_NETAPI_MSG_TYPE_ACK }; - msg_t msg_queue[GNRC_NETIF_MSG_QUEUE_SIZE]; DEBUG("gnrc_netif: starting thread %i\n", thread_getpid()); netif = ctx->netif; @@ -1848,7 +1847,7 @@ static void *_gnrc_netif_thread(void *args) #endif /* MODULE_GNRC_NETIF_EVENTS */ /* setup the link-layer's message queue */ - msg_init_queue(msg_queue, GNRC_NETIF_MSG_QUEUE_SIZE); + msg_init_queue(netif->msg_queue, ARRAY_SIZE(netif->msg_queue)); /* initialize low-level driver */ ctx->result = netif->ops->init(netif); /* signal that driver init is done */