Commit graph

24,075 commits

Author SHA1 Message Date
Jamie McCrae
872905f2f3 mgmt: mcumgr: grp: img_mgmt: Add support for zephyr,mapped-partition
Prevents checking if the flash offset Kconfig is defined

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-03-17 18:24:52 -04:00
Jamie McCrae
4b24aeec22 dfu: img_util: flash_img: Add support for zephyr,mapped-partition
Allows using this system with zephyr,mapped-partition bindings

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-03-17 18:24:52 -04:00
Jamie McCrae
f8f83289c0 storage: Add support for zephyr,mapped-partition
Adds support for this new binding with new macros, also introduces
a new PARTITION_* macro scheme which allows for using either
storage method without needing to pick one or the other, and
deprecates the previous FIXED_PARTITION_* macros

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-03-17 18:24:52 -04:00
Fin Maaß
f4e724a56a mgmt: hawkbit: remove CONFIG_HAWKBIT_DDI_NO_SECURITY
remove the deprecated option
CONFIG_HAWKBIT_DDI_NO_SECURITY.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-17 18:23:41 -04:00
Alberto Escolar Piedras
aadb23a188 net: Include correct header in all users of net logging macros
The net logging helper macros are now in a separate header.
Let's have all net users to include this new header.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-03-17 18:21:28 -04:00
Alberto Escolar Piedras
f9002f02fc shell: backends: shell_telnet: Remove uses of net logging helper macros
These macros are private to the net subsystem, let's not use them in
other subsystems.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-03-17 18:21:28 -04:00
Chaitanya Tata
277dad84c9 net: lib: shell: Add static ARP support
Add shell command to add a static ARP entry, useful in testing.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Cursor:Auto clang-format
2026-03-17 18:21:10 -04:00
Roman Leonov
638731f438 drivers: usb: host: Fixed small typo in description
Fixed small typo in doxygen description interace -> interface.

Signed-off-by: Roman Leonov <jam_roma@yahoo.com>
2026-03-17 18:18:49 -04:00
Fin Maaß
8843c50f3e net: ethernet: lldp: use sys_timepoint_* api
use sys_timepoint_* api.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-17 18:17:46 -04:00
Fin Maaß
061e7ff951 net: ethernet: lldp: simplify of changed vlan ifaces
as there is now a 1:1 relationship beween
struct ethernet_context and struct net_if
we can simplify the logic here,.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-17 18:17:46 -04:00
Fin Maaß
d089a201dc net: ethernet: lldp: use net_if_oper_state to check up ifaces
use `NET_IF_OPER_UP` to check if the iface is
already up, this is also the state that corespondes with
NET_EVENT_IF_UP.

Also move `net_if_foreach(iface_cb, NULL);`
after `net_mgmt_add_event_callback()`, so we won't
miss any up event.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-17 18:17:46 -04:00
Fin Maaß
fe56ee8794 net: ethernet: lldp: use K_WORK_DELAYABLE_DEFINE
use K_WORK_DELAYABLE_DEFINE macro.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-17 18:17:46 -04:00
Glenn Andrews
81485240c2 Debug: coredump: Fix error checking
Fix error-checking bug in Zephyr `coredump_shell.c` for
`coredump_cmd(COREDUMP_CMD_COPY_STORED_DUMP, ...)`. The function
returns the number of bytes copied (≥ 0) on success and a negative
errno on failure, but the existing checks used `ret != 0` which
incorrectly treated a successful non-zero byte count as an error.

This bug prevented the coredump printing shell commands from working.

signed-off-by: Glenn Andrews <andrewsglenn@meta.com>
2026-03-17 18:17:17 -04:00
Stephanos Ioannidis
a3a3908c51 secure_storage: Document SECURE_STORAGE_ITS_STORE_SETTINGS_NAME_BUF_SIZE
Document `SECURE_STORAGE_ITS_STORE_SETTINGS_NAME_BUF_SIZE` enum to appease
the Doxygen coverage check ...

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2026-03-17 15:43:52 -04:00
Anas Nashif
180f667812 cmake: toolchain: combine host variants
Combine toolchains provided by the host into one variant. This includes
both gcc and llvm installation typically coming from the distribution
(on Linux).

