Commit graph

21541 commits

Author SHA1 Message Date
Benjamin Cabé
e92468c7a6 llext: adopt SHELL_HELP macro
adopt structured help message in llext shell

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-21 18:34:08 +02:00
Anas Nashif
bd8597c9d7 x86: rename DEBUG_INFO to X86_DEBUG_INFO
This is an X86 specific option and should not appear as generic debug
option.

Fixes zephyrproject-rtos/zephyr#52929

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-06-20 14:43:42 -05:00
Benjamin Cabé
3b60dec110 bindesc: fix typo in errno (ENONET->ENOENT)
Fix typo in errno which isn't caught when building since ENONET
is also a valid code, despite not being defined (nor allowed?)
in Zephyr proper.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-20 13:21:39 -04:00
Johann Fischer
09752374c5 usb: device_next: rework CDC ACM serial for flash usage
Allow optimization if high speed is not supported. Unify strings for
error logging. Allow the application to enable/disable the USB device.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-20 16:23:34 +02:00
Johann Fischer
635a006da7 usb: device_next: bt_hci: drop high-speed descriptors table if not used
If high-speed is not supported, drop the high-speed descriptors table.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-19 22:36:51 -07:00
Johann Fischer
d2e42c99ac usb: device_next: bt_hci: do not take semaphore if transfer enqueue fail
Do not take semaphore if transfer enqueue fails.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-19 22:36:51 -07:00
Johann Fischer
96422f262e usb: device: fix Bluetooth buffer handling
In both implementation, when comparing received data length take into
account that the buffer obtained from bt_buf_get_tx() stores the type at
the top. The buffer types are H:4 and in the TX path we need to check for
BT_HCI_H4_* types not BT_BUF_*.

In the legacy implementation, the hci_acl_pkt_len() function obtains the
length from the USB transaction buffer, which does not contain a buffer
type at the top.

In the new implementation, partially revert the changes and restore
hci_pkt_get_len(), this will be required for any further changes anyway.

Fixes commit f85d63a6cc ("Bluetooth: Remove USB H4 mode support").

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-19 22:36:51 -07:00
Johann Fischer
76579d21ab usb: device_next: allow to limit number or digits in serial number
Add Kconfig option to limit the length requested from HWINFO to a
meaningful number of digits. Also, check the length returned by the
HWINFO driver and rename the variables to a more suitable name.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-19 14:04:31 +02:00
Johann Fischer
452a53ba1a usb: device_next: hide Kconfig option USBD_MSG_SLAB_COUNT if not used
If deferred mode is not being used, hide the USBD_MSG_SLAB_COUNT option.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-19 14:04:31 +02:00
Luca Burelli
741c5b5a98 llext: rework debug code in llext_link
This removes 'return' statements affecting code flow from debug code in
llext_link(). Also, all valid relocations are tried before returning an
error, so that the user can see all the errors (most likely missing
symbols) at once.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-06-19 14:00:11 +02:00
Jamie McCrae
0adcf2e66d mgmt: mcumgr: grp: os_mgmt: Add optional boot mode for reset
Adds an optional boot mode field which can be used to boot into a
specific image or mode using MCUmgr's OS mgmt reset command

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-06-18 17:48:44 -04:00
Anas Nashif
d20a52c4aa ztest: add missing break statement in ztest_test_pass function
Adds missing break in switch statement.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-06-18 17:48:03 -04:00
Jukka Rissanen
9a0e9be8c3 net: shell: dns: Add service discovery command
Add "net dns service <dns-service-name>" which can resolve
service names like "_http._tcp.dns-sd.org" described in DNS-SD
RFC 6763.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-18 09:08:41 -04:00
Jukka Rissanen
7799f0c994 net: dns: Allow user to specify max answer length via Kconfig
If the default max. answer length of 512 bytes is not enough,
user can specify it by setting CONFIG_DNS_RESOLVER_MAX_ANSWER_SIZE
to suitable value.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-18 09:08:41 -04:00
Jukka Rissanen
cf8b7d715d net: dns: Add service discovery support
Allow PTR queries with dns_resolve_service() API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-18 09:08:41 -04:00
Rubin Gerritsen
b63b993491 Bluetooth: Decode Bluetooth 6.1 version number
Bluetooth 6.1 has version number 0x0F and was released in May 2025.
This commit ensures this version number is properly decoded.

