From 40f189a3a369b0a18acc03c90a810a9419c20ee0 Mon Sep 17 00:00:00 2001 From: Joakim Eriksson Date: Sat, 7 Oct 2017 20:12:51 +0200 Subject: [PATCH] removed NETSTACK_CONF_MAC_OTHER --- arch/platform/nrf52dk/Makefile.nrf52dk | 3 --- arch/platform/nrf52dk/contiki-conf.h | 4 ++-- examples/ipv6/slip-radio/slip-net.c | 13 ++++++++++++- examples/sensniff/Makefile | 3 --- examples/sensniff/project-conf.h | 5 +++-- tests/16-6tisch/code/Makefile | 3 +-- tests/16-6tisch/code/project-conf.h | 6 +++--- 7 files changed, 21 insertions(+), 16 deletions(-) diff --git a/arch/platform/nrf52dk/Makefile.nrf52dk b/arch/platform/nrf52dk/Makefile.nrf52dk index 7d46a25d6..9ed30f2b5 100644 --- a/arch/platform/nrf52dk/Makefile.nrf52dk +++ b/arch/platform/nrf52dk/Makefile.nrf52dk @@ -24,9 +24,6 @@ CLEAN += *.nrf52dk ### Unless the example dictates otherwise, build with code size optimisations switched off SMALL ?= 0 -# Custom MAC layer for BLE (ble_ipsp_mac_driver) -MAKE_MAC = MAKE_MAC_OTHER - ### Define the CPU directory and pull in the correct CPU makefile. CONTIKI_CPU=$(CONTIKI)/arch/cpu/nrf52832 include $(CONTIKI_CPU)/Makefile.nrf52832 diff --git a/arch/platform/nrf52dk/contiki-conf.h b/arch/platform/nrf52dk/contiki-conf.h index c283f7231..f52bf48d2 100644 --- a/arch/platform/nrf52dk/contiki-conf.h +++ b/arch/platform/nrf52dk/contiki-conf.h @@ -56,8 +56,8 @@ * @{ */ -/* Selected in netstack.h because our Makefile sets MAKE_MAC = MAKE_MAC_OTHER */ -#define NETSTACK_CONF_OTHER_MAC ble_ipsp_mac_driver +/* Select the BLE mac driver */ +#define NETSTACK_CONF_MAC ble_ipsp_mac_driver /* 6LoWPAN */ #define SICSLOWPAN_CONF_MAC_MAX_PAYLOAD 1280 diff --git a/examples/ipv6/slip-radio/slip-net.c b/examples/ipv6/slip-radio/slip-net.c index bb162ea9b..4449462e2 100644 --- a/examples/ipv6/slip-radio/slip-net.c +++ b/examples/ipv6/slip-radio/slip-net.c @@ -94,10 +94,21 @@ slipnet_input(void) /* printf("SUT: %u\n", uip_len); */ slip_send_packet(uip_buf, uip_len); } + +static uint8_t +slipnet_output(const linkaddr_t *localdest) +{ + /* do nothing... */ + return 1; +} + /*---------------------------------------------------------------------------*/ const struct network_driver slipnet_driver = { "slipnet", slipnet_init, - slipnet_input + slipnet_input, + /* output is likely never called - or at least not used as no IP packets + should be produced in slip-radio */ + slipnet_output }; /*---------------------------------------------------------------------------*/ diff --git a/examples/sensniff/Makefile b/examples/sensniff/Makefile index a64864d53..53b8c7c46 100755 --- a/examples/sensniff/Makefile +++ b/examples/sensniff/Makefile @@ -15,9 +15,6 @@ endif ### add more source files to the build or define make variables. -include $(TARGET)/Makefile.$(TARGET) -# Custom MAC layer for sensniff (sensniff_mac_driver) -MAKE_MAC = MAKE_MAC_OTHER - all: $(CONTIKI_PROJECT) CONTIKI = ../.. diff --git a/examples/sensniff/project-conf.h b/examples/sensniff/project-conf.h index bbf53463d..a68cfc933 100644 --- a/examples/sensniff/project-conf.h +++ b/examples/sensniff/project-conf.h @@ -32,8 +32,9 @@ #ifndef PROJECT_CONF_H_ #define PROJECT_CONF_H_ /*---------------------------------------------------------------------------*/ -/* Selected in netstack.h because our Makefile sets MAKE_MAC = MAKE_MAC_OTHER */ -#define NETSTACK_CONF_OTHER_MAC sensniff_mac_driver +/* Configure the sensniff_mac_driver for netstack.h */ +#undef NETSTACK_CONF_MAC +#define NETSTACK_CONF_MAC sensniff_mac_driver /*---------------------------------------------------------------------------*/ /* Include platform-specific header */ #include "target-conf.h" diff --git a/tests/16-6tisch/code/Makefile b/tests/16-6tisch/code/Makefile index 3d4f2b517..5388bc5c3 100644 --- a/tests/16-6tisch/code/Makefile +++ b/tests/16-6tisch/code/Makefile @@ -10,6 +10,5 @@ CFLAGS += -DSIXP_MSG_API_TEST=1 endif CONTIKI = ../../.. -# MAC layer is test_mac_driver -MAKE_MAC = MAKE_MAC_OTHER + include $(CONTIKI)/Makefile.include diff --git a/tests/16-6tisch/code/project-conf.h b/tests/16-6tisch/code/project-conf.h index 895d935be..0e857cbd6 100644 --- a/tests/16-6tisch/code/project-conf.h +++ b/tests/16-6tisch/code/project-conf.h @@ -65,8 +65,8 @@ #undef IEEE802154_CONF_PANID #define IEEE802154_CONF_PANID 0xabcd -/* Custom MAC layer, enabled via MAKE_MAC = MAKE_MAC_OTHER in the Makefile */ -#undef NETSTACK_CONF_OTHER_MAC -#define NETSTACK_CONF_OTHER_MAC test_mac_driver +/* Custom MAC layer */ +#undef NETSTACK_CONF_MAC +#define NETSTACK_CONF_MAC test_mac_driver #endif /* __PROJECT_CONF_H__ */