Both gcc and llvm are now part of the 'host' variant, the default is the
gnu compiler, so setting

	ZEPHYR_TOOLCHAIN_VARIANT=host

Will select the gnu compiler. To select llvm or any other compuler
provided in this variant, use the follwoing format:

	ZEPHYR_TOOLCHAIN_VARIANT=<variant>/<compiler>

The following will select llvm:

	ZEPHYR_TOOLCHAIN_VARIANT=host/llvm

Although gnu is the default, it can also be selected using the above
syntax:

	ZEPHYR_TOOLCHAIN_VARIANT=host/gnu

This commit removes the llvm variant for now, it should be deperecated
in another commit to follow.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2026-03-17 15:43:52 -04:00
Alberto Escolar Piedras
0738cf846c modem: cmux: Fix trivial warning building with clang
Fix `error: label followed by a declaration is a C23 extension`
warning.

Issue introduced 0d3883516f

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-03-17 15:06:06 +01:00
Aiden Hu
fb3ae541cf usb: host: refine connect/disconnect handling
The attach and detach flow was previously scattered across bus event
handlers and class code, causing duplicated enumeration and class
probe/remove logic. Root-device state was also manipulated directly in
the host context, which made lifecycle handling implicit and limited
the ability to support devices behind a hub.

This update introduces common helpers for device attach and detach and
replaces direct root access with simple accessor functions. By unifying
enumeration and teardown into a single path, the control flow becomes
clearer and more consistent, and the host stack is no longer tied to a
single-root assumption. These changes form the basis for supporting
multiple devices attached through a hub in future updates.

Signed-off-by: Aiden Hu <weiwei.hu@nxp.com>
2026-03-17 10:25:34 +00:00
Tharaka Jayasena
22c25e9595 net: ethernet: bridge: ensure valid MAC
The random_linkaddr() function may generate MAC addresses with the
multicast bit set. Source MAC addresses must not be multicast, and
randomly generated virtual interface addresses should have the
locally administered (LAA) bit set.
Force the LAA bit and clear the multicast bit after generating the
random address.

Signed-off-by: Tharaka Jayasena <9dmpires2k17.tuj@gmail.com>
2026-03-16 19:08:41 -05:00
Seppo Takalo
3abf8e47b0 modem: cmux: Add checks for frame decoding
Check for:
* valid frame type
* valid address (range 0..63)
* command decoding length.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2026-03-16 19:05:20 -05:00
Seppo Takalo
0d3883516f modem: cmux: Remove double buffering from RX
Remove double buffering that was using a separate work_buffer.
Receive and parse frames directly into receive_buffer instead.

This saves MODEM_CMUX_WORK_BUFFER_SIZE of RAM and avoids
one copy from work_buffer to receive_buffer.

Driver already asserts if the receive buffer does not fit
maximum frame, so it should be properly sized.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2026-03-16 19:05:20 -05:00
Emil Gydesen
ce46777957 Bluetooth: CAP: Shell: Set correct stream_cnt for ac_14
AC 14 is stereo on a single BIS, so that is 1 stream with
2 channels.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-03-16 19:04:26 -05:00
Pieter De Gendt
90ed20dbc6 net: lib: addrinfo: Use struct net_sockaddr_storage
Replace the struct net_sockaddr in zsock_addrinfo with struct
net_sockaddr_storage.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-03-16 19:04:02 -05:00
Ayush Singh
5e2e40f64c boards: beagleboard: pocketbeagle_2: m4: Add rpmsg uart
- Add rpmsg uart in dt.
- Not enabling it by default yet.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2026-03-16 18:58:35 -05:00
Ayush Singh
4979d81f75 ipc: rpmsg_service: Add openamp resource table support
Use resource table when CONFIG_OPENAMP_RSC_TABLE is enabled.

