From 83d8a7ed8ba317462943fa1b953d88c6fc33c786 Mon Sep 17 00:00:00 2001 From: Anthony Merlino Date: Sun, 18 Jun 2017 10:53:31 -0400 Subject: [PATCH] wireless/ieee802154: Renames Kconfig option, adds option for unimplemented receiver priority. --- wireless/ieee802154/Kconfig | 38 ++++++++++++++++++++++++++++------- wireless/ieee802154/Make.defs | 2 +- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/wireless/ieee802154/Kconfig b/wireless/ieee802154/Kconfig index 7ffe2654f4..107063a43e 100644 --- a/wireless/ieee802154/Kconfig +++ b/wireless/ieee802154/Kconfig @@ -21,13 +21,7 @@ config IEEE802154_DEFAULT_EADDR ---help--- Set the default extended address to be used by MAC networks on init -config IEEE802154_MAC_DEV - bool "Character driver for IEEE 802.15.4 MAC layer" - default n - depends on WIRELESS_IEEE802154 - ---help--- - Enable the device driver to expose the IEEE 802.15.4 MAC layer - access to user space as IOCTLs + choice prompt "IEEE 802.15.4 work queue" @@ -83,6 +77,36 @@ config IEEE802154_IND_IRQRESERVE Non-interrupt logic will also first attempt to allocate from the general, pre-allocated structure pool. If that fails, it will dynamically allocate the meta data structure with an additional cost in performance. + +config IEEE802154_MACDEV + bool "Character driver for IEEE 802.15.4 MAC layer" + default n + depends on WIRELESS_IEEE802154 + ---help--- + Enable the device driver to expose the IEEE 802.15.4 MAC layer + access to user space as IOCTLs + +if IEEE802154_MACDEV + +config IEEE802154_MACDEV_RECEIVERPRIORITY + int "Priority of frame receiver registerd with the MAC layer" + default 0 + ---help--- + When the MAC layer receives an incoming data frame, it passes the frame + to registered receivers, in order of receiver priority, until one of the + receivers claim the frame. + + An example case would be when 6LoWPAN and the MAC character driver are + enabled. Both have receivers registered with the MAC. The 6LoWPAN layer + should get assigned a higher priority than the character driver. In this + case, the 6LoWPAN receiver will receive the frame first. If the frame is + a 6LoWPAN frame, it will claim the frame and the MAC will not pass the + frame to any additional receivers. If it does not claim the frame, the + MAC layer will call the next highest priority receiver, in this case, + the MAC character driver (which should always be lowest priority since + it is a "catch-all" type receiver). + +endif # IEEE802154_MACDEV config IEEE802154_NETDEV bool "IEEE802154 6loWPAN Network Device" diff --git a/wireless/ieee802154/Make.defs b/wireless/ieee802154/Make.defs index da1b1bc05e..26705a51a7 100644 --- a/wireless/ieee802154/Make.defs +++ b/wireless/ieee802154/Make.defs @@ -46,7 +46,7 @@ CSRCS += mac802154_sync.c # Include wireless devices build support -ifeq ($(CONFIG_IEEE802154_MAC_DEV),y) +ifeq ($(CONFIG_IEEE802154_MACDEV),y) CSRCS += mac802154_device.c endif