Skip to content

Commit b4fd086

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 - update test spec Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
1 parent 2222684 commit b4fd086

File tree

8 files changed

+12
-15
lines changed

8 files changed

+12
-15
lines changed

.github/test-spec.yml

+1
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@
376376
- "drivers/hw_cc3xx/*"
377377
- "drivers/entropy/*"
378378
- "modules/nrfxlib/nrf_802154/**/*"
379+
- "modules/openthread/**/*"
379380

380381
"CI-nfc-test":
381382
- "subsys/nfc/**/*"

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/"

scripts/ci/tags.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ ci_samples_openthread:
275275
- nrf/drivers/hw_cc3xx/
276276
- nrf/drivers/mpsl/
277277
- nrf/modules/nrfxlib/nrf_802154/
278+
- nrf/modules/openthread/
278279
- nrf/samples/openthread/
279280
- nrf/subsys/ieee802154/
280281
- nrf/subsys/mpsl/
@@ -290,7 +291,6 @@ ci_samples_openthread:
290291
- nrfxlib/openthread/
291292
- zephyr/include/zephyr/net/
292293
- zephyr/modules/mbedtls/
293-
- zephyr/modules/openthread/
294294
- zephyr/soc/nordic/
295295
- zephyr/subsys/net/
296296
- zephyr/subsys/settings/
@@ -1461,6 +1461,7 @@ ci_applications_protocols_serialization:
14611461
- nrf/applications/protocols_serialization/
14621462
- nrf/drivers/mpsl/
14631463
- nrf/modules/nrfxlib/nrf_802154/
1464+
- nrf/modules/openthread/
14641465
- nrf/subsys/bluetooth/
14651466
- nrf/subsys/ieee802154/
14661467
- nrf/subsys/logging/
@@ -1473,7 +1474,6 @@ ci_applications_protocols_serialization:
14731474
- nrfxlib/nrf_802154/
14741475
- nrfxlib/nrf_rpc/
14751476
- zephyr/drivers/ieee802154/
1476-
- zephyr/modules/openthread/
14771477
- zephyr/subsys/bluetooth/
14781478
- zephyr/subsys/net/
14791479
- zephyr/subsys/retention/

0 commit comments

Comments
 (0)