Commit graph

24,075 commits

Author SHA1 Message Date
Joel Holdsworth
56b486eee9 debug: thread_info: Store thread stack pointer offset for OpenRISC
In OpenRISC 1000, the stack pointer is stored in the r1 register. This
patch stores the offset of this value within in the thread structure into
the thread info offsets.

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
2026-03-21 07:50:57 -05:00
Nicholas Cadieux
cf8197b7d1 usbc: tcpc: fix memory corruption in vconn_en and vconn_discharge callbacks
The vconn_en and vconn_discharge callbacks were invoked with the TCPC
device as the first argument. Application callbacks then called
usbc_get_dpm_data(dev) with the TCPC device, causing dev->data (which
is struct tcpc_data *) to be misinterpreted as struct usbc_port_data *.
This resulted in dpm_data->vconn_pol being written to an incorrect
memory offset, silently corrupting TCPC driver state.

Fix by adding a const struct device *usbc_dev parameter to
tcpc_vconn_control_cb_t and tcpc_vconn_discharge_cb_t, and propagating
it through set_vconn_cb and set_vconn_discharge_cb in the driver API.

Signed-off-by: Nicholas Cadieux <ncadieux@qti.qualcomm.com>
2026-03-21 00:48:09 +00:00
Nicholas Cadieux
d920c1689f usb: usb_c: tc: fix usbc_tc init race condition
Introduces a new TC_STARTUP_STATE to handle the initialization phase of
the Type-C state machine.

Previously, the state machine was initialized to TC_DISABLED_STATE during
POST_KERNEL initialization. This state inherits from
TC_CC_OPEN_SUPER_STATE, which executes tcpc_set_vconn(false). Since
VCONN callbacks are typically registered in main() (which runs after
POST_KERNEL), this resulted in an error log and the statemachine
unexpectedly transitioning to TC_ERROR_RECOVERY_STATE.

The new TC_STARTUP_STATE has no parent state and performs no hardware
operations. The state machine now transitions:
1. Boot (POST_KERNEL): Initialize to TC_STARTUP_STATE.
2. Start (MAIN): When usbc_start() runs the thread, tc_init() transitions
   to TC_DISABLED_STATE (ensuring VCONN/VBUS off with valid callbacks).
3. Run: Immediately transitions to TC_ERROR_RECOVERY_STATE to begin
   protocol operation.

Signed-off-by: Nicholas Cadieux <ncadieux@qti.qualcomm.com>
2026-03-21 00:48:09 +00:00
Nicholas Cadieux
9990ffa1d6 usb: usb_c: add Dual Role Power (DRP) support
Introduces DRP support to the USB-C subsystem, enabling dynamic
support for both Source and Sink power roles. Unattached devices
toggle between Source (Rp) and Sink (Rd) CC advertisements based
on the configured DRP period (tDRP) and duty cycle (dcSRC.DRP).
Once an attach is detected, the device enters the appropriate
Attached.SRC or Attached.SNK usbc_tc state and starts the
corresponding usbc_pe state machine to negotiate a power contract.

Signed-off-by: Nicholas Cadieux <ncadieux@qti.qualcomm.com>
2026-03-21 00:48:09 +00:00
Trond F. Christiansen
fe101944ce zbus: add IPC backend for zbus proxy agent
Implement IPC backend for ZBus proxy agent, enabling
message forwarding between domains over IPC endpoints.

Signed-off-by: Trond F. Christiansen <trond.christiansen@nordicsemi.no>
2026-03-21 00:47:22 +00:00
Trond F. Christiansen
759225db08 zbus: add multidomain proxy agent core
Add core implementation for zbus communication between domains using
pluggable backend transports.

Signed-off-by: Trond F. Christiansen <trond.christiansen@nordicsemi.no>
2026-03-21 00:47:22 +00:00
Tomasz Moń
1525950cd6 usb: device_next: remove udc_buf_get_all()
Function udc_buf_get_all() was intended to be a helper to remove all
requests from endpoint FIFO. While for just freeing all queue the
it may be argued that there may be some doubtful simplicity argument,
merging multiple submitted transfers into one is just enforcing
unnecessary complexity on class implementations.

At general level, every submitted (enqueued) request should get
corresponding completion (request callback) call. UDC drivers were
violating this sensible behavior when dequeuing (cancelling) requests by
merging all submitted requests into one.

