net: openthread: implement `otPlatRadioGetCslUncertainty`
Implement the OpenThread API to retrieve the platforms CSL
Uncertainty.
Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
diff --git a/subsys/net/l2/openthread/Kconfig.thread b/subsys/net/l2/openthread/Kconfig.thread
index f7a0967..6f0b111 100644
--- a/subsys/net/l2/openthread/Kconfig.thread
+++ b/subsys/net/l2/openthread/Kconfig.thread
@@ -97,10 +97,11 @@
The minimum CSL receive window (in microseconds) required to receive a full IEEE 802.15.4 frame
config OPENTHREAD_PLATFORM_CSL_UNCERT
- int "CSL clock uncertainty"
+ int "CSL uncertainty"
default 255
+ range 0 255
help
- The Uncertainty of the scheduling CSL of transmission by the parent, in ±10 us units.
+ The fixed uncertainty of the Device for scheduling CSL Transmissions in units of 10 microseconds.
config OPENTHREAD_MAC_SOFTWARE_TX_SECURITY_ENABLE
bool "Software transmission security logic"
diff --git a/subsys/net/lib/openthread/platform/openthread-core-zephyr-config.h b/subsys/net/lib/openthread/platform/openthread-core-zephyr-config.h
index 7f289f2..90234f2 100644
--- a/subsys/net/lib/openthread/platform/openthread-core-zephyr-config.h
+++ b/subsys/net/lib/openthread/platform/openthread-core-zephyr-config.h
@@ -317,16 +317,6 @@
#endif /* CONFIG_OPENTHREAD_CSL_MIN_RECEIVE_ON */
/**
- * @def OPENTHREAD_CONFIG_PLATFORM_CSL_UNCERT
- *
- * The Uncertainty of the scheduling CSL of transmission by the parent, in ±10 us units.
- */
-
-#ifdef CONFIG_OPENTHREAD_PLATFORM_CSL_UNCERT
-#define OPENTHREAD_CONFIG_PLATFORM_CSL_UNCERT CONFIG_OPENTHREAD_PLATFORM_CSL_UNCERT
-#endif /* CONFIG_OPENTHREAD_PLATFORM_CSL_UNCERT */
-
-/**
* @def OPENTHREAD_CONFIG_MAC_SOFTWARE_TX_SECURITY_ENABLE
*
* Set to 1 to enable software transmission security logic.
diff --git a/subsys/net/lib/openthread/platform/radio.c b/subsys/net/lib/openthread/platform/radio.c
index bdc792b..2601b70 100644
--- a/subsys/net/lib/openthread/platform/radio.c
+++ b/subsys/net/lib/openthread/platform/radio.c
@@ -1135,6 +1135,15 @@
return radio_api->get_sch_acc(radio_dev);
}
+#if defined(CONFIG_OPENTHREAD_PLATFORM_CSL_UNCERT)
+uint8_t otPlatRadioGetCslUncertainty(otInstance *aInstance)
+{
+ ARG_UNUSED(aInstance);
+
+ return CONFIG_OPENTHREAD_PLATFORM_CSL_UNCERT;
+}
+#endif
+
#if defined(CONFIG_OPENTHREAD_LINK_METRICS_SUBJECT)
/**
* Header IE format - IEEE Std. 802.15.4-2015, 7.4.2.1 && 7.4.2.2