Skip to content

Commit e7e4f8b

Browse files
bas-archembeddednordicjm
authored andcommitted
[nrf fromtree] net: openthread: Add option to set RCP restoration count.
This patch allows to set the RCP restoration count when necessary. Signed-off-by: Bas van Loon <[email protected]> (cherry picked from commit 27a32b3)
1 parent 793e93e commit e7e4f8b

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

modules/openthread/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ macro(kconfig_to_ot_option kconfig_option ot_config description)
1111
endif()
1212
endmacro()
1313

14+
macro(kconfig_to_ot_option_value kconfig_option ot_config description)
15+
set(${ot_config} ${${kconfig_option}} CACHE STRING "${description}" FORCE)
16+
endmacro()
17+
1418
# OpenThread options
1519
set(OT_BUILD_EXECUTABLES OFF CACHE BOOL "Disable OpenThread samples")
1620
set(OT_BUILTIN_MBEDTLS_MANAGEMENT OFF CACHE BOOL "Use Zephyr's mbedTLS heap")
@@ -130,6 +134,7 @@ kconfig_to_ot_option(CONFIG_OPENTHREAD_UPTIME OT_UPTIME "Enable support for trac
130134
kconfig_to_ot_option(CONFIG_OPENTHREAD_VERHOEFF_CHECKSUM OT_VERHOEFF_CHECKSUM "Verhoeff checksum")
131135
kconfig_to_ot_option(CONFIG_OPENTHREAD_WAKEUP_COORDINATOR OT_WAKEUP_COORDINATOR "Enable Wake-up Coordinator role")
132136
kconfig_to_ot_option(CONFIG_OPENTHREAD_WAKEUP_END_DEVICE OT_WAKEUP_END_DEVICE "Enable Wake-up End Device role")
137+
kconfig_to_ot_option_value(CONFIG_OPENTHREAD_RCP_RESTORATION_MAX_COUNT OT_RCP_RESTORATION_MAX_COUNT "Set the maximum number of RCP restoration attempts")
133138

134139
if(CONFIG_OPENTHREAD_COPROCESSOR_VENDOR_HOOK_SOURCE)
135140
set(OT_NCP_VENDOR_HOOK_SOURCE ${CONFIG_OPENTHREAD_COPROCESSOR_VENDOR_HOOK_SOURCE} CACHE STRING "NCP vendor hook source file name" FORCE)

modules/openthread/Kconfig.thread

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,3 +250,9 @@ config OPENTHREAD_MLE_CHILD_TIMEOUT
250250
default 240
251251
help
252252
The value of MLE child timeout in seconds.
253+
254+
config OPENTHREAD_RCP_RESTORATION_MAX_COUNT
255+
int "Openthread RCP restoration maximum count"
256+
default 2
257+
help
258+
The maximum number of attempts to restore the RCP connection.

0 commit comments

Comments
 (0)