Going forward we may consider removing printing the version
number as a string because the feature set is more important
than the version number.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2025-06-18 10:56:34 +02:00
Jukka Rissanen
2ed2232f17 net: socket: mgmt: Create proper socket options for net_mgmt sockets
We cannot use the network management event number directly as
a socket option value because the management value is uint64_t
and that cannot be mapped directly to 32 bit integer.
So have an intermediate socket option that is mapped to actual
network management request number in getsockopt() and setsockopt().

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-18 10:54:44 +02:00
Jukka Rissanen
5a9a39caf3 net: mgmt: Convert the mgmt API to use 64-bit masks
Instead of using 32 bit enum values for event numbers, convert
the code to use 64 bit long bit fields. This means that the
user API is changed to use 64 bit event values instead of 32
bit event values.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-18 10:54:44 +02:00
The Nguyen
f51a89268f tracing: fix build error on USB backend
This commit to fix build error due to a wrong syntax in case USBD
highspeed was enabled

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-06-18 10:54:32 +02:00
Tim Pambor
58527c1020 input: Fix function signature of input_thread
Update the input_thread function signature to match the expected
k_thread_entry_t type:
typedef void (*k_thread_entry_t)(void *p1, void *p2, void *p3);

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-06-18 07:41:25 +02:00
Benjamin Cabé
1032dd47b2 net: coap: fix offset typo in insert_be16
Fix usage of the wrong variable in insert_be16 which could cause
insertion at the wrong offset.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-18 07:40:12 +02:00
Benjamin Cabé
312bea8cae net: socket: use proper tracing macro for socketpair()
SYS_PORT_TRACING_OBJ_FUNC_* are for when the function being
traced is a method of an object. Use SYS_PORT_TRACING_FUNC_* instead.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-18 07:38:44 +02:00
Daniel Leung
3fbd7dfb75 debug: gdbstub: add arch_gdb_post_memory_write()
This adds an architecture-specific post processing after memory
writes. This introduction is due to GDB's behavior regarding
breakpoints in code. GDB may choose to write break instructions
instead of using hardware breakpoints to interrupt code
execution (e.g. for manual breakpoint or stepping through code).
There is no separate GDB packet type for this. So we need to
make an assumption that a memory write may be to setup break
instructions. Different architectures may have their own unique
ways of dealing with instruction cache in this situation. So we
defer to the architecture code to handle this.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-06-17 16:27:27 -05:00
Pieter De Gendt
b3316fc4fd net: l2: wifi: shell: Fix passphrase long opt help text
A passphrase needs to be passed with --passphrase instead of --psk.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-17 17:47:11 +02:00
Joakim Andersson
2e5a03877f net: tls_credentials_shell: Add credential buffer load argument
Add argument to the TLS credential `cred buf` command that enables
a shell bypass to write the TLS credential directly to the credential
buffer.
This is useful for writing load credentials that cannot fit in a single
`cred buf` command and would otherwise have to be split into multiple
cred buf commands.
Sending multiple in succession like that from a script for example very
easily causes the shell RX buffer to get full, resulting in multiple
`RX ring buffer full.` warnings.
This is very difficult for a script to handle.

Using a bypass has much better performance and can easily avoid the
RX ring buffer full condition without increasing the RX ring buffer
to much.
It is also easier for a script to use.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2025-06-17 17:45:26 +02:00
Guennadi Liakhovetski
53a179ac4e llext: make unresolved symbol errors fatal
With experience it becomes clear, that failing to resolve symbols
during the linking process is likely fatal for the module loading and
a simple warning isn't enough. Fail loading instead.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2025-06-17 16:09:50 +02:00
Jukka Rissanen
8704b3add7 net: ppp: Bind DNS to device ppp network interface
Make sure received DNS server information is bound to the
ppp network interface.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-17 16:08:56 +02:00
Jukka Rissanen
57c452fb79 net: shell: conn: Print packet socket information correctly
The "net conn" command printed AF_PACKET socket as AF_UNK(3).
Fix this by printing "AF_PACKET" in this case.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-17 16:08:56 +02:00
Jukka Rissanen
cb9052459a net: dns: Properly cleanup DNS servers per network interface
Make sure we cleanup only those DNS servers that belong to
certain network interface when the interface goes down.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-17 16:08:56 +02:00
Jukka Rissanen
248cb3d251 net: dhcpv6: Honor network interface for DNS servers
Bind the network interface to the network interface we
have received the DNS servers from. This is now the default.
The previous behavior can be restored by disabling the
CONFIG_NET_DHCPV6_DNS_SERVER_VIA_INTERFACE option.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-17 16:08:56 +02:00
Jukka Rissanen
1224c5a43a net: dhcpv4: Honor network interface for DNS servers
Bind the network interface to the network interface we
have received the DNS servers from. This is now the default.
The previous behavior can be restored by disabling the
CONFIG_NET_DHCPV4_DNS_SERVER_VIA_INTERFACE option.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-17 16:08:56 +02:00
Jukka Rissanen
2af5dba995 net: dns: Allow reconfiguration with network interfaces
Allow user to specify which network interfaces to bind the
server to when reconfiguring the DNS system.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-17 16:08:56 +02:00
Fin Maaß
89006fbe1b net: shell: iface: support deactivating auto-neg
support deactivating auto-neg in face shell.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-17 16:08:22 +02:00
Fin Maaß
f24426b31f drivers: net: ethernet: phy: add support for disabling auto-negotiation
Add option in enum phy_link_speed to disable auto-negotiation.
This allows PHY drivers to support disabling auto-negotiation.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-17 16:08:22 +02:00
Keith Packard
f50ee8c1d3 fs/ext2: Missing error check in ext2_inode_remove_blocks
Don't assume that get_level_offsets will succeed.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
97f96afbd7 linker_script: Remove all SUBALIGN usage for iterable sections
SUBALIGN forces alignment to the specified value, even if the object
requires stricter alignment. This causes mis-aligned access when accessing
the resulting value.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Filip Kokosinski
15b73eda7d subsys/tracing: select backend name in Kconfig
This commit allows tracing backend name selection through Kconfig.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2025-06-17 16:05:59 +02:00
Filip Kokosinski
ef20311522 subsys/tracing: add names to Kconfig choice symbols
This commit adds names to Kconfig choice sysmbols. This allows for their
selection from Kconfig, e.g.:

    choice TRACING_FORMAT_CHOICE
    	default TRACING_TEST if CONFIG_FOO
	default TRACING_CTF if CONFIG_BAR
    endchoice

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2025-06-17 16:05:29 +02:00
Tommi Kangas
941dcd31e7 shell: Make TX mutex timeout configurable
The 50 ms TX mutex timeouts introduced in commit b0a0feb cause
dropped messages when used with the shell log backend. This
commit makes time timeout configurable using the
CONFIG_SHELL_TX_TIMEOUT_MS Kconfig option and makes the
default timeout longer when shell log backend is enabled.