Remove udc_buf_get_all() and replace all uses with simple loops. For
most classes (that submit just one request for an endpoint at a time)
this has no functional difference. For classes that implement double
buffering this simplifies completion handling.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2026-03-21 00:47:16 +00:00
Aiden Hu
d820b0bd6a usb: host: uvc: implement USB host UVC class with video API
Add a USB Video Class (UVC) host class implementation that enables
Zephyr-based systems to act as USB hosts for standard UVC cameras.
This allows applications to capture video streams from USB cameras
using the standard Zephyr video API.

The implementation follows the UVC specification for device enumeration,
format negotiation, and stream control. It handles the complexity of UVC
descriptor parsing, bandwidth management, and isochronous transfer
scheduling, presenting a clean video device interface to applications.

Support for common camera controls such as brightness, contrast,
exposure, focus, and zoom allows applications to adjust camera settings
at runtime. Dynamic format and frame rate changes are also supported,
making it suitable for various use cases from simple video capture to
more advanced computer vision applications.

Signed-off-by: Aiden Hu <weiwei.hu@nxp.com>
2026-03-21 00:46:16 +00:00
Aiden Hu
ee9c2221ee usb: uvc: add UVC_MAX_CTRL_SIZE macro
This macro is used for the data size of uvc control.

Signed-off-by: Aiden Hu <weiwei.hu@nxp.com>
2026-03-21 00:46:16 +00:00
TOKITA Hiroshi
216a41c88c fb: cfb: Improve handling of missing characters in font
Characters not present in the font were replaced with a space character.
This is changed to draw **tofu** instead.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2026-03-21 00:45:53 +00:00
Robert Lubos
b9ad6b17c7 net: sockets: Check for overflows in recvmsg/sendmsg syscalls
When calling zsock_recvmsg()/zsock_sendmsg() system calls, check if
provided msg->msg_iovlen is valid, i.e. does not cause size_t overflow
when calculating memory needed for msg->msg_iov vector.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2026-03-20 12:38:00 -05:00
Håvard Reierstad
850f5006dc Bluetooth: Shell: Fix vendor gatt read size
When reading the value of the vendor attribute, strlen was used instead
of sizeof, causing a unpredictable read size. This commit changes the
implementation to use sizeof instead.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2026-03-20 12:37:11 -05:00
Valerio Setti
44d35422aa secure_storage: adapt build system for TF-PSA-Crypto
Minor changes that are required in order to move from Mbed TLS 3.6.5
to TF-PSA-Crypto 1.x:

- "psa_crypto_driver_wrappers.h" has been relocated
- some extra include folders are required because they are directly
  included from "psa_crypto_driver_wrappers.h" but not exported from
  "mbedTLS" library since they are meant to remain private.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2026-03-20 12:32:52 -05:00
Valerio Setti
e9b5feb797 net: lib: sockets: tls: do not specify random function to be used
Both PK and TLS now rely on PSA generate random to get random data
so end users (i.e. sockets_tls in this case) don't need to manually
specify this anymore.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2026-03-20 12:32:52 -05:00
Krzysztof Chruściński
99336e5d24 ipc: ipc_service: icbmsg: Return error on too early open
If open is called before the backend is initilize then bounding
will stuck as works scheduled to the workqueue in the open function
are never executed. Return error if open is called too early, before
device initialization.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2026-03-20 20:43:13 +09:00
Titouan Christophe
6e1a9e6c52 bluetooth: host: monitor: fix build with 64b log timestamps
If CONFIG_LOG_TIMESTAMP_64BIT is enabled, then the call to
log_set_timestamp_func in the Bluetooth monitor is type-invalid,
which may fail to build with -Werror.

To avoid this type inconsistency let's use the type `log_timestamp_t`,
which accounts for the correct size, depending on selected config.

