Skip to content

Commit

Permalink
sys/net/gnrc/netif/init_devs: IEEE802154_STACKSIZE_DEFAULT
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian18 committed Dec 3, 2020
1 parent 420e8f5 commit efafa2e
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 9 deletions.
3 changes: 2 additions & 1 deletion sys/net/gnrc/netif/init_devs/auto_init_at86rf215.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "net/gnrc/gomach/gomach.h"
#endif
#include "net/gnrc.h"
#include "include/init_devs.h"

#include "at86rf215.h"
#include "at86rf215_params.h"
Expand All @@ -37,7 +38,7 @@
* @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
#define AT86RF215_MAC_PRIO (GNRC_NETIF_PRIO)
#endif
Expand Down
3 changes: 2 additions & 1 deletion sys/net/gnrc/netif/init_devs/auto_init_at86rf2xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "net/gnrc/gomach/gomach.h"
#endif
#include "net/gnrc.h"
#include "include/init_devs.h"

#include "at86rf2xx.h"
#include "at86rf2xx_params.h"
Expand All @@ -35,7 +36,7 @@
* @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
#define AT86RF2XX_MAC_PRIO (GNRC_NETIF_PRIO)
#endif
Expand Down
3 changes: 2 additions & 1 deletion sys/net/gnrc/netif/init_devs/auto_init_cc2420.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "board.h"
#include "net/gnrc/netif/ieee802154.h"
#include "net/gnrc.h"
#include "include/init_devs.h"

#include "cc2420.h"
#include "cc2420_params.h"
Expand All @@ -31,7 +32,7 @@
* @brief MAC layer stack parameters
* @{
*/
#define CC2420_MAC_STACKSIZE (THREAD_STACKSIZE_MAIN)
#define CC2420_MAC_STACKSIZE (IEEE802154_STACKSIZE_DEFAULT)
#ifndef CC2420_MAC_PRIO
#define CC2420_MAC_PRIO (GNRC_NETIF_PRIO)
#endif
Expand Down
3 changes: 2 additions & 1 deletion sys/net/gnrc/netif/init_devs/auto_init_cc2538_rf.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@

#include "log.h"
#include "net/gnrc/netif/ieee802154.h"
#include "include/init_devs.h"

#include "cc2538_rf.h"

/**
* @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
#define CC2538_MAC_PRIO (GNRC_NETIF_PRIO)
#endif
Expand Down
3 changes: 2 additions & 1 deletion sys/net/gnrc/netif/init_devs/auto_init_kw2xrf.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "board.h"
#include "net/gnrc/netif/ieee802154.h"
#include "net/gnrc.h"
#include "include/init_devs.h"

#include "kw2xrf.h"
#include "kw2xrf_params.h"
Expand All @@ -32,7 +33,7 @@
* @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
#define KW2XRF_MAC_PRIO (GNRC_NETIF_PRIO)
#endif
Expand Down
3 changes: 2 additions & 1 deletion sys/net/gnrc/netif/init_devs/auto_init_kw41zrf.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "board.h"
#include "net/gnrc.h"
#include "net/gnrc/netif/ieee802154.h"
#include "include/init_devs.h"

#ifdef MODULE_GNRC_LWMAC
#include "net/gnrc/lwmac/lwmac.h"
Expand All @@ -37,7 +38,7 @@
* @{
*/
#ifndef KW41ZRF_NETIF_STACKSIZE
#define KW41ZRF_NETIF_STACKSIZE (THREAD_STACKSIZE_DEFAULT)
#define KW41ZRF_NETIF_STACKSIZE (IEEE802154_STACKSIZE_DEFAULT)
#endif
#ifndef KW41ZRF_NETIF_PRIO
#define KW41ZRF_NETIF_PRIO (GNRC_NETIF_PRIO)
Expand Down
3 changes: 2 additions & 1 deletion sys/net/gnrc/netif/init_devs/auto_init_mrf24j40.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "board.h"
#include "net/gnrc/netif/ieee802154.h"
#include "net/gnrc.h"
#include "include/init_devs.h"

#include "mrf24j40.h"
#include "mrf24j40_params.h"
Expand All @@ -29,7 +30,7 @@
* @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
#define MRF24J40_MAC_PRIO (GNRC_NETIF_PRIO)
#endif
Expand Down
3 changes: 2 additions & 1 deletion sys/net/gnrc/netif/init_devs/auto_init_nrf802154.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@
#include "board.h"
#include "nrf802154.h"
#include "net/gnrc/netif/ieee802154.h"
#include "include/init_devs.h"

/**
* @brief Define stack parameters for the MAC layer thread
* @{
*/
#ifndef NRF802154_MAC_STACKSIZE
#define NRF802154_MAC_STACKSIZE (THREAD_STACKSIZE_DEFAULT)
#define NRF802154_MAC_STACKSIZE (IEEE802154_STACKSIZE_DEFAULT)
#endif
#ifndef NRF802154_MAC_PRIO
#define NRF802154_MAC_PRIO (GNRC_NETIF_PRIO)
Expand Down
3 changes: 2 additions & 1 deletion sys/net/gnrc/netif/init_devs/auto_init_socket_zep.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@
#include "socket_zep.h"
#include "socket_zep_params.h"
#include "net/gnrc/netif/ieee802154.h"
#include "include/init_devs.h"

#define ENABLE_DEBUG 0
#include "debug.h"

/**
* @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
#define SOCKET_ZEP_MAC_PRIO (GNRC_NETIF_PRIO)
#endif
Expand Down
53 changes: 53 additions & 0 deletions sys/net/gnrc/netif/init_devs/include/init_devs.h
Original file line number Diff line number Diff line change
@@ -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 */
/** @} */

0 comments on commit efafa2e

Please sign in to comment.