From d639d8857dbe6506a8a6649ce9308f70fec2a90c Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 16 Jul 2017 12:53:01 -0600 Subject: [PATCH] IEEE 802.15.4 MAC: Disable option to select interrupt-level meta data allocator. --- wireless/ieee802154/Kconfig | 10 ++++++++-- wireless/ieee802154/mac802154_indalloc.c | 13 ++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/wireless/ieee802154/Kconfig b/wireless/ieee802154/Kconfig index f01ae562d7..d8c698047c 100644 --- a/wireless/ieee802154/Kconfig +++ b/wireless/ieee802154/Kconfig @@ -93,7 +93,8 @@ config IEEE802154_IND_PREALLOC config IEEE802154_IND_IRQRESERVE int "Reserved pre-allocated meta-data structures" - default 10 + default 0 + depends on EXPERIMENTAL ---help--- If meta-data structures can be allocated from interrupt handlers, then this specifies the number of pre-allocatd meta-data structures @@ -110,7 +111,12 @@ config IEEE802154_IND_IRQRESERVE Non-interrupt logic will also first attempt to allocate from the general, pre-allocated structure pool. If that fails, it will - dynamically allocate the meta data structure with an additional cost in performance. + dynamically allocate the meta data structure with an additional cost + in performance. + + NOTE: Currently marked as experimental and with a default 0 zero + because there are no interrupt level allocations performed by the + current IEEE 802.15.4 MAC code. config IEEE802154_MACDEV bool "Character driver for IEEE 802.15.4 MAC layer" diff --git a/wireless/ieee802154/mac802154_indalloc.c b/wireless/ieee802154/mac802154_indalloc.c index 375cda69aa..f8747a905f 100644 --- a/wireless/ieee802154/mac802154_indalloc.c +++ b/wireless/ieee802154/mac802154_indalloc.c @@ -54,14 +54,21 @@ * Pre-processor Definitions ****************************************************************************/ -#if !defined(CONFIG_IEEE802154_IND_PREALLOC) || CONFIG_IEEE802154_IND_PREALLOC < 0 +/* NOTE: The CONFIG_IEEE802154_IND_IRQRESERVE options is marked as marked + * 'experimental' and with the default 0 zero because there are no interrupt + * level allocations performed by the current IEEE 802.15.4 MAC code. + */ + +#if !defined(CONFIG_IEEE802154_IND_PREALLOC) || \ + CONFIG_IEEE802154_IND_PREALLOC < 0 # undef CONFIG_IEEE802154_IND_PREALLOC # define CONFIG_IEEE802154_IND_PREALLOC 20 #endif -#if !defined(CONFIG_IEEE802154_IND_IRQRESERVE) || CONFIG_IEEE802154_IND_IRQRESERVE < 0 +#if !defined(CONFIG_IEEE802154_IND_IRQRESERVE) || \ + CONFIG_IEEE802154_IND_IRQRESERVE < 0 # undef CONFIG_IEEE802154_IND_IRQRESERVE -# define CONFIG_IEEE802154_IND_IRQRESERVE 10 +# define CONFIG_IEEE802154_IND_IRQRESERVE 0 #endif #if CONFIG_IEEE802154_IND_IRQRESERVE > CONFIG_IEEE802154_IND_PREALLOC