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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Updated in-system profiling for CPU usage with on target
measurements and added assertion checks.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
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>
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>
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>
This update was seemingly forgotten when additional image support
was added to supporting MCUboot files
Signed-off-by: Jamie McCrae <spam@helper3000.net>