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

Merge pull request #10549 from miri64/gnrc_netif/enh/submodules

gnrc_netif: make link-layer specific operations proper submodules
This commit is contained in:
Kaspar Schleiser 2018-12-05 17:44:40 +01:00 committed by GitHub
commit f38d9d14c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 23 additions and 12 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,12 +34,9 @@ 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)))
DIRS += netif/hdr
endif
ifneq (,$(filter gnrc_netreg,$(USEMODULE)))
DIRS += netreg
endif

View File

@ -1,3 +1,13 @@
MODULE := gnrc_netif
ifneq (,$(filter gnrc_netif_ethernet,$(USEMODULE)))
DIRS += ethernet
endif
ifneq (,$(filter gnrc_netif_ieee802154,$(USEMODULE)))
DIRS += ieee802154
endif
ifneq (,$(filter gnrc_netif_hdr,$(USEMODULE)))
DIRS += hdr
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 */
/** @} */