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:
commit
f38d9d14c6
@ -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)))
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
3
sys/net/gnrc/netif/ethernet/Makefile
Normal file
3
sys/net/gnrc/netif/ethernet/Makefile
Normal file
@ -0,0 +1,3 @@
|
||||
MODULE := gnrc_netif_ethernet
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
@ -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 */
|
||||
|
||||
/** @} */
|
3
sys/net/gnrc/netif/ieee802154/Makefile
Normal file
3
sys/net/gnrc/netif/ieee802154/Makefile
Normal file
@ -0,0 +1,3 @@
|
||||
MODULE := gnrc_netif_ieee802154
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
@ -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 */
|
||||
/** @} */
|
Loading…
Reference in New Issue
Block a user