cpu/nrf52: nrf802154: default to netdev_ieee802154_submac#15132
Conversation
|
I'm fine with it! The ROM and RAM will be reduced when we remove the migration interfaces :), but the retransmission logic still adds some memory. |
|
Ah well, no lwip support yet. |
|
It really sucks that we don't have a common network stack independent bootstrap for all radios :( |
407d272 to
c35c40a
Compare
|
So all the other stacks work now - should we flip the switch? |
Sure, I'm in :) |
|
Well it's up to you to merge this then 😉 |
|
Let's go with it, but there's only a minor thing that I think it should be addressed: What I propose for the short-term is to add a The following patch does the trick in case you want to append it to this PR: From d8b1b30ee8655c72b3f25860dc20855502c5fca5 Mon Sep 17 00:00:00 2001
From: Jose Alamos <jose.alamos@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..e96762ea47 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 for IEEE 802.15.4 radios.
+# USEMODULE += netdev_ieee802154_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..7ac0d4c7ef 100644
--- a/makefiles/pseudomodules.inc.mk
+++ b/makefiles/pseudomodules.inc.mk
@@ -133,6 +133,7 @@ PSEUDOMODULES += ztimer%
# ztimer's main module is called "ztimer_core"
NO_PSEUDOMODULES += ztimer_core
NO_PSEUDOMODULES += netdev_ieee802154_submac
+NO_PSEUDOMODULES += netdev_ieee802154_legacy
# print ascii representation in function od_hex_dump()
PSEUDOMODULES += od_string
--
2.29.2
From 97edf7823829ccc61e0ed10eee9df856e0cf43cb Mon Sep 17 00:00:00 2001
From: Jose Alamos <jose.alamos@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..e84d04c63e 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_ieee802154_legacy,$(USEMODULE)))
+ USEMODULE += netdev_ieee802154_submac
+ endif
endif
# The nrf52832 requires gpio IRQ with SPI to work around errata 58
--
2.29.2
|
|
Alternatively, we can open a follow up PR. As you wish 😉 |
Probably the module should be called EDIT: Already fixed it in #15132 (comment) |
The basic nrf802154 driver lacks ACK handling and retransmissions, which degrades it's usefulness. The 802.15.4 Sub-MAC fixes all those issues. Enable it by default for this driver to make it better behaved.
c35c40a to
264d0e3
Compare
|
added it |
|
I don't see any reason not to go forward with this. Sadly nrf802154 netdev will not have those features in the near future (despite #11150 being out there). This PR will definitely improve the current situation on those nrf boards. |
The idea would be to deprecate |
How is that? Unless the applications rely on ACKs/Retransmissions not being available, they shouldn't even notice a difference. |
True, I disregarded this for there are probably no real users of this driver (who can't switch to the submac in an instance). In that case it might go into the next release, officially deprecating nrf802154. EDIT:
Well if someone have code that is connected to the driver, it will most likely not work anymore. |
I don't see why this needs an extra ACK. Even if it is an API change (I disagree with that), I don't believe the |
Contribution description
The basic nrf802154 driver lacks ACK handling and retransmissions, which degrades it's usefulness.
The 802.15.4 Sub-MAC fixes all those issues.
Enable it by default for this driver to make it better behaved.
Testing procedure
Benefits are immediately noticeable with
pingmaster
sub-MAC
This adds 2732 bytes of ROM and 256 bytes of RAM.
Issues/PRs references
Should probably wait until after the hard feature freeze.