Even though the monitoring protocol only seems to support 32b timestamps,
the rest of the module is already based on 64b timestamps, so the
truncation is only done when encoding the timestamp for transmission
to the host in encode_hdr()

Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
2026-03-20 18:19:35 +09:00
Jordan Yates
1559515215 rtio: workq: set workqueue names
Set unique names for the RTIO workqueue threads. If
`CONFIG_RTIO_WORKQ_THREADS_POOL` goes over 9, the numbers repeat. This
is not expected to occur in practice since the two defaults for this
config are `1` and `2`, and fully handling it is not worth the code
complexity.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-03-20 18:17:21 +09:00
Alberto Escolar Piedras
c6a4721474 Bluetooth: Controller: nRF5x: Trivial maintainability issue fixes
Fix a few trivial complains from Sonar Cloud in these files
* Methods should not be empty c:S1186
https://sonarcloud.io/organizations/zephyrproject-rtos/rules?open=c%3AS1186&rule_key=c%3AS1186
* "default" clauses should be first or last c:S4524
https://sonarcloud.io/organizations/zephyrproject-rtos/rules?open=c%3AS4524&rule_key=c%3AS4524

This commit introduced no functional changes.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-03-19 17:16:11 -05:00
Lauren Murphy
d77e760189 llext: nits in doc, kconfig, testcase
Fixes a couple nits in the docs, Kconfig and testcase.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2026-03-19 17:12:57 -05:00
Måns Ansgariusson
5388837a81 testsuite: benchmark framework
Currently, ztest is primarily focused on unit testing. This commit
introduces a framework designed specifically for performance analysis.

Key features:
- Standardized API: ZBENCH_SUITE and ZBENCH macros.
- Low overhead: Uses Welford's online algorithm for statistics
  to keep memory footprint minimal.
- Hardware agnostic: Built on top of <zephyr/timing/timing.h>.
- Clear output: Provides formatted console tables of results.

Signed-off-by: Måns Ansgariusson <mansgariusson@gmail.com>
2026-03-19 17:07:52 -05:00
Emil Gydesen
bc37305998 Bluetooth: ASCS: Hotfix for failing ASCS unittests
The way that ASCS registers and unregisters for the ASCS
unittests does not work properly with UUIDs and local variables.

Hotfix is to use a `static` backup instead of a stack-allocated
backup. A proper fix will be provided later.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-03-19 14:56:35 -05:00
Fin Maaß
af0f6394e0 net: l2: ethernet: simplify use of net_if_get_device()
when using net_if_get_device() save the pointer
and use the pointer again.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-19 14:56:23 -05:00
Pieter De Gendt
9a75818c6d net: lib: sntp: Make sockaddr const for sntp_ctx
Both sntp_init and sntp_init_async shouldn't modify the socket address
passed.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-03-19 17:02:11 +01:00
Arthur Gay
099d0e0590 shell: websocket: Fix client disconnection handling
Don't rely solely on disconnect events to determine writability, since
the socket can drop at any time. A send() to a closed socket fails and
the resulting error reaches the shell thread, where a failing __ASSERT
causes a crash.

Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
2026-03-19 17:02:00 +01:00
Arthur Gay
164cf2c8e8 shell: websocket: Fix race condition
Guard the websocket shell backend's internal state with a mutex.
The disconnect callback executes on a different thread than the shell
and can interleave with sends, leading to writes on an invalid fd or
a disconnected socket.

Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
2026-03-19 17:02:00 +01:00
Tomasz Moń
188118f562 usb: device_next: Preallocate SETUP buffer
Preallocate and keep reusing the same buffer for SETUP data. This
ensures that USB stack will always be able to handle SETUP stage
regardless of UDC memory pool usage.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2026-03-19 16:58:56 +01:00
Tomasz Moń
244b015e99 usb: device_next: Allocate control buffers in stack
Allocating buffer in response to control transfer is part of processing
and therefore should not be done in UDC driver but rather in the stack.

Simplify UDC driver design by moving all control transfer buffer
allocations and processing to USB stack.

