fixed better packet size assumptions

This commit is contained in:
Joakim Eriksson 2018-10-30 16:22:18 +01:00
parent 42dfc81af2
commit 35123e9dd8
3 changed files with 4 additions and 7 deletions

View File

@ -69,7 +69,7 @@
#ifdef CSMA_MAC_CONF_LEN
#define CSMA_MAC_LEN CSMA_MAC_CONF_LEN
#else
#define CSMA_MAC_LEN 127
#define CSMA_MAC_LEN 127 - 2
#endif
/* just a default - with LLSEC, etc */

View File

@ -66,8 +66,8 @@
/* 1 channel, sequence length 1 */
#define TSCH_HOPPING_SEQUENCE_1_1 (uint8_t[]){ 20 }
/* Max TSCH packet lenght */
#define TSCH_PACKET_MAX_LEN MIN(127, PACKETBUF_SIZE)
/* Max TSCH packet lenght - last bytes are CRC in default 802.15.4 packets */
#define TSCH_PACKET_MAX_LEN MIN(127 - 2, PACKETBUF_SIZE)
/* The jitter to remove in ticks.
* This should be the sum of measurement errors on Tx and Rx nodes.

View File

@ -62,9 +62,6 @@
#include "net/mac/tsch/sixtop/sixtop.h"
#endif
/* Needed to estimate the MAC lenght */
#define TSCH_MAC_MAX_LEN 127
#if FRAME802154_VERSION < FRAME802154_IEEE802154_2015
#error TSCH: FRAME802154_VERSION must be at least FRAME802154_IEEE802154_2015
#endif
@ -1135,7 +1132,7 @@ static int
max_payload(void)
{
/* Setup security... before. */
return TSCH_MAC_MAX_LEN - NETSTACK_FRAMER.length();
return TSCH_PACKET_MAX_LEN - NETSTACK_FRAMER.length();
}
/*---------------------------------------------------------------------------*/
const struct mac_driver tschmac_driver = {