Link: #90215

Signed-off-by: Tommi Kangas <tommi.kangas@nordicsemi.no>
2025-06-17 16:05:20 +02:00
Emil Gydesen
6885a368d4 Bluetooth: Host: Add advertising state to bt_le_ext_adv_info
The bt_le_ext_adv_info struct has been extended to also
contain the advertising and periodic advertising states.

Additionally, the function verifies the input to avoid
NULL pointer access, and the addr field is more
properly documented.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-06-17 16:04:42 +02:00
Glenn Andrews
94084e5aba Lib: SMF: Add return code to signal event propagation
See Discussion https://github.com/zephyrproject-rtos/zephyr/discussions/83659
for information about the purpose of this change.

Modifies run actions of hierarchical state machines
to return a value indicating if the event was handled
by the run action or should be propagated up to the
parent run action. Flat state machines are not affected,
and their run action returns void.

smf_set_handled() has been removed and replaced by
this return value. smf_set_state() will not propagate
events regardless of the return value as the transition
is considered to have occurred.

Documentation, tests, samples, has been updated.
USB-C and hawkBit use SMF and have been updated to use
the new return codes.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2025-06-17 16:04:04 +02:00
Glenn Andrews
1bee2920f9 Lib: hawkBit: apply clang-format
Apply clang-format in preparation for code changes.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2025-06-17 16:04:04 +02:00
Glenn Andrews
d4a9cc12b9 Lib: USB-C: Apply clang-format
Apply clang-format to USB-C in preparation for code changes

No code is changed, only formatting.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2025-06-17 16:04:04 +02:00
Johann Fischer
1174308df8 tracing: port USB backend to the new USB device stack
Port USB backend to the new USB device stack.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-17 16:03:44 +02:00
Emil Gydesen
2ab5882e0b Bluetooth: CAP: Add cap_unicast_group API
Adds a new abstract struct for unicast group that is
specific for CAP. The difference between this and the BAP
unicast group, is that the parameters are CAP streams and
thus ensuring that the streams in the group adhere to the
additional requirements that CAP has on top of BAP.

This also adds foreach functions for both CAP and BAP
to allow users to iterate on the streams in the
abstract groups.

Various samples, modules and tests have been updated
to use the CAP struct and API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-06-17 08:20:25 +02:00
Benjamin Cabé
1387657107 net: dns: remove redundant check in mdns_unpack_query_header
Drop this redundant check that was likely meant to be checking that Z
field is zero but in the case of reception the RFC says it MUST be
ignored anyway.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-16 14:04:59 -04:00
Benjamin Cabé
179045e5a5 net: mdns_responder: fix wrong context when rescheduling IPv6 probe
Use ipv6 context, not ipv4

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-16 08:31:32 +02:00
Benjamin Cabé
453d2367ef net: dhcpv6: fix typo in macro name
DHVP -> DHCP

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-16 08:29:47 +02:00
Benjamin Cabé
c7e7d977c2 input: input_utils: use proper sizeof
Would have not directly caused issues, but better to fix it :)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-16 04:27:44 +02:00
Benjamin Cabé
9652ac5d16 input: input_hid: add missing const qualifier
HID lookup table can live in Flash and save some RAM (quite a bit
actually, as it's quite large!).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-16 04:27:44 +02:00