sys/net/gnrc/netif/init_devs: IEEE802154_STACKSIZE_DEFAULT

This commit is contained in:
Fabian Hüßler 2020-11-22 23:50:51 +01:00
parent 6123e87e64
commit 7b5391b7ce
10 changed files with 71 additions and 9 deletions

View File

@ -29,6 +29,7 @@
#include "net/gnrc/gomach/gomach.h" #include "net/gnrc/gomach/gomach.h"
#endif #endif
#include "net/gnrc.h" #include "net/gnrc.h"
#include "include/init_devs.h"
#include "at86rf215.h" #include "at86rf215.h"
#include "at86rf215_params.h" #include "at86rf215_params.h"
@ -37,7 +38,7 @@
* @brief Define stack parameters for the MAC layer thread * @brief Define stack parameters for the MAC layer thread
* @{ * @{
*/ */
#define AT86RF215_MAC_STACKSIZE (THREAD_STACKSIZE_DEFAULT) #define AT86RF215_MAC_STACKSIZE (IEEE802154_STACKSIZE_DEFAULT)
#ifndef AT86RF215_MAC_PRIO #ifndef AT86RF215_MAC_PRIO
#define AT86RF215_MAC_PRIO (GNRC_NETIF_PRIO) #define AT86RF215_MAC_PRIO (GNRC_NETIF_PRIO)
#endif #endif

View File

@ -27,6 +27,7 @@
#include "net/gnrc/gomach/gomach.h" #include "net/gnrc/gomach/gomach.h"
#endif #endif
#include "net/gnrc.h" #include "net/gnrc.h"
#include "include/init_devs.h"
#include "at86rf2xx.h" #include "at86rf2xx.h"
#include "at86rf2xx_params.h" #include "at86rf2xx_params.h"
@ -35,7 +36,7 @@
* @brief Define stack parameters for the MAC layer thread * @brief Define stack parameters for the MAC layer thread
* @{ * @{
*/ */
#define AT86RF2XX_MAC_STACKSIZE (THREAD_STACKSIZE_DEFAULT) #define AT86RF2XX_MAC_STACKSIZE (IEEE802154_STACKSIZE_DEFAULT)
#ifndef AT86RF2XX_MAC_PRIO #ifndef AT86RF2XX_MAC_PRIO
#define AT86RF2XX_MAC_PRIO (GNRC_NETIF_PRIO) #define AT86RF2XX_MAC_PRIO (GNRC_NETIF_PRIO)
#endif #endif

View File

@ -23,6 +23,7 @@
#include "board.h" #include "board.h"
#include "net/gnrc/netif/ieee802154.h" #include "net/gnrc/netif/ieee802154.h"
#include "net/gnrc.h" #include "net/gnrc.h"
#include "include/init_devs.h"
#include "cc2420.h" #include "cc2420.h"
#include "cc2420_params.h" #include "cc2420_params.h"
@ -31,7 +32,7 @@
* @brief MAC layer stack parameters * @brief MAC layer stack parameters
* @{ * @{
*/ */
#define CC2420_MAC_STACKSIZE (THREAD_STACKSIZE_MAIN) #define CC2420_MAC_STACKSIZE (IEEE802154_STACKSIZE_DEFAULT)
#ifndef CC2420_MAC_PRIO #ifndef CC2420_MAC_PRIO
#define CC2420_MAC_PRIO (GNRC_NETIF_PRIO) #define CC2420_MAC_PRIO (GNRC_NETIF_PRIO)
#endif #endif

View File

@ -19,6 +19,7 @@
#include "log.h" #include "log.h"
#include "net/gnrc/netif/ieee802154.h" #include "net/gnrc/netif/ieee802154.h"
#include "include/init_devs.h"
#include "cc2538_rf.h" #include "cc2538_rf.h"
@ -26,7 +27,7 @@
* @brief Define stack parameters for the MAC layer thread * @brief Define stack parameters for the MAC layer thread
* @{ * @{
*/ */
#define CC2538_MAC_STACKSIZE (THREAD_STACKSIZE_DEFAULT) #define CC2538_MAC_STACKSIZE (IEEE802154_STACKSIZE_DEFAULT)
#ifndef CC2538_MAC_PRIO #ifndef CC2538_MAC_PRIO
#define CC2538_MAC_PRIO (GNRC_NETIF_PRIO) #define CC2538_MAC_PRIO (GNRC_NETIF_PRIO)
#endif #endif

View File

@ -24,6 +24,7 @@
#include "board.h" #include "board.h"
#include "net/gnrc/netif/ieee802154.h" #include "net/gnrc/netif/ieee802154.h"
#include "net/gnrc.h" #include "net/gnrc.h"
#include "include/init_devs.h"
#include "kw2xrf.h" #include "kw2xrf.h"
#include "kw2xrf_params.h" #include "kw2xrf_params.h"
@ -32,7 +33,7 @@
* @brief Define stack parameters for the MAC layer thread * @brief Define stack parameters for the MAC layer thread
* @{ * @{
*/ */
#define KW2XRF_MAC_STACKSIZE (THREAD_STACKSIZE_DEFAULT) #define KW2XRF_MAC_STACKSIZE (IEEE802154_STACKSIZE_DEFAULT)
#ifndef KW2XRF_MAC_PRIO #ifndef KW2XRF_MAC_PRIO
#define KW2XRF_MAC_PRIO (GNRC_NETIF_PRIO) #define KW2XRF_MAC_PRIO (GNRC_NETIF_PRIO)
#endif #endif

View File

@ -22,6 +22,7 @@
#include "board.h" #include "board.h"
#include "net/gnrc.h" #include "net/gnrc.h"
#include "net/gnrc/netif/ieee802154.h" #include "net/gnrc/netif/ieee802154.h"
#include "include/init_devs.h"
#ifdef MODULE_GNRC_LWMAC #ifdef MODULE_GNRC_LWMAC
#include "net/gnrc/lwmac/lwmac.h" #include "net/gnrc/lwmac/lwmac.h"
@ -37,7 +38,7 @@
* @{ * @{
*/ */
#ifndef KW41ZRF_NETIF_STACKSIZE #ifndef KW41ZRF_NETIF_STACKSIZE
#define KW41ZRF_NETIF_STACKSIZE (THREAD_STACKSIZE_DEFAULT) #define KW41ZRF_NETIF_STACKSIZE (IEEE802154_STACKSIZE_DEFAULT)
#endif #endif
#ifndef KW41ZRF_NETIF_PRIO #ifndef KW41ZRF_NETIF_PRIO
#define KW41ZRF_NETIF_PRIO (GNRC_NETIF_PRIO) #define KW41ZRF_NETIF_PRIO (GNRC_NETIF_PRIO)

View File

@ -21,6 +21,7 @@
#include "board.h" #include "board.h"
#include "net/gnrc/netif/ieee802154.h" #include "net/gnrc/netif/ieee802154.h"
#include "net/gnrc.h" #include "net/gnrc.h"
#include "include/init_devs.h"
#include "mrf24j40.h" #include "mrf24j40.h"
#include "mrf24j40_params.h" #include "mrf24j40_params.h"
@ -29,7 +30,7 @@
* @brief Define stack parameters for the MAC layer thread * @brief Define stack parameters for the MAC layer thread
* @{ * @{
*/ */
#define MRF24J40_MAC_STACKSIZE (THREAD_STACKSIZE_DEFAULT) #define MRF24J40_MAC_STACKSIZE (IEEE802154_STACKSIZE_DEFAULT)
#ifndef MRF24J40_MAC_PRIO #ifndef MRF24J40_MAC_PRIO
#define MRF24J40_MAC_PRIO (GNRC_NETIF_PRIO) #define MRF24J40_MAC_PRIO (GNRC_NETIF_PRIO)
#endif #endif

View File

@ -21,13 +21,14 @@
#include "board.h" #include "board.h"
#include "nrf802154.h" #include "nrf802154.h"
#include "net/gnrc/netif/ieee802154.h" #include "net/gnrc/netif/ieee802154.h"
#include "include/init_devs.h"
/** /**
* @brief Define stack parameters for the MAC layer thread * @brief Define stack parameters for the MAC layer thread
* @{ * @{
*/ */
#ifndef NRF802154_MAC_STACKSIZE #ifndef NRF802154_MAC_STACKSIZE
#define NRF802154_MAC_STACKSIZE (THREAD_STACKSIZE_DEFAULT) #define NRF802154_MAC_STACKSIZE (IEEE802154_STACKSIZE_DEFAULT)
#endif #endif
#ifndef NRF802154_MAC_PRIO #ifndef NRF802154_MAC_PRIO
#define NRF802154_MAC_PRIO (GNRC_NETIF_PRIO) #define NRF802154_MAC_PRIO (GNRC_NETIF_PRIO)

View File

@ -21,6 +21,7 @@
#include "socket_zep.h" #include "socket_zep.h"
#include "socket_zep_params.h" #include "socket_zep_params.h"
#include "net/gnrc/netif/ieee802154.h" #include "net/gnrc/netif/ieee802154.h"
#include "include/init_devs.h"
#define ENABLE_DEBUG 0 #define ENABLE_DEBUG 0
#include "debug.h" #include "debug.h"
@ -28,7 +29,7 @@
/** /**
* @brief Define stack parameters for the MAC layer thread * @brief Define stack parameters for the MAC layer thread
*/ */
#define SOCKET_ZEP_MAC_STACKSIZE (THREAD_STACKSIZE_DEFAULT + DEBUG_EXTRA_STACKSIZE) #define SOCKET_ZEP_MAC_STACKSIZE (IEEE802154_STACKSIZE_DEFAULT + DEBUG_EXTRA_STACKSIZE)
#ifndef SOCKET_ZEP_MAC_PRIO #ifndef SOCKET_ZEP_MAC_PRIO
#define SOCKET_ZEP_MAC_PRIO (GNRC_NETIF_PRIO) #define SOCKET_ZEP_MAC_PRIO (GNRC_NETIF_PRIO)
#endif #endif

View File

@ -0,0 +1,53 @@
/*
* Copyright (C) 2020 Otto-von-Guericke-Universität Magdeburg
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup sys_auto_init_gnrc_netif
* @{
*
* @file
* @brief common netif device initialization definitions
*
* @author Fabian Hüßler <fabian.huessler@ovgu.de>
*/
#ifndef INIT_DEVS_H
#define INIT_DEVS_H
#include "thread.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief extra stack size if ieee802154 security is enabled
*
* You may increase this value if you experience a stack overflow
* with IEEE 802.15.4 security enabled.
*/
#define IEEE802154_SECURITY_EXTRA_STACKSIZE (128)
#ifndef IEEE802154_STACKSIZE_DEFAULT
#ifdef MODULE_IEEE802154_SECURITY
#define IEEE802154_STACKSIZE_DEFAULT (THREAD_STACKSIZE_DEFAULT + \
IEEE802154_SECURITY_EXTRA_STACKSIZE)
#else
/**
* @brief stack size of an ieee802154 device
*/
#define IEEE802154_STACKSIZE_DEFAULT (THREAD_STACKSIZE_DEFAULT)
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif /* INIT_DEVS_H */
/** @} */