1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

gnrc_netif: make link-layer specific operations proper submodules

This commit is contained in:
Martine Lenders 2018-12-05 14:22:14 +01:00
parent b271b0d670
commit 72c5fd06b4
7 changed files with 20 additions and 9 deletions

View File

@ -146,6 +146,12 @@ endif
ifneq (,$(filter gnrc_netif,$(USEMODULE)))
USEMODULE += netif
USEMODULE += fmt
ifneq (,$(filter netdev_ieee802154,$(USEMODULE)))
USEMODULE += gnrc_netif_ieee802154
endif
ifneq (,$(filter netdev_eth,$(USEMODULE)))
USEMODULE += gnrc_netif_ethernet
endif
endif
ifneq (,$(filter ieee802154 nrfmin,$(USEMODULE)))

View File

@ -34,7 +34,7 @@ endif
ifneq (,$(filter gnrc_netapi,$(USEMODULE)))
DIRS += netapi
endif
ifneq (,$(filter gnrc_netif,$(USEMODULE)))
ifneq (,$(filter gnrc_netif gnrc_netif_%,$(USEMODULE)))
DIRS += netif
endif
ifneq (,$(filter gnrc_netif_hdr,$(USEMODULE)))

View File

@ -1,3 +1,10 @@
MODULE := gnrc_netif
ifneq (,$(filter gnrc_netif_ethernet,$(USEMODULE)))
DIRS += ethernet
endif
ifneq (,$(filter gnrc_netif_ieee802154,$(USEMODULE)))
DIRS += ieee802154
endif
include $(RIOTBASE)/Makefile.base

View File

@ -0,0 +1,3 @@
MODULE := gnrc_netif_ethernet
include $(RIOTBASE)/Makefile.base

View File

@ -17,7 +17,6 @@
#include <string.h>
#ifdef MODULE_NETDEV_ETH
#include "net/ethernet/hdr.h"
#include "net/gnrc.h"
#include "net/gnrc/netif/ethernet.h"
@ -248,8 +247,5 @@ safe_out:
gnrc_pktbuf_release(pkt);
return NULL;
}
#else /* MODULE_NETDEV_ETH */
typedef int dont_be_pedantic;
#endif /* MODULE_NETDEV_ETH */
/** @} */

View File

@ -0,0 +1,3 @@
MODULE := gnrc_netif_ieee802154
include $(RIOTBASE)/Makefile.base

View File

@ -28,7 +28,6 @@
#include "od.h"
#endif
#ifdef MODULE_NETDEV_IEEE802154
static int _send(gnrc_netif_t *netif, gnrc_pktsnip_t *pkt);
static gnrc_pktsnip_t *_recv(gnrc_netif_t *netif);
@ -263,7 +262,4 @@ static int _send(gnrc_netif_t *netif, gnrc_pktsnip_t *pkt)
gnrc_pktbuf_release(pkt);
return res;
}
#else /* MODULE_NETDEV_IEEE802154 */
typedef int dont_be_pedantic;
#endif /* MODULE_NETDEV_IEEE802154 */
/** @} */