Commit graph

24,075 commits

Author SHA1 Message Date
Pieter De Gendt
4fa4329a16 shell: Add user data argument to shell_set_bypass
Allow passing some context to the shell bypass callback function by
providing a void pointer user data argument.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-10-10 12:53:55 -04:00
Seppo Takalo
9de7d61709 modem: cmux: Implement DM and NSC responses
Implement following responses from 3GPP TS 27.010:
5.4.6.3.8 Non Supported Command Response (NSC)
5.3.3 Disconnected Mode (DM) response

Close DLC when receiving DM response.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-10-09 22:55:17 +03:00
Jeppe Odgaard
d58e6efc76 shell: mqtt: cancel disconnect work on connect event
If the disconnect work has not yet run when a connect event is received the
connect event is dropped.

Prevent this behaviour by reorganizing `network_evt_handler()`.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-10-09 12:46:33 -04:00
Make Shi
528e732aad Bluetooth: Shell: BR: Add SDP discovery support for AVRCP CT/TG
Add SDP discovery handlers for AVRCP CT/TG roles and corresponding
discovery parameters and a common result handling function.

Signed-off-by: Make Shi <make.shi@nxp.com>
2025-10-09 12:42:45 -04:00
Peter Mitsis
ec9a7f8cdd cpu_freq: Add SMP support
Extends the CPU frequency scaling to support SMP for two models.

Model 1: Each CPU/core can have its frequency scaled independently
of the others.

Model 2: All CPUs/cores use the same frequency scaling.

In both models, IPIs are sent from the timer handler to each of the
CPUs to obtain the most up-to-date CPU load information. For the
first model, each CPU sets its next P-state after determining its
load. For the second model, the next P-state is set by the last
CPU/core to determine its load and is based on the CPU/core with the
highest load.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2025-10-09 12:42:32 -04:00
Peter Mitsis
613653716d cpu_freq: Add new policy APIs
Adds two new CPU frequency scaling policy APIs:
  cpu_freq_policy_reset()
  cpu_freq_policy_pstate_set()

These new APIs allow the policy to better control and isolate relevant
logic from the rest of the subsystem.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2025-10-09 12:42:32 -04:00
Peter Mitsis
63748db7c6 cpu_freq: Add default stub for cpu_freq_pstate_set()
This allows a project to select where cpu_freq_pstate_set()
gets implemented. The system integrator may choose to use
a default stub, a version implemented by the SOC, or a custom
version implemented by the project.

The existing 'native' SoC version now has its output contain
the string "SoC" while the new stub version has the string
"Stub" in its. This allows a means to differentiate between the
two.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2025-10-09 12:42:32 -04:00
Peter Mitsis
87570bae3e cpu_load: Make cpu_load_get() SMP safe
Update cpu_load_get() to work with both multiple threads as
well as multiple CPUs.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2025-10-09 12:42:32 -04:00
Vinayak Kariappa Chettimada
9b26e967ca Bluetooth: Controller: nRF54L: Fix to improve decryption speed
Fix to improve decryption speed. Decryption starts after
payload reception, hence use fastest mode to decrypt PDUs.
nRF54Lx only supports decryption after payload reception,
this implementation was already there in the code.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-10-09 12:41:43 -04:00
Vinayak Kariappa Chettimada
a5e1f59686 Bluetooth: Controller: Revert relaxed radio packet assignment deadline
Reverts relaxed radio packet assignment deadline as it is
too risky and can cause invalid bits be transmitted and/or
cause MIC failures.

