Don't initialise the queuebuf unconditionally
Currently, it is only used by 6LoWPAN when fragmentation is enabled, by TSCH and by CSMA. Platforms that disable fragmentation and choose a different MAC layer (e.g. NULLMAC) will unnecessarily end up with the module linked in the image, wasting flash and/or RAM space.
This commit is contained in:
parent
adbe10881f
commit
8de3ffbc2e
@ -206,8 +206,6 @@ contiki_init()
|
||||
longaddr[4], longaddr[5], longaddr[6], longaddr[7]);
|
||||
}
|
||||
|
||||
queuebuf_init();
|
||||
|
||||
/* Initialize communication stack */
|
||||
netstack_init();
|
||||
printf("%s/%s\n",
|
||||
|
@ -43,7 +43,6 @@
|
||||
#include "contiki.h"
|
||||
#include "contiki-net.h"
|
||||
#include "sys/platform.h"
|
||||
#include "net/queuebuf.h"
|
||||
#include "dev/watchdog.h"
|
||||
|
||||
#if BUILD_WITH_ORCHESTRA
|
||||
@ -92,7 +91,6 @@ main(void)
|
||||
|
||||
#if NETSTACK_CONF_WITH_IPV6
|
||||
memcpy(&uip_lladdr.addr, &linkaddr_node_addr, sizeof(uip_lladdr.addr));
|
||||
queuebuf_init();
|
||||
process_start(&tcpip_process, NULL);
|
||||
#endif /* NETSTACK_CONF_WITH_IPV6 */
|
||||
|
||||
|
@ -1983,6 +1983,11 @@ sicslowpan_init(void)
|
||||
#endif /* SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS > 1 */
|
||||
|
||||
#endif /* SICSLOWPAN_COMPRESSION == SICSLOWPAN_COMPRESSION_IPHC */
|
||||
|
||||
/* We use the queuebuf module if fragmentation is enabled */
|
||||
#if SICSLOWPAN_CONF_FRAG
|
||||
queuebuf_init();
|
||||
#endif
|
||||
}
|
||||
/*--------------------------------------------------------------------*/
|
||||
int
|
||||
|
@ -549,4 +549,5 @@ csma_output_init(void)
|
||||
memb_init(&packet_memb);
|
||||
memb_init(&metadata_memb);
|
||||
memb_init(&neighbor_memb);
|
||||
queuebuf_init();
|
||||
}
|
||||
|
@ -921,7 +921,8 @@ tsch_init(void)
|
||||
LOG_ERR("! TSCH_HOPPING_SEQUENCE_MAX_LEN < sizeof(TSCH_DEFAULT_HOPPING_SEQUENCE). Abort init.\n");
|
||||
}
|
||||
|
||||
/* Init TSCH sub-modules */
|
||||
/* Init the queuebuf and TSCH sub-modules */
|
||||
queuebuf_init();
|
||||
tsch_reset();
|
||||
tsch_queue_init();
|
||||
tsch_schedule_init();
|
||||
|
Loading…
Reference in New Issue
Block a user