[riot-notifications] [RIOT-OS/RIOT] cpu/nrf52: nrf802154: default to netdev_ieee802154_submac (#15132)

José Alamos notifications at github.com
Mon Nov 23 13:00:19 CET 2020


Let's go with it, but there's only a minor thing that I think it should be addressed: `netdev_submac_ieee802154` doesn't implement all NETOPTs defined by this driver. There might be people that still need to use e.g NETOPT_CHANNEL_IS_CLR with this radio.

What I propose for the short-term is to add a `netdev_legacy` module that enables the netdev implementation. In the mid-run we can implement the missing NETOPTs.

The following patch does the trick in case you want to append it to this PR:
```patch
>From 3daa0880b0148164c1c4be776fce9af0d5f5cb91 Mon Sep 17 00:00:00 2001
From: Jose Alamos <jose.alamos at haw-hamburg.de>
Date: Mon, 23 Nov 2020 12:58:38 +0100
Subject: [PATCH 1/2] netdev: add legacy pseudomodule

---
 examples/gnrc_networking/Makefile | 3 +++
 makefiles/pseudomodules.inc.mk    | 1 +
 2 files changed, 4 insertions(+)

diff --git a/examples/gnrc_networking/Makefile b/examples/gnrc_networking/Makefile
index 610d0bc501..49bb3b6afa 100644
--- a/examples/gnrc_networking/Makefile
+++ b/examples/gnrc_networking/Makefile
@@ -31,6 +31,9 @@ USEMODULE += netstats_l2
 USEMODULE += netstats_ipv6
 USEMODULE += netstats_rpl
 
+# Uncomment this to enable legacy support of netdev
+# USEMODULE += netdev_legacy
+
 # Comment this out to disable code in RIOT that does safety checking
 # which is not needed in a production environment but helps in the
 # development process:
diff --git a/makefiles/pseudomodules.inc.mk b/makefiles/pseudomodules.inc.mk
index 41295be5f5..0ebf78d9a5 100644
--- a/makefiles/pseudomodules.inc.mk
+++ b/makefiles/pseudomodules.inc.mk
@@ -80,6 +80,7 @@ PSEUDOMODULES += netdev_ieee802154
 PSEUDOMODULES += netdev_eth
 PSEUDOMODULES += netdev_layer
 PSEUDOMODULES += netdev_register
+PSEUDOMODULES += netdev_legacy
 PSEUDOMODULES += netstats
 PSEUDOMODULES += netstats_l2
 PSEUDOMODULES += netstats_ipv6
-- 
2.29.2


>From de0a43ef207bb5b714f7a84e3c302a74da17e7cc Mon Sep 17 00:00:00 2001
From: Jose Alamos <jose.alamos at haw-hamburg.de>
Date: Mon, 23 Nov 2020 12:58:50 +0100
Subject: [PATCH 2/2] fixup! cpu/nrf52: nrf802154: default to
 netdev_ieee802154_submac

---
 cpu/nrf52/Makefile.dep | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cpu/nrf52/Makefile.dep b/cpu/nrf52/Makefile.dep
index 63a95395d5..95a88490b6 100644
--- a/cpu/nrf52/Makefile.dep
+++ b/cpu/nrf52/Makefile.dep
@@ -5,7 +5,9 @@ ifneq (,$(filter nrf802154,$(USEMODULE)))
   FEATURES_REQUIRED += radio_nrf802154
   USEMODULE += luid
   USEMODULE += netdev_ieee802154
-  USEMODULE += netdev_ieee802154_submac
+  ifeq (,$(filter netdev_legacy,$(USEMODULE)))
+    USEMODULE += netdev_ieee802154_submac
+  endif
 endif
 
 # The nrf52832 requires gpio IRQ with SPI to work around errata 58
-- 
2.29.2
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15132#issuecomment-732118047
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201123/c93a381f/attachment.htm>


More information about the notifications mailing list