Tested with PocketBeagle 2 (M4 core running Zephyr)

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2026-03-16 18:58:35 -05:00
Emil Gydesen
b908885ec9 Bluetooth: TBS: Remove BT_TBS_SUPPORTED_FEATURES
Remove the Kconfig option BT_TBS_SUPPORTED_FEATURES as it was
not used by the subsystem, but only by applications.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-03-16 10:08:42 -04:00
Emil Gydesen
f8b573e7a3 Bluetooth: CCP: Modify get_bearer_uci to use output buffer
Modify bt_ccp_call_control_server_get_bearer_uci to
store the bearer UCI in an output buffer, instead of just
providing the pointer.

The reason for this is to make the result thread safe, and
avoid the user/application having a direct pointer to
internal storage.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-03-16 10:08:29 -04:00
Erdem Simsek
a71a9fd9d1 ipc_service: icmsg: Update state information before bound request
Set state before bound callback. The callback may trigger
icmsg_send which requires CONNECTED state.

Signed-off-by: Erdem Simsek <erdem.simsek@nordicsemi.no>
2026-03-16 10:08:08 -04:00
Emil Gydesen
5f5f198289 Bluetooth: CAP: Make CAP cancel thread safe
The functions bt_cap_commander_cancel and
bt_cap_initiator_unicast_audio_cancel were not thread safe,
and calling these while handling e.g. a notifications
or a write response could cause fatal errors.

This commit modifies active_proc so that all access to it
is guarded by a mutex.

Some functions were modified to take the active_proc as an
argument, instead of calling bt_cap_common_get_active_proc
for performance reasons.

This also means that all the atomic fields can now be
treated like regular fields. This has not been done in this
commit to keep the changes minimal.

The design is that only the function that calls
bt_cap_common_get_active_proc should unlock it again.
If a function gets the actice_proc as an argument, it should
not unlock or complete it.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-03-16 10:07:47 -04:00
Emil Gydesen
6750321dfc Bluetooth: BAP: UC: Do not set up data path twice
Move the call to bt_bap_setup_iso_data_path to the state_changed
clause in unicast_client_ep_streaming_state.

bt_bap_setup_iso_data_path should only be called once, as calling it
again would be rejected by the controller.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-03-16 10:07:30 -04:00
Lauren Murphy
8bcc333e65 llext: custom sections for heap
Places heaps in custom sections with default placements.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2026-03-16 10:07:20 -04:00
Emil Gydesen
7eea50b0c6 Bluetooth: BAP: UC: Simplify disconnect handler
A recent change in the host made it so that CIS always
disconnect before the ACL. This means that we do not need
to handle the case when the ACL disconnects before the CIS,
and the ACL and CIS disconnect handlers can thus be
simplified.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-03-16 10:07:09 -04:00
Emil Gydesen
ead2218beb Bluetooth: Controller: Moved non-advanced Kconfigs from adv feats
Move BT_CTLR_ADV_AUX_SET, BT_CTLR_ADV_SYNC_SET and
BT_CTLR_ADV_DATA_BUF_MAX out from the menu "Advanced features"
as they are not really advances, and users should be able to
adjust these values without enabling BT_CTLR_ADVANCED_FEATURES.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-03-16 10:06:34 -04:00
Peter Ujfalusi
4d8b77c6c3 logging: mtrace: Reset host and dsp pointer during init
After power on the slot memory used for mtrace has not been initialized
and it's content is filled with 0xff.
The first log out will try to use 0xffffffff as host and dsp pointer, which
is not something which should be done.

Set both pointers to 0 as after DSP reset this is the expected value on
host side and also on firmware side.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2026-03-16 10:05:50 -04:00
Arthur Gay
65af02827e net: lib: http_server: Fix missing error check for websocket key
The call to psa_hash_compute may silently fail if Zephyr is not compiled
with support for the SHA1 algorithm enabled. This leads to an invalid
Sec-WebSocket-Accept response header.

Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
2026-03-16 12:33:22 +01:00
Arthur Gay
bb1cf2579f net: lib: http_server: Fix missing dependency
The websocket server needs SHA1 algorithm to compute response header
Sec-Websocket-Accept.

Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
2026-03-16 12:33:22 +01:00
TOKITA Hiroshi
a0f37226d5 fb: cfb: Use signed-integer for API that specifies coordinations
Change the arguments of `cfb_invert_area`, `cfb_print`, and
`cfb_draw_(point|line|rect|circle)`, which used unsigned integers to
specify coordinates to signed integers.

