Commit graph

22128 commits

Author SHA1 Message Date
Jeppe Odgaard
c6f31346d2 net: config: sntp: add resync interval range
RFC4330 section 10 states:

A client MUST NOT under any conditions use a poll interval less then 15
seconds.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-09-08 14:41:25 +02:00
Kai Cheng
62a4506c6d Bluetooth: SDP: fix sdp record not uninitialized
sdp matching_recs maybe filled with uninitialized record. if
sdp_svc_search_req come from remote with invalid max_rec_count,
which is greater than num_services, matching_recs would response
uninitialized record result.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2025-09-08 14:37:29 +02:00
Aaron Ye
229fdf0fe7 logging: backends: Use CMSIS 6 register defines in SWO initialization
ARM CMSIS 6 has different ITM and TPI register definition comparing
with CMSIS 5. Update the swo initialization to use CMSIS 6 defines.
For the Cortex-M cores which are higher than Cortex-CM7, the LAR
has been removed from ITM.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2025-09-08 09:48:44 +02:00
Appana Durga Kedareswara rao
7542107048 arm64: Add new CPU_CORTEX_A78 configuration for Cortex-A78 support
Introduce a new Kconfig option CPU_CORTEX_A78 to enable support for the
Arm Cortex-A78 CPU architecture within Zephyr. This configuration can be
selected by boards or SoCs that utilize the Cortex-A78 core, enabling
architecture-specific features and optimizations as needed.

Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
2025-09-05 16:48:38 -04:00
Øyvind Hagen
27e5a8fcf5 usb: device: fix CDC ACM serial state notification for Rx Carrier
Use the actual value instead of the flag.

Signed-off-by: Øyvind Hagen <oyvinha@ifi.uio.no>
2025-09-05 17:11:16 +02:00
Mark Wang
0e86cb85f2 bluetooth: avdtp: fix the issue of registering same endpoint
return error when the already registered endpoint is registered again.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-09-05 17:10:41 +02:00
Josuah Demangeon
916c6e60ef usb: host: wrap the mutex lock with a helper
Hide the mutex lock details inside a wrapper call, like done for the
device stack API. This is not used for the per-device lock of the host
stack which use a different mutex lock.

Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
2025-09-05 13:45:30 +02:00
Josuah Demangeon
e8ecb6c3af usb: host: check that descriptor is in bound before dereferencing
In the while loop parsing descriptors, check that the descriptor is past
the end just before dereferencing it to check if it is seemingly valid.

Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
2025-09-05 13:45:30 +02:00
Josuah Demangeon
a6faa0ca32 usb: host: rename "struct usbh_contex" to "usbh_context"
Make the struct name match the device naming for ease of use, although
slightly longer name. Propagate the change to the subsystem, includes,
tests and samples.

Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
2025-09-05 13:45:30 +02:00
Samuel Tsai
07dc0ad40d Bluetooth: host: adv: revert 39cb574 to fix spurious error log
Commit 39cb574 changed the log level from LOG_DBG to LOG_ERR in
bt_le_adv_resume(). This causes the error log
"No valid legacy adv to resume" to appear during normal connection
establishment when using bt_le_ext_adv_start(), even though the
system is functioning correctly.

Revert the change to restore the original LOG_DBG level.

Fixes: #94954

Signed-off-by: Samuel Tsai <stsai@atmosic.com>
2025-09-05 12:27:45 +02:00
Mark Wang
06dfa99980 bluetooth: a2dp: fix the process of failed cmd
If the cmd fail to receive response (for example: timeout), the buf is
NULL, then need to callback the result.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-09-05 12:27:29 +02:00
Bjarki Arge Andreasen
682c835113 pm: device_runtime: put_sync_locked: fix usage count on err
If pm action fails within put_sync_locked, usage count should be
reset to reflect the state of the device.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-09-05 07:44:08 +02:00
Sean Kyer
e4fb01c66b cpu_freq: Add CPU Frequency Scaling subsystem
Add a CPU frequency scaling subsystem, allowing a policy
algorithm to control the frequency of a given SoC/MCU
automatically at runtime.