New control transfer handling flow is as follows:
  1. USB stack allocates and queues buffer for Setup stage. This informs
     UDC driver that USB stack is ready to process new transfer.
  2. UDC driver completes enqueued Setup buffer. SETUP data may have
     been received by device before Setup buffer was enqueued.
     If multiple SETUP data was received, UDC driver must complete
     request using last received SETUP data.
  3. USB stack processes request. USB stack is responsible for:
       * Stalling control endpoint when request cannot be processed
       * Allocating and enqueueing Data stage buffer if necessary
           - Depending on enqueued endpoint (IN/OUT), UDC driver is
	     expected to complete the transfer. If host sends new SETUP
             data for any reason (e.g. timeout), then Data stage buffer
             must be completed with -ECONNRESET code.
           - UDC driver may postpone processing Data IN until USB stack
	     enqueues new Setup stage buffer.
       * Handling status stage if applicable
           - If Data IN was enqueued, stack immediately allocates and
	     enqueues Status OUT stage buffer.
           - If Data OUT was enqueued, stack waits for Data OUT buffer
	     completion before doing any further processing.
           - If control transfer handling fails, stack is expected to
             STALL control endpoint.
       * Allocating and enqueuing Setup buffer.
           - This informs UDC driver that stack has finished processing
	     control transfer. UDC driver may choose to start processing
             Data IN and/or Status OUT only after new Setup buffer is
             enqueued.
  4. UDC driver must fail (complete with -ECONNRESET) any enqueued and
     not completed Data and Status buffers if host sends new SETUP data.
     UDC driver must be able to buffer last received SETUP data until
     USB stack is ready (enqueues Setup buffer).
  5. UDC driver must complete all Data and Status buffers before it
     completes Setup buffer.
  6. UDC driver may keep ownership of Setup, Data and/or Status buffers
     across USB bus resets. USB stack does not attempt to dequeue any
     control transfer buffer it enqueued.

This approach implicitly synchronizes UDC driver against USB stack,
which ensures that only one set of Setup/Data/Status buffers is
allocated at a time.

Another advantage of the rework is drawing a clear line on buffer
ownership. The buffer responsibilities are as follows:
  * USB stack is the only entity that both allocates and frees the
    buffers. Only USB stack is allowed to set "setup", "data" and
    "status" fields in struct udc_buf_info.
  * UDC takes ownership of buffers handed to it in udc_ep_enqueue().
  * UDC releases buffer ownership by calling udc_submit_ep_event().

Because there is just a single place where the buffer ownership changes,
and all buffers must go USB stack (alloc) -> UDC (perform requests on
the bus) -> USB stack (free) route it would be possible in the future to
implement a "tap" similar to Linux usbmon that would ease debugging.

This commit significantly changes how USB stack communicates with UDC
drivers. It was decided that supporting both the old and new model
simultaneously would require way too much effort. Therefore all UDC
drivers were reworked. Following people worked on driver rework:
  * Tomasz Moń - ambiq, dwc2, kinetis, mcux ip3511, nrf, numaker,
                 renesas ra, rpi pico, smartbond, virtual
  * Mathieu Choplain - stm32
  * Mark Wang - mcux ehci
  * Johann Fischer - sam0, stm32
  * Ren Chen - it82xx2
  * Brandon Hurst - max32
  * Gerson Fernando Budke - sam udp, sam usbc, sam usbhs

Co-authored-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Co-authored-by: Johann Fischer <johann.fischer@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Co-authored-by: Mark Wang <yichang.wang@nxp.com>
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Co-authored-by: Ren Chen <Ren.Chen@ite.com.tw>
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
Co-authored-by: Brandon Hurst <brandon.hurst@analog.com>
Signed-off-by: Brandon Hurst <brandon.hurst@analog.com>
Co-authored-by: Gerson Fernando Budke <nandojve@gmail.com>
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2026-03-19 16:58:56 +01:00
Emil Gydesen
fa87a67169 Bluetooth: ISO: Replace CHECKIF with if
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-03-19 11:38:12 +00:00
Kai Cheng
f3c178192e Bluetooth: UUID: add bt_uuid_compress helper
Add bt_uuid_compress() to compact a 128-bit Bluetooth UUID into its
16-bit or 32-bit short form when it matches the Bluetooth Base UUID.

If the UUID does not match the Base UUID pattern the 128-bit value is
copied unchanged and -ENOTSUP is returned, allowing callers to
distinguish compressible from non-compressible UUIDs.

16-bit and 32-bit source UUIDs are copied as-is.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-03-19 11:36:39 +00:00
Kai Cheng
63420b0098 Bluetooth: UUID: add string to UUID conversion function
Implement bt_uuid_from_str() function to convert string representations
to Bluetooth UUID structures. This provides bidirectional conversion
between UUID structures and their string representations, complementing
the existing bt_uuid_to_str() function.