Reverts commit 4dbfb22a7e ("Bluetooth: Controller: Relax
radio packet pointer assignment deadline"), and
commit 230df77993 ("Bluetooth: Controller: Relax radio
packet pointer assignment deadline").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-10-09 12:41:43 -04:00
Vinayak Kariappa Chettimada
1fe79a65a2 Bluetooth: Controller: Use CONFIG_SOC_COMPATIBLE_NRF5340_CPUNET
Use CONFIG_SOC_COMPATIBLE_NRF5340_CPUNET for nRF53 SoC
conditional compilations.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-10-09 12:41:43 -04:00
Robert Lubos
fa22fa37cb net: coap_client: Add optional payload callback for uploads
Add an optional payload callback field to the coap_client_request
structure, allowing the application to provide blocks of payload
interactively during the resource upload, instead of having to provide
entire payload in a single contigunous memory space.

If registered, the CoAP client library will call the payload callback
whenever a new PUT/POST message is being generated (note this is also
true for retransmissions) instead of using the payload pointer/length.
If the payload callback is NULL, then the library operates as usual.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-10-09 12:37:47 -04:00
Robert Lubos
a6560c1a7b net: coap_client: Handle block size negotiation on upload
During block uploads, the server may respond with Block 1 option with
a smaller block size than currently used (so called block size
negotiation). The CoAP client however did not read the Block 1 option
from the response, therefore ignoring the server request to lower the
block size.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-10-09 12:37:47 -04:00
Declan Snyder
74d715c5ef pm: Remove "power state consistency" check
This check is totally wrong, min-residency-us and exit-latency-us are
not related to each other at all except that the end of the residency
period occurs when the exit starts, so they are totally orthogonal
values and should not be checking if one is less than the other or
anything like this. Even in the code for the default policy manager,
they are added together, so this check is incompatible / in disagreement
with that code, so it should be removed.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-10-09 12:37:07 -04:00
Ryan Erickson
0ab308590c modem: backends: isr: notify remaining RX bytes
If there are still bytes in the RX buffer, trigger another
MODEM_PIPE_EVENT_RECEIVE_READY event.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2025-10-09 12:35:57 -04:00
Emil Gydesen
0abb23ffad Bluetooth: ISO: rm extra log statements in chan_send
bt_iso_chan_send and bt_iso_chan_send_ts would log
twice for each TX, which is unncessary. LOG_DBG statements
include the function name by default, so the 2nd log
statement was unncessary, and were removed.

Added logging of the ts in bt_iso_chan_send_ts which
would still make it possible to tell the 2 apart,
even if CONFIG_LOG_FUNC_NAME_PREFIX_DBG=n.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-10-08 18:25:17 -07:00
Vinayak Kariappa Chettimada
7fd5dea9cc Bluetooth: Controller: Cosmetic changes to Link Layer interface
Cosmetic changes to the Link Layer interface header file.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-10-08 15:12:22 -04:00
Vinayak Kariappa Chettimada
8eae0bfbd0 Bluetooth: Controller: Fix single switch timer use in ISO Sync
Fix implementation of Broadcast ISO Synchronized Receiver
using single switch timer to consider minimum compare value
requirement.

This fix reduces latencies to setup radio receptions and
fixes an assertion in lll_sync_iso when radio_tmr_start_us()
is checked for latencies.

Relates to commit 5dfc58cff9 ("Bluetooth: Controller: Fix
single switch timer minimum compare value").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-10-08 15:09:33 -04:00
Henrik Brix Andersen
afc65525c0 retention: remove unused API struct
Remove the unused/unnecessary retention subsystem API struct.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-10-08 10:09:41 +02:00
Karsten Koenig
d833556ee5 drivers: debug: Moved nrf_etr from misc
Moved the nrf_etr driver from the drive/misc folder into the recently
established driver/debug folder where it is a better fit. Moved the
associated files such as bindings and headers accordingly as well.

Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
2025-10-08 10:09:02 +02:00
Emil Gydesen
4b9bc7d11b Bluetooth: Controller: Fix return types for ll_length
ll_length_req_send and ll_length_default_set were defined to return
a uint32_t, but only returned a uint8_t HCI error code and
was the return value was always stored as such.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-10-08 08:45:37 +02:00
Måns Ansgariusson
98917a022b tracing: Remove retired k_pipe tracing api
The old k_pipe api was retired in #95408, the tracing hooks should be
removed as well.

Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
2025-10-08 08:44:11 +02:00
Titouan Christophe
3c50822e1d samples: net: midi2: new sample
Add a new sample to demonstrate usage of the newly introduced
Network MIDI 2.0 host stack.

Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
2025-10-08 08:42:27 +02:00
Titouan Christophe
b0fa1be5b0 net: lib: midi2: new Network MIDI 2.0 host stack
Add a new network protocol for MIDI2.0 over the network, using UDP sockets.
This allows Zephyr to host a UMP endpoint on the network, which can be
invited by UMP clients to exchange MIDI2.0 data.

Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
2025-10-08 08:42:27 +02:00
Titouan Christophe
5d71669c70 usb: device_next: usbd_midi: mark UMP group as 31.25kb/s from devicetree
Since a new device-tree property has been introduced to describe if a
UMP group is limited to 31.25kb/s (like a physical MIDI DIN-5 port),
this can be used in the USB UMP group terminal block descriptors, as
specified in the USB-MIDI2.0 reference document [1], (in 5.4.2.1
Group Terminal Block Descriptor):

  Maximum Output Bandwidth Capability in 4KB/second. 0x0000 – 0xFFFF.
  Bandwidth is total for this Block, shared among all OUT Group Terminals.
      0x0000 = Unknown or Not Fixed.
      0x0001 = Rounded version of 31.25kb/s

[1] https://www.usb.org/sites/default/files/USB%20MIDI%20v2_0.pdf

Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
2025-10-08 08:42:27 +02:00
Dominik Ermel
f5e70d56be fs: ext2: Explicit int cast ret assignment in ext2_init_storage
Adds cast to int when ret is assigned error code returned by
functions that return int64_t. The cast has been added to indicate
that assignment with truncation is here intentional.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2025-10-08 08:42:18 +02:00
Anas Nashif
bf82f7ffac copyrights: fix copyright line
Add space before (c) to allow correct parsing by linters.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-07 22:53:45 -04:00
Emil Gydesen
2140b55d29 Bluetooth: BAP: Shell: 0-init some global variables
0-init some non-static global variables to avoid
issues with uninitialized values. Also modify
the printing of the broadcast sources found slightly.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-10-07 17:44:19 +03:00
Dawid Niedzwiecki
58a7119d28 mgmt: ec_host_cmd: usb: fix double free
Fix double free of a net buffer after request error.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2025-10-07 17:43:59 +03:00
Jordan Yates
83375a8f86 modem: chat: add modem_chat_is_running
Add a helper function to query if the chat instance is currently running
a script.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-07 14:06:37 +02:00
Jamie McCrae
b2884ffb20 mgmt: mcumgr: grp: os_mgmt: Use board target for hardware platform
Uses the full hwmv2 board target for the hardware platform output,
seemingly this was missed in the hwmv2 migration and it was using
the board name only. Adds a deprecated Kconfig to restore to the
previous behaviour

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-10-07 14:06:06 +02:00
Emil Gydesen
35909d7fdf Bluetooth: CAP: Mark err used for assert as __maybe_unused
If asserts are disabled, then `err` is unused can caused
a compiler warning.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-10-07 12:47:30 +02:00
Pieter De Gendt
6a4b5cd3d3 net: lib: coap: Add packet pointer to client response callback data
Pass a pointer to the CoAP packet in the response data. This allows
callback function to inspect for CoAP options.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-10-07 11:00:50 +02:00
Pieter De Gendt
cbef8679f4 net: lib: coap: Convert client response callback arguments to struct
Make it easier to modify the response callback data by passing it as a
struct pointer rather than a long list of arguments.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-10-07 11:00:50 +02:00
Jordan Yates
1f3ce818fc bluetooth: controller: ll_sw: nordic: constant latency req
When `CONFIG_NRF_SYS_EVENT` is enabled, route constant latency requests
through the reference counted API.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-07 10:59:38 +02:00
Charles Hardin
2bfd76425a net: ip: account for the size in the inet_ntop code path
The code was writing to the dst without a verification check on
size which is not appropriate. The guard on the arguements should
be enforced and so just ensure the size is larger then the
definition of the strings from POSIX and return an error in those
cases.

Signed-off-by: Charles Hardin <ckhardin@gmail.com>
2025-10-07 10:59:08 +02:00
Charles Hardin
a8aa8af946 net: dns: fix the inet_ntop buffer size mismatch with a sizeof
From the manpage for inet_ntop

  This function converts the network address structure src in the af
  address family into a character string.  The resulting string is
  copied to the buffer pointed to by dst, which must be a non-null
  pointer.  The caller specifies the number of bytes available in
  this buffer in the argument size.

In an unintended misconfiguration the resolve max string ended up
being 20 and tracking thru some wierd code issues determined some
stack corruption which came back to the shell command. So, just
fix the size argument to be the sizeof which then leads to the next
problem that the size is being ignored by inet_ntop.

Signed-off-by: Charles Hardin <ckhardin@gmail.com>
2025-10-07 10:59:08 +02:00
Emil Gydesen
6c870b071a Bluetooth: Remove CONFIG_BT_BUF_ACL_RX_COUNT
Remove the deprecated CONFIG_BT_BUF_ACL_RX_COUNT config
as it has been deprecated since 4.1

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-10-06 20:17:14 -04:00
Pieter De Gendt
05a605021a nvmem: Introduce new subsystem for Non-Volatile Memory layer
This commit adds the NVMEM subsystem with a basic implementation for use
with EEPROM devices.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-10-06 15:09:30 -04:00
Jordan Yates
761961fa28 modem: optional dedicated workqueue
Add the option to use a dedicated workqueue for the modem backend
instead of the system workqueue.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-06 20:01:41 +03:00
Emil Gydesen
360880b7c7 Bluetooth: Host: Remove bt_le_set_auto_conn
Remove the deprecated function bt_le_set_auto_conn
as it has been deprecated since 4.1.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-10-06 20:01:04 +03:00
Alberto Escolar Piedras
1264a923f3 net: mqtt_sn: udp: Adapt to new zsock_recvfrom() api.
zsock_recvfrom() takes as last argument a socklen_t pointer
( c546c1cad1 )
whose definition has changed.
So let's ensure we pass the right type of pointer to it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-10-06 20:00:20 +03:00
Alberto Escolar Piedras
37ff1b254f tracing: ctf: Fix arguments socket tracing functions
Zephyr's socklen_t was changed in
c546c1cad1
to be uint32_t instea of size_t.
Let's fix accordingly the prototypes which expect it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-10-06 20:00:20 +03:00
Alberto Escolar Piedras
d4094d431c net: dns: dispatcher: Fix type of pointer
zsock_recvfrom() takes as last argument a socklen_t pointer
which type was changed in
c546c1cad1
as is not anymore equivalent to size_t.
So let's ensure we pass the right type of pointer to it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-10-06 20:00:20 +03:00
Jukka Rissanen
c546c1cad1 net: socket: Change socklen_t to be 4 bytes long
There is an issue when zephyr is compiled with native_sim_64 where
size_t is 8 bytes. The socklen_t in specified as 4 bytes in Linux
even for 64 bit builds so we have a conflict between Linux and Zephyr.
To make things work properly, define socklen_t as uint32_t in order to
align with Linux. Four bytes is enough for socket address length anyway.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-10-06 09:38:01 +02:00
Jordan Yates
f047a412e0 modem: cmux: auto calculate work buffer sizes
Automatically size the CMUX work buffers based on
`CONFIG_MODEM_CMUX_MTU`. This eliminates a Kconfig variable that would
otherwise need to manually be kept in sync. The option to extend the
size of these buffers is still provided through
`CONFIG_MODEM_CMUX_WORK_BUFFER_SIZE_EXTRA`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-06 09:37:26 +02:00
Shawn Huang
f7412dc0df logging: allow simplified logging of backend
This allows no timestamps and level prefixes in backend log output.

Signed-off-by: Shawn Huang <shawn.huang724@realtek.com>
2025-10-06 09:36:23 +02:00
Pieter De Gendt
6693923734 net: wifi: mgmt: Remove extraneous newlines from logs
Some log statements appended unnecessary newlines, remove those.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-10-05 20:02:08 -04:00
Pieter De Gendt
ce45f4ca53 net: lib: wifi: mgmt: Fix memory leaks
When connecting to WiFi from stored credentials, the key_passwd is never
freed.
Additionally if the connect fails, the allocated data was never freed.

Convert heap allocated memory to stack allocated buffers.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-10-05 20:02:08 -04:00
Gustavo Romero
139407f818 instrumentation: Add instrumentation subsystem
This commit adds the instrumentation subsystem.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2025-10-05 06:18:25 -04:00