Commit graph

24,075 commits

Author SHA1 Message Date
Mathieu Choplain
aaee496010 mgmt: ec_host_cmd: backends/stm32_spi: configure proper DMA burst length
The burst length unit is bytes, not number of transfers. This had not been
an issue since the DMA driver historically ignored the values, but has now
become one since they are used and (most importantly for us) validated.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-12-04 05:23:02 -05:00
Nicholas Lowell
d98ec13320 logging: add all format options to Kconfig and std_get_flags()
Some but not all LOG_OUTPUT_ format flags were Kconfigurable
for log backends using log_backend_std_get_flags()

Adding the missing configurable flags to Kconfig and referencing
them in log_backend_std_get_flags() for full control of output:
- CRLF_NONE
- CRLF_LFONLY
- SKIP_SOURCE

FORMAT_SYSLOG was omitted b/c it is specific to NET log backend.

Signed-off-by: Nicholas Lowell <Nicholas.Lowell@lexmark.com>
2025-12-04 06:33:40 +00:00
Chaitanya Tata
466d18d19c net: l2: wifi_shell: Fix MFPR handling
When protocol says MFP is required for WPA3, no point in asking user and
then validating.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-12-03 15:36:47 -05:00
Damian Krolik
6402a58f34 debug: coredump: stack top limit for current thread
Extend the functionality to limit the number of stack bytes
included in the core dump by allowing the limit to be
different for the current thread and remaining threads.

This is useful because it is more likely that we need more
call frames of the thread that was running when the
exception occurred than of the other threads in order to
analyze the exception.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2025-12-03 10:40:00 -05:00
Pavel Vasilyev
9227a7c131 bluetooth: buf: Fix callback protection for ISR context
Fix assertion failure when buf_rx_freed_notify() is called from ISR
by replacing k_sched_lock with atomic_ptr operations for callback
pointer access.

The scheduler lock is retained during callback execution in thread
context to maintain backward compatibility, but is skipped in ISR
context where it's not available.

Updated documentation to clarify the behavior difference between
thread and ISR contexts.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2025-12-03 10:38:47 -05:00
Robert Lubos
2c21048ade net: core: Verify interface state in net_try_send_data()
Verify that the interface is in operational UP state before attempting
to send the packet with net_send_data() / net_try_send_data().

So far there's only been an NET_IF_LOWER_UP check in a lower level
function, net_if_try_send_data(), however that didn't work well with
interface like Wi-Fi, whouch could have carrier state set to ON, but
was still not associated with the network (so the interface was no
operational UP). Protocols like ICMP or DHCP, which use net_send_data()
directly, should not be able to send packets in such case.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-12-03 09:12:58 -05:00
Aleksandr Khromykh
00fdcf0582 bluetooth: mesh: lpn shouldn't relay messages received over friendship
Commit fixes the issue when lpn device relays
broad- and group cast messages received over
friendship queue. This is specification violation,
see Table 3.13: Network layer Network PDU retransmission
requirements. Also, it does not have sense since
sending messages have already happened and lpn
just consumes extra power to retransmit useless data.
In general, lpn device will be more power efficient after
this fix.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2025-12-03 11:44:34 +01:00
Make Shi
8a5657427e Bluetooth: AVRCP: Mask invalid bit in absolute volume
PTS may send absolute volume values with bit 7 set, which exceed the
valid range. Instead of rejecting these values, mask the invalid bit
to ensure compatibility.

Signed-off-by: Make Shi <make.shi@nxp.com>
2025-12-03 11:41:55 +01:00
Make Shi
d58782fe1a Bluetooth: AVRCP: Return INVALID_COMMAND when PDU ID is invalid
Added a check in the vendor dependent handler to ensure the PDU ID
matches supported command handlers. If the PDU ID or command type
is invalid, respond with BT_AVRCP_STATUS_INVALID_COMMAND.

Signed-off-by: Make Shi <make.shi@nxp.com>
2025-12-03 11:41:55 +01:00
Radosław Koppel
9b35906861 Bluetooth: GATT: Simplify GAP write_name and apperance_write
Update write_name function to check the offset value against 0 as long
writes are not used here.
Simplify write_appearance function also to remove long writes support.
The appearance property is always 16 bit and is should not even support
long writes.