Features:
- Supports 16-bit UUID format (4 hex characters, e.g., "180d")
- Supports 32-bit UUID format (8 hex characters, e.g., "abcdef12")
- Supports 128-bit UUID standard format (with hyphens)
- Comprehensive input validation and error handling
- Automatic UUID type detection based on string length

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-03-19 11:36:39 +00:00
Kai Cheng
898c4877a2 Bluetooth: UUID: refactor to use generic UUID library
Refactor the Bluetooth UUID module to use the generic UUID library
(lib/uuid) instead of hand-rolled byte manipulation.

Changes:
- Replace bt_uuid_128-based base UUID with struct uuid (RFC 9562 order)
- Replace uuid_to_uuid128() with bt_uuid_to_uuid() for BT-to-generic
  UUID conversion using proper big-endian / byte-swap operations
- Simplify bt_uuid_to_str() 128-bit case via uuid_to_string()
- Add Kconfig 'select UUID' dependency for BT_HCI_HOST

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-03-19 11:36:39 +00:00
Andreas Ålgård
2f6289d792 net: dhcpv4_server: Allow application to reject an address
This is useful if the application may wish to reject an address.
This works well alongside the address_provider callback, this way
you can enforce static leases based on the client id (MAC address).

Signed-off-by: Andreas Ålgård <aal@ixys.no>
2026-03-19 11:35:22 +00:00
akshay bansod
baa6058b08 net: sockets: add missing net_log.h header
compilation of socket_obj_core.c fails due to missing
net_log.h header. Fixes #105692

Signed-off-by: akshay bansod <akbansd@gmail.com>
2026-03-19 11:34:38 +00:00
Lyle Zhu
f21c79f310 bluetooth: host: avrcp: fix return value handling in command handlers
Fix three command handlers that were incorrectly returning the result
of callback functions with void return type:
- avrcp_unit_info_cmd_handler
- avrcp_subunit_info_cmd_handler
- avrcp_pass_through_cmd_handler

Split the callback invocation and return statement to properly handle
the void return type, avoiding potential compiler warnings or errors.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-03-19 12:28:15 +09:00
Emil Gydesen
3d5b7275e8 Bluetooth: Audio: Spring cleaning
Add missing header files, remove unused header files,
fix typos and missing static.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-03-18 17:42:55 -05:00
Roland Lux
2ced30b672 logging: backend: mqtt: fix mqtt log backend on client disconnect
The MQTT logging backend can cause the logging thread
to take over idle time when the used client disconnects/fails
to send the log messages.
Fixed by always returning the length of the log in every case.

Signed-off-by: Roland Lux <roland.lux@blue-zone.at>
2026-03-18 17:35:57 -05:00
Jjateen Gundesha
33b29cb4ef net: config: fix race in check_interface() causing indefinite block
- NET_EVENT_IF_UP can fire between the net_if_is_up() check and
net_mgmt_add_event_callback() in check_interface(). When this
happens (e.g. with CONFIG_SHELL_BACKEND_TELNET=y which starts a
same-priority thread that brings the interface up concurrently),
the event is missed and net_config_init_by_iface() blocks forever.

- Fix by always registering the callback first, then checking
net_if_is_up() after registration. If the interface came up in
the race window, remove the callback and signal the semaphore
immediately. Move the NET_INFO print to only fire when we are
genuinely going to wait.

Signed-off-by: Jjateen Gundesha <jjateen97@gmail.com>
2026-03-18 15:27:54 -05:00
Sylvio Alves
d8215fe289 cmake: remove deprecated espressif toolchain variant
The espressif toolchain variant (ZEPHYR_TOOLCHAIN_VARIANT=espressif)
has not been used for years. Espressif targets are now built using the
Zephyr SDK, which bundles the required Xtensa and RISC-V toolchains.

Remove the cmake/toolchain/espressif/ directory containing generic.cmake,
target.cmake, and Kconfig files that implemented this variant. Also
clean up references in the coredump xtensa gdb stubs, removing the
ESPRESSIF toolchain enum value and related handling code.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-03-18 15:25:03 -05:00
Johan Hedberg
6f9999f48e Bluetooth: Remove bt_hci_cmd_create()
The bt_hci_cmd_create() function was deprecated several releases ago (in
Zephyr 4.2) and can therefore now be removed.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2026-03-18 15:23:03 -05:00
Seppo Takalo
42d4c802a2 modem: cmux: Add handler for control channel disconnect
The 3GPP TS 27.010  section 5.3.4 specifies:
"DISC command sent at DLCI 0 have the same meaning as the
 Multiplexer Close Down command"

