Skip to content

Commit 77efbdb

Browse files
modules: openthread: start using NCS implementation of OT platform
- Start using NCS implementation of OT platform - align license allowlist - remove sourcing files that have not been copied from upstream - update CODEOWNERS - clean compliance issues Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
1 parent 2222684 commit 77efbdb

File tree

6 files changed

+9
-13
lines changed

6 files changed

+9
-13
lines changed

CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@
430430
/modules/mcuboot/ @nrfconnect/ncs-pluto
431431
/modules/memfault-firmware-sdk/ @nrfconnect/ncs-cia
432432
/modules/nrfxlib/ @nrfconnect/ncs-code-owners
433+
/modules/openthread/ @nrfconnect/ncs-thread
433434
/modules/trusted-firmware-m/ @nrfconnect/ncs-aegir
434435
/modules/wfa-qt/ @nrfconnect/ncs-wifi
435436

modules/modules.cmake

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ set(ZEPHYR_COREMARK_KCONFIG ${CMAKE_CURRENT_LIST_DIR}/coremark/Kconfig)
77
set(ZEPHYR_TRUSTED_FIRMWARE_M_KCONFIG ${CMAKE_CURRENT_LIST_DIR}/trusted-firmware-m/Kconfig)
88
set(ZEPHYR_AZURE_SDK_FOR_C_KCONFIG ${CMAKE_CURRENT_LIST_DIR}/azure-sdk-for-c/Kconfig)
99
set(ZEPHYR_AZURE_SDK_FOR_C_CMAKE_DIR ${CMAKE_CURRENT_LIST_DIR}/azure-sdk-for-c)
10+
set(ZEPHYR_OPENTHREAD_CMAKE_DIR ${CMAKE_CURRENT_LIST_DIR}/openthread)
11+
set(ZEPHYR_OPENTHREAD_KCONFIG ${CMAKE_CURRENT_LIST_DIR}/openthread/Kconfig)
1012

1113
# Those are modules with Kconfig tree's inside the module repo but where
1214
# nRF Connect SDK extend those trees.

modules/openthread/platform/CMakeLists.txt

-7
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,10 @@ zephyr_library_sources(
66
entropy.c
77
misc.c
88
platform.c
9-
)
10-
11-
zephyr_library_sources_ifndef(CONFIG_HDLC_RCP_IF
129
radio.c
1310
spi.c
1411
)
1512

16-
zephyr_library_sources_ifdef(CONFIG_HDLC_RCP_IF
17-
radio_spinel.cpp
18-
hdlc_interface.cpp
19-
)
2013

2114
zephyr_library_sources_ifdef(CONFIG_OPENTHREAD_BLE_TCAT ble.c)
2215
zephyr_library_sources_ifdef(CONFIG_OPENTHREAD_DIAG diag.c)

modules/openthread/platform/alarm.c

+2-5
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,9 @@ void platformAlarmProcess(otInstance *aInstance)
6767
#endif
6868
if (timer_ms_fired) {
6969
timer_ms_fired = false;
70-
#if defined(CONFIG_OPENTHREAD_DIAG)
71-
if (otPlatDiagModeGet()) {
70+
if (IS_ENABLED(CONFIG_OPENTHREAD_DIAG) && otPlatDiagModeGet()) {
7271
otPlatDiagAlarmFired(aInstance);
73-
} else
74-
#endif
75-
{
72+
} else {
7673
otPlatAlarmMilliFired(aInstance);
7774
}
7875
}

modules/openthread/platform/radio.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,7 @@ static void openthread_handle_received_frame(otInstance *instance,
502502
struct net_pkt *pkt)
503503
{
504504
otRadioFrame recv_frame;
505+
505506
memset(&recv_frame, 0, sizeof(otRadioFrame));
506507

507508
recv_frame.mPsdu = net_buf_frag_last(pkt->buffer)->data;
@@ -942,6 +943,7 @@ int8_t otPlatRadioGetRssi(otInstance *aInstance)
942943
int error = 0;
943944
const uint16_t detection_time = 1;
944945
enum ieee802154_hw_caps radio_caps;
946+
945947
ARG_UNUSED(aInstance);
946948

947949
radio_caps = radio_api->get_capabilities(radio_dev);
@@ -973,8 +975,8 @@ int8_t otPlatRadioGetRssi(otInstance *aInstance)
973975
otRadioCaps otPlatRadioGetCaps(otInstance *aInstance)
974976
{
975977
otRadioCaps caps = OT_RADIO_CAPS_NONE;
976-
977978
enum ieee802154_hw_caps radio_caps;
979+
978980
ARG_UNUSED(aInstance);
979981
__ASSERT(radio_api,
980982
"platformRadioInit needs to be called prior to otPlatRadioGetCaps");

scripts/ci/license_allow_list.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Apache-2.0: |
4848
^nrf/tests/bluetooth/tester/src/bttester.c$
4949
^nrf/subsys/nrf_security/src/legacy
5050
^nrf/modules/trusted-firmware-m/fault.c
51+
^nrf/modules/openthread/
5152
^nrf/samples/net/http_server/src/main.c
5253
^nrf/tests/subsys/suit/common/tls_config/user-tls-conf.h
5354
curl: "^nrf/ext/"

0 commit comments

Comments
 (0)