Implement a basic, "on-demand" policy algorithm which
iterates through the P-states supported by the SoC and
selects the first P-state where it's trigger threshold is
less than the CPU load.

The CPU frequency scaling subsystem does not currently
support SMP. The CPU load measurement can be made to support
SMP since statistics are measured from the scheduler.

Co-authored-by: Eric Hay <Eric.Hay@analog.com>
Signed-off-by: Sean Kyer <Sean.Kyer@analog.com>
2025-09-05 07:43:56 +02:00
Eric Hay
73ce03246b cpu_load: Add CPU Load subsystem
Implement CPU load measurement subsystem. The statistics
used to calcualte the load are taken from the scheduler.
Specifically, the number of cycles used by the idle thread.

Co-authored-by: Sean Kyer <Sean.Kyer@analog.com>
Signed-off-by: Eric Hay <Eric.Hay@analog.com>
2025-09-05 07:43:56 +02:00
Diego Herranz
7489a38e3b fb: cfb_shell: fix draw circle help text
HELP_DRAW_CIRCLE existed, but HELP_DRAW_RECT was used instead.

Signed-off-by: Diego Herranz <diegoherranz@diegoherranz.com>
2025-09-04 20:08:27 -04:00
Victor Brzeski
a52966b3bc uac2: rate limit ops->get_recv_buf error log
Rate limit the get_recv_buf() callback from the application to
reduce system trash when buffer pressure gets high.

Signed-off-by: Victor Brzeski <vbrzeski@gmail.com>
2025-09-04 16:46:17 +02:00
Jamie McCrae
d12c6888e3 mgmt: mcumgr: grp: img_mgmt: Add support for SHA512 in images
Adds support for images signed with SHA512.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-09-04 14:43:26 +02:00
Yangbo Lu
263911d79e net: net_if: use simple vlanX for vlan interface name
Used simple vlanX for vlan interface name. What interface the
vlan interface was attached to could be checked by "net iface"
or "net vlan".

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-09-04 11:34:15 +02:00
Yangbo Lu
0948812f70 net: vlan: drop current vlan interface naming
There were two problems about vlan interface naming currently.

1. When there were more than 1 vlan interfaces. It's not able to
   initialze name for all of them to same name VLAN-<free>.
2. When enabled vlan with tag, the name VLAN-xxx was used.
   However we may need to support multiple physical interfaces
   in the future. So, it's not able to use same name VLAN-xxx
   either for same tag on different physical interfaces.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-09-04 11:34:15 +02:00
Yangbo Lu
3fc03623ad net: shell: vlan: fix tag/attached info showing
There was call trace to execute "net vlan" if vlan interface
hadn't been enabled. Fixed it.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-09-04 11:34:15 +02:00
Emil Gydesen
aa27460880 Bluetooth: CCP: Add support for set/get provider name
Add support for setting and getting the bearer provider
name. For now the name will be duplicated by the TBS
implementation, but will be optimizied in the future
so only one copy of the name exists.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-09-04 11:30:36 +02:00
Johann Fischer
1d282539a3 usb: device_next: avoid false error logging in CDC ECM/NCM
The interface descriptor and its associated string descriptor are shared
between different speed configurations. Do not try to add a string
descriptor if it has already been added and the index is not zero.

Similar to commit ec851ba7c7
("usb: device_next: avoid false error logging in CDC ACM").

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-09-03 17:04:39 +02:00
Benjamin Cabé
0132ea07fb doc: fix spelling errors tree-wide
fix some spelling errors in code comments and Kconfig helps

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-03 17:04:13 +02:00
Benjamin Cabé
dd4bf1aadc pm: policy: doc: fix spelling of help text
s/whithout/without/

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-03 17:04:13 +02:00
Benjamin Cabé
89fef8aa6d doc: correct the spelling of "comparison"
s/comparision/comparison/

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-03 17:04:13 +02:00
Benjamin Cabé
637f1cd411 net: shell: dns: use int type for %.*s format specifier
The `%.*s` format specifier expects an int so cast the size_t parameter
to int.

