-
Notifications
You must be signed in to change notification settings - Fork 671
Openthread separate L2 configs #2792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
ArekBalysNordic
wants to merge
9
commits into
nrfconnect:main
Choose a base branch
from
ArekBalysNordic:openthread_separate_l2_cp
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Openthread separate L2 configs #2792
ArekBalysNordic
wants to merge
9
commits into
nrfconnect:main
from
ArekBalysNordic:openthread_separate_l2_cp
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Apr 18, 2025
e258eaf
to
a98cb40
Compare
a98cb40
to
164efb6
Compare
bd8dcac
to
711cb9e
Compare
ae584be
to
7272dea
Compare
… modules Move OpenThread-related code from zephyr/subsys/net/l2/openthread/openthread.c to zephyr/modules/openthread/platform/openthread.c. The primary goal of this refactor is to enable the use of OpenThread as an independent module, without the necessity of Zephyr's networking layer. This change is particularly beneficial for simple applications that have their own implementation of the IEEE802.15.4 driver and do not require a networking layer. These applications can now disable Zephyr's L2 and IEEE802.15.4 shim layers and directly use the OpenThread module, saving valuable kilobytes of memory. In this approach if the CONFIG_NET_L2_OPENTHREAD Kconfig option is set, Zephyr's L2 and IEEE802.15.4 layers will be used, and everything will function as before. The main difference is the Zephyr's L2 layer now uses the OpenThread module, no longer implementing it. While most of the functions in include/net/openthread.h have been deprecated, they are still available for use to maintain backwards compatibility. Signed-off-by: Arkadiusz Balys <[email protected]> (cherry picked from commit 596844a)
…n POST_KERNEL The new CONFIG_OPENTHREAD_SYS_INIT Kconfig option allows OpenThread to be automatically initialised during the Zephyr POST_KERNEL initialisation stage. If Zephyr's L2 layer OpenThread implementation is enabled, the IEEE802.15.4 shim layer initialises OpenThread in the POST_KERNEL phase. However, since Openthread may work without Zephyr's L2 layer, in this case, no object can initialise it automatically. This new Kconfig option may help start OpenThread automatically if the L2 Layer is disabled. Signed-off-by: Arkadiusz Balys <[email protected]> (cherry picked from commit 9a5f4b9)
… platform Stop using L2 log level in OpenThread platform files. Signed-off-by: Arkadiusz Balys <[email protected]> (cherry picked from commit ca40f41)
…_addr When both CONFIG_NET_IPV6_DAD and CONFIG_NET_IPV4_ACD are disabled, the anonymous union in struct net_if_addr ends up with no members, which results in a different struct layout between C and C++. In C, an empty union has size 0, while in C++ it has size >=1, which shifts the offsets of the following fields. Add a 1-byte dummy member to the union to ensure consistent layout across both compilers. Signed-off-by: Adrian Gielniewski <[email protected]> (cherry picked from commit 4d8ffcc) Signed-off-by: Adrian Gielniewski <[email protected]>
8fa1b75
to
c6b24db
Compare
* Add header with public API of OpenThread module. * Add module include directory to Zephyr include directories. * Use new header in platform implementation. Signed-off-by: Adrian Gielniewski <[email protected]> (cherry picked from commit 201d928) Signed-off-by: Adrian Gielniewski <[email protected]>
… header Use OpenThread module header instead of redefining its API. Signed-off-by: Adrian Gielniewski <[email protected]> (cherry picked from commit 47f39a1) Signed-off-by: Adrian Gielniewski <[email protected]>
Add openthread module header to INPUT due to dependencies to symbols in `zephyr/net/openthread.h` Signed-off-by: Adrian Gielniewski <[email protected]> (cherry picked from commit 73faf5c) Signed-off-by: Adrian Gielniewski <[email protected]>
c6b24db
to
0087a08
Compare
…r functions Add new Kconfig options to enable platform-specific features in OpenThread: - CONFIG_OPENTHREAD_PLATFORM_PKT_TXTIME enables support for packet TX time when CONFIG_NET_PKT_TXTIME is selected. - CONFIG_OPENTHREAD_PLATFORM_CARRIER_FUNCTIONS enables modulated and continuous carrier functions when CONFIG_OPENTHREAD_DIAG and CONFIG_IEEE802154_CARRIER_FUNCTIONS are enabled. Update preprocessor conditionals to use the new options instead of relying directly on CONFIG_NET_PKT_TXTIME and CONFIG_IEEE802154_CARRIER_FUNCTIONS. This change improves configurability and allows to reuse the platform implementation when not using Zephyr networking. Signed-off-by: Adrian Gielniewski <[email protected]> (cherry picked from commit e04f679) Signed-off-by: Adrian Gielniewski <[email protected]>
0087a08
to
58cb7bb
Compare
…twork. If CONFIG_OPENTHREAD_SYS_INIT is enabled, OpenThread initialisation should also consider running OpenThread automatically if CONFIG_OPENTHREAD_MANUAL_START is disabled. Removed also dependency on the `net_bytes_from_str` functions from the openthread.h file. Now, in the OpenThread module, there is an additional `openthread_utils.c/.h` file that can implement useful utilities for the OpenThread platform. Currently, it implements the `bytes_from_str` function to use it instead of `net_bytes_from_str`. Upstream PR #: 90861 Signed-off-by: Arkadiusz Balys <[email protected]>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please see commit messages.
Do not review while it is in draft.