diff --git a/Kconfig.nrf b/Kconfig.nrf index b36f3f12d1c5..ba3874722b48 100644 --- a/Kconfig.nrf +++ b/Kconfig.nrf @@ -80,10 +80,6 @@ config MCUMGR_TRANSPORT_NETBUF_SIZE default 2475 if MCUMGR_TRANSPORT_BT_REASSEMBLY default 1024 if UPDATEABLE_IMAGE_NUMBER > 1 -# When using HCI on the nRF5340 we need a larger command buffer. -config BT_BUF_CMD_TX_COUNT - default 10 if SOC_COMPATIBLE_NRF5340_CPUAPP || SOC_COMPATIBLE_NRF5340_CPUNET - config INIT_ARCH_HW_AT_BOOT default y help @@ -104,9 +100,6 @@ config NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE chosen Zephyr flash devicetree node to ensure that swapping can be performed. -config GETOPT - default n - # Temporary hack to be able to build samples and tests on the nRF51L15/nRF54L09 Eng A/nRF54L20 Eng A/nRF7120 FLPR core config FLASH_BASE_ADDRESS hex diff --git a/applications/connectivity_bridge/boards/thingy91_nrf52840.conf b/applications/connectivity_bridge/boards/thingy91_nrf52840.conf index 062efe231a62..f9951d6f5bcc 100644 --- a/applications/connectivity_bridge/boards/thingy91_nrf52840.conf +++ b/applications/connectivity_bridge/boards/thingy91_nrf52840.conf @@ -18,6 +18,7 @@ CONFIG_BT_NUS=y CONFIG_BT_GATT_CLIENT=y CONFIG_BT_SMP=y CONFIG_BT_CTLR_RX_BUFFERS=10 +CONFIG_BT_BUF_EVT_RX_COUNT=11 CONFIG_BT_BUF_ACL_TX_COUNT=10 CONFIG_BT_BUF_ACL_TX_SIZE=251 CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 @@ -37,4 +38,7 @@ CONFIG_DP_DRIVER=y CONFIG_CMSIS_DAP_DEVICE_VENDOR="Nordic Semiconductor ASA" CONFIG_CMSIS_DAP_DEVICE_NAME="nrf91" -CONFIG_USB_CDC_ACM_RINGBUF_SIZE=15360 +CONFIG_USB_CDC_ACM_RINGBUF_SIZE=12280 + +# Reduce logging to save flash space +CONFIG_LOG_MAX_LEVEL=1 diff --git a/applications/connectivity_bridge/boards/thingy91x_nrf5340_cpuapp.conf b/applications/connectivity_bridge/boards/thingy91x_nrf5340_cpuapp.conf index d8b58332e03a..cf826b50c90c 100644 --- a/applications/connectivity_bridge/boards/thingy91x_nrf5340_cpuapp.conf +++ b/applications/connectivity_bridge/boards/thingy91x_nrf5340_cpuapp.conf @@ -17,6 +17,7 @@ CONFIG_BT_BUF_ACL_RX_SIZE=251 CONFIG_BT_NUS=y CONFIG_BT_GATT_CLIENT=y CONFIG_BT_SMP=y +CONFIG_BT_BUF_EVT_RX_COUNT=11 CONFIG_BT_BUF_ACL_TX_COUNT=10 CONFIG_BT_BUF_ACL_TX_SIZE=251 CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 diff --git a/applications/nrf_desktop/src/modules/usb_state.c b/applications/nrf_desktop/src/modules/usb_state.c index 129e33e7597c..22ce9f52ddfc 100644 --- a/applications/nrf_desktop/src/modules/usb_state.c +++ b/applications/nrf_desktop/src/modules/usb_state.c @@ -1137,13 +1137,15 @@ static uint32_t get_idle_next(const struct device *dev, const uint8_t id) return usb_hid->idle_duration[id]; } -static void report_sent_cb_next(const struct device *dev) +static void report_sent_cb_next(const struct device *dev, const uint8_t *report) { struct usb_hid_device *usb_hid = dev_to_usb_hid(dev); struct usb_hid_buf *buf = usb_hid_buf_find(usb_hid, USB_HID_BUF_SENDING); /* USB next stack does not explicitly indicate failed transfers. */ bool error = !usb_hid->enabled; + ARG_UNUSED(report); + report_sent(usb_hid, buf, error); } diff --git a/applications/serial_lte_modem/src/slm_ppp.c b/applications/serial_lte_modem/src/slm_ppp.c index a7e228c62fe2..e74f7c477489 100644 --- a/applications/serial_lte_modem/src/slm_ppp.c +++ b/applications/serial_lte_modem/src/slm_ppp.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -99,8 +100,8 @@ static bool open_ppp_sockets(void) { int ret; - ppp_fds[ZEPHYR_FD_IDX] = zsock_socket(AF_PACKET, SOCK_RAW | SOCK_NATIVE, - htons(IPPROTO_RAW)); + ppp_fds[ZEPHYR_FD_IDX] = zsock_socket(AF_PACKET, SOCK_DGRAM | SOCK_NATIVE, + htons(ETH_P_ALL)); if (ppp_fds[ZEPHYR_FD_IDX] < 0) { LOG_ERR("Zephyr socket creation failed (%d).", errno); return false; @@ -108,7 +109,8 @@ static bool open_ppp_sockets(void) ppp_zephyr_dst_addr = (struct sockaddr_ll){ .sll_family = AF_PACKET, - .sll_ifindex = net_if_get_by_iface(ppp_iface) + .sll_ifindex = net_if_get_by_iface(ppp_iface), + .sll_protocol = htons(ETH_P_ALL), }; ret = zsock_bind(ppp_fds[ZEPHYR_FD_IDX], (const struct sockaddr *)&ppp_zephyr_dst_addr, sizeof(ppp_zephyr_dst_addr)); @@ -658,6 +660,19 @@ static void ppp_data_passing_thread(void*, void*, void*) void *dst_addr = (dst == MODEM_FD_IDX) ? NULL : &ppp_zephyr_dst_addr; socklen_t addrlen = (dst == MODEM_FD_IDX) ? 0 : sizeof(ppp_zephyr_dst_addr); + if (dst == ZEPHYR_FD_IDX) { + uint8_t type = ppp_data_buf[0] & 0xf0; + + if (type == 0x60) { + ppp_zephyr_dst_addr.sll_protocol = htons(ETH_P_IPV6); + } else if (type == 0x40) { + ppp_zephyr_dst_addr.sll_protocol = htons(ETH_P_IP); + } else { + /* Not IP traffic, ignore. */ + continue; + } + } + send_ret = zsock_sendto(fds[dst].fd, ppp_data_buf, len, 0, dst_addr, addrlen); if (send_ret == -1) { diff --git a/dts/common/nordic/nrf7120_enga.dtsi b/dts/common/nordic/nrf7120_enga.dtsi index 543d338bd426..db79103220eb 100644 --- a/dts/common/nordic/nrf7120_enga.dtsi +++ b/dts/common/nordic/nrf7120_enga.dtsi @@ -265,7 +265,6 @@ compatible = "nordic,nrf-timer"; reg = <0x55000 0x1000>; interrupts = <85 NRF_DEFAULT_IRQ_PRIORITY>; - max-frequency = ; cc-num = <6>; max-bit-width = <32>; prescaler = <0>; @@ -314,7 +313,6 @@ compatible = "nordic,nrf-timer"; reg = <0x85000 0x1000>; interrupts = <133 NRF_DEFAULT_IRQ_PRIORITY>; - max-frequency = ; cc-num = <8>; max-bit-width = <32>; prescaler = <0>; @@ -495,7 +493,6 @@ compatible = "nordic,nrf-timer"; reg = <0xca000 0x1000>; interrupts = <202 NRF_DEFAULT_IRQ_PRIORITY>; - max-frequency = ; cc-num = <6>; max-bit-width = <32>; prescaler = <0>; @@ -506,7 +503,6 @@ compatible = "nordic,nrf-timer"; reg = <0xcb000 0x1000>; interrupts = <203 NRF_DEFAULT_IRQ_PRIORITY>; - max-frequency = ; cc-num = <6>; max-bit-width = <32>; prescaler = <0>; @@ -517,7 +513,6 @@ compatible = "nordic,nrf-timer"; reg = <0xcc000 0x1000>; interrupts = <204 NRF_DEFAULT_IRQ_PRIORITY>; - max-frequency = ; cc-num = <6>; max-bit-width = <32>; prescaler = <0>; @@ -528,7 +523,6 @@ compatible = "nordic,nrf-timer"; reg = <0xcd000 0x1000>; interrupts = <205 NRF_DEFAULT_IRQ_PRIORITY>; - max-frequency = ; cc-num = <6>; max-bit-width = <32>; prescaler = <0>; @@ -539,7 +533,6 @@ compatible = "nordic,nrf-timer"; reg = <0xce000 0x1000>; interrupts = <206 NRF_DEFAULT_IRQ_PRIORITY>; - max-frequency = ; cc-num = <6>; max-bit-width = <32>; prescaler = <0>; diff --git a/ext/curl/Kconfig b/ext/curl/Kconfig index 340913d42630..d33179900d4d 100644 --- a/ext/curl/Kconfig +++ b/ext/curl/Kconfig @@ -10,7 +10,7 @@ config NRF_CURL_PROMPTLESS config NRF_CURL bool "Curl" if !NRF_CURL_PROMPTLESS - depends on POSIX_API && !PTHREAD_IPC && NEWLIB_LIBC + depends on POSIX_API && NEWLIB_LIBC imply NEWLIB_LIBC_FLOAT_PRINTF help Curl support for NRF. diff --git a/ext/iperf3/Kconfig b/ext/iperf3/Kconfig index e970a0dcf9bf..ea25972802e9 100644 --- a/ext/iperf3/Kconfig +++ b/ext/iperf3/Kconfig @@ -12,7 +12,7 @@ config NRF_IPERF3_PROMPTLESS config NRF_IPERF3 bool "Iperf3 NRF integration" if !NRF_IPERF3_PROMPTLESS - depends on POSIX_API && !PTHREAD_IPC && NEWLIB_LIBC && CJSON_LIB + depends on POSIX_API && NEWLIB_LIBC && CJSON_LIB help Enable Iperf3 NRF integration diff --git a/include/bluetooth/gatt_pool.h b/include/bluetooth/gatt_pool.h index b3f506f039dd..b36d28b70509 100644 --- a/include/bluetooth/gatt_pool.h +++ b/include/bluetooth/gatt_pool.h @@ -112,7 +112,7 @@ extern "C" { #define BT_GATT_POOL_CCC(_gp, _ccc, _ccc_changed, _perm) \ do { \ int _ret; \ - _ccc = (struct _bt_gatt_ccc)BT_GATT_CCC_INITIALIZER(\ + _ccc = (struct bt_gatt_ccc_managed_user_data)BT_GATT_CCC_MANAGED_USER_DATA_INIT(\ _ccc_changed, NULL, NULL); \ _ret = bt_gatt_pool_ccc_alloc(_gp, &_ccc, _perm); \ __ASSERT_NO_MSG(!_ret); \ @@ -176,7 +176,7 @@ int bt_gatt_pool_desc_alloc(struct bt_gatt_pool *gp, * @return 0 or negative error code. */ int bt_gatt_pool_ccc_alloc(struct bt_gatt_pool *gp, - struct _bt_gatt_ccc *ccc, + struct bt_gatt_ccc_managed_user_data *ccc, uint8_t perm); /** @brief Free the whole dynamically created GATT service. diff --git a/include/bluetooth/services/hids.h b/include/bluetooth/services/hids.h index 7d3de3fbbba1..bee0eda74528 100644 --- a/include/bluetooth/services/hids.h +++ b/include/bluetooth/services/hids.h @@ -191,7 +191,7 @@ typedef void (*bt_hids_rep_handler_t) (struct bt_hids_rep *rep, */ struct bt_hids_inp_rep { /** CCC descriptor. */ - struct _bt_gatt_ccc ccc; + struct bt_gatt_ccc_managed_user_data ccc; /** Report ID defined in the HIDS Report Map. */ uint8_t id; @@ -288,7 +288,7 @@ struct bt_hids_outp_feat_rep { */ struct bt_hids_boot_mouse_inp_rep { /** CCC descriptor. */ - struct _bt_gatt_ccc ccc; + struct bt_gatt_ccc_managed_user_data ccc; /** Index in the service attribute array. */ uint8_t att_ind; @@ -301,7 +301,7 @@ struct bt_hids_boot_mouse_inp_rep { */ struct bt_hids_boot_kb_inp_rep { /** CCC descriptor. */ - struct _bt_gatt_ccc ccc; + struct bt_gatt_ccc_managed_user_data ccc; /** Index in the service attribute array. */ uint8_t att_ind; diff --git a/include/dfu/dfu_target_smp.h b/include/dfu/dfu_target_smp.h index d56a797120b8..b42767274e34 100644 --- a/include/dfu/dfu_target_smp.h +++ b/include/dfu/dfu_target_smp.h @@ -16,6 +16,7 @@ #include #include +#include #include #ifdef __cplusplus diff --git a/lib/edge_impulse/ei_wrapper.cpp b/lib/edge_impulse/ei_wrapper.cpp index f62e5b461526..dc80da6285cb 100644 --- a/lib/edge_impulse/ei_wrapper.cpp +++ b/lib/edge_impulse/ei_wrapper.cpp @@ -347,7 +347,7 @@ static void edge_impulse_thread_fn(void) } if (err) { - LOG_ERR("run_classifier err=%d", err); + LOG_ERR("run_classifier err=%d", (int)err); } processing_finished(err); diff --git a/modules/openthread/Kconfig b/modules/openthread/Kconfig index 4ff059de486e..ef907d46d594 100644 --- a/modules/openthread/Kconfig +++ b/modules/openthread/Kconfig @@ -3,11 +3,327 @@ config OPENTHREAD bool "OpenThread Support" + imply FLASH + imply FLASH_MAP + imply MPU_ALLOW_FLASH_WRITE + + select SETTINGS if FLASH + select OPENTHREAD_SETTINGS_RAM if !FLASH + select CPP + select REBOOT + select ENTROPY_GENERATOR + + select NRF_802154_RADIO_DRIVER if HAS_HW_NRF_RADIO_IEEE802154 && !NET_L2_OPENTHREAD + select NRF_802154_SER_HOST if !HAS_HW_NRF_RADIO_IEEE802154 && !NET_L2_OPENTHREAD + select NRF_802154_RADIO_CONFIG if !NET_L2_OPENTHREAD help This option enables the OpenThread library if OPENTHREAD +choice OPENTHREAD_IMPLEMENTATION + prompt "OpenThread origin selection" + help + Select OpenThread stack to use for build. Custom OpenThread implementations + can be added to the application Kconfig. + +config OPENTHREAD_SOURCES + bool "OpenThread from sources" + help + Build Zephyr's OpenThread port from sources. + +endchoice + +config OPENTHREAD_MANUAL_START + bool "Start OpenThread stack manually" + help + If enabled, OpenThread stack will have to be configured and + started manually, with respective API calls or CLI/NCP commands. + Otherwise, OpenThread will configure the network parameters and try to + join the Thread network automatically during initialization (using + credentials stored in persistent storage, obtained during + commissioning or pre-commissioned with other Kconfig options, + depending on configuration used). + +menu "Logging" + +menuconfig OPENTHREAD_DEBUG + bool "OpenThread stack logging support" + help + This option enables logging support for OpenThread. + +choice OPENTHREAD_LOG_LEVEL_CHOICE + prompt "OpenThread stack log level" + depends on OPENTHREAD_DEBUG + help + This option selects log level for OpenThread stack. + +config OPENTHREAD_LOG_LEVEL_CRIT + bool "Critical" +config OPENTHREAD_LOG_LEVEL_WARN + bool "Warning" +config OPENTHREAD_LOG_LEVEL_NOTE + bool "Notice" +config OPENTHREAD_LOG_LEVEL_INFO + bool "Informational" +config OPENTHREAD_LOG_LEVEL_DEBG + bool "Debug" +endchoice # OPENTHREAD_LOG_LEVEL_CHOICE + +config OPENTHREAD_LOG_LEVEL + int + default 1 if OPENTHREAD_LOG_LEVEL_CRIT + default 2 if OPENTHREAD_LOG_LEVEL_WARN + default 3 if OPENTHREAD_LOG_LEVEL_NOTE + default 4 if OPENTHREAD_LOG_LEVEL_INFO + default 5 if OPENTHREAD_LOG_LEVEL_DEBG + default 0 + help + Log level for OpenThread stack. + +config OPENTHREAD_PLATFORM_LOG_LEVEL + int + default 1 if OPENTHREAD_LOG_LEVEL_CRIT + default 2 if OPENTHREAD_LOG_LEVEL_WARN + default 3 if OPENTHREAD_LOG_LEVEL_NOTE || OPENTHREAD_LOG_LEVEL_INFO + default 4 if OPENTHREAD_LOG_LEVEL_DEBG + default 0 + help + Log level for OpenThread Zephyr platform. + +endmenu # "Logging" + +menu "Zephyr optimizations" + +config OPENTHREAD_THREAD_PREEMPTIVE + bool "Set Openthread thread to be preemptive" + +config OPENTHREAD_THREAD_PRIORITY + int "OpenThread thread priority" + default 0 if OPENTHREAD_THREAD_PREEMPTIVE + default 8 + +config OPENTHREAD_THREAD_STACK_SIZE + int "OpenThread thread stack size" + default 6144 if OPENTHREAD_COMMISSIONER || OPENTHREAD_JOINER + default 6240 if (OPENTHREAD_COMMISSIONER || OPENTHREAD_JOINER) && MPU_STACK_GUARD && FPU_SHARING && CPU_CORTEX_M + default 3168 if MPU_STACK_GUARD && FPU_SHARING && CPU_CORTEX_M + default 3072 + + +config OPENTHREAD_PKT_LIST_SIZE + int "List size for IPv6 packet buffering" + default 10 + +config OPENTHREAD_RADIO_WORKQUEUE_STACK_SIZE + int "OpenThread radio transmit workqueue stack size" + default 608 if MPU_STACK_GUARD && FPU_SHARING && CPU_CORTEX_M + default 512 + +endmenu # "Zephyr optimizations" + + +config OPENTHREAD_SHELL + bool "OpenThread shell" + depends on SHELL + +config MBEDTLS_PROMPTLESS + bool + default y if !CUSTOM_OPENTHREAD_SECURITY + +choice OPENTHREAD_SECURITY + prompt "OpenThread security" + default OPENTHREAD_MBEDTLS_CHOICE + +config CUSTOM_OPENTHREAD_SECURITY + bool "Custom" + help + Security settings will be controlled directly by the user. + Enabling this setting will give access to full control of mbed TLS + configuration. + +config OPENTHREAD_MBEDTLS_CHOICE + bool "mbed TLS built-in" + select OPENTHREAD_MBEDTLS + help + Use the OpenThread mbed TLS configuration pre-defined security scheme. + +endchoice + +config OPENTHREAD_MBEDTLS + bool + select MBEDTLS + select MBEDTLS_ENABLE_HEAP + select MBEDTLS_CIPHER_AES_ENABLED + select MBEDTLS_CIPHER_CCM_ENABLED + select MBEDTLS_SHA256 + select MBEDTLS_ENTROPY_C + select MBEDTLS_CMAC + select MBEDTLS_CIPHER + select MBEDTLS_MD + select MBEDTLS_TLS_VERSION_1_2 if OPENTHREAD_COMMISSIONER || OPENTHREAD_JOINER + select MBEDTLS_DTLS if OPENTHREAD_COMMISSIONER || OPENTHREAD_JOINER + select MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED if OPENTHREAD_COMMISSIONER || OPENTHREAD_JOINER + select MBEDTLS_ECJPAKE_C if OPENTHREAD_COMMISSIONER || OPENTHREAD_JOINER + select MBEDTLS_ECP_DP_SECP256R1_ENABLED if OPENTHREAD_COMMISSIONER || OPENTHREAD_JOINER || \ + OPENTHREAD_SRP_CLIENT || OPENTHREAD_SRP_SERVER + select MBEDTLS_ECP_NIST_OPTIM if OPENTHREAD_COMMISSIONER || OPENTHREAD_JOINER + select MBEDTLS_CTR_DRBG_ENABLED if OPENTHREAD_COMMISSIONER || OPENTHREAD_JOINER + select MBEDTLS_HMAC_DRBG_ENABLED if OPENTHREAD_COMMISSIONER || OPENTHREAD_JOINER || \ + OPENTHREAD_SRP_CLIENT || OPENTHREAD_SRP_SERVER + select MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED if OPENTHREAD_ECDSA + select MBEDTLS_ECDH_C if OPENTHREAD_ECDSA + select MBEDTLS_ECDSA_C if OPENTHREAD_ECDSA + select MBEDTLS_ECDSA_DETERMINISTIC if OPENTHREAD_ECDSA + select MBEDTLS_PK_WRITE_C if OPENTHREAD_ECDSA + select MBEDTLS_ECP_C if OPENTHREAD_COMMISSIONER || OPENTHREAD_JOINER || OPENTHREAD_ECDSA + + +config OPENTHREAD_MBEDTLS_LIB_NAME + string "mbedtls lib name" + default "mbedTLS" + help + This option allows to specify one or more mbedtls library files to be + linked with OpenThread. Separate multiple values with space " ". + +config OPENTHREAD_COPROCESSOR + bool "OpenThread Co-Processor" + select OPENTHREAD_MANUAL_START + select RING_BUFFER + select UART_INTERRUPT_DRIVEN + help + Enable Co-Processor in OpenThread stack. + +if OPENTHREAD_COPROCESSOR + +choice OPENTHREAD_COPROCESSOR_CHOICE + prompt "OpenThread Co-Processor type" + help + This option selects Thread network co-processor type + +config OPENTHREAD_COPROCESSOR_NCP + bool "NCP - Network Co-Processor" +config OPENTHREAD_COPROCESSOR_RCP + bool "RCP - Radio Co-Processor" +endchoice # OPENTHREAD_COPROCESSOR_CHOICE + +config OPENTHREAD_COPROCESSOR_UART_RING_BUFFER_SIZE + int "Set Co-Processor UART ring buffer size" + default 4096 + help + TX buffer size for the OpenThread Co-Processor UART. + +config OPENTHREAD_COPROCESSOR_VENDOR_HOOK_SOURCE + string "Path to vendor hook source file" + help + Provides path to compile vendor hook file. + +endif # OPENTHREAD_COPROCESSOR + +config OPENTHREAD_PLATFORM_INFO + string "Platform information for OpenThread" + default "ZEPHYR" + help + Platform information for OpenThread + +config OPENTHREAD_CUSTOM_PARAMETERS + string "Custom Parameters to pass to OpenThread build system" + default "" + help + This option is intended for advanced users only. + Pass additional parameters that do not have corresponding Kconfig + options to the OpenThread build system. Separate multiple values with + space " ", for example: + "OPENTHREAD_CONFIG_JOINER_ENABLE=1 OPENTHREAD_CONFIG_JOINER_MAX_CANDIDATES=3" + +config OPENTHREAD_NUM_MESSAGE_BUFFERS + int "The number of message buffers in the buffer pool" + default 128 + help + "The number of message buffers in the buffer pool." + +config OPENTHREAD_MESSAGE_BUFFER_SIZE + int "The size of a message buffer in bytes" + default 128 + help + "The size of a message buffer in bytes" + +config OPENTHREAD_PLATFORM_MESSAGE_MANAGEMENT + bool "Use platform message management" + help + The message pool is managed by platform defined logic. + +config OPENTHREAD_MAX_STATECHANGE_HANDLERS + int "The maximum number of state-changed callback handlers" + default 2 + help + The maximum number of state-changed callback handlers + set using otSetStateChangedCallback. + +config OPENTHREAD_TMF_ADDRESS_CACHE_ENTRIES + int "The number of EID-to-RLOC cache entries" + default 20 + help + The number of EID-to-RLOC cache entries. + +config OPENTHREAD_TMF_ADDRESS_CACHE_MAX_SNOOP_ENTRIES + int "The maximum number of EID-to-RLOC cache entries" + default 2 + help + The maximum number of EID-to-RLOC cache entries that can be used for + "snoop optimization" where an entry is created by inspecting a received + message. + +config OPENTHREAD_LOG_PREPEND_LEVEL_ENABLE + bool "Prepending the log level to all OpenThread log messages" + help + When enabled the OpenThread logs will be prepended with the appropriate + log level prefix i.e. [CRIT], [WARN], [NOTE], [INFO], [DEBG]. + +config OPENTHREAD_MAC_SOFTWARE_ACK_TIMEOUT_ENABLE + bool "Software ACK timeout logic" + default y + help + Set y if the radio supports AckTime event + +config OPENTHREAD_MAC_SOFTWARE_RETRANSMIT_ENABLE + bool "Software retransmission logic" + default y + help + Set y if the radio supports tx retry logic with collision avoidance (CSMA) + +config OPENTHREAD_MAC_SOFTWARE_CSMA_BACKOFF_ENABLE + bool "Software CSMA backoff logic" + default y + help + Set y to enable software CSMA backoff. The option can be disabled if + the radio has hardware support for this feature (IEEE802154_HW_CSMA). + +config OPENTHREAD_CRYPTO_PSA + bool "ARM PSA crypto API" + depends on MBEDTLS_PSA_CRYPTO_CLIENT + select OPENTHREAD_PLATFORM_KEY_REF if !OPENTHREAD_COPROCESSOR_RCP + imply OPENTHREAD_PLATFORM_KEYS_EXPORTABLE_ENABLE + help + Enable crypto backend library implementation based on ARM PSA crypto + API instead of the default, using mbedTLS. + +config OPENTHREAD_PLATFORM_KEYS_EXPORTABLE_ENABLE + bool "Make MAC keys exportable" + depends on OPENTHREAD_PLATFORM_KEY_REF + help + Enable the creation of exportable MAC keys in the OpenThread Key Manager. + +config OPENTHREAD_INTERFACE_EARLY_UP + bool "Make OpenThread interface ready as soon as Thread is enabled" + help + When enabled, OpenThread interface will be marked ready (operational + UP) as soon as Thread has been enabled. This means the interface will + be ready to transmit application packets during the Mesh Link + Establishment phase. + Otherwise, OpenThread interface will be marked operational UP only + after the device joins a Thread network. + menu "OpenThread stack features" rsource "Kconfig.features" endmenu diff --git a/modules/wfa-qt/Kconfig b/modules/wfa-qt/Kconfig index d81d23753626..2f0f5ce4886b 100644 --- a/modules/wfa-qt/Kconfig +++ b/modules/wfa-qt/Kconfig @@ -12,8 +12,8 @@ source "subsys/logging/Kconfig.template.log_config" config WFA_QT_CONTROL_APP # Need full POSIX from libc, Zephyr's POSIX support is only partial select POSIX_API - select PTHREAD_IPC - select POSIX_SIGNAL + select POSIX_THREADS + select POSIX_SIGNALS bool "WFA Quicktrack control app" config WFA_QT_THREAD_STACK_SIZE diff --git a/samples/bluetooth/iso_time_sync/src/iso_tx.c b/samples/bluetooth/iso_time_sync/src/iso_tx.c index 6c62fb064d18..f376aae1ad65 100644 --- a/samples/bluetooth/iso_time_sync/src/iso_tx.c +++ b/samples/bluetooth/iso_time_sync/src/iso_tx.c @@ -83,7 +83,7 @@ static struct bt_iso_info iso_infos[CONFIG_BT_ISO_MAX_CHAN]; void iso_chan_info_print(struct bt_iso_info *info, uint8_t role) { - if (info->type == BT_ISO_CHAN_TYPE_CONNECTED) { + if (info->type == BT_ISO_CHAN_TYPE_CENTRAL || info->type == BT_ISO_CHAN_TYPE_PERIPHERAL) { uint8_t bn; uint32_t flush_timeout; uint32_t transport_latency_us; @@ -302,7 +302,8 @@ static uint32_t trigger_time_us_get(uint32_t sdu_sync_ref, uint8_t chan_index) * See Bluetooth Core Specification, Vol 6, Part G, Section 3.2. */ - if (iso_infos[chan_index].type == BT_ISO_CHAN_TYPE_CONNECTED) { + if (iso_infos[chan_index].type == BT_ISO_CHAN_TYPE_CENTRAL || + iso_infos[chan_index].type == BT_ISO_CHAN_TYPE_PERIPHERAL) { if (roles[chan_index] == BT_CONN_ROLE_CENTRAL) { trigger_time_us += iso_infos[chan_index].unicast.central.latency; } diff --git a/samples/bluetooth/nrf_auraconfig/src/nrf_auraconfig.c b/samples/bluetooth/nrf_auraconfig/src/nrf_auraconfig.c index 7a3aa370fc35..a6959a477faa 100644 --- a/samples/bluetooth/nrf_auraconfig/src/nrf_auraconfig.c +++ b/samples/bluetooth/nrf_auraconfig/src/nrf_auraconfig.c @@ -29,6 +29,8 @@ #include LOG_MODULE_REGISTER(main, CONFIG_MAIN_LOG_LEVEL); +struct zbus_observer_node zbus_obs_node; + ZBUS_CHAN_DECLARE(bt_mgmt_chan); ZBUS_CHAN_DECLARE(sdu_ref_chan); ZBUS_CHAN_DECLARE(le_audio_chan); @@ -461,13 +463,15 @@ static int zbus_link_producers_observers(void) return -ENOTSUP; } - ret = zbus_chan_add_obs(&bt_mgmt_chan, &bt_mgmt_evt_listen, ZBUS_ADD_OBS_TIMEOUT_MS); + ret = zbus_chan_add_obs(&bt_mgmt_chan, &bt_mgmt_evt_listen, &zbus_obs_node, + ZBUS_ADD_OBS_TIMEOUT_MS); if (ret) { LOG_ERR("Failed to add bt_mgmt listener"); return ret; } - ret = zbus_chan_add_obs(&le_audio_chan, &le_audio_evt_sub, ZBUS_ADD_OBS_TIMEOUT_MS); + ret = zbus_chan_add_obs(&le_audio_chan, &le_audio_evt_sub, &zbus_obs_node, + ZBUS_ADD_OBS_TIMEOUT_MS); if (ret) { LOG_ERR("Failed to add le_audio sub"); return ret; diff --git a/samples/bluetooth/peripheral_lbs/prj_minimal.conf b/samples/bluetooth/peripheral_lbs/prj_minimal.conf index c7580d4df29f..8e64445f7962 100644 --- a/samples/bluetooth/peripheral_lbs/prj_minimal.conf +++ b/samples/bluetooth/peripheral_lbs/prj_minimal.conf @@ -107,5 +107,6 @@ CONFIG_BT_BUF_EVT_RX_COUNT=2 CONFIG_BT_CONN_TX_MAX=3 CONFIG_BT_L2CAP_TX_BUF_COUNT=2 CONFIG_BT_ATT_TX_COUNT=2 +CONFIG_BT_BUF_EVT_RX_COUNT=4 CONFIG_BT_BUF_ACL_TX_COUNT=3 CONFIG_BT_BUF_ACL_TX_SIZE=27 diff --git a/samples/bluetooth/throughput/prj.conf b/samples/bluetooth/throughput/prj.conf index b31021e1bf34..fec67f3a6fa9 100644 --- a/samples/bluetooth/throughput/prj.conf +++ b/samples/bluetooth/throughput/prj.conf @@ -35,6 +35,7 @@ CONFIG_BT_ATT_TX_COUNT=10 CONFIG_BT_L2CAP_TX_MTU=498 CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y CONFIG_BT_CONN_TX_MAX=10 +CONFIG_BT_BUF_EVT_RX_COUNT=11 CONFIG_BT_BUF_ACL_TX_COUNT=10 CONFIG_BT_BUF_ACL_TX_SIZE=502 diff --git a/samples/cellular/at_client/prj.conf b/samples/cellular/at_client/prj.conf index cff74317d9d5..36656414bfa0 100644 --- a/samples/cellular/at_client/prj.conf +++ b/samples/cellular/at_client/prj.conf @@ -24,5 +24,3 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_MAIN_STACK_SIZE=3072 CONFIG_HEAP_MEM_POOL_SIZE=16384 CONFIG_AT_MONITOR_HEAP_SIZE=512 - -CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=n diff --git a/samples/cellular/modem_shell/boards/thingy91x_nrf9151_ns.conf b/samples/cellular/modem_shell/boards/thingy91x_nrf9151_ns.conf index b71baefe0809..c8844553121e 100644 --- a/samples/cellular/modem_shell/boards/thingy91x_nrf9151_ns.conf +++ b/samples/cellular/modem_shell/boards/thingy91x_nrf9151_ns.conf @@ -14,6 +14,3 @@ CONFIG_IMG_MANAGER=y CONFIG_STREAM_FLASH=y CONFIG_MCUBOOT_IMG_MANAGER=y CONFIG_IMG_ERASE_PROGRESSIVELY=y - -# Hopefully a temporary UART config to fix jam in the boot -CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=n diff --git a/samples/cellular/modem_shell/overlay-ppp.conf b/samples/cellular/modem_shell/overlay-ppp.conf index a292d7adb9e1..c0fcfe7ffe0c 100644 --- a/samples/cellular/modem_shell/overlay-ppp.conf +++ b/samples/cellular/modem_shell/overlay-ppp.conf @@ -38,7 +38,6 @@ CONFIG_NET_CONFIG_AUTO_INIT=y CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_PACKET=y -CONFIG_NET_SOCKETS_PACKET_DGRAM=n CONFIG_NET_IF_MAX_IPV4_COUNT=2 CONFIG_NET_IF_MAX_IPV6_COUNT=2 diff --git a/samples/cellular/modem_shell/prj.conf b/samples/cellular/modem_shell/prj.conf index 777fc3138ac6..404c99c79ef3 100644 --- a/samples/cellular/modem_shell/prj.conf +++ b/samples/cellular/modem_shell/prj.conf @@ -73,7 +73,6 @@ CONFIG_NET_IPV4=y CONFIG_NET_IPV6=y CONFIG_POSIX_API=y -CONFIG_PTHREAD_IPC=n # There are issues with posix api if this is set CONFIG_ZVFS_OPEN_MAX=10 # Need to be the same as MAX_FDS CONFIG_NET_SOCKETS_POLL_MAX=10 diff --git a/samples/cellular/modem_shell/src/location/location_shell.c b/samples/cellular/modem_shell/src/location/location_shell.c index 32c27dd53e9c..7187dffd814c 100644 --- a/samples/cellular/modem_shell/src/location/location_shell.c +++ b/samples/cellular/modem_shell/src/location/location_shell.c @@ -9,7 +9,7 @@ #include #include -#ifdef CONFIG_GETOPT +#ifdef CONFIG_POSIX_C_LIB_EXT #include #endif #include diff --git a/samples/cellular/modem_shell/src/ping/icmp_ping_shell.c b/samples/cellular/modem_shell/src/ping/icmp_ping_shell.c index 9bcd55a10855..66b34bf096a9 100644 --- a/samples/cellular/modem_shell/src/ping/icmp_ping_shell.c +++ b/samples/cellular/modem_shell/src/ping/icmp_ping_shell.c @@ -8,7 +8,7 @@ #include #include -#ifdef CONFIG_GETOPT +#ifdef CONFIG_POSIX_C_LIB_EXT #include #endif #include diff --git a/samples/cellular/modem_shell/src/ppp/ppp_ctrl.c b/samples/cellular/modem_shell/src/ppp/ppp_ctrl.c index a5b663e08fdb..e7bc0d231268 100644 --- a/samples/cellular/modem_shell/src/ppp/ppp_ctrl.c +++ b/samples/cellular/modem_shell/src/ppp/ppp_ctrl.c @@ -377,9 +377,9 @@ static int ppp_ctrl_zephyr_sckt_create(void) return 0; } - /* Create raw Zephyr socket for passing data to/from ppp link: */ - ppp_data_socket_fd = socket(AF_PACKET, SOCK_RAW | SOCK_NATIVE, - htons(IPPROTO_RAW)); + /* Create Zephyr packet socket for passing data to/from ppp link: */ + ppp_data_socket_fd = socket(AF_PACKET, SOCK_DGRAM | SOCK_NATIVE, + htons(ETH_P_ALL)); if (ppp_data_socket_fd < 0) { mosh_error("PPP Zephyr data socket creation failed: (%d)\n", -errno); goto return_error; @@ -392,6 +392,7 @@ static int ppp_ctrl_zephyr_sckt_create(void) dst.sll_ifindex = net_if_get_by_iface(ppp_iface_global); dst.sll_family = AF_PACKET; + dst.sll_protocol = htons(ETH_P_ALL); ret = bind(ppp_data_socket_fd, (const struct sockaddr *)&dst, sizeof(struct sockaddr_ll)); diff --git a/samples/cellular/modem_shell/src/ppp/ppp_mdm_data_rcv.c b/samples/cellular/modem_shell/src/ppp/ppp_mdm_data_rcv.c index f892813608ac..708793426cfc 100644 --- a/samples/cellular/modem_shell/src/ppp/ppp_mdm_data_rcv.c +++ b/samples/cellular/modem_shell/src/ppp/ppp_mdm_data_rcv.c @@ -10,6 +10,7 @@ #include +#include #include #include @@ -68,6 +69,17 @@ static void ppp_modem_dl_data_thread_handler(void) recv_data_len = recv(ppp_modem_data_socket_fd, receive_buffer, used_mtu_mru, 0); if (recv_data_len > 0) { + uint8_t type = receive_buffer[0] & 0xf0; + + if (type == 0x60) { + dst.sll_protocol = htons(ETH_P_IPV6); + } else if (type == 0x40) { + dst.sll_protocol = htons(ETH_P_IP); + } else { + /* Not IP traffic, ignore. */ + continue; + } + ret = sendto(ppp_data_socket_fd, receive_buffer, recv_data_len, 0, (const struct sockaddr *)&dst, sizeof(struct sockaddr_ll)); diff --git a/samples/cellular/modem_shell/src/rest/rest_shell.c b/samples/cellular/modem_shell/src/rest/rest_shell.c index 9fb1c8fed559..c727bf1185d4 100644 --- a/samples/cellular/modem_shell/src/rest/rest_shell.c +++ b/samples/cellular/modem_shell/src/rest/rest_shell.c @@ -9,7 +9,7 @@ #include #include -#ifdef CONFIG_GETOPT +#ifdef CONFIG_POSIX_C_LIB_EXT #include #endif #include diff --git a/samples/cellular/modem_shell/src/sms/sms_shell.c b/samples/cellular/modem_shell/src/sms/sms_shell.c index 5791b844193d..e26ca9d88f33 100644 --- a/samples/cellular/modem_shell/src/sms/sms_shell.c +++ b/samples/cellular/modem_shell/src/sms/sms_shell.c @@ -8,7 +8,7 @@ #include #include #include -#ifdef CONFIG_GETOPT +#ifdef CONFIG_POSIX_C_LIB_EXT #include #endif #include diff --git a/samples/debug/memfault/boards/nrf7002dk_nrf5340_cpuapp.conf b/samples/debug/memfault/boards/nrf7002dk_nrf5340_cpuapp.conf index 38109d9644ce..229be81f5322 100644 --- a/samples/debug/memfault/boards/nrf7002dk_nrf5340_cpuapp.conf +++ b/samples/debug/memfault/boards/nrf7002dk_nrf5340_cpuapp.conf @@ -5,7 +5,7 @@ # # General -CONFIG_POSIX_CLOCK=y +CONFIG_POSIX_TIMERS=y CONFIG_HW_STACK_PROTECTION=y CONFIG_HW_ID_LIBRARY=y CONFIG_HW_ID_LIBRARY_SOURCE_NET_MAC=y diff --git a/samples/net/aws_iot/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/net/aws_iot/boards/nrf54l15dk_nrf54l15_cpuapp.conf index dbc5dc262d8a..75f4b9a885cb 100644 --- a/samples/net/aws_iot/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/net/aws_iot/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -56,7 +56,7 @@ CONFIG_MQTT_HELPER_PROVISION_CERTIFICATES=y # Kernel options CONFIG_POSIX_NETWORKING=y -CONFIG_POSIX_MAX_FDS=21 +CONFIG_ZVFS_OPEN_MAX=21 # Shell CONFIG_SHELL=y diff --git a/samples/net/aws_iot/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/aws_iot/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index 6f8a7880c27f..ca36102659d7 100644 --- a/samples/net/aws_iot/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/aws_iot/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -9,7 +9,7 @@ # set here will take precedence if they are present in both files. # General -CONFIG_POSIX_CLOCK=y +CONFIG_POSIX_TIMERS=y CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 CONFIG_HEAP_MEM_POOL_SIZE=40144 CONFIG_NRF_WIFI_CTRL_HEAP_SIZE=20000 diff --git a/samples/net/azure_iot_hub/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/azure_iot_hub/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index 762c0cf3b757..35b96402d8e0 100644 --- a/samples/net/azure_iot_hub/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/azure_iot_hub/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -5,7 +5,7 @@ # # General -CONFIG_POSIX_CLOCK=y +CONFIG_POSIX_TIMERS=y CONFIG_HW_ID_LIBRARY=y CONFIG_HW_ID_LIBRARY_SOURCE_NET_MAC=y CONFIG_DK_LIBRARY=y diff --git a/samples/net/coap_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/net/coap_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf index c38ad1a06e48..131d2de445d6 100644 --- a/samples/net/coap_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/net/coap_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -57,7 +57,7 @@ CONFIG_NRF70_MAX_TX_AGGREGATION=1 # Kernel options CONFIG_POSIX_NETWORKING=y -CONFIG_POSIX_MAX_FDS=21 +CONFIG_ZVFS_OPEN_MAX=21 # Shell CONFIG_SHELL=y diff --git a/samples/net/coap_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/coap_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index dceb3fc3fddc..8a6f64cd50be 100644 --- a/samples/net/coap_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/coap_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -9,7 +9,7 @@ # set here will take precedence if they are present in both files. # General -CONFIG_POSIX_CLOCK=y +CONFIG_POSIX_TIMERS=y CONFIG_LOG_BUFFER_SIZE=4096 CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 CONFIG_MAIN_STACK_SIZE=6144 diff --git a/samples/net/download/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/net/download/boards/nrf54l15dk_nrf54l15_cpuapp.conf index 5940186d69da..c24fde07854d 100644 --- a/samples/net/download/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/net/download/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -57,7 +57,7 @@ CONFIG_NRF70_MAX_TX_AGGREGATION=1 # Kernel options CONFIG_POSIX_NETWORKING=y -CONFIG_POSIX_MAX_FDS=21 +CONFIG_ZVFS_OPEN_MAX=21 # Shell CONFIG_SHELL=y diff --git a/samples/net/download/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/download/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index bf5ec2b037ce..993079dedec0 100644 --- a/samples/net/download/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/download/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -7,7 +7,7 @@ # General CONFIG_LOG=y CONFIG_LOG_MODE_IMMEDIATE=y -CONFIG_POSIX_CLOCK=y +CONFIG_POSIX_TIMERS=y CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 CONFIG_HEAP_MEM_POOL_SIZE=40144 CONFIG_NRF_WIFI_CTRL_HEAP_SIZE=20000 diff --git a/samples/net/http_server/boards/native_sim.conf b/samples/net/http_server/boards/native_sim.conf index 87df9e6695da..da26607a8f19 100644 --- a/samples/net/http_server/boards/native_sim.conf +++ b/samples/net/http_server/boards/native_sim.conf @@ -14,4 +14,4 @@ CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.1" CONFIG_NET_HOSTNAME_ENABLE=y CONFIG_NET_HOSTNAME_UNIQUE=n CONFIG_NET_HOSTNAME="httpserver" -CONFIG_POSIX_UNAME=n +CONFIG_POSIX_SINGLE_PROCESS=n diff --git a/samples/net/http_server/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/net/http_server/boards/nrf54l15dk_nrf54l15_cpuapp.conf index 61bf36dfa918..27fafe0a620c 100644 --- a/samples/net/http_server/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/net/http_server/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -40,7 +40,7 @@ CONFIG_MDNS_RESPONDER_DNS_SD=y CONFIG_NET_HOSTNAME_ENABLE=y CONFIG_NET_HOSTNAME_UNIQUE=n CONFIG_NET_HOSTNAME="httpserver" -CONFIG_POSIX_UNAME=n +CONFIG_POSIX_SINGLE_PROCESS=n # NET buffers CONFIG_NET_PKT_TX_COUNT=6 diff --git a/samples/net/http_server/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/http_server/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index 2c76ead822d2..86d04a9be3d7 100644 --- a/samples/net/http_server/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/http_server/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -33,7 +33,7 @@ CONFIG_MDNS_RESPONDER_DNS_SD=y CONFIG_NET_HOSTNAME_ENABLE=y CONFIG_NET_HOSTNAME_UNIQUE=n CONFIG_NET_HOSTNAME="httpserver" -CONFIG_POSIX_UNAME=n +CONFIG_POSIX_SINGLE_PROCESS=n # Zephyr NET Connection Manager connectivity layer CONFIG_L2_WIFI_CONNECTIVITY=y diff --git a/samples/net/https_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/net/https_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf index fc8a57dedf05..65b052f9aeef 100644 --- a/samples/net/https_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/net/https_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -53,7 +53,7 @@ CONFIG_NRF70_MAX_TX_AGGREGATION=1 # Kernel options CONFIG_POSIX_NETWORKING=y -CONFIG_POSIX_MAX_FDS=21 +CONFIG_ZVFS_OPEN_MAX=21 # Shell CONFIG_SHELL=y diff --git a/samples/net/https_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/https_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index 3167ed614d93..cc6a771230e5 100644 --- a/samples/net/https_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/https_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -5,7 +5,7 @@ # # General -CONFIG_POSIX_CLOCK=y +CONFIG_POSIX_TIMERS=y CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 CONFIG_NRF_WIFI_CTRL_HEAP_SIZE=20000 CONFIG_NRF_WIFI_DATA_HEAP_SIZE=40000 diff --git a/samples/net/mqtt/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/net/mqtt/boards/nrf54l15dk_nrf54l15_cpuapp.conf index 2189f6e68503..f858ffbbf0e8 100644 --- a/samples/net/mqtt/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/net/mqtt/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -57,7 +57,7 @@ CONFIG_NRF70_MAX_TX_AGGREGATION=1 # Kernel options CONFIG_POSIX_NETWORKING=y -CONFIG_POSIX_MAX_FDS=21 +CONFIG_ZVFS_OPEN_MAX=21 # Shell CONFIG_SHELL=y diff --git a/samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index 5e5cb1b0c72b..72084a2a8172 100644 --- a/samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -9,7 +9,7 @@ # set here will take precedence if they are present in both files. # General -CONFIG_POSIX_CLOCK=y +CONFIG_POSIX_TIMERS=y CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 CONFIG_MAIN_STACK_SIZE=4096 CONFIG_LOG_BUFFER_SIZE=3072 diff --git a/samples/net/udp/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/net/udp/boards/nrf54l15dk_nrf54l15_cpuapp.conf index 4a8aa443c322..6ab7e42924d1 100644 --- a/samples/net/udp/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/net/udp/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -57,7 +57,7 @@ CONFIG_NRF70_MAX_TX_AGGREGATION=1 # Kernel options CONFIG_POSIX_NETWORKING=y -CONFIG_POSIX_MAX_FDS=21 +CONFIG_ZVFS_OPEN_MAX=21 # Shell CONFIG_SHELL=y diff --git a/samples/net/udp/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/udp/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index 563249edea07..d1477be278ee 100644 --- a/samples/net/udp/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/udp/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -5,7 +5,7 @@ # # General -CONFIG_POSIX_CLOCK=y +CONFIG_POSIX_TIMERS=y CONFIG_HEAP_MEM_POOL_SIZE=40144 CONFIG_NRF_WIFI_CTRL_HEAP_SIZE=15000 CONFIG_NRF_WIFI_DATA_HEAP_SIZE=64856 diff --git a/samples/wifi/ble_coex/prj.conf b/samples/wifi/ble_coex/prj.conf index ca4829016eea..45d035860b23 100644 --- a/samples/wifi/ble_coex/prj.conf +++ b/samples/wifi/ble_coex/prj.conf @@ -52,7 +52,7 @@ CONFIG_ENTROPY_GENERATOR=y # Logging CONFIG_LOG=y CONFIG_PRINTK=y -CONFIG_POSIX_CLOCK=y +CONFIG_POSIX_TIMERS=y # Benchmarking CONFIG_NET_ZPERF=y diff --git a/samples/wifi/monitor/overlay-netusb.conf b/samples/wifi/monitor/overlay-netusb.conf index d4bed2c98ee5..82f89fa32f60 100644 --- a/samples/wifi/monitor/overlay-netusb.conf +++ b/samples/wifi/monitor/overlay-netusb.conf @@ -19,6 +19,6 @@ CONFIG_NET_IPV4_FRAGMENT_MAX_COUNT=10 CONFIG_POSIX_THREAD_THREADS_MAX=5 # Every pthread_create needs a mutex, and WFA DUT needs an extra mutex/thread # CONFIG_POSIX_THREAD_THREADS_MAX * 2 -CONFIG_MAX_PTHREAD_MUTEX_COUNT=10 +CONFIG_MAX_POSIX_THREADS_COUNT=10 # Same as above: CONFIG_POSIX_THREAD_THREADS_MAX * 2 -CONFIG_MAX_PTHREAD_COND_COUNT=10 +CONFIG_MAX_POSIX_THREADS_COUNT=10 diff --git a/samples/wifi/monitor/prj.conf b/samples/wifi/monitor/prj.conf index 8a2fa9aa50e4..bfa51381a38d 100644 --- a/samples/wifi/monitor/prj.conf +++ b/samples/wifi/monitor/prj.conf @@ -45,7 +45,7 @@ CONFIG_NET_RX_STACK_SIZE=4096 # Logging CONFIG_LOG=y CONFIG_LOG_MODE_IMMEDIATE=y -CONFIG_POSIX_CLOCK=y +CONFIG_POSIX_TIMERS=y CONFIG_POSIX_API=y # printing of scan results puts pressure on queues in new locking diff --git a/samples/wifi/promiscuous/overlay-netusb.conf b/samples/wifi/promiscuous/overlay-netusb.conf index d4bed2c98ee5..82f89fa32f60 100644 --- a/samples/wifi/promiscuous/overlay-netusb.conf +++ b/samples/wifi/promiscuous/overlay-netusb.conf @@ -19,6 +19,6 @@ CONFIG_NET_IPV4_FRAGMENT_MAX_COUNT=10 CONFIG_POSIX_THREAD_THREADS_MAX=5 # Every pthread_create needs a mutex, and WFA DUT needs an extra mutex/thread # CONFIG_POSIX_THREAD_THREADS_MAX * 2 -CONFIG_MAX_PTHREAD_MUTEX_COUNT=10 +CONFIG_MAX_POSIX_THREADS_COUNT=10 # Same as above: CONFIG_POSIX_THREAD_THREADS_MAX * 2 -CONFIG_MAX_PTHREAD_COND_COUNT=10 +CONFIG_MAX_POSIX_THREADS_COUNT=10 diff --git a/samples/wifi/promiscuous/prj.conf b/samples/wifi/promiscuous/prj.conf index b1ef17bbdf4b..2dfa2d02b46e 100644 --- a/samples/wifi/promiscuous/prj.conf +++ b/samples/wifi/promiscuous/prj.conf @@ -72,7 +72,7 @@ CONFIG_ENTROPY_GENERATOR=y # Logging CONFIG_LOG=y CONFIG_LOG_BUFFER_SIZE=2048 -CONFIG_POSIX_CLOCK=y +CONFIG_POSIX_TIMERS=y # printing of scan results puts pressure on queues in new locking # design in net_mgmt. So, use a higher timeout for a crowded diff --git a/samples/wifi/provisioning/softap/prj.conf b/samples/wifi/provisioning/softap/prj.conf index 1e3eeebd5dda..a76683c601b8 100644 --- a/samples/wifi/provisioning/softap/prj.conf +++ b/samples/wifi/provisioning/softap/prj.conf @@ -83,7 +83,7 @@ CONFIG_MDNS_RESPONDER_DNS_SD=y CONFIG_NET_HOSTNAME_ENABLE=y CONFIG_NET_HOSTNAME="wifiprov" # Disable POSIX uname support to suppress build warning that hostname is too long. -CONFIG_POSIX_UNAME=n +CONFIG_POSIX_SINGLE_PROCESS=n # DHCPv4 client and server CONFIG_NET_DHCPV4=y diff --git a/samples/wifi/radio_test/multi_domain/prj.conf b/samples/wifi/radio_test/multi_domain/prj.conf index a73e66385d20..782fefceb2f3 100644 --- a/samples/wifi/radio_test/multi_domain/prj.conf +++ b/samples/wifi/radio_test/multi_domain/prj.conf @@ -31,7 +31,7 @@ CONFIG_PRINTK=y CONFIG_SHELL=y CONFIG_SHELL_GETOPT=y CONFIG_DEVICE_SHELL=y -CONFIG_POSIX_CLOCK=y +CONFIG_POSIX_TIMERS=y CONFIG_DATE_SHELL=y CONFIG_LOG_BUFFER_SIZE=4096 CONFIG_SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE=1024 diff --git a/samples/wifi/radio_test/single_domain/prj.conf b/samples/wifi/radio_test/single_domain/prj.conf index 53fb88ec874a..02db2cd7edbd 100644 --- a/samples/wifi/radio_test/single_domain/prj.conf +++ b/samples/wifi/radio_test/single_domain/prj.conf @@ -32,7 +32,7 @@ CONFIG_PRINTK=y CONFIG_SHELL=y CONFIG_SHELL_GETOPT=y CONFIG_DEVICE_SHELL=y -CONFIG_POSIX_CLOCK=y +CONFIG_POSIX_TIMERS=y CONFIG_DATE_SHELL=y CONFIG_LOG_BUFFER_SIZE=4096 CONFIG_SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE=1024 diff --git a/samples/wifi/raw_tx_packet/prj.conf b/samples/wifi/raw_tx_packet/prj.conf index 4f230edbe1f6..a3b57ca6f521 100644 --- a/samples/wifi/raw_tx_packet/prj.conf +++ b/samples/wifi/raw_tx_packet/prj.conf @@ -69,7 +69,7 @@ CONFIG_ENTROPY_GENERATOR=y # Logging CONFIG_LOG=y CONFIG_LOG_BUFFER_SIZE=2048 -CONFIG_POSIX_CLOCK=y +CONFIG_POSIX_TIMERS=y CONFIG_POSIX_API=y CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.168.1.99" diff --git a/samples/wifi/shell/overlay-netusb.conf b/samples/wifi/shell/overlay-netusb.conf index d4bed2c98ee5..82f89fa32f60 100644 --- a/samples/wifi/shell/overlay-netusb.conf +++ b/samples/wifi/shell/overlay-netusb.conf @@ -19,6 +19,6 @@ CONFIG_NET_IPV4_FRAGMENT_MAX_COUNT=10 CONFIG_POSIX_THREAD_THREADS_MAX=5 # Every pthread_create needs a mutex, and WFA DUT needs an extra mutex/thread # CONFIG_POSIX_THREAD_THREADS_MAX * 2 -CONFIG_MAX_PTHREAD_MUTEX_COUNT=10 +CONFIG_MAX_POSIX_THREADS_COUNT=10 # Same as above: CONFIG_POSIX_THREAD_THREADS_MAX * 2 -CONFIG_MAX_PTHREAD_COND_COUNT=10 +CONFIG_MAX_POSIX_THREADS_COUNT=10 diff --git a/samples/wifi/shell/prj.conf b/samples/wifi/shell/prj.conf index 0fd875b1b2f6..4bd53cd9c6bf 100644 --- a/samples/wifi/shell/prj.conf +++ b/samples/wifi/shell/prj.conf @@ -72,7 +72,7 @@ CONFIG_PRINTK=y CONFIG_SHELL=y CONFIG_SHELL_GETOPT=y CONFIG_DEVICE_SHELL=y -CONFIG_POSIX_CLOCK=y +CONFIG_POSIX_TIMERS=y CONFIG_DATE_SHELL=y CONFIG_NET_CONFIG_AUTO_INIT=n CONFIG_POSIX_API=y diff --git a/samples/wifi/softap/prj.conf b/samples/wifi/softap/prj.conf index d2b459dc1e32..4a956bf8366b 100644 --- a/samples/wifi/softap/prj.conf +++ b/samples/wifi/softap/prj.conf @@ -70,7 +70,7 @@ CONFIG_ENTROPY_GENERATOR=y # Logging CONFIG_LOG=y CONFIG_LOG_BUFFER_SIZE=2048 -CONFIG_POSIX_CLOCK=y +CONFIG_POSIX_TIMERS=y CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.168.1.1" CONFIG_NET_CONFIG_MY_IPV4_NETMASK="255.255.255.0" diff --git a/samples/wifi/sta/prj.conf b/samples/wifi/sta/prj.conf index 1be8a75a11c2..dc509898c10d 100644 --- a/samples/wifi/sta/prj.conf +++ b/samples/wifi/sta/prj.conf @@ -72,7 +72,7 @@ CONFIG_ENTROPY_GENERATOR=y # Logging CONFIG_LOG=y CONFIG_LOG_BUFFER_SIZE=2048 -CONFIG_POSIX_CLOCK=y +CONFIG_POSIX_TIMERS=y CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.168.1.99" CONFIG_NET_CONFIG_MY_IPV4_NETMASK="255.255.255.0" diff --git a/samples/wifi/thread_coex/prj.conf b/samples/wifi/thread_coex/prj.conf index 54ba471023d7..a3c0df96cda6 100644 --- a/samples/wifi/thread_coex/prj.conf +++ b/samples/wifi/thread_coex/prj.conf @@ -48,7 +48,7 @@ CONFIG_ENTROPY_GENERATOR=y # Logging CONFIG_LOG=y CONFIG_PRINTK=y -CONFIG_POSIX_CLOCK=y +CONFIG_POSIX_TIMERS=y # Benchmarking CONFIG_NET_ZPERF=y diff --git a/samples/wifi/throughput/prj.conf b/samples/wifi/throughput/prj.conf index 97d1a4719f55..b1e4c809d53b 100644 --- a/samples/wifi/throughput/prj.conf +++ b/samples/wifi/throughput/prj.conf @@ -73,7 +73,7 @@ CONFIG_PRINTK=y CONFIG_SHELL=y CONFIG_SHELL_GETOPT=y CONFIG_DEVICE_SHELL=y -CONFIG_POSIX_CLOCK=y +CONFIG_POSIX_TIMERS=y CONFIG_DATE_SHELL=y CONFIG_NET_CONFIG_AUTO_INIT=n diff --git a/samples/wifi/twt/prj.conf b/samples/wifi/twt/prj.conf index c108c798b3f7..54ae11c00273 100644 --- a/samples/wifi/twt/prj.conf +++ b/samples/wifi/twt/prj.conf @@ -72,7 +72,7 @@ CONFIG_ENTROPY_GENERATOR=y # Logging CONFIG_LOG=y CONFIG_LOG_BUFFER_SIZE=2048 -CONFIG_POSIX_CLOCK=y +CONFIG_POSIX_TIMERS=y CONFIG_POSIX_API=y CONFIG_PM=y diff --git a/samples/wifi/wfa_qt_app/prj.conf b/samples/wifi/wfa_qt_app/prj.conf index f44ecfeffad5..623bdf07ac98 100644 --- a/samples/wifi/wfa_qt_app/prj.conf +++ b/samples/wifi/wfa_qt_app/prj.conf @@ -82,7 +82,7 @@ CONFIG_PRINTK=y CONFIG_SHELL=y CONFIG_SHELL_GETOPT=y CONFIG_DEVICE_SHELL=y -CONFIG_POSIX_CLOCK=y +CONFIG_POSIX_TIMERS=y CONFIG_DATE_SHELL=y CONFIG_NET_CONFIG_AUTO_INIT=n CONFIG_NET_CONFIG_SETTINGS=y diff --git a/scripts/quarantine_zephyr.yaml b/scripts/quarantine_zephyr.yaml index d752d231ca4a..ee9ca17b2e37 100644 --- a/scripts/quarantine_zephyr.yaml +++ b/scripts/quarantine_zephyr.yaml @@ -5,7 +5,7 @@ # This configurations come from tests/samples in sdk-zephyr - scenarios: - - libraries.hash_map.newlib.cxx_unordered_map.djb2 + - sample.libraries.hash_map.newlib.cxx_unordered_map.djb2 comment: "https://nordicsemi.atlassian.net/browse/NCSDK-21219" - scenarios: diff --git a/subsys/bluetooth/controller/hci_internal_wrappers.c b/subsys/bluetooth/controller/hci_internal_wrappers.c index 74847e921c9d..7b04b763a671 100644 --- a/subsys/bluetooth/controller/hci_internal_wrappers.c +++ b/subsys/bluetooth/controller/hci_internal_wrappers.c @@ -36,7 +36,9 @@ * to avoid deadlocks due to missing CMD buffers, if the host is only allocating the next command * once the previous is completed. */ -BUILD_ASSERT(BT_BUF_ACL_RX_COUNT < CONFIG_BT_BUF_CMD_TX_COUNT, +#define BT_BUF_CMD_TX_COUNT CONFIG_BT_BUF_CMD_TX_COUNT + +BUILD_ASSERT(BT_BUF_ACL_RX_COUNT < BT_BUF_CMD_TX_COUNT, "Too low HCI command buffers compared to ACL Rx buffers."); #else /* controller-only build */ /* @@ -46,7 +48,9 @@ BUILD_ASSERT(BT_BUF_ACL_RX_COUNT < CONFIG_BT_BUF_CMD_TX_COUNT, * do flow control, at least one more buffer is needed. * */ -BUILD_ASSERT((CONFIG_BT_BUF_CMD_TX_COUNT - 1) > 0, +#define BT_BUF_CMD_TX_COUNT (BT_BUF_RX_COUNT + 1) + +BUILD_ASSERT((BT_BUF_CMD_TX_COUNT - 1) > 0, "We need at least two HCI command buffers to avoid deadlocks."); #endif /* CONFIG_BT_CONN && CONFIG_BT_HCI_HOST */ @@ -71,7 +75,7 @@ int sdc_hci_cmd_cb_host_buffer_size_wrapper(const sdc_hci_cmd_cb_host_buffer_siz sdc_hci_cmd_cb_host_buffer_size_t ctrl_cmd_params = *cmd_params; ctrl_cmd_params.host_total_num_acl_data_packets = MIN( - ctrl_cmd_params.host_total_num_acl_data_packets, (CONFIG_BT_BUF_CMD_TX_COUNT - 1)); + ctrl_cmd_params.host_total_num_acl_data_packets, (BT_BUF_CMD_TX_COUNT - 1)); return sdc_hci_cmd_cb_host_buffer_size(&ctrl_cmd_params); } diff --git a/subsys/bluetooth/gatt_pool.c b/subsys/bluetooth/gatt_pool.c index 0e5458f8a289..c43c6d908892 100644 --- a/subsys/bluetooth/gatt_pool.c +++ b/subsys/bluetooth/gatt_pool.c @@ -379,7 +379,7 @@ int bt_gatt_pool_desc_alloc(struct bt_gatt_pool *gp, } int bt_gatt_pool_ccc_alloc(struct bt_gatt_pool *gp, - struct _bt_gatt_ccc *ccc, + struct bt_gatt_ccc_managed_user_data *ccc, uint8_t perm) { struct bt_gatt_attr *attr; diff --git a/subsys/bluetooth/rpc/client/bt_rpc_conn_client.c b/subsys/bluetooth/rpc/client/bt_rpc_conn_client.c index ae5487e8c021..1f28e6fc2cb0 100644 --- a/subsys/bluetooth/rpc/client/bt_rpc_conn_client.c +++ b/subsys/bluetooth/rpc/client/bt_rpc_conn_client.c @@ -392,7 +392,7 @@ static void bt_conn_get_remote_info_rpc_rsp(const struct nrf_rpc_group *group, bt_conn_remote_info_dec(ctx, res->conn, res->remote_info); } -int bt_conn_get_remote_info(struct bt_conn *conn, +int bt_conn_get_remote_info(const struct bt_conn *conn, struct bt_conn_remote_info *remote_info) { struct nrf_rpc_cbor_ctx ctx; @@ -403,7 +403,7 @@ int bt_conn_get_remote_info(struct bt_conn *conn, bt_rpc_encode_bt_conn(&ctx, conn); - result.conn = conn; + result.conn = (struct bt_conn *)conn; result.remote_info = remote_info; nrf_rpc_cbor_cmd_no_err(&bt_rpc_grp, BT_CONN_GET_REMOTE_INFO_RPC_CMD, diff --git a/subsys/bluetooth/rpc/client/bt_rpc_gatt_client.c b/subsys/bluetooth/rpc/client/bt_rpc_gatt_client.c index af47caa32d0d..3fab96497d02 100644 --- a/subsys/bluetooth/rpc/client/bt_rpc_gatt_client.c +++ b/subsys/bluetooth/rpc/client/bt_rpc_gatt_client.c @@ -143,7 +143,7 @@ static void bt_rpc_gatt_ccc_cfg_changed_cb_rpc_handler(const struct nrf_rpc_grou uint32_t attr_index; uint16_t ccc_value; const struct bt_gatt_attr *attr; - struct _bt_gatt_ccc *ccc; + struct bt_gatt_ccc_managed_user_data *ccc; attr_index = nrf_rpc_decode_uint(ctx); ccc_value = nrf_rpc_decode_uint(ctx); @@ -157,7 +157,7 @@ static void bt_rpc_gatt_ccc_cfg_changed_cb_rpc_handler(const struct nrf_rpc_grou return; } - ccc = (struct _bt_gatt_ccc *) attr->user_data; + ccc = (struct bt_gatt_ccc_managed_user_data *) attr->user_data; if (ccc->cfg_changed) { ccc->cfg_changed(attr, ccc_value); @@ -181,7 +181,7 @@ static void bt_rpc_gatt_ccc_cfg_write_cb_rpc_handler(const struct nrf_rpc_group uint32_t attr_index; struct bt_conn *conn; const struct bt_gatt_attr *attr; - struct _bt_gatt_ccc *ccc; + struct bt_gatt_ccc_managed_user_data *ccc; uint16_t ccc_value; ssize_t write_len = 0; @@ -198,7 +198,7 @@ static void bt_rpc_gatt_ccc_cfg_write_cb_rpc_handler(const struct nrf_rpc_group return; } - ccc = (struct _bt_gatt_ccc *) attr->user_data; + ccc = (struct bt_gatt_ccc_managed_user_data *) attr->user_data; if (ccc->cfg_write) { write_len = ccc->cfg_write(conn, attr, ccc_value); @@ -222,7 +222,7 @@ static void bt_rpc_gatt_ccc_cfg_match_cb_rpc_handler(const struct nrf_rpc_group uint32_t attr_index; struct bt_conn *conn; const struct bt_gatt_attr *attr; - struct _bt_gatt_ccc *ccc; + struct bt_gatt_ccc_managed_user_data *ccc; bool match = false; conn = bt_rpc_decode_bt_conn(ctx); @@ -237,7 +237,7 @@ static void bt_rpc_gatt_ccc_cfg_match_cb_rpc_handler(const struct nrf_rpc_group return; } - ccc = (struct _bt_gatt_ccc *) attr->user_data; + ccc = (struct bt_gatt_ccc_managed_user_data *) attr->user_data; if (ccc->cfg_match) { match = ccc->cfg_match(conn, attr); @@ -511,7 +511,7 @@ static int bt_rpc_gatt_send_desc_attr(uint8_t special_attr, uint16_t param, uint static int send_ccc_attr(uint8_t special_attr, const struct bt_gatt_attr *attr) { - struct _bt_gatt_ccc *ccc = (struct _bt_gatt_ccc *)attr->user_data; + struct bt_gatt_ccc_managed_user_data *ccc = (struct bt_gatt_ccc_managed_user_data *)attr->user_data; uint16_t data = attr->perm; if (ccc->cfg_changed) { diff --git a/subsys/bluetooth/rpc/host/bt_rpc_gatt_host.c b/subsys/bluetooth/rpc/host/bt_rpc_gatt_host.c index e24c5d464c1d..e63335afabeb 100644 --- a/subsys/bluetooth/rpc/host/bt_rpc_gatt_host.c +++ b/subsys/bluetooth/rpc/host/bt_rpc_gatt_host.c @@ -582,14 +582,15 @@ static bool bt_ccc_cfg_match_call(struct bt_conn *conn, const struct bt_gatt_att static int add_ccc_attr(struct bt_gatt_attr *attr, uint16_t param) { - struct _bt_gatt_ccc *ccc; + struct bt_gatt_ccc_managed_user_data *ccc; - ccc = (struct _bt_gatt_ccc *)bt_rpc_gatt_add(&gatt_buffer, sizeof(struct _bt_gatt_ccc)); + ccc = (struct bt_gatt_ccc_managed_user_data *)bt_rpc_gatt_add(&gatt_buffer, + sizeof(struct bt_gatt_ccc_managed_user_data)); if (!ccc) { return -ENOMEM; } - memset(ccc, 0, sizeof(struct _bt_gatt_ccc)); + memset(ccc, 0, sizeof(struct bt_gatt_ccc_managed_user_data)); ccc->cfg_changed = (param & BT_RPC_GATT_CCC_CFG_CHANGE_PRESENT_FLAG) ? bt_ccc_cfg_changed_call : NULL; diff --git a/subsys/bluetooth/services/hids.c b/subsys/bluetooth/services/hids.c index 0e5f47b2ad5b..17ba503c7acb 100644 --- a/subsys/bluetooth/services/hids.c +++ b/subsys/bluetooth/services/hids.c @@ -474,7 +474,7 @@ static void hids_input_report_ccc_changed(struct bt_gatt_attr const *attr, LOG_DBG("Input Report CCCD has changed."); struct bt_hids_inp_rep *inp_rep = - CONTAINER_OF((struct _bt_gatt_ccc *)attr->user_data, + CONTAINER_OF((struct bt_gatt_ccc_managed_user_data *)attr->user_data, struct bt_hids_inp_rep, ccc); uint8_t report_id = inp_rep->id; @@ -533,7 +533,7 @@ static void hids_boot_mouse_inp_rep_ccc_changed(struct bt_gatt_attr const *attr, LOG_DBG("Boot Mouse Input Report CCCD has changed."); struct bt_hids_boot_mouse_inp_rep *boot_mouse_rep = - CONTAINER_OF((struct _bt_gatt_ccc *)attr->user_data, + CONTAINER_OF((struct bt_gatt_ccc_managed_user_data *)attr->user_data, struct bt_hids_boot_mouse_inp_rep, ccc); if (value == BT_GATT_CCC_NOTIFY) { @@ -588,7 +588,7 @@ static void hids_boot_kb_inp_rep_ccc_changed(struct bt_gatt_attr const *attr, LOG_DBG("Boot Keyboard Input Report CCCD has changed."); struct bt_hids_boot_kb_inp_rep *boot_kb_inp_rep = - CONTAINER_OF((struct _bt_gatt_ccc *)attr->user_data, + CONTAINER_OF((struct bt_gatt_ccc_managed_user_data *)attr->user_data, struct bt_hids_boot_kb_inp_rep, ccc); if (value == BT_GATT_CCC_NOTIFY) { diff --git a/subsys/bluetooth/services/mds.c b/subsys/bluetooth/services/mds.c index b96ecc6c6c3b..a70604af989e 100644 --- a/subsys/bluetooth/services/mds.c +++ b/subsys/bluetooth/services/mds.c @@ -355,7 +355,8 @@ static ssize_t data_export_ccc_write(struct bt_conn *conn, return sizeof(value); } -static struct _bt_gatt_ccc mds_data_export_ccc = BT_GATT_CCC_INITIALIZER(data_export_ccc_changed, +static struct bt_gatt_ccc_managed_user_data mds_data_export_ccc = BT_GATT_CCC_MANAGED_USER_DATA_INIT( + data_export_ccc_changed, data_export_ccc_write, NULL); diff --git a/subsys/bluetooth/services/ras/rrsp/ras_rrsp.c b/subsys/bluetooth/services/ras/rrsp/ras_rrsp.c index bbf05bcb1513..01d5f8b625b2 100644 --- a/subsys/bluetooth/services/ras/rrsp/ras_rrsp.c +++ b/subsys/bluetooth/services/ras/rrsp/ras_rrsp.c @@ -215,13 +215,13 @@ BT_GATT_SERVICE_DEFINE( /* On-demand Ranging Data */ BT_GATT_CHARACTERISTIC(BT_UUID_RAS_ONDEMAND_RD, BT_GATT_CHRC_INDICATE | BT_GATT_CHRC_NOTIFY, BT_GATT_PERM_NONE, NULL, NULL, NULL), - BT_GATT_CCC_MANAGED(((struct _bt_gatt_ccc[]){BT_GATT_CCC_INITIALIZER( + BT_GATT_CCC_MANAGED(((struct bt_gatt_ccc_managed_user_data[]){BT_GATT_CCC_MANAGED_USER_DATA_INIT( NULL, ondemand_rd_ccc_cfg_write_cb, NULL)}), BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT), /* Real-time Ranging Data */ BT_GATT_CHARACTERISTIC(BT_UUID_RAS_REALTIME_RD, BT_GATT_CHRC_INDICATE | BT_GATT_CHRC_NOTIFY, BT_GATT_PERM_NONE, NULL, NULL, NULL), - BT_GATT_CCC_MANAGED(((struct _bt_gatt_ccc[]){BT_GATT_CCC_INITIALIZER( + BT_GATT_CCC_MANAGED(((struct bt_gatt_ccc_managed_user_data[]){BT_GATT_CCC_MANAGED_USER_DATA_INIT( NULL, realtime_rd_ccc_cfg_write_cb, NULL)}), BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT), /* RAS-CP */ diff --git a/subsys/dfu/dfu_target/src/dfu_stream_flatten.c b/subsys/dfu/dfu_target/src/dfu_stream_flatten.c index 63281e4a81ed..5b3207f90886 100644 --- a/subsys/dfu/dfu_target/src/dfu_stream_flatten.c +++ b/subsys/dfu/dfu_target/src/dfu_stream_flatten.c @@ -22,7 +22,7 @@ int stream_flash_flatten_page(struct stream_flash_ctx *ctx, off_t off) } #if defined(CONFIG_STREAM_FLASH_ERASE) - if (ctx->last_erased_page_start_offset == page.start_offset) { + if (ctx->erased_up_to == page.start_offset) { return 0; } #else @@ -39,7 +39,7 @@ int stream_flash_flatten_page(struct stream_flash_ctx *ctx, off_t off) LOG_ERR("Error %d while flattening page", rc); #if defined(CONFIG_STREAM_FLASH_ERASE) } else { - ctx->last_erased_page_start_offset = page.start_offset; + ctx->erased_up_to = page.start_offset; #endif } diff --git a/subsys/net/lib/lwm2m_client_utils/lwm2m/ground_fix_obj.c b/subsys/net/lib/lwm2m_client_utils/lwm2m/ground_fix_obj.c index 11940820f8e7..fff965c08ce8 100644 --- a/subsys/net/lib/lwm2m_client_utils/lwm2m/ground_fix_obj.c +++ b/subsys/net/lib/lwm2m_client_utils/lwm2m/ground_fix_obj.c @@ -119,7 +119,7 @@ static int forward_to_location_obj(uint16_t obj_inst_id, switch (res_id) { case GROUND_FIX_LATITUDE: - if (IS_ENABLED(CONFIG_POSIX_CLOCK)) { + if (IS_ENABLED(CONFIG_POSIX_TIMERS)) { /* Update timestamp as well */ lwm2m_set_time( &LWM2M_OBJ(LWM2M_OBJECT_LOCATION_ID, 0, LOCATION_TIMESTAMP_ID), diff --git a/subsys/net/openthread/Kconfig b/subsys/net/openthread/Kconfig index 0a926f8dee7c..9b4581866c02 100644 --- a/subsys/net/openthread/Kconfig +++ b/subsys/net/openthread/Kconfig @@ -8,7 +8,7 @@ # Separate Kconfig exists in nrfxlib repository responsible solely for managing # OpenThread precompiled libraries. -if NET_L2_OPENTHREAD +if OPENTHREAD menu "OpenThread" @@ -16,7 +16,6 @@ config NORDIC_SECURITY_PROMPTLESS default y if !CUSTOM_OPENTHREAD_SECURITY choice OPENTHREAD_SECURITY - depends on !OPENTHREAD_SECURITY_INTERNAL config OPENTHREAD_NRF_SECURITY_PSA_CHOICE bool "nRF Security with PSA crypto enabled" @@ -146,7 +145,7 @@ endchoice endmenu # "OpenThread" -endif # NET_L2_OPENTHREAD +endif # OPENTHREAD rsource "rpc/Kconfig" rsource "report/Kconfig" diff --git a/subsys/net/openthread/Kconfig.defconfig b/subsys/net/openthread/Kconfig.defconfig index 407cc3011d09..e116041ca9f5 100644 --- a/subsys/net/openthread/Kconfig.defconfig +++ b/subsys/net/openthread/Kconfig.defconfig @@ -8,7 +8,7 @@ # This file only changes defaults and thus all symbols here must be prompltless # and safeguarded so that they only are applied when building Thread. -if NET_L2_OPENTHREAD +if OPENTHREAD choice OPENTHREAD_STACK_VERSION default OPENTHREAD_THREAD_VERSION_1_4 @@ -54,20 +54,6 @@ config LOG_BUFFER_SIZE config INIT_STACKS default y -config NET_IPV6_NBR_CACHE - default n - -config NET_IPV6_MLD - default n - -config NET_PKT_RX_COUNT - default 4 if OPENTHREAD_COPROCESSOR_RCP - default 10 - -config NET_PKT_TX_COUNT - default 4 if OPENTHREAD_COPROCESSOR_RCP - default 16 - config OPENTHREAD_MANUAL_START default y @@ -146,28 +132,6 @@ config MBEDTLS_HEAP_SIZE default 15360 if OPENTHREAD_NRF_SECURITY_PSA default 12440 if !OPENTHREAD_NRF_SECURITY_PSA -if !OPENTHREAD_THREAD_VERSION_1_1 - -# Thread 1.2 dependencies -config NRF_802154_ENCRYPTION - default y - -config NET_PKT_TXTIME - default y - -config NET_PKT_TIMESTAMP - default y - -# CSL Transmitter configuration -config IEEE802154_NRF5_DELAY_TRX_ACC - default 50 if BOARD_NRF52840DONGLE_NRF52840 || BOARD_NRF54L15DK - default 20 - -config IEEE802154_CSL_ENDPOINT - default y if OPENTHREAD_CSL_RECEIVER - -endif # !OPENTHREAD_THREAD_VERSION_1_1 - if OPENTHREAD_COPROCESSOR_RCP config MBEDTLS_PSA_KEY_SLOT_COUNT @@ -182,12 +146,6 @@ config IDLE_STACK_SIZE config MPSL_WORK_STACK_SIZE default 512 -config NET_RX_STACK_SIZE - default 300 - -config NET_TX_STACK_SIZE - default 300 - endif # OPENTHREAD_COPROCESSOR_RCP if OPENTHREAD_BLE_TCAT @@ -223,4 +181,13 @@ config ZMS config NVS default y if !(SOC_FLASH_NRF_RRAM || SOC_FLASH_NRF_MRAM) -endif # NET_L2_OPENTHREAD +if !OPENTHREAD_THREAD_VERSION_1_1 + +# Thread 1.2 dependencies +config NRF_802154_ENCRYPTION + default y + +endif # !OPENTHREAD_THREAD_VERSION_1_1 +endif # OPENTHREAD + +rsource "Kconfig.defconfig.l2" diff --git a/subsys/net/openthread/Kconfig.defconfig.l2 b/subsys/net/openthread/Kconfig.defconfig.l2 new file mode 100644 index 000000000000..94fbc463a240 --- /dev/null +++ b/subsys/net/openthread/Kconfig.defconfig.l2 @@ -0,0 +1,54 @@ +# Copyright (c) 2025 Nordic Semiconductor +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# The purpose of this file is to define new default values of settings related +# to building Thread from sources. +# This file only changes defaults related to the Zephyr L2 layer. + +if NET_L2_OPENTHREAD + +config NET_IPV6_NBR_CACHE + default n + +config NET_IPV6_MLD + default n + +config NET_PKT_RX_COUNT + default 4 if OPENTHREAD_COPROCESSOR_RCP + default 10 + +config NET_PKT_TX_COUNT + default 4 if OPENTHREAD_COPROCESSOR_RCP + default 16 + +if !OPENTHREAD_THREAD_VERSION_1_1 + +config NET_PKT_TXTIME + default y + +config NET_PKT_TIMESTAMP + default y + +# CSL Transmitter configuration +config IEEE802154_NRF5_DELAY_TRX_ACC + default 50 if BOARD_NRF52840DONGLE_NRF52840 || BOARD_NRF54L15DK + default 20 + +config IEEE802154_CSL_ENDPOINT + default y if OPENTHREAD_CSL_RECEIVER + +endif # !OPENTHREAD_THREAD_VERSION_1_1 + +if OPENTHREAD_COPROCESSOR_RCP + +config NET_RX_STACK_SIZE + default 300 + +config NET_TX_STACK_SIZE + default 300 + +endif # OPENTHREAD_COPROCESSOR_RCP + +endif # NET_L2_OPENTHREAD diff --git a/subsys/net/openthread/report/Kconfig b/subsys/net/openthread/report/Kconfig index 0a26c942feaf..3f29cf2a81d6 100644 --- a/subsys/net/openthread/report/Kconfig +++ b/subsys/net/openthread/report/Kconfig @@ -6,7 +6,7 @@ menuconfig OPENTHREAD_REPORT bool "OpenThread report generation" default y - depends on NET_L2_OPENTHREAD + depends on OPENTHREAD help Enables report generation that contains the OpenThread version, NCS revision, OpenThread library build information, List of enabled diff --git a/subsys/net/openthread/rpc/server/ot_rpc_if.c b/subsys/net/openthread/rpc/server/ot_rpc_if.c index fd90b35022da..2c2173eb6404 100644 --- a/subsys/net/openthread/rpc/server/ot_rpc_if.c +++ b/subsys/net/openthread/rpc/server/ot_rpc_if.c @@ -12,6 +12,7 @@ #include +#include /* For ETH_P_ALL */ #include #include #include @@ -97,14 +98,13 @@ static void ot_rpc_cmd_if_enable(const struct nrf_rpc_group *group, struct nrf_r if (enable) { struct sockaddr_ll addr; - ret = net_context_get(AF_PACKET, SOCK_RAW, IPPROTO_RAW, &recv_net_context); + ret = net_context_get(AF_PACKET, SOCK_DGRAM, ETH_P_ALL, &recv_net_context); if (ret) { NET_ERR("Failed to allocate recv net context"); goto out; } addr.sll_family = AF_PACKET; - addr.sll_protocol = htons(IPPROTO_RAW); addr.sll_ifindex = net_if_get_by_iface(iface); ret = net_context_bind(recv_net_context, (const struct sockaddr *)&addr, diff --git a/subsys/nrf_security/Kconfig.legacy b/subsys/nrf_security/Kconfig.legacy index 5ac7c23359ca..f1ffe4ec092f 100644 --- a/subsys/nrf_security/Kconfig.legacy +++ b/subsys/nrf_security/Kconfig.legacy @@ -401,7 +401,7 @@ comment "Cipher Selection" config MBEDTLS_CIPHER_MODE_CBC bool "AES-CBC - AES Cipher Block Chaining mode" - default y if !NET_L2_OPENTHREAD + default y if !OPENTHREAD select PSA_WANT_ALG_CBC_NO_PADDING if PSA_CRYPTO_CLIENT select PSA_WANT_KEY_TYPE_AES if PSA_CRYPTO_CLIENT help @@ -414,7 +414,7 @@ menu "CBC cipher padding modes" config MBEDTLS_CIPHER_PADDING_PKCS7 bool prompt "Enable MBEDTLS_CIPHER_PADDING_PKCS7" - default y if !NET_L2_OPENTHREAD + default y if !OPENTHREAD select PSA_WANT_ALG_CBC_PKCS7 if PSA_CRYPTO_CLIENT select PSA_WANT_KEY_TYPE_AES if PSA_CRYPTO_CLIENT help @@ -507,7 +507,7 @@ config MBEDTLS_CCM_C config MBEDTLS_GCM_C bool prompt "AES-GCM - AES Galois/Counter Mode support" - default y if !(NET_L2_OPENTHREAD || MBEDTLS_USE_PSA_CRYPTO) + default y if !(OPENTHREAD || MBEDTLS_USE_PSA_CRYPTO) select PSA_WANT_ALG_GCM if PSA_CRYPTO_CLIENT select PSA_WANT_KEY_TYPE_AES if PSA_CRYPTO_CLIENT help @@ -517,7 +517,7 @@ config MBEDTLS_GCM_C config MBEDTLS_CHACHA20_C bool prompt "CHACHA20 stream cipher support" - default y if !(NET_L2_OPENTHREAD || MBEDTLS_USE_PSA_CRYPTO) + default y if !(OPENTHREAD || MBEDTLS_USE_PSA_CRYPTO) select PSA_WANT_ALG_CHACHA20 if PSA_CRYPTO_CLIENT select PSA_WANT_ALG_CHACHA20_POLY1305 if PSA_CRYPTO_CLIENT select PSA_WANT_ALG_STREAM_CIPHER if PSA_CRYPTO_CLIENT @@ -528,7 +528,7 @@ config MBEDTLS_CHACHA20_C config MBEDTLS_POLY1305_C bool prompt "POLY1305 module support" - default y if !(NET_L2_OPENTHREAD || MBEDTLS_USE_PSA_CRYPTO) + default y if !(OPENTHREAD || MBEDTLS_USE_PSA_CRYPTO) select PSA_WANT_ALG_CHACHA20_POLY1305 if PSA_CRYPTO_CLIENT help Enable the POLY1305 module. @@ -538,7 +538,7 @@ config MBEDTLS_CHACHAPOLY_C bool prompt "CHACHA-POLY module support" depends on (MBEDTLS_CHACHA20_C && MBEDTLS_POLY1305_C) - default y if !(NET_L2_OPENTHREAD || MBEDTLS_USE_PSA_CRYPTO) + default y if !(OPENTHREAD || MBEDTLS_USE_PSA_CRYPTO) select PSA_WANT_ALG_CHACHA20_POLY1305 if PSA_CRYPTO_CLIENT help Enable the CHACHA-POLY module. @@ -782,7 +782,7 @@ config MBEDTLS_MD5_C config MBEDTLS_SHA1_C bool prompt "SHA-1 hash functionality" - default y if !(NET_L2_OPENTHREAD || MBEDTLS_USE_PSA_CRYPTO) + default y if !(OPENTHREAD || MBEDTLS_USE_PSA_CRYPTO) select PSA_WANT_ALG_SHA_1 if PSA_CRYPTO_CLIENT help SHA-1 hash functionality. @@ -790,7 +790,7 @@ config MBEDTLS_SHA1_C config MBEDTLS_SHA224_C bool prompt "SHA-224 hash functionality" - default y if !(NET_L2_OPENTHREAD || MBEDTLS_USE_PSA_CRYPTO) + default y if !(OPENTHREAD || MBEDTLS_USE_PSA_CRYPTO) select PSA_WANT_ALG_SHA_224 if PSA_CRYPTO_CLIENT help SHA-224 hash functionality. @@ -813,7 +813,7 @@ config MBEDTLS_SHA384_C bool prompt "SHA-384 hash functionality" select MBEDTLS_SHA512_C - default y if !(NET_L2_OPENTHREAD || MBEDTLS_USE_PSA_CRYPTO) + default y if !(OPENTHREAD || MBEDTLS_USE_PSA_CRYPTO) select PSA_WANT_ALG_SHA_384 if PSA_CRYPTO_CLIENT help SHA-384 hash functionality. @@ -821,7 +821,7 @@ config MBEDTLS_SHA384_C config MBEDTLS_SHA512_C bool prompt "SHA-512 hash functionality" - default y if !(NET_L2_OPENTHREAD || MBEDTLS_USE_PSA_CRYPTO) + default y if !(OPENTHREAD || MBEDTLS_USE_PSA_CRYPTO) select PSA_WANT_ALG_SHA_512 if PSA_CRYPTO_CLIENT help SHA-512 hash functionality. diff --git a/subsys/nrf_security/Kconfig.tls b/subsys/nrf_security/Kconfig.tls index 36ef5f2f0cdb..6e0f416331a4 100644 --- a/subsys/nrf_security/Kconfig.tls +++ b/subsys/nrf_security/Kconfig.tls @@ -420,47 +420,47 @@ config MBEDTLS_HAS_ECJPAKE_CIPHERSUITE_REQUIREMENTS config MBEDTLS_KEY_EXCHANGE_PSK_ENABLED bool prompt "PSK" - default y if OPENTHREAD_COAPS || !NET_L2_OPENTHREAD + default y if OPENTHREAD_COAPS || !OPENTHREAD depends on MBEDTLS_HAS_CIPHER_MODE_CIPHERSUITE_REQUIREMENTS config MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED bool prompt "DHE PSK" - default y if !NET_L2_OPENTHREAD + default y if !OPENTHREAD depends on MBEDTLS_HAS_CIPHER_MODE_CIPHERSUITE_REQUIREMENTS && \ MBEDTLS_HAS_RSA_CIPHERSUITE_REQUIREMENTS config MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED bool prompt "ECDHE PSK" - default y if !NET_L2_OPENTHREAD + default y if !OPENTHREAD depends on MBEDTLS_HAS_CIPHER_MODE_CIPHERSUITE_REQUIREMENTS && \ MBEDTLS_HAS_ECDH_CIPHERSUITE_REQUIREMENTS config MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED bool prompt "RSA PSK" - default y if !NET_L2_OPENTHREAD + default y if !OPENTHREAD depends on MBEDTLS_HAS_CIPHER_MODE_CIPHERSUITE_REQUIREMENTS && \ MBEDTLS_HAS_RSA_CIPHERSUITE_REQUIREMENTS config MBEDTLS_KEY_EXCHANGE_RSA_ENABLED bool prompt "RSA" - default y if !NET_L2_OPENTHREAD + default y if !OPENTHREAD depends on MBEDTLS_HAS_RSA_CIPHERSUITE_REQUIREMENTS config MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED bool prompt "DHE RSA" - default y if !NET_L2_OPENTHREAD + default y if !OPENTHREAD depends on MBEDTLS_HAS_CIPHER_MODE_CIPHERSUITE_REQUIREMENTS && \ MBEDTLS_HAS_RSA_CIPHERSUITE_REQUIREMENTS config MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED bool prompt "ECDHE RSA" - default y if !NET_L2_OPENTHREAD + default y if !OPENTHREAD depends on MBEDTLS_HAS_CIPHER_MODE_CIPHERSUITE_REQUIREMENTS && \ MBEDTLS_HAS_ECDH_CIPHERSUITE_REQUIREMENTS && \ MBEDTLS_HAS_RSA_CIPHERSUITE_REQUIREMENTS @@ -468,7 +468,7 @@ config MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED config MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED bool prompt "ECDHE ECDSA" - default y if OPENTHREAD_ECDSA || !NET_L2_OPENTHREAD + default y if OPENTHREAD_ECDSA || !OPENTHREAD depends on MBEDTLS_HAS_CIPHER_MODE_CIPHERSUITE_REQUIREMENTS && \ MBEDTLS_HAS_ECDH_CIPHERSUITE_REQUIREMENTS && \ MBEDTLS_HAS_ECDSA_CIPHERSUITE_REQUIREMENTS @@ -476,7 +476,7 @@ config MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED config MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED bool prompt "ECDH ECDSA" - default y if !NET_L2_OPENTHREAD + default y if !OPENTHREAD depends on MBEDTLS_HAS_CIPHER_MODE_CIPHERSUITE_REQUIREMENTS && \ MBEDTLS_HAS_ECDH_CIPHERSUITE_REQUIREMENTS && \ MBEDTLS_HAS_ECDSA_CIPHERSUITE_REQUIREMENTS @@ -484,7 +484,7 @@ config MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED config MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED bool prompt "ECDH RSA" - default y if !NET_L2_OPENTHREAD + default y if !OPENTHREAD depends on MBEDTLS_HAS_CIPHER_MODE_CIPHERSUITE_REQUIREMENTS && \ MBEDTLS_HAS_ECDH_CIPHERSUITE_REQUIREMENTS && \ MBEDTLS_HAS_RSA_CIPHERSUITE_REQUIREMENTS diff --git a/subsys/nrf_security/src/core/nrf_oberon/CMakeLists.txt b/subsys/nrf_security/src/core/nrf_oberon/CMakeLists.txt index 35eb09401597..efd4cfe99d10 100644 --- a/subsys/nrf_security/src/core/nrf_oberon/CMakeLists.txt +++ b/subsys/nrf_security/src/core/nrf_oberon/CMakeLists.txt @@ -32,14 +32,6 @@ target_link_libraries(oberon_psa_core psa_interface ) -# Disable warnings showing up in Oberon PSA crypto code. -target_compile_options(oberon_psa_core - PRIVATE - -Wno-stringop-overflow - -Wno-stringop-overread - -Wno-strict-aliasing -) - target_compile_definitions(oberon_psa_core PRIVATE BUILDING_MBEDTLS_CRYPTO diff --git a/tests/bluetooth/iso/prj.conf b/tests/bluetooth/iso/prj.conf index 0c1345b02748..efc7c9e6132e 100644 --- a/tests/bluetooth/iso/prj.conf +++ b/tests/bluetooth/iso/prj.conf @@ -57,7 +57,7 @@ CONFIG_MINIMAL_LIBC=n CONFIG_NEWLIB_LIBC=y # Need to disable devmem shell since it enforces Zephyr's internal version of getopt CONFIG_DEVMEM_SHELL=n -CONFIG_GETOPT=y +CONFIG_POSIX_C_LIB_EXT=y CONFIG_GETOPT_LONG=y CONFIG_SHELL_GETOPT=y diff --git a/tests/lib/app_jwt/src/main.c b/tests/lib/app_jwt/src/main.c index 86837dff2ecc..844a3b9da9e0 100644 --- a/tests/lib/app_jwt/src/main.c +++ b/tests/lib/app_jwt/src/main.c @@ -31,21 +31,21 @@ static psa_key_id_t kid; #define EXPECTED_JWT_MIN \ "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9." \ - "eyJzdWIiOiJucmYtMzU4Mjk5ODQwMTIzNDU2IiwiZXhwIjoxNzM5ODgxODg5fQ.cYGNV8-" \ - "DxTKyV3MlsSALKlva3Aarx3u0Owj8cxAH5tm3WRPLC8-xZtTW0djJp-j3V8sU1Mt_xjm3OIzMx4RNcw" + "eyJzdWIiOiJucmYtMzU4Mjk5ODQwMTIzNDU2IiwiZXhwIjoxNzM5ODgxODg5fQ." \ + "OG3Ug9iPJmKYoV5AbhlVuxXxRloNL80QsJmBexR40f5BVISYg4FjXc8FdVnCLMaRlMGTKRd5cFaST4_DB21Vkw" #define EXPECTED_JWT_MIN_UUID \ "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9." \ "eyJzdWIiOiI2YzBmMTIyNi1mNTA2LTExZWYtYTViYi05Mzc2M2I0YmRmMTEiLCJleHAiOjE3Mzk4ODE4ODl9." \ - "oIDg_ptVr7EP0Bg4qxmj5jh53d30FaBtzHOdeQJXyakz9_WQALqPXIrPl4immMvYhgcQD12KWxFiHh4YPjhBaw" + "je3nWh-f5IaBsypVQReXZY1z10gYAwyfFckhkXDAJOK8bDpdS3UVNRpN5eBBGph-RVEgqZG5RhRLD8gENa7a0w" #define EXPECTED_JWT_NRF91 \ "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6IjJhNTNkMjBmODcxYjFkZWVhYjUzYTFiZmNlMDJhZTVk" \ "NWVmYzEyZjFlMGY0YjVjZTY2YzRhMWMyOGRhZDExMmMifQ." \ "eyJpYXQiOjE3Mzk4ODEyODksImp0aSI6Im5SRjkxNjAuNTY0YWIzNTYtZjUwNS0xMWVmLWIyODctYjc2OTAyMWQ1" \ "ZmQ2LjlmZjE3NTI0OWFmZTQ4OTQxMiIsImlzcyI6Im5SRjkxNjAuNTY0YWIzNTYtZjUwNS0xMWVmLWIyODctYjc2" \ - "OTAyMWQ1ZmQ2Iiwic3ViIjoibnJmLTM1ODI5OTg0MDEyMzQ1NiIsImV4cCI6MTczOTg4MTg4OX0." \ - "i3xPhJ1dQw2bb_2OgaAZ8w-IP_EpLiDgt97agpAdIsWDSdzCWd2iwwCpV937mAyqXWe-eoc-VjnBlWfXk5nXqQ" + "OTAyMWQ1ZmQ2Iiwic3ViIjoibnJmLTM1ODI5OTg0MDEyMzQ1NiIsImV4cCI6MTczOTg4MTg4OX0.YhaArF-_" \ + "7NNOd4ngnTT_KCQCcNfarxDlDuRvsSbE_RX_r5HC1nXduc4KDjc-7FJ9NUaKNcPAHg3BwJ7kOZ3NAQ" #define EC_PRV_KEY \ "-----BEGIN PRIVATE KEY-----\n" \ diff --git a/tests/lib/hw_id/src/main.c b/tests/lib/hw_id/src/main.c index b07a0a9775d7..807090e8898d 100644 --- a/tests/lib/hw_id/src/main.c +++ b/tests/lib/hw_id/src/main.c @@ -28,11 +28,10 @@ FAKE_VALUE_FUNC(struct net_if *, net_if_get_default); FAKE_VALUE_FUNC(ssize_t, z_impl_hwinfo_get_device_id, uint8_t *, size_t); FAKE_VALUE_FUNC_VARARG(int, nrf_modem_at_cmd, void *, size_t, const char *, ...); -static uint8_t link_addr[6] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; static struct net_if_dev net_if_dev_example = { .link_addr = { - .addr = link_addr, - .len = ARRAY_SIZE(link_addr) + .addr = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}, + .len = 6, } }; static struct net_if net_if_example = { diff --git a/tests/lib/location/CMakeLists.txt b/tests/lib/location/CMakeLists.txt index add304d2a4ca..dc7b5facb95f 100644 --- a/tests/lib/location/CMakeLists.txt +++ b/tests/lib/location/CMakeLists.txt @@ -29,15 +29,20 @@ cmock_handle(${ZEPHYR_NRF_MODULE_DIR}/include/net/nrf_cloud_rest.h) # that CMock is not able to parse properly. cmock_handle(${ZEPHYR_BASE}/include/zephyr/net/net_if.h FUNC_EXCLUDE ".*net_if_send_data" + FUNC_EXCLUDE ".*net_if_try_send_data" FUNC_EXCLUDE ".*net_if_recv_data" FUNC_EXCLUDE ".*net_if_queue_tx" + FUNC_EXCLUDE ".*net_if_try_queue_tx" FUNC_EXCLUDE ".*net_if_register_timestamp_cb" FUNC_EXCLUDE ".*net_if_call_timestamp_cb" FUNC_EXCLUDE ".*net_if_add_tx_timestamp" FUNC_EXCLUDE ".*net_if_ipv4_get_netmask" FUNC_EXCLUDE ".*net_if_ipv4_set_netmask" WORD_EXCLUDE ".*deprecated.*" - WORD_EXCLUDE ".*struct net_pkt.*") + WORD_EXCLUDE ".*net_if_send_data.*" + WORD_EXCLUDE ".*net_if_try_send_data.*" + WORD_EXCLUDE ".*net_if_try_queue_tx.*" + WORD_EXCLUDE ".*net_if_register_timestamp_cb.*") cmock_handle(${ZEPHYR_BASE}/include/zephyr/net/net_mgmt.h FUNC_EXCLUDE ".*net_mgmt_event_notify" FUNC_EXCLUDE ".*net_mgmt_event_notify_with_info" diff --git a/tests/subsys/net/lib/download_client/prj.conf b/tests/subsys/net/lib/download_client/prj.conf index 5efcf4c5ba4c..2f3b125160c0 100644 --- a/tests/subsys/net/lib/download_client/prj.conf +++ b/tests/subsys/net/lib/download_client/prj.conf @@ -15,7 +15,6 @@ CONFIG_NET_IPV4=y CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_OFFLOAD=y CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=2048 -CONFIG_PIPES=y CONFIG_POSIX_API=y CONFIG_COAP=n diff --git a/tests/subsys/net/lib/download_client/src/main.c b/tests/subsys/net/lib/download_client/src/main.c index 2e14f3357add..dfb19edf2bb3 100644 --- a/tests/subsys/net/lib/download_client/src/main.c +++ b/tests/subsys/net/lib/download_client/src/main.c @@ -13,7 +13,6 @@ #include "mock/socket.h" #include "mock/dl_coap.h" -K_PIPE_DEFINE(event_pipe, 10, _Alignof(struct download_client_evt)); static struct download_client client; static const struct sockaddr_in addr_coap_me_http = { .sin_family = AF_INET, @@ -26,16 +25,62 @@ static const struct sockaddr_in addr_example_com = { .sin_addr.s4_addr = {93, 184, 216, 34}, }; -static int download_client_callback(const struct download_client_evt *event) +struct pipe { + struct download_client_evt data[10]; + uint8_t wr_idx; + uint8_t rd_idx; +}; + +static struct pipe event_pipe; +K_SEM_DEFINE(pipe_sem, 0, 10); + +static void pipe_reset(struct pipe *pipe) +{ + memset(pipe, 0, sizeof(struct pipe)); +} + +static int pipe_put(struct pipe *pipe, const struct download_client_evt *evt) +{ + if (k_sem_count_get(&pipe_sem) >= 10) { + printk("Pipe is full! Please check size!"); + return -ENOSPC; + } + + memcpy(&pipe->data[pipe->wr_idx], evt, sizeof(struct download_client_evt)); + + pipe->wr_idx++; + pipe->wr_idx = CLAMP(pipe->wr_idx, 0, (sizeof(pipe->data) / sizeof(struct download_client_evt)) - 1); + + k_sem_give(&pipe_sem); + + return 0; +} + +static int pipe_get(struct pipe *pipe, struct download_client_evt *evt, k_timeout_t timeo) { - size_t written; + int err; + + err = k_sem_take(&pipe_sem, timeo); + if (err) { + return err; + } + + memcpy(evt, &pipe->data[pipe->rd_idx], sizeof(struct download_client_evt)); + pipe->rd_idx++; + pipe->rd_idx = CLAMP(pipe->rd_idx, 0, (sizeof(pipe->data) / sizeof(struct download_client_evt)) - 1); + + return 0; +} + +static int download_client_callback(const struct download_client_evt *event) +{ if (event == NULL) { return -EINVAL; } printk("event: %d\n", event->id); - k_pipe_put(&event_pipe, (void *)event, sizeof(*event), &written, sizeof(*event), K_FOREVER); + pipe_put(&event_pipe, event); return 0; } @@ -52,13 +97,11 @@ static void mock_return_values(const char *func, int32_t *val, size_t len) static struct download_client_evt wait_for_event(enum download_client_evt_id event, k_timeout_t timeout) { - size_t read; struct download_client_evt evt; int err; while (true) { - err = k_pipe_get(&event_pipe, &evt, sizeof(evt), &read, sizeof(evt), - timeout); + err = pipe_get(&event_pipe, &evt, timeout); zassert_ok(err); if (evt.id == event) { break; @@ -70,11 +113,10 @@ static struct download_client_evt wait_for_event(enum download_client_evt_id eve static struct download_client_evt get_next_event(k_timeout_t timeout) { - size_t read; struct download_client_evt evt; int err; - err = k_pipe_get(&event_pipe, &evt, sizeof(evt), &read, sizeof(evt), timeout); + err = pipe_get(&event_pipe, &evt, timeout); zassert_ok(err); return evt; } @@ -95,7 +137,7 @@ static void init(void) zassert_ok(err, NULL); initialized = true; } - k_pipe_flush(&event_pipe); + pipe_reset(&event_pipe); } static void dl_coap_start(void) diff --git a/tests/subsys/net/lib/downloader/CMakeLists.txt b/tests/subsys/net/lib/downloader/CMakeLists.txt index f3a9b61c6c18..9f4bfa786a21 100644 --- a/tests/subsys/net/lib/downloader/CMakeLists.txt +++ b/tests/subsys/net/lib/downloader/CMakeLists.txt @@ -45,4 +45,9 @@ target_compile_options(app -DCONFIG_COAP_BACKOFF_PERCENT=5 -DCONFIG_COAP_BLOCK_SIZE=5 -DCONFIG_DOWNLOADER_MAX_REDIRECTS=1 + -DCONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=2 + -DCONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT=1 + -DCONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=2 + -DCONFIG_NET_IF_MCAST_IPV4_ADDR_COUNT=1 + -DCONFIG_NET_IF_IPV6_PREFIX_COUNT=2 ) diff --git a/tests/subsys/net/lib/downloader/prj.conf b/tests/subsys/net/lib/downloader/prj.conf index 845e0c0a40b5..3bf790e9f33b 100644 --- a/tests/subsys/net/lib/downloader/prj.conf +++ b/tests/subsys/net/lib/downloader/prj.conf @@ -4,4 +4,3 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # CONFIG_UNITY=y -CONFIG_PIPES=y diff --git a/tests/subsys/net/lib/downloader/src/main.c b/tests/subsys/net/lib/downloader/src/main.c index c0160dbfb37c..0ab77aac4b8f 100644 --- a/tests/subsys/net/lib/downloader/src/main.c +++ b/tests/subsys/net/lib/downloader/src/main.c @@ -1123,8 +1123,52 @@ struct coap_transmission_parameters coap_get_transmission_parameters_ok(void) return coap_transmission_params; } -K_PIPE_DEFINE(event_pipe, 10*sizeof(struct downloader_evt), - _Alignof(struct downloader_evt)); +struct pipe { + struct downloader_evt data[10]; + uint8_t wr_idx; + uint8_t rd_idx; +}; + +static struct pipe event_pipe; +K_SEM_DEFINE(pipe_sem, 0, 10); + +static void pipe_reset(struct pipe *pipe) +{ + memset(pipe, 0, sizeof(struct pipe)); +} + +static int pipe_put(struct pipe *pipe, const struct downloader_evt *evt) +{ + if (k_sem_count_get(&pipe_sem) >= 10) { + return -ENOSPC; + } + + memcpy(&pipe->data[pipe->wr_idx], evt, sizeof(struct downloader_evt)); + + pipe->wr_idx++; + pipe->wr_idx = CLAMP(pipe->wr_idx, 0, (sizeof(pipe->data) / sizeof(struct downloader_evt)) - 1); + + k_sem_give(&pipe_sem); + + return 0; +} + +static int pipe_get(struct pipe *pipe, struct downloader_evt *evt, k_timeout_t timeo) +{ + int err; + + err = k_sem_take(&pipe_sem, timeo); + if (err) { + return err; + } + + memcpy(evt, &pipe->data[pipe->rd_idx], sizeof(struct downloader_evt)); + + pipe->rd_idx++; + pipe->rd_idx = CLAMP(pipe->rd_idx, 0, (sizeof(pipe->data) / sizeof(struct downloader_evt)) - 1); + + return 0; +} static const char *dl_event_id_str(int evt_id) { @@ -1141,8 +1185,6 @@ static const char *dl_event_id_str(int evt_id) static int dl_callback(const struct downloader_evt *event) { - size_t written; - TEST_ASSERT(event != NULL); printk("event: %s ", dl_event_id_str(event->id)); @@ -1156,15 +1198,13 @@ static int dl_callback(const struct downloader_evt *event) printk("\n"); } - k_pipe_put(&event_pipe, (void *)event, sizeof(*event), &written, sizeof(*event), K_FOREVER); + pipe_put(&event_pipe, event); return 0; } static int dl_callback_abort(const struct downloader_evt *event) { - size_t written; - TEST_ASSERT(event != NULL); printk("event: %s\n", dl_event_id_str(event->id)); @@ -1172,7 +1212,7 @@ static int dl_callback_abort(const struct downloader_evt *event) /* avoid spamming error events during development */ k_sleep(K_MSEC(100)); } - k_pipe_put(&event_pipe, (void *)event, sizeof(*event), &written, sizeof(*event), K_FOREVER); + pipe_put(&event_pipe, event); return 1; /* stop download*/ } @@ -1180,13 +1220,11 @@ static int dl_callback_abort(const struct downloader_evt *event) static struct downloader_evt dl_wait_for_event(enum downloader_evt_id event, k_timeout_t timeout) { - size_t read; struct downloader_evt evt; int err; while (true) { - err = k_pipe_get(&event_pipe, &evt, sizeof(evt), &read, sizeof(evt), - timeout); + err = pipe_get(&event_pipe, &evt, K_FOREVER); TEST_ASSERT_EQUAL(0, err); if (evt.id == event) { break; @@ -2455,7 +2493,7 @@ void setUp(void) RESET_FAKE(coap_get_transmission_parameters); RESET_FAKE(coap_pending_init); - k_pipe_flush(&event_pipe); + pipe_reset(&event_pipe); } void tearDown(void) diff --git a/tests/subsys/net/lib/nrf_provisioning/src/coap.c b/tests/subsys/net/lib/nrf_provisioning/src/coap.c index 261633a42ba5..2bc497ed08a5 100644 --- a/tests/subsys/net/lib/nrf_provisioning/src/coap.c +++ b/tests/subsys/net/lib/nrf_provisioning/src/coap.c @@ -416,6 +416,8 @@ void test_coap_auth_valid(void) .connect_socket = -1, }; + struct coap_client_option block2_option = {}; + __cmock_modem_info_string_get_ExpectAnyArgsAndReturn(sizeof(MFW_VER)); __cmock_modem_info_string_get_ReturnArrayThruPtr_buf(MFW_VER, strlen(MFW_VER) + 1); @@ -427,6 +429,7 @@ void test_coap_auth_valid(void) __cmock_coap_client_req_AddCallback(coap_client_auth_cb); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); + __cmock_coap_client_option_initial_block2_CMockIgnoreAndReturn(0, block2_option); nrf_provisioning_coap_req(&coap_ctx); } @@ -516,6 +519,8 @@ void test_coap_no_more_commands(void) .connect_socket = -1, }; + struct coap_client_option block2_option = {}; + __cmock_modem_info_string_get_ExpectAnyArgsAndReturn(sizeof(MFW_VER)); __cmock_modem_info_string_get_ReturnArrayThruPtr_buf(MFW_VER, strlen(MFW_VER) + 1); @@ -527,6 +532,7 @@ void test_coap_no_more_commands(void) __cmock_coap_client_req_AddCallback(coap_client_no_commands_cb); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); + __cmock_coap_client_option_initial_block2_CMockIgnoreAndReturn(0, block2_option); int ret = nrf_provisioning_coap_req(&coap_ctx); @@ -542,6 +548,8 @@ void test_coap_cmds_valid_path(void) .connect_socket = -1, }; + struct coap_client_option block2_option = {}; + __cmock_modem_info_string_get_ExpectAnyArgsAndReturn(sizeof(MFW_VER)); __cmock_modem_info_string_get_ReturnArrayThruPtr_buf(MFW_VER, strlen(MFW_VER) + 1); @@ -553,6 +561,7 @@ void test_coap_cmds_valid_path(void) __cmock_coap_client_req_AddCallback(coap_client_cmds_valid_path_cb); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); + __cmock_coap_client_option_initial_block2_CMockIgnoreAndReturn(0, block2_option); int ret = nrf_provisioning_coap_req(&coap_ctx); @@ -569,6 +578,8 @@ void test_coap_cmds_bad_request(void) .connect_socket = -1, }; + struct coap_client_option block2_option = {}; + __cmock_modem_info_string_get_ExpectAnyArgsAndReturn(sizeof(MFW_VER)); __cmock_modem_info_string_get_ReturnArrayThruPtr_buf(MFW_VER, strlen(MFW_VER) + 1); @@ -580,6 +591,7 @@ void test_coap_cmds_bad_request(void) __cmock_coap_client_req_AddCallback(coap_client_cmds_bad_request_cb); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); + __cmock_coap_client_option_initial_block2_CMockIgnoreAndReturn(0, block2_option); int ret = nrf_provisioning_coap_req(&coap_ctx); @@ -596,6 +608,8 @@ void test_coap_cmds_server_error(void) .connect_socket = -1, }; + struct coap_client_option block2_option = {}; + __cmock_modem_info_string_get_ExpectAnyArgsAndReturn(sizeof(MFW_VER)); __cmock_modem_info_string_get_ReturnArrayThruPtr_buf(MFW_VER, strlen(MFW_VER) + 1); @@ -607,6 +621,7 @@ void test_coap_cmds_server_error(void) __cmock_coap_client_req_AddCallback(coap_client_cmds_server_error_cb); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); + __cmock_coap_client_option_initial_block2_CMockIgnoreAndReturn(0, block2_option); int ret = nrf_provisioning_coap_req(&coap_ctx); @@ -623,6 +638,8 @@ void test_coap_cmds_unsupported_code(void) .connect_socket = -1, }; + struct coap_client_option block2_option = {}; + __cmock_modem_info_string_get_ExpectAnyArgsAndReturn(sizeof(MFW_VER)); __cmock_modem_info_string_get_ReturnArrayThruPtr_buf(MFW_VER, strlen(MFW_VER) + 1); @@ -634,6 +651,7 @@ void test_coap_cmds_unsupported_code(void) __cmock_coap_client_req_AddCallback(coap_client_cmds_unsupported_code_cb); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); + __cmock_coap_client_option_initial_block2_CMockIgnoreAndReturn(0, block2_option); int ret = nrf_provisioning_coap_req(&coap_ctx); @@ -735,6 +753,8 @@ void test_provisioning_task_valid(void) static struct nrf_provisioning_mm_change mm = {.cb = dummy_nrf_provisioning_modem_mode_cb, .user_data = NULL}; + struct coap_client_option block2_option = {}; + k_work_init_delayable(&trigger_data.work, provisioning_condvar_signal); __cmock_modem_key_mgmt_exists_AddCallback(modem_key_mgmt_exists_true); @@ -775,6 +795,8 @@ void test_provisioning_task_valid(void) CONFIG_NRF_PROVISIONING_JWT_MAX_VALID_TIME_S, tok_jwt_plain, strlen(tok_jwt_plain) + 1); + __cmock_coap_client_option_initial_block2_CMockIgnoreAndReturn(0, block2_option); + __cmock_coap_client_req_AddCallback(coap_client_ok_cb); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); @@ -804,6 +826,8 @@ void test_provisioning_commands(void) static struct nrf_provisioning_mm_change mm = {.cb = dummy_nrf_provisioning_modem_mode_cb, .user_data = NULL}; + struct coap_client_option block2_option = {}; + k_work_init_delayable(&trigger_data.work, provisioning_condvar_signal); __cmock_modem_key_mgmt_exists_AddCallback(modem_key_mgmt_exists_true); @@ -853,6 +877,8 @@ void test_provisioning_commands(void) CONFIG_NRF_PROVISIONING_JWT_MAX_VALID_TIME_S, tok_jwt_plain, strlen(tok_jwt_plain) + 1); + __cmock_coap_client_option_initial_block2_CMockIgnoreAndReturn(0, block2_option); + __cmock_coap_client_req_AddCallback(coap_client_commands_cb); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); @@ -889,6 +915,8 @@ void test_coap_rps_bad_request(void) struct nrf_provisioning_mm_change mm = {.cb = dummy_nrf_provisioning_modem_mode_cb, .user_data = NULL}; + struct coap_client_option block2_option = {}; + __cmock_lte_lc_func_mode_get_IgnoreAndReturn(0); __cmock_nrf_provisioning_at_cmee_enable_ExpectAndReturn(0); __cmock_nrf_provisioning_at_cmee_control_ExpectAnyArgsAndReturn(0); @@ -904,6 +932,8 @@ void test_coap_rps_bad_request(void) CONFIG_NRF_PROVISIONING_JWT_MAX_VALID_TIME_S, tok_jwt_plain, strlen(tok_jwt_plain) + 1); + __cmock_coap_client_option_initial_block2_CMockIgnoreAndReturn(0, block2_option); + __cmock_coap_client_req_AddCallback(coap_client_rsp_bad_request_cb); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); @@ -927,6 +957,8 @@ void test_coap_rsp_server_error(void) struct nrf_provisioning_mm_change mm = {.cb = dummy_nrf_provisioning_modem_mode_cb, .user_data = NULL}; + struct coap_client_option block2_option = {}; + __cmock_lte_lc_func_mode_get_IgnoreAndReturn(0); __cmock_nrf_provisioning_at_cmee_enable_ExpectAndReturn(0); __cmock_nrf_provisioning_at_cmee_control_ExpectAnyArgsAndReturn(0); @@ -942,6 +974,8 @@ void test_coap_rsp_server_error(void) CONFIG_NRF_PROVISIONING_JWT_MAX_VALID_TIME_S, tok_jwt_plain, strlen(tok_jwt_plain) + 1); + __cmock_coap_client_option_initial_block2_CMockIgnoreAndReturn(0, block2_option); + __cmock_coap_client_req_AddCallback(coap_client_rsp_server_error_cb); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); @@ -965,6 +999,8 @@ void test_coap_rsp_unsupported_code(void) struct nrf_provisioning_mm_change mm = {.cb = dummy_nrf_provisioning_modem_mode_cb, .user_data = NULL}; + struct coap_client_option block2_option = {}; + __cmock_lte_lc_func_mode_get_IgnoreAndReturn(0); __cmock_nrf_provisioning_at_cmee_enable_ExpectAndReturn(0); __cmock_nrf_provisioning_at_cmee_control_ExpectAnyArgsAndReturn(0); @@ -980,6 +1016,8 @@ void test_coap_rsp_unsupported_code(void) CONFIG_NRF_PROVISIONING_JWT_MAX_VALID_TIME_S, tok_jwt_plain, strlen(tok_jwt_plain) + 1); + __cmock_coap_client_option_initial_block2_CMockIgnoreAndReturn(0, block2_option); + __cmock_coap_client_req_AddCallback(coap_client_rsp_unsupported_code_cb); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); __cmock_coap_client_req_ExpectAnyArgsAndReturn(0); diff --git a/west.yml b/west.yml index d836f485c195..e853823be319 100644 --- a/west.yml +++ b/west.yml @@ -65,7 +65,7 @@ manifest: # https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html - name: zephyr repo-path: sdk-zephyr - revision: 893c3332454a29c1611fa90aa8ceaf87a6bdf848 + revision: pull/2840/head import: # In addition to the zephyr repository itself, NCS also # imports the contents of zephyr/west.yml at the above @@ -127,7 +127,7 @@ manifest: compare-by-default: true - name: mcuboot repo-path: sdk-mcuboot - revision: 9d9d524407df6da0815c79c5b9cf645f1ce25592 + revision: pull/425/head path: bootloader/mcuboot - name: qcbor url: https://github.com/laurencelundblade/QCBOR @@ -156,7 +156,7 @@ manifest: - name: matter repo-path: sdk-connectedhomeip path: modules/lib/matter - revision: 73537ddf6c29f81d23e5c8e576c127c723dee2b1 + revision: pull/603/head west-commands: scripts/west/west-commands.yml submodules: - name: nlio