Skip to content

Commit b010bae

Browse files
maciejbaczmanskiArekBalysNordic
authored andcommitted
[nrf fromtree] openthread: Rework L2 configuration
- Add possibility to choose implementation of OpenThread L2 and set it to Zephyr's by default - Remove unused `OPENTHREAD_SECURITY_INTERNAL` Kconfig - Add missing choice names for logging and coprocessor Signed-off-by: Maciej Baczmanski <[email protected]> (cherry picked from commit 6636adc)
1 parent 7607c65 commit b010bae

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

subsys/net/l2/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if(CONFIG_NET_L2_IEEE802154)
2424
add_subdirectory(ieee802154)
2525
endif()
2626

27-
if(CONFIG_NET_L2_OPENTHREAD)
27+
if(CONFIG_NET_L2_OPENTHREAD_IMPLEMENTATION_ZEPHYR)
2828
add_subdirectory(openthread)
2929
endif()
3030

subsys/net/l2/openthread/Kconfig

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
# Copyright (c) 2018 Nordic Semiconductor ASA
44
# SPDX-License-Identifier: Apache-2.0
5-
config OPENTHREAD_SECURITY_INTERNAL
6-
bool
7-
help
8-
OpenThread setting to signal that OpenThread security settings, such
9-
as the OPENTHREAD_MBEDTLS setting will be controlled through other
10-
Kconfig dependencies and should not be user configurable.
11-
125
menuconfig NET_L2_OPENTHREAD
136
bool "OpenThread L2"
147
depends on NETWORKING
8+
9+
choice NET_L2_OPENTHREAD_IMPLEMENTATION
10+
prompt "OpenThread L2 implementation"
11+
depends on NET_L2_OPENTHREAD
12+
13+
config NET_L2_OPENTHREAD_IMPLEMENTATION_ZEPHYR
14+
bool "Zephyr's OpenThread L2 implementation"
1515
select NET_L2_PHY_IEEE802154
1616
select OPENTHREAD
1717

@@ -28,13 +28,17 @@ menuconfig NET_L2_OPENTHREAD
2828
imply NET_UDP
2929
imply NET_IPV6
3030
imply NET_CONFIG_NEED_IPV6
31+
help
32+
Use Zephyr's implementation of the OpenThread L2.
33+
34+
endchoice # NET_L2_OPENTHREAD_IMPLEMENTATION
3135

32-
if NET_L2_OPENTHREAD
36+
if NET_L2_OPENTHREAD_IMPLEMENTATION_ZEPHYR
3337

3438
choice OPENTHREAD_IMPLEMENTATION
3539
prompt "OpenThread origin selection"
3640
help
37-
Select OpenThread to use for build. Custom OpenThread implementations
41+
Select OpenThread stack to use for build. Custom OpenThread implementations
3842
can be added to the application Kconfig.
3943

4044
config OPENTHREAD_SOURCES
@@ -63,7 +67,7 @@ menuconfig OPENTHREAD_DEBUG
6367
help
6468
This option enables logging support for OpenThread.
6569

66-
choice
70+
choice OPENTHREAD_LOG_LEVEL_CHOICE
6771
prompt "OpenThread stack log level"
6872
depends on OPENTHREAD_DEBUG
6973
help
@@ -79,7 +83,7 @@ config OPENTHREAD_LOG_LEVEL_INFO
7983
bool "Informational"
8084
config OPENTHREAD_LOG_LEVEL_DEBG
8185
bool "Debug"
82-
endchoice
86+
endchoice # OPENTHREAD_LOG_LEVEL_CHOICE
8387

8488
config OPENTHREAD_LOG_LEVEL
8589
int
@@ -169,7 +173,6 @@ config MBEDTLS_PROMPTLESS
169173
choice OPENTHREAD_SECURITY
170174
prompt "OpenThread security"
171175
default OPENTHREAD_MBEDTLS_CHOICE
172-
depends on !OPENTHREAD_SECURITY_INTERNAL
173176

174177
config CUSTOM_OPENTHREAD_SECURITY
175178
bool "Custom"
@@ -232,7 +235,7 @@ config OPENTHREAD_COPROCESSOR
232235

233236
if OPENTHREAD_COPROCESSOR
234237

235-
choice
238+
choice OPENTHREAD_COPROCESSOR_CHOICE
236239
prompt "OpenThread Co-Processor type"
237240
help
238241
This option selects Thread network co-processor type
@@ -241,7 +244,7 @@ config OPENTHREAD_COPROCESSOR_NCP
241244
bool "NCP - Network Co-Processor"
242245
config OPENTHREAD_COPROCESSOR_RCP
243246
bool "RCP - Radio Co-Processor"
244-
endchoice
247+
endchoice # OPENTHREAD_COPROCESSOR_CHOICE
245248

246249
config OPENTHREAD_COPROCESSOR_UART_RING_BUFFER_SIZE
247250
int "Set Co-Processor UART ring buffer size"
@@ -350,4 +353,4 @@ config OPENTHREAD_PLATFORM_KEYS_EXPORTABLE_ENABLE
350353
help
351354
Enable the creation of exportable MAC keys in the OpenThread Key Manager.
352355

353-
endif # NET_L2_OPENTHREAD
356+
endif # NET_L2_OPENTHREAD_IMPLEMENTATION_ZEPHYR

0 commit comments

Comments
 (0)