From 3ecc58815cf6b67359feddfbc142888b6cdd4174 Mon Sep 17 00:00:00 2001 From: Yang Sun Date: Mon, 14 Aug 2023 13:35:58 +0800 Subject: [PATCH] [ncp] add support for 1.3.1 in GetThreadVersion() (#1968) --- src/ncp/ncp_openthread.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ncp/ncp_openthread.cpp b/src/ncp/ncp_openthread.cpp index ef1627e6971..efd3e7f0860 100644 --- a/src/ncp/ncp_openthread.cpp +++ b/src/ncp/ncp_openthread.cpp @@ -60,9 +60,10 @@ namespace otbr { namespace Ncp { -static const uint16_t kThreadVersion11 = 2; ///< Thread Version 1.1 -static const uint16_t kThreadVersion12 = 3; ///< Thread Version 1.2 -static const uint16_t kThreadVersion13 = 4; ///< Thread Version 1.3 +static const uint16_t kThreadVersion11 = 2; ///< Thread Version 1.1 +static const uint16_t kThreadVersion12 = 3; ///< Thread Version 1.2 +static const uint16_t kThreadVersion13 = 4; ///< Thread Version 1.3 +static const uint16_t kThreadVersion131 = 5; ///< Thread Version 1.3.1 ControllerOpenThread::ControllerOpenThread(const char *aInterfaceName, const std::vector &aRadioUrls, @@ -384,6 +385,9 @@ const char *ControllerOpenThread::GetThreadVersion(void) case kThreadVersion13: version = "1.3.0"; break; + case kThreadVersion131: + version = "1.3.1"; + break; default: otbrLogEmerg("Unexpected thread version %hu", otThreadGetVersion()); exit(-1);