Fixes an issue spotted in CI for:

    west twister -p native_sim/native/64 -s sample.net.dns_resolve.mdns

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-03 14:53:17 +03:00
Emil Gydesen
29f5628c7f Bluetooth: CAP: Add bt_cap_unicast_group_get_info
Add bt_cap_unicast_group_get_info to get information about
a CAP unicast group. For now this just contain the pointer
to the BAP unicast group, which then can be used with
bt_bap_unicast_group_get_info to get information specific
to BAP. The bt_cap_unicast_group_info struct can later be
expanded with any additional information CAP may add.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-09-03 13:49:54 +03:00
Emil Gydesen
dae29d344a Bluetooth: BAP: Add bt_bap_unicast_group_get_info
Add bt_bap_unicast_group_get_info to get information
about a unicast group. In this first iteration the info
struct only contains the sink and source presentation
delay, but the info struct can easily be expanded on
later to contain more.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-09-03 13:49:54 +03:00
Emil Gydesen
e42e875777 Bluetooth: BAP: Add validation of presentation delay
BAP section 7.1 states that all streams in a direction shall
have the same presentation delay. To achieve this, we need to
store the configured presentation delay for a unicast group,
so that we can compare with the new presentation delay.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-09-03 13:49:54 +03:00
Flavio Ceolin
9fdbe5f66e bt: host/classic: Use proper flexible array
0 length array is a GNU extension. Use proper C99 flexible
array.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-09-03 13:49:31 +03:00
Flavio Ceolin
1441a5a9dc bt: controller/openisa: Use proper flexible array
0 length array is a GNU extension. Use proper C99 flexible
array.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-09-03 13:49:31 +03:00
Flavio Ceolin
e50da84e74 bt: host/classic: Use proper flexible array
0 length array is a GNU extension. Use proper C99 flexible
array.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-09-03 13:49:31 +03:00
Flavio Ceolin
bb66123ecd bt: controller/util: Use proper flexible array
0 length array is a GNU extension. Use proper C99 flexible
array.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-09-03 13:49:31 +03:00
Flavio Ceolin
6f0e9caa9c bt: audio: Use proper flexible array
0 length array is a GNU extension. Use proper C99 flexible
array.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-09-03 13:49:31 +03:00
Jun Lin
e9d470b2f4 ec_host_cmd: shi: npcx: not reset when receiving bad data
When the SHI driver receives data from the host and finds it is invalid
(due to a checksum error or an unsupported protocol version),
it currently resets the state machine, initializes the output buffer,
and waits for CS de-assertion. Upon CS de-assertion, the driver resets
the state machine and initializes the output buffer again. This commit
removes the first redundant reset and re-initialization in the function
`shi_npcx_bad_received_data()`, improving the driver’s efficiency.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2025-09-03 06:09:25 +02:00
Vinayak Kariappa Chettimada
230df77993 Bluetooth: Controller: Relax radio packet pointer assignment deadline
Relax the radio packet pointer assignment deadline assertion
until access address being transmitted. The PDU buffer is
probably only needed just after access address is being
transmitted or received by the radio. This will give some
more breathing room for slow CPUs like in nRF51x SoCs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-09-03 01:36:57 +02:00
Pisit Sawangvonganan
fa3f2e1b2a modbus: serial: rename rtu_tx_adu to modbus_rtu_tx_adu
Renamed the static function `rtu_tx_adu` to `modbus_rtu_tx_adu`
for naming consistency with `modbus_rtu_rx_adu`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-09-03 01:10:49 +02:00
Syver Haraldsen
6331225c94 storage/stream_flash: Add API to query buffered data size
add a wrapper function to read the number of bytes currently buffered
and pending for the next flash write operation.

Signed-off-by: Syver Haraldsen <syver.haraldsen@nordicsemi.no>
2025-09-02 18:42:45 +02:00
Charles Hardin
633246a3ea net: dns: add query support for additional types CNAME, SRV, and TXT
These types are useful for IoT deployments and should be available
thru the resolver interface to get the data. The SRV is especially
useful to find services on the local network when not using a dns-sd
deployment and just something like Avanhi or Bonjour.