Signed-off-by: Radosław Koppel <r.koppel@k-el.com>
2025-12-02 18:40:50 -05:00
Vinayak Kariappa Chettimada
57e8cf516c Bluetooth: Controller: Fix BT_CTLR_LOW_LAT scan disable hang
When using BT_CTLR_LOW_LAT and LLL_PRIO equals ULL_LOW_PRIO,
add missing mayfly_enable() call for ULL_LOW execution
context, without this ticker_stop() does not get processed.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-12-02 15:22:52 -05:00
Trond F. Christiansen
46eca1e3a9 zbus: add zbus_chan_from_name() function
Add a new API function zbus_chan_from_name() that allows retrieving a
zbus channel by its name string. This complements the existing
zbus_chan_from_id() function and provides more flexibility for channel
lookup operations.

The implementation is conditionally compiled when CONFIG_ZBUS_CHANNEL_NAME
is enabled, ensuring it's only available when channel names are configured
in the system.

Signed-off-by: Trond F. Christiansen <trond.christiansen@nordicsemi.no>
2025-12-02 15:19:32 -05:00
Valerio Setti
597fc3bbe1 jwt: remove support for legacy RSA crypto
CONFIG_JWT_SIGN_RSA_LEGACY was already deprecated, but we agreed on
removing all usages of legacy Mbed TLS crypto from Zephyr codebase quickly
in order to prepare for the transition to Mbed TLS 4.0/TF-PSA-Crypto 1.0.

Therefore this commit remvoes support for CONFIG_JWT_SIGN_RSA_LEGACY
before the deprecation period expires.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-12-02 16:14:11 +00:00
Yangbo Lu
8c95e841ec net: dsa: use snprintk instead of snprintf
Used snprintk instead of snprintf as snprintk is compatible
across platforms.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-12-02 11:45:19 +01:00
Yangbo Lu
b46db1e2ea net: net_if: use debug level message for iface down
Dropping packet is normal operation when iface is down.
So, we don't have to use warning here for much noise.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-12-02 11:45:19 +01:00
Yangbo Lu
44463a42d8 net: bridge: enable IPv4/IPv6 support
Ethernet bridge performs L2 forwarding between bridged interfaces.
But for the virtual bridge interface, we could make it perform as
normal Ethernet interface with IP address to use.

This is useful allowing applications to communicate with network,
like LAN router or switch with a host IP.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-12-02 11:45:19 +01:00
Yangbo Lu
684957e9c1 net: bridge: add forward decision support
Added forward decision support including for broadcast,
multicast and local address packets.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-12-02 11:45:19 +01:00
Yangbo Lu
27b8d65b77 net: ethernet: support bridge RX
Added support for bridge RX. We were going to support protocols
on bridge.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-12-02 11:45:19 +01:00
Yangbo Lu
7d22828642 net: bridge: handle RX in bridge_input.c
Current bridge function is very simple which does forwarding for all
packets. There will be more and more features of bridge RX handling.

Let's move bridge RX handling to bridge_input.c for next IPv4/IPv6
protocols support for virtual bridge interface.

And currently there is no path to call bridge_iface_recv function.
Let's rework it for proper function returning NET_CONTINUE.

Also fixed another issue of link local address checking. Because
net_linkaddr structure changed. So fixed

is_link_local_addr((struct net_eth_addr *)net_pkt_lladdr_dst(pkt))

to

is_link_local_addr((struct net_eth_addr *)(net_pkt_lladdr_dst(pkt)->addr))

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-12-02 11:45:19 +01:00
Yangbo Lu
3361dd1939 net: bridge: move bridge files to folder
Moved bridge files to folder to manage. More bridge features
and files will be added in the future.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-12-02 11:45:19 +01:00
Pavel Vasilyev
6da559f565 bluetooth: host: Fix stale RPA usage after invalidation
Add !BT_ADV_RPA_VALID check to force RPA regeneration when re-enabling
an advertising set after RPA rotation occurred while disabled.

The BT_ADV_RANDOM_ADDR_UPDATED flag was added to prevent unnecessary
address regeneration (RPA/NRPA) between bt_le_ext_adv_param_set() and
bt_le_ext_adv_start() calls. However, this revealed an issue:

When RPA rotation (le_force_rpa_timeout) occurs while an advertiser is
disabled, BT_ADV_RPA_VALID is cleared but the RPA is not regenerated.
On subsequent bt_le_ext_adv_start() without a new param_set() call:
- BT_ADV_RANDOM_ADDR_UPDATED is already cleared (from previous start)
- Without BT_PER_ADV_ENABLED, no regeneration occurs
- Stale RPA is used, violating privacy requirements

Add !BT_ADV_RPA_VALID check for both connectable and non-connectable
advertisers to ensure fresh RPA generation when the previous RPA was
invalidated while the advertiser was disabled.

