From c312f37d126a834431ec2df0dc07aab9d62bc62d Mon Sep 17 00:00:00 2001 From: Eduardo Montoya Date: Tue, 8 Oct 2024 14:06:37 +0200 Subject: [PATCH] review --- include/openthread/link.h | 1 + src/core/config/mac.h | 10 ---------- src/core/config/wakeup.h | 10 ++++++++++ src/core/mac/mac.hpp | 1 + src/core/radio/radio.hpp | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/include/openthread/link.h b/include/openthread/link.h index 21157ec98fdd..2a88b9669840 100644 --- a/include/openthread/link.h +++ b/include/openthread/link.h @@ -1135,6 +1135,7 @@ otError otLinkSetWakeupChannel(otInstance *aInstance, uint8_t aChannel); * @param[in] aEnable true to enable listening for wake-up frames, or false otherwise. * * @retval OT_ERROR_NONE Successfully enabled / disabled the listening for wake-up frames. + * @retval OT_ERROR_INVALID_ARGS Configured listen interval is not greater than listen duration. * @retval OT_ERROR_INVALID_STATE Could not enable listening for wake-up frames due to bad configuration. */ otError otLinkSetWedListenEnabled(otInstance *aInstance, bool aEnable); diff --git a/src/core/config/mac.h b/src/core/config/mac.h index 4e3768a00834..d2359a91db24 100644 --- a/src/core/config/mac.h +++ b/src/core/config/mac.h @@ -497,16 +497,6 @@ #define OPENTHREAD_CONFIG_CSL_RECEIVE_TIME_AHEAD 320 #endif -/** - * @def OPENTHREAD_CONFIG_WED_RECEIVE_TIME_AFTER - * - * Margin to be applied after the end of a WED listen duration to schedule the next listen interval, in units of - * microseconds. - */ -#ifndef OPENTHREAD_CONFIG_WED_RECEIVE_TIME_AFTER -#define OPENTHREAD_CONFIG_WED_RECEIVE_TIME_AFTER 500 -#endif - /** * @def OPENTHREAD_CONFIG_MIN_RECEIVE_ON_AHEAD * diff --git a/src/core/config/wakeup.h b/src/core/config/wakeup.h index c9f37cccbbc9..19de4f13b9c8 100644 --- a/src/core/config/wakeup.h +++ b/src/core/config/wakeup.h @@ -81,6 +81,16 @@ #define OPENTHREAD_CONFIG_WED_LISTEN_DURATION 8000 #endif +/** + * @def OPENTHREAD_CONFIG_WED_RECEIVE_TIME_AFTER + * + * Margin to be applied after the end of a WED listen duration to schedule the next listen interval, in units of + * microseconds. + */ +#ifndef OPENTHREAD_CONFIG_WED_RECEIVE_TIME_AFTER +#define OPENTHREAD_CONFIG_WED_RECEIVE_TIME_AFTER 500 +#endif + /** * @} */ diff --git a/src/core/mac/mac.hpp b/src/core/mac/mac.hpp index 45bb70316d6b..4e0867da7e7f 100644 --- a/src/core/mac/mac.hpp +++ b/src/core/mac/mac.hpp @@ -740,6 +740,7 @@ class Mac : public InstanceLocator, private NonCopyable * @param[in] aEnable TRUE to enable listening for wake-up frames, FALSE otherwise * * @retval kErrorNone Successfully enabled/disabled listening for wake-up frames. + * @retval kErrorInvalidArgs Configured listen interval is not greater than listen duration. * @retval kErrorInvalidState Could not enable/disable listening for wake-up frames. */ Error SetWedListenEnabled(bool aEnable); diff --git a/src/core/radio/radio.hpp b/src/core/radio/radio.hpp index d63f2bc1104d..c991fa02fba0 100644 --- a/src/core/radio/radio.hpp +++ b/src/core/radio/radio.hpp @@ -65,7 +65,7 @@ static constexpr uint64_t kMaxCslTimeout = OPENTHREAD_CONFIG_MAC_CSL_MAX_TIMEOUT #if OPENTHREAD_CONFIG_WAKEUP_END_DEVICE_ENABLE /** - * Minimum WED listen duration supported in us. + * Minimum WED listen duration supported in microseconds. */ static constexpr uint32_t kMinWedListenDuration = 100; #endif