From 83660ac30e7f64b529977b61e183c1e5005bda8d Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 8 Apr 2017 13:27:03 -0600 Subject: [PATCH] Add configuration/build support for an IEEE802.15.4 network device. --- wireless/ieee802154/Kconfig | 34 +++++++++++++++++++++++++++++++++- wireless/ieee802154/Make.defs | 4 ++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/wireless/ieee802154/Kconfig b/wireless/ieee802154/Kconfig index b46aada66d..64b9e66e91 100644 --- a/wireless/ieee802154/Kconfig +++ b/wireless/ieee802154/Kconfig @@ -37,13 +37,45 @@ config IEEE802154_DEV Enables a device driver to expose ieee802.15.4 radio controls to user space as IOCTLs. +config IEEE802154_NETDEV + bool "IEEE802154 6loWPAN Network Device" + default n + depends on NET_6LOWPAN && NET_IPv6 + select ARCH_HAVE_NETDEV_STATISTICS + ---help--- + Add support for the IEEE802.15.4 6loWPAN network device built on + the common IEEE802.15.4 MAC. + +if IEEE802154_NETDEV + +choice + prompt "Work queue" + default IEEE802154_NETDEV_LPWORK if SCHED_LPWORK + default IEEE802154_NETDEV_HPWORK if !SCHED_LPWORK && SCHED_HPWORK + depends on SCHED_WORKQUEUE + ---help--- + Work queue support is required to use the IEEE802.15.4 network + driver. If the low priority work queue is available, then it shoul + be used by the loopback driver. + +config IEEE802154_NETDEV_HPWORK + bool "High priority" + depends on SCHED_HPWORK + +config IEEE802154_NETDEV_LPWORK + bool "Low priority" + depends on SCHED_LPWORK + +endchoice # Work queue +endif # IEEE802154_NETDEV + config IEEE802154_LOOPBACK bool "IEEE802154 6loWPAN Loopback" default n depends on NET_6LOWPAN && NET_IPv6 select ARCH_HAVE_NETDEV_STATISTICS ---help--- - Add support for the IEEE802154 6loWPAN Loopback test device. + Add support for the IEEE802.15.4 6loWPAN Loopback test device. if IEEE802154_LOOPBACK diff --git a/wireless/ieee802154/Make.defs b/wireless/ieee802154/Make.defs index bb2531e3e7..fc4db543bf 100644 --- a/wireless/ieee802154/Make.defs +++ b/wireless/ieee802154/Make.defs @@ -53,6 +53,10 @@ ifeq ($(CONFIG_IEEE802154_DEV),y) CSRCS += radio802154_device.c endif +ifeq ($(CONFIG_IEEE802154_NETDEV),y) +CSRCS += mac802154_netdev.c +endif + ifeq ($(CONFIG_IEEE802154_LOOPBACK),y) CSRCS += mac802154_loopback.c endif