Signed-off-by: Charles Hardin <ckhardin@gmail.com>
2025-09-02 18:42:35 +02:00
Charles Hardin
b60ae6fb1a net: dns: only add periods between labels and not on the first label
When resolving SRV records - the label might not be compressed so
the first entry into the net buf is the start of the name and a
period could end up at the start - ie. ".example.local" so only add
a period when the buffer is not empty.

Signed-off-by: Charles Hardin <ckhardin@gmail.com>
2025-09-02 18:42:35 +02:00
Charles Hardin
ece1ed567b net: dns: adjust the enum for response type to be positive on success
The enum will auto increment, so in debug the IP and DATA records are
negative numbers which initially made this look like an error, so just
push the expected good values to be positive numbers in case of a print
or something else would imply these are ok.

Signed-off-by: Charles Hardin <ckhardin@gmail.com>
2025-09-02 18:42:35 +02:00
Emil Gydesen
2dc358cee2 Bluetooth: ISO: Add check to prevent premature BIG termination
There was an issue where terminating the BIG while in the
ISO connected callbacks could lead to continueing the loops
would cause access to cleared memory.

The simple solution to this is to simply prevent
bt_iso_big_terminate from terminating the BIGs while we are
processing the BIG HCI events.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-09-02 18:42:04 +02:00
Emil Gydesen
258e793cc8 Bluetooth: ISO: Shell: Fix bcode for big_create
The broadcast code was attempting to read from argv[1] instead
of argv[2] that actually contains the broadcast code.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-09-02 18:41:32 +02:00
Theis Mejnertsen
aca602f2d0 fs: zms: add input validation of fs pointer for api
Add checks on the fs pointer passed through the api before using to
avoid causing an exception

Signed-off-by: Theis Mejnertsen <theismejnertsen@gmail.com>
2025-09-02 15:54:17 +02:00
Theis Mejnertsen
4e4482205f fs: zms: make zms_active_sector_free_space return type signed
zms_active_sector_free_space is documented to return -EACCES on fs not
mounted error but currently returns an usigned type size_t. This fixes
that by changing the return value into a ssize_t

Signed-off-by: Theis Mejnertsen <theismejnertsen@gmail.com>
2025-09-02 15:54:17 +02:00
Emil Gydesen
600010cf5f Bluetooth: BAP: Switch to new USB stack for BAP shell
Modify the BAP shell to use the new USB stack, as the current
one used is now deprecated.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-09-02 12:33:11 +02:00
Emil Gydesen
4059d5b6a7 Bluetooth: CAP: Implement bt_cap_initiator_broadcast_foreach_stream
Implement the function bt_cap_initiator_broadcast_foreach_stream that
allows users to iterate on all BAP streams in a BAP broadcast source.
This can be used to easily get references to other broadcast streams in
the same group.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-09-02 11:10:22 +02:00
Pavel Vasilyev
427cf0da6a bluetooth: mesh: pb_adv: check SegN in Transaction Continuation PDU
Check that SegN is not 0. SegN = 0 is invalid as the first segment is
sent in Transaction Start PDU.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2025-09-02 11:09:59 +02:00
Emil Gydesen
90e5b7d658 Bluetooth: Shell: Only add broadcast audio val one place
Instead of add BT_UUID_BROADCAST_AUDIO_VAL for either BAP or
CAP, we now only do it one place (in BAP). This can now be done
since the default_source.broadcast_id was recently added.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-09-01 16:41:05 +02:00
Emil Gydesen
6fe1474225 Bluetooth: Audio: Shell: Store broadcast_id statically
Add a broadcast_id field in broadcast_source so that it can be
lookup later, which is useful for doing broadcast assitant
procedures on a local broadcast source.

The broadcast ID is now created at the same time as the
broadcast source(s), instead at the time of retriving
the advertising data.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-09-01 16:41:05 +02:00