From dadfdf91403658d3d3f1f6058cfda946acf22f32 Mon Sep 17 00:00:00 2001 From: Maciej Baczmanski Date: Mon, 30 Sep 2024 09:43:15 +0200 Subject: [PATCH] [nrf fromlist] net: openthread: add `OPENTHREAD_STORE_FRAME_COUNTER_AHEAD` Add `OPENTHREAD_STORE_FRAME_COUNTER_AHEAD` Kconfig option and set it to 100000, as after calculations it appears to be a more suitable value. Upstream PR: https://github.com/zephyrproject-rtos/zephyr/pull/79180 Signed-off-by: Maciej Baczmanski --- modules/openthread/Kconfig.thread | 10 ++++++++-- .../platform/openthread-core-zephyr-config.h | 10 ++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/modules/openthread/Kconfig.thread b/modules/openthread/Kconfig.thread index 021393fb371..f084d3b3a56 100644 --- a/modules/openthread/Kconfig.thread +++ b/modules/openthread/Kconfig.thread @@ -187,13 +187,13 @@ config OPENTHREAD_BLE_TCAT_THREAD_STACK_SIZE default 5120 if OPENTHREAD_CRYPTO_PSA default 4200 help - Openthread default TCAT stack size. + Openthread default TCAT stack size. config OPENTHREAD_BLE_TCAT_RING_BUF_SIZE int "Openthread BLE ringbuffer size" default 512 help - Openthread BLE TCAT ringbuffer size. + Openthread BLE TCAT ringbuffer size. config OPENTHREAD_NAT64_CIDR string "Set IPv4 CIDR used by NAT64" @@ -204,3 +204,9 @@ config OPENTHREAD_NAT64_CIDR to set source address of the outgoing translated IPv4 packets. The CIDR must have four bytes in the address with the non-zero length of prefix (e.g., "127.0.0.1/24"). + +config OPENTHREAD_STORE_FRAME_COUNTER_AHEAD + int "Openthread frame counter ahead value" + default 100000 + help + Openthread value ahead of the current frame counter for persistent storage. diff --git a/modules/openthread/platform/openthread-core-zephyr-config.h b/modules/openthread/platform/openthread-core-zephyr-config.h index 71a087ca0b5..20f424ee2fe 100644 --- a/modules/openthread/platform/openthread-core-zephyr-config.h +++ b/modules/openthread/platform/openthread-core-zephyr-config.h @@ -448,4 +448,14 @@ #define OPENTHREAD_CONFIG_RADIO_STATS_ENABLE CONFIG_OPENTHREAD_RADIO_STATS #endif +/** + * @def OPENTHREAD_CONFIG_STORE_FRAME_COUNTER_AHEAD + * + * The value ahead of the current frame counter for persistent storage. + * + */ +#ifdef CONFIG_OPENTHREAD_STORE_FRAME_COUNTER_AHEAD +#define OPENTHREAD_CONFIG_STORE_FRAME_COUNTER_AHEAD CONFIG_OPENTHREAD_STORE_FRAME_COUNTER_AHEAD +#endif + #endif /* OPENTHREAD_CORE_ZEPHYR_CONFIG_H_ */