fixed compilation issues

This commit is contained in:
Joakim Eriksson 2018-10-23 07:51:46 +02:00
parent 0a3b890080
commit 008cffe81a
4 changed files with 9 additions and 6 deletions

View File

@ -141,12 +141,14 @@ uipbuf_is_attr_flag(uint16_t flag)
void
uipbuf_init(void)
{
memset(uipbuf_default_attrs, 0, sizeof(uipbuf_default_attrs));
/* And initialize anything that should be initialized */
uipbuf_set_attr(UIPBUF_ATTR_MAX_MAC_TRANSMISSIONS,
UIP_MAX_MAC_TRANSMISSIONS_UNDEFINED);
uipbuf_set_default_attr(UIPBUF_ATTR_MAX_MAC_TRANSMISSIONS,
UIP_MAX_MAC_TRANSMISSIONS_UNDEFINED);
/* set the not-set default value - this will cause the MAC layer to
configure its default */
uipbuf_set_attr(UIPBUF_ATTR_LLSEC_LEVEL, UIPBUF_ATTR_LLSEC_LEVEL_MAC_DEFAULT);
uipbuf_set_default_attr(UIPBUF_ATTR_LLSEC_LEVEL,
UIPBUF_ATTR_LLSEC_LEVEL_MAC_DEFAULT);
}
/*---------------------------------------------------------------------------*/

View File

@ -44,7 +44,7 @@
#ifdef CSMA_CONF_LLSEC_DEFAULT_KEY0
#define CSMA_LLSEC_DEFAULT_KEY0 CSMA_CONF_LLSEC_DEFAULT_KEY0
#else
#define CSMA_LLSEC_DEFAULT_KEY0 {0x10, 0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f}
#define CSMA_LLSEC_DEFAULT_KEY0 {0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f}
#endif
#ifdef CSMA_CONF_LLSEC_SECURITY_LEVEL

View File

@ -147,11 +147,12 @@ static void
init(void)
{
#if LLSEC802154_USES_AUX_HEADER
#ifdef CSMA_LLSEC_DEFAULT_KEY0
uint8_t key[16] = CSMA_LLSEC_DEFAULT_KEY0;
csma_security_set_key(0, key);
#endif
#endif /* LLSEC802154_USES_AUX_HEADER */
csma_output_init();
on();
}

View File

@ -42,7 +42,6 @@
#include "net/netstack.h"
#include "packetutils.h"
#include "border-router.h"
#include "net/mac/csma-security.h"
#include <string.h>
/*---------------------------------------------------------------------------*/
@ -65,6 +64,7 @@ struct tx_callback {
/*---------------------------------------------------------------------------*/
static struct tx_callback callbacks[MAX_CALLBACKS];
/*---------------------------------------------------------------------------*/
void
init_sec(void)
{
/* use the CSMA LLSEC config parameter */