From 2c1aa8618b94a4cf9c1eb65979eb839ac258f030 Mon Sep 17 00:00:00 2001 From: Akshai M Date: Sun, 24 May 2020 15:18:20 +0530 Subject: [PATCH] gnrc/mac : Configure GNRC_MAC_RX_QUEUE_SIZE with exponent --- sys/include/net/gnrc/mac/mac.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/include/net/gnrc/mac/mac.h b/sys/include/net/gnrc/mac/mac.h index 983e1dd59b..39bd499c00 100644 --- a/sys/include/net/gnrc/mac/mac.h +++ b/sys/include/net/gnrc/mac/mac.h @@ -28,11 +28,22 @@ extern "C" { #endif +/** + * @brief Default message queue size to use for the incoming packets (as + * exponent of 2^n). + * + * As the queue size ALWAYS needs to be power of two, this option represents the + * exponent of 2^n, which will be used as the size of the queue. + */ +#ifndef CONFIG_GNRC_MAC_RX_QUEUE_SIZE_EXP +#define CONFIG_GNRC_MAC_RX_QUEUE_SIZE_EXP (3U) +#endif + /** * @brief The default rx queue size for incoming packets */ #ifndef GNRC_MAC_RX_QUEUE_SIZE -#define GNRC_MAC_RX_QUEUE_SIZE (8U) +#define GNRC_MAC_RX_QUEUE_SIZE (1 << CONFIG_GNRC_MAC_RX_QUEUE_SIZE_EXP) #endif /**