This is because coordinate are usually specify with real numbers,
so it is difficult to use unless negative numbers are accepted.
We clip drawings outside the drawable area on the implementation side.

Accordingly, we will update the API version to 0.10.0.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2026-03-16 12:19:40 +01:00
Make Shi
6c56ca835c bluetooth: shell: avrcp: improve avrcp shell commands
Improve AVRCP shell commands by adding success messages after
operations complete, including passthrough (PRESSED/RELEASED)
and get_caps command.

Signed-off-by: Make Shi <make.shi@nxp.com>
2026-03-15 16:28:27 +01:00
Aleksandr Mirlenko
4911512c60 bluetooth: host: add IPT in the CS reflector subfeature
Add support for the IPT in the CS reflector subfeature
in the Bluetooth host stack.

Signed-off-by: Aleksandr Mirlenko <aleksandr.mirlenko@nordicsemi.no>
2026-03-14 06:00:09 +01:00
Yongxu Wang
62f53cccde pm: device: replace magic number with named constant
Introduce enum pm_device_deps_region to replace the magic number
used when iterating through device dependency array regions in
power_domain_add_or_remove().

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2026-03-14 05:59:45 +01:00
Zafer SEN
5d8ed77db6 sockets: increase CONNECT and TLS timeout ranges for NTN support
Expand the allowed range for NET_SOCKETS_CONNECT_TIMEOUT and
NET_SOCKETS_TLS_CONNECT_TIMEOUT from 60s to 300s. Satellite and
NTN links can experience very high RTT, making the previous
60s maximum too small for reliable connect() and TLS handshake
operations.

Increasing the upper bound allows applications and overlays to
set longer, realistic timeout values when operating over high
latency networks such as NTN.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-03-13 14:30:46 -07:00
Seppo Takalo
bc86bf20cb net: l2: ppp: Allow using zero asyncmap locally
The L2 PPP driver was not working for any other
Async-Control-Character-Map values than 0xffffffff.

This was caused by two issues:
* modem_ppp.c was expecting CONTROL field to be always escaped.
* lcp.c was decoding async_map values wrongly. Either as 16bit,
  or raw 32bit, instead of big-endian 32 bit.

Now it should be safe to default my_options.async_map to a zero.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2026-03-13 16:33:05 +01:00
Seppo Takalo
412d48ef31 net: l2: ppp: Async-Control-Character-Map updated too early
When peer sends the Async-Control-Character-Map option on LCP
phase, Zephyr correctly responsed with Configure-Ack.
But the LCP negotiation phase have not been finnished yet,
so the remote end may not expect us to immediately
update the value.

This is seen when trying to use Zephyr's PPP stack against
PPPD from Linux, where default asyncmap option is zero.

However, if we delay the update of the asyncmap to the network phase,
it works just fine.

Fixes #105291

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2026-03-13 16:32:32 +01:00
Yongxu Wang
11dc0bde67 pm: device_system_managed: add warning log for resume failures
Add error logging in pm_resume_devices() to report when a device
fails to resume. This improves debuggability by making resume
failures visible in the system log.

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2026-03-13 14:45:17 +01:00
Jiafei Pan
4773cb1aa0 pm: state: only define variable for enabled CPU Core
Only define variable for enabled CPU Core to fix the following building
warning in case of any CPU Core is not enabled but with "cpu-power-states"
dts node property:

zephyr/subsys/pm/state.c:15:43: warning: 'pmstates_DT_N_S_cpus_S_cpu_0'
defined but not used [-Wunused-const-variable=]

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2026-03-13 14:45:02 +01:00
Michael Ellerman
5d653fcfd4 net: lib: http_server: Reject over length websocket key header
If CONFIG_HTTP_SERVER_MAX_HEADER_LEN is increased from the default of
32, a compiler warning pops in the HTTP websocket code:

    zephyr/subsys/net/lib/http/http_server_http1.c:
    In function 'on_header_value':
    zephyr/subsys/net/lib/http/http_server_http1.c:898:33:
    warning: 'strncpy' output may be truncated copying between 0 and 32
    bytes from a string of length 47 [-Wstringop-truncation]
      898 |          strncpy(ctx->ws_sec_key, ctx->header_buffer,
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      899 |                  MIN(sizeof(ctx->ws_sec_key), offset));
          |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This comes from:

                if (ctx->websocket_sec_key_next) {
    #if defined(CONFIG_WEBSOCKET)
                         strncpy(ctx->ws_sec_key, ctx->header_buffer,
                                 MIN(sizeof(ctx->ws_sec_key), offset));
    #endif

If eg. header_buffer is 48 bytes and holds a string >= 32 bytes then
ws_sec_key can end up non-nul terminated. That can then lead to buffer
overflow in handle_http1_to_websocket_upgrade().

Add a check to make sure the header value fits in ws_sec_key, if not
reject the request with a HTTP 500. The websocket key is not expected to
be > 31 bytes.

Once the check is in place, it's safe to use memcpy() for the copy, and
then add the terminating nul manually.

Signed-off-by: Michael Ellerman <mpe@oss.tenstorrent.com>
2026-03-13 07:09:44 +01:00
Jordan Yates
bdc5ab30a1 debug: thread_analyzer: default THREAD_RUNTIME_STATS
`THREAD_RUNTIME_STATS` is not a requirement for the thread analyzer to
operate, merely useful. Switch the control to `configdefault` to leave
it enabled by default, while allowing both applications to disable the
option with `CONFIG_THREAD_RUNTIME_STATS=n` and for alternate defaults
to be specified elsewhere.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-03-13 07:09:04 +01:00
Pieter De Gendt
aad056a7bc net: lib: coap: observer: Use struct net_sockaddr_storage
Replace the incomplete struct net_sockaddr with net_sockaddr_storage for
CoAP observers.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-03-12 14:06:27 -05:00
Pieter De Gendt
134e06c7d9 net: lib: coap: server: Use struct net_sockaddr_storage
Replace the net_sockaddr struct with a net_sockaddr_storage struct.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-03-12 14:06:27 -05:00
Li Long
bf31fab429 net: wifi: shell: Add check for iface type when get iface
When we start uAP by specifying the network interface "-i" like this:
    wifi ap enable … -i 1
(here: 1 is STA iface, 2 is uAP iface)

Currently, get_iface() uses interface index to choose the network
interface, but we do not check if the selected interface is correct
type.

So if the user specified interface is valid interface, we then verify
that it matches the given type. If there is no match, we return an
error and do not select a default type interface.

Signed-off-by: Li Long <li.long@nxp.com>
2026-03-12 14:06:05 -05:00
Lyle Zhu
96f8077b95 bluetooth: Classic: l2cap: refactor R-bit handling for RET mode
Refactor the Retransmission Disable (R) bit handling in L2CAP BR/EDR
to reuse the existing L2CAP_FLAG_REMOTE_BUSY flag instead of
maintaining separate R-bit tracking flags.

The previous implementation used dedicated flags (
`L2CAP_FLAG_RECV_FRAME_R` and `L2CAP_FLAG_RECV_FRAME_R_CHANGED`) to
track the R-bit state, which duplicated the functionality of
L2CAP_FLAG_REMOTE_BUSY and added unnecessary complexity.

Key changes:
- Remove `L2CAP_FLAG_RECV_FRAME_R` and
  `L2CAP_FLAG_RECV_FRAME_R_CHANGED` flags
- Update `bt_l2cap_br_update_r()` to directly use
  `L2CAP_FLAG_REMOTE_BUSY` for tracking remote busy state
- Trigger I-frame retransmission when R-bit transitions from 1 to 0
- Update I-frame and S-frame header packing to set R-bit based on
  local busy state in retransmission mode
- Simplify I-frame sending logic by consolidating remote busy checks
- Remove redundant R-bit checks in data pull path
- Add RET mode specific handling in S-frame reception for RR and REJ
  frames
- Enhance `bt_l2cap_br_chan_recv_complete()` to support both RET and
  ERET modes with proper local busy state management
- Set S-frame type to REJ when local busy and in RET mode

These changes eliminate code duplication and make the remote busy
state management more consistent across the L2CAP implementation.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-03-12 12:09:04 -04:00