Add a handler for this and do the same operation as in
modem_cmux_on_cld_command().

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2026-03-18 15:19:57 -05:00
Emil Gydesen
9fafa1288d Bluetooth: TBS: Add check before memcpy of URI scheme
Add a check of the URI scheme length before comparing it
to any instance's supported URI schemes. If the incoming
URI scheme is longer than what we support, then there's
no point in checking if we support it, as we cannot.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-03-18 08:44:27 -05:00
Vedant Malkar
e49a5c1bc2 Bluetooth: MCS: Remove the GATT include service when OTS is disabled
The BT_GATT_INCLUDE_SERVICE is always included in
BT_MCS_SERVICE_DEFINITION even when CONFIG_BT_OTS=n,
this fixes it such that it is only included when OTS is enabled.

Fixes zephyrproject-rtos#105345

Signed-off-by: Vedant Malkar <vedantitsme@gmail.com>
2026-03-18 08:42:34 -05:00
Kai Cheng
77e1d6a86c Bluetooth: host: call bt_br_init() for Classic init in hci_init
When the controller supports BR/EDR and CONFIG_BT_CLASSIC is
enabled, call bt_br_init() to perform the full BR/EDR Classic
initialization (SSP mode, inquiry mode, local name, Class of
Device, etc.).

For non-Classic builds that still need BR/EDR buffer sizes,
gate the hci_read_buffer_size() fallback with
IS_ENABLED(CONFIG_BT_CONN) to make the build-time condition
explicit at the call site.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-03-18 08:35:43 -05:00
Kai Cheng
8cec37d8ec Bluetooth: Classic: sync local name to BR/EDR in bt_set_name()
When CONFIG_BT_CLASSIC is enabled and the controller is ready,
push the updated device name to the BR/EDR controller via
bt_br_write_local_name() inside bt_set_name(). This ensures
runtime name changes are properly synchronized to the BR/EDR
transport.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-03-18 08:35:43 -05:00
Kai Cheng
74e4b632ac Bluetooth: Classic: sync local name to BR/EDR on settings commit
When CONFIG_BT_DEVICE_NAME_DYNAMIC is enabled, write the device name
(restored from flash or the compile-time default) to the BR/EDR
controller during commit_settings().

Replace the bt_set_name() call with a direct strncpy into bt_dev.name
to avoid an unnecessary flash write, then explicitly push the name to
the BR/EDR controller via bt_br_write_local_name().

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-03-18 08:35:43 -05:00
Kai Cheng
f5e1c8ea54 Bluetooth: Classic: move bt local name to bt_br_write_local_name
Extract the HCI Write Local Name command into a reusable
bt_br_write_local_name() helper and use it in bt_br_init().

When CONFIG_BT_DEVICE_NAME_DYNAMIC and CONFIG_BT_SETTINGS are
both enabled, skip writing the compile-time default here since
the settings commit callback will push the correct name (either
restored from flash or the default) to the controller.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-03-18 08:35:43 -05:00
Fin Maaß
a3a39e1cf9 net: config: improve help of NET_CONFIG_CLOCK_SNTP_INIT
as we now have the sys_clock api that is
used for the system time, mention that api
in help too.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-18 10:58:30 +09:00
Fin Maaß
9784bf1d4b net: config: fix help of NET_CONFIG_SNTP_INIT_USE_CONNECTION_MANAGER
fix help of NET_CONFIG_SNTP_INIT_USE_CONNECTION_MANAGER

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-18 10:58:30 +09:00
Jamie McCrae
f22592cbc5 tree: Replace FIXED_PARTITION_* macro usage with PARTITION_*
Replaces usage of these deprecated macros with ones that support
fixed and mapped partition compatibles. Also includes an update to
hal_espressif which also (rightly or wrongly) has zephyr specific
code in it

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-03-17 18:24:52 -04:00
Jamie McCrae
0b6b5bfe34 secure_storage: kconfig: Add support for zephyr,mapped-partition
Adds support for this binding to the Kconfig

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-03-17 18:24:52 -04:00