Fixes regression introduced in #98117.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2025-12-02 11:40:39 +01:00
Jordan Yates
e401209af0 bluetooth: host: name AUTO_PHY choices
Add names to the automatic PHY update choices so the defaults can be
updated.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-12-02 11:22:38 +01:00
Carles Cufi
a264b54f37 drivers: nrf: Clean up remnants of nrfx error codes
Starting with nrfx 4.0.0, the nrfx_err_t, NRFX_SUCCESS and NRFX_ERROR_*
have been deprecated. Most of them were removed here:

https://github.com/zephyrproject-rtos/zephyr/pull/99399

but a few were missed.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-12-01 12:26:18 -05:00
Simon Piriou
f186218e42 net: l2: ieee802154: add support for MLME coordinator address
There are two ways in the current implementation to join a network,
either with an association request or a via MLME-SET(macShortAddress) to
rejoin a previously associated network.

The coordinator address needs to be valid in the rejoin case. It can be
lost, for example if the device power cycles. This commit fixes that gap
with new MLME GET/SET for:
- macCoordShortAddress
- macCoordExtendedAddress

Signed-off-by: Simon Piriou <spiriou31@gmail.com>
2025-12-01 12:24:05 -05:00
Simon Piriou
b87b17502f net: l2: ieee802154: skip filter removal for unassociated values
Trying to remove filter with NOT_ASSOCIATED parameter results in noisy
warning logs in most of the radio drivers. It's safe to ignore it as
this is an invalid operation.

Signed-off-by: Simon Piriou <spiriou31@gmail.com>
2025-12-01 12:23:56 -05:00
Maksim Salau
1eaceb448f cfb: Skip non-existent font glyphs
The change ensures that returned glyph exists in the current font.

Signed-off-by: Maksim Salau <maksim.salau@gmail.com>
2025-12-01 12:23:41 -05:00
Ivan Pankratov
a44583c8f4 dts: bindings: Rename gpio-radio-coex to radio-gpio-coex
Rename GPIO coex binding to use 'radio-' prefix for consistency with
other radio bindings (radio.yaml, radio-fem-two-ctrl-pins.yaml).

Updated beacon sample overlay and coex documentation.

Signed-off-by: Ivan Pankratov <ivan.pankratov@silabs.com>
2025-12-01 12:22:33 -05:00
Ivan Pankratov
6ccc58a8f6 dts: bindings: Rename generic-fem-two-ctrl-pins to radio-fem-two-ctrl-pins
Rename generic FEM binding to use 'radio-' prefix for consistency with
other radio bindings (radio.yaml, ble-radio.yaml).

Updated 3 board files, Nordic BLE controller HAL, documentation, and
test overlays. Added missing settle-time properties to pan1783a board.

Signed-off-by: Ivan Pankratov <ivan.pankratov@silabs.com>
2025-12-01 12:22:33 -05:00
Kevin Zeng
ada3aad811 assert: Add an option for a custom assert header
Similar to logging and shell, allow application to override and
extend the ASSERT macros globally. This enables intercepting log strings
at the macro level for things like string tokenizations.

Signed-off-by: Kevin Zeng <zengk@google.com>
2025-12-01 12:22:03 -05:00
Pieter De Gendt
d9be161571 nvmem: Verify device readiness before read/write
Verify the NVMEM controller device state before reads/writes.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-12-01 12:21:52 -05:00
Andrea Gilardoni
53eaf0f71e llext: llext_priv: INSTR_FETCHABLE missing parentheses in definition
C macro INSTR_FETCHABLE is missing parentheses in its definition,
this could lead to incorrect expansion when combined with logical
operators

Signed-off-by: Andrea Gilardoni <a.gilardoni@arduino.cc>
2025-12-01 08:32:11 +01:00
Lyle Zhu
05dc860f11 Bluetooth: Classic: A2DP: Fix out of bounds issue
This is a negative detection. The conn index should be never out of
bounds of the array `connection`. Because the size of the array is
`CONFIG_BT_MAX_CONN`.

To improve the readability, add a `__ASSERT` checking to check if the
conn index is out of bounds.

CID 487769

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-12-01 08:31:26 +01:00
Lyle Zhu
e586213417 Bluetooth: Classic: SDP: Fix out of bounds issue
This is a negative detection. The conn index should be never out of
bounds of the array `bt_sdp_client_pool`. Because the size of the
array is `CONFIG_BT_MAX_CONN`.

To improve the readability, add a `__ASSERT` checking here. Check
whether the conn index is out of bounds.

Fix #99985

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-12-01 08:31:19 +01:00
Lyle Zhu
2b827d31fc Bluetooth: Classic: conn: Fix br conn cannot be found issue
There is a corner case that the connect complete event is notified
before the function `bt_hci_cmd_send_sync()` returns. Because the
created conn object is in the state of `BT_CONN_DISCONNECTED`, it
cannot be found in the connect complete event. As a result, the
connect can not established normally.

Fix the issue by setting the connect state and role before calling
the function `bt_hci_cmd_send_sync()`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-12-01 08:30:53 +01:00
Jisheng Zhang
30c5c7c8a8 logging: backend: swo: use DCB instead of CoreDebug
commit a763207962 ("arch: arm: dwt: use the cmsis_6 macro
unconditionally") use cmsis_6 macro unconditionally, we can use DCB
instead of CoreDebug macro unconditionally.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
2025-12-01 08:26:46 +01:00
Valerio Setti
1969f493e3 net: lib: midi2: remove unnecessary cipher selection in mbedtls-shim driver
Cipher support is already implied by default so there is no need to
select it explicitly.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-12-01 08:26:29 +01:00
Valerio Setti
3a6f0879c4 mgmt: osdp: remove unnecessary cipher selection in mbedtls-shim driver
Cipher support is already implied by default so there is no need to
select it explicitly.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-12-01 08:26:29 +01:00
Aurelien Jarno
78a3890acb net: mqtt_sn: udp: enforce maximum address size at build time
Introduce BUILD_ASSERT checks in the UDP transport implementation to
ensure the configured maximum address size is large enough for the
enabled IP families.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2025-11-28 22:10:40 +00:00
Aurelien Jarno
05b9ffb390 net: mqtt_sn: document address size and add support for IPv6
Add guidelines in Kconfig explaining the minimum required
MQTT_SN_LIB_MAX_ADDR_SIZE for UDP transport and IPv4 and or IPv6. Also
explain when this value might need to be changed.

Use these values to provide a sane default for IPv4 and IPv6.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2025-11-28 22:10:40 +00:00
Lyle Zhu
57b99f5846 Bluetooth: Classic: RFCOMM: Fix unchecked returned value issue
Check the return code of the function `bt_l2cap_br_server_register()`.

Fix #100016

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-28 17:26:21 +00:00
Vinayak Kariappa Chettimada
06cd4f5849 Bluetooth: Controller: Remove redundant Sync ISO must expire
Remove redundant Sync ISO must expire code that is not
planned to be implemented.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-11-28 17:25:50 +00:00
Vinayak Kariappa Chettimada
2ab41387a4 Bluetooth: Controller: nRF54Lx: Fix Radio Tx Power set
Fix incorrectly high Radio Tx Power being set as default.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-11-28 17:25:02 +00:00
Vinayak Kariappa Chettimada
6692264d22 Bluetooth: Controller: In-system profiling and CPU overhead assertions
Updated in-system profiling for CPU usage with on target
measurements and added assertion checks.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-11-28 17:24:09 +00:00
Vinayak Kariappa Chettimada
d82c1dcaec Bluetooth: Controller: In-system ticker_start and ticker_stop tests
Add in-system ticker_start and ticker_stop tests.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-11-28 17:24:09 +00:00
Robert Lubos
f908d0b5f2 net: shell: Verify array index during dynamic iface completion
Verify that the interface index, converted to array index,
 does not exceed the preallocated string array for dynamic index
completion.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-11-27 21:56:37 +01:00
Robert Lubos
852a1e8104 net: sockets: getnameinfo: Cast to sockaddr_in6 instead of sockaddr_in
As explained in the comment in the code, both structs have the same
offsets for it's fields, but sockaddr_in is smaller, hence it can
confuse static analyzer, giving warnings about potential out-of-bound
access. Therefore, cast to sockaddr_in6 instead to avoid the warning.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-11-27 21:55:12 +01:00
Emil Gydesen
4bd0c33cdd Bluetooth: CSIP: Only allow rank changes with set size changes
The rank cannot be notified and the function allowed for
just updated to the rank. The CSIS spec does not mention
the usecase, nor support, for changing the rank of a device.
The spec only seems to allow for dynamic changes to the set
size (and only during that can the rank be set).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-11-27 16:01:36 +01:00
Jamie McCrae
33a5c301a1 dfu: kconfig: Raise limit of MCUboot images to 8
This update was seemingly forgotten when additional image support
was added to supporting MCUboot files

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2025-11-27 14:46:40 +01:00
Jamie McCrae
5c713cd7d4 dfu: kconfig: Fix styling
Fixes this styling to be valid

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2025-11-27 14:46:40 +01:00
Jamie McCrae
6950bf2b42 dfu: boot: cmake: Fix styling
Fixes this styling to be valid

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2025-11-27 14:46:40 +01:00