Add early_disconnect test cases for iso/cis and l2cap/stress
to test the bluetooth stack handling of disconnects
while transmit is still in progress.
Signed-off-by: Mike J. Chen <mjchen@google.com>
Channel tx_queue purging on disconnect was inconsistently handled
by the different channels: iso, l2cap, l2cap_br.
iso channels handled purging in the tx_data_pull hook.
l2cap and l2cap_br did the purging in channel delete functions
and did not expect tx_data_pull to be called for a disconnected
channel. Their data_pull functions could return a ptr to a
net_buf that was still on the tx_queue, which is problematic
when the conn tx_processor unrefs the returned buffer resulting
in multiple calls to the buf destroy function.
To make things consistent and correct, remove the code that tries
to purge tx_queues in the tx_processor and only do purging in
the channels themselves when they are deleted/disconnected.
Also refactor and clarify referencing of the net_buf returned
by tx_data_pull. It was confusing who had a reference and
when, which could vary depending on the length of the original
buffer. There are three cases: the buffer length is less
than the tx.mps, greater the mps but less than the mtu so
requiring segementation but not fragmentation, or greater than
both mps and mtu so requiring both segmentation and fragmentation.
The conn layer would increase the refcnt if the length was
greater than the mtu, but not have any awareness of whether
the net_buf was still on the tx_queue or not.
Now it is the tx_data_pull callbacks responsibitity to increment
the reference count if it is returning a pointer to a net_buf
that it is still keeping on the tx_queue for segmentation purposes.
The conn layer will now always transfer that reference into a
fragment view and not conditional it on the length relative to
the mtu, and always decrement the reference to the parent when
the fragment is destroyed.
So there is no risk of decrementing a reference to a net buf
that might still be on a tx_queue, which simplifies error
handling in particular.
Also add error handling paths for when asserts are not enabled.
Signed-off-by: Mike J. Chen <mjchen@google.com>
When WDT_OPT_PAUSE_IN_SLEEP option is passed in set enableWait flag
in addition to the enableStop.
Fixes#86437
Signed-off-by: David Leach <david.leach@nxp.com>
Fix peripheral role assertion during connection update and
simultaneous flash operations.
prepare_cb: Actual EVENT_OVERHEAD_START_US = 6149
This happens due to instant latency at connection update
where the ticks_at_expire was in the past.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Write operations are not constant time on nRF54Lx SoCs and
depend on the previous value present versus new value to be
written. Hence, perform no more than one iteration.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Immediate log mode may use a lot of stack and hence may cause some stack
overflow on some boards.
Enable deferred log mode to have the least impact on the application.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Add condition to do the test pattern fixture test only if the test
pattern control was successfully set.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Demonstrate the crop/compose API by introducing 4 new
CONFIG options in order to define the crop area.
Moreover, if the selection API is available and if
the targetted size is different from the current crop
size, then try to apply a compose in order to reach
the targetted format size.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Instead of having a conf file for all variants of STM32N6570_DK,
set the necessary settings for any platform which has DCMIPP enabled.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Clarify expectations about the recently modified default variant of the
board.
Update migration guide to warn existing users about the change.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
as in mbox cases the ocram is used as code area, so shall not be used
as sram again. this is a typo introduced by
aec0355380
fixing: #82841
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
In HFP PTS, cases run fail with the log 'Bluetooth Profile Descriptor
List UUID (0x111E) is missing'.
With this patch, the affected cases can pass correctly.
Signed-off-by: Jiawei Yang <jiawei.yang_1@nxp.com>
Emphasize the role of maintainers in upholding the project's code of
conduct and fostering an inclusive environment for all.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add information about hostap IPC mechanism change that can save up to
6-8 kB memory when using native wifi stack.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This resolves an issue on MacOS where
`west sdk install` would fail when extracting
a `.tar.xz` package due to the command line
options selected by patool.
Signed-off-by: Mirko Covizzi <mrkcvzz@gmail.com>
The struct video_buffer are currently used with `struct k_fifo`, which
require them to preserve the first word of data for use by the kernel.
Move the first fields to make it possible to keep using video buffers in
FIFO safely.
Fixes#92526
Signed-off-by: Josuah Demangeon <me@josuah.net>
Rename and clarify the @defgroup SENSOR_AXIS_ALIGN to better reflect its
purpose. Replace the vague "DT Options" title with a more descriptive
name: "Sensor axis alignment DT options".
This improves documentation clarity for developers configuring sensor
orientation via Device Tree.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
This commit fixes the content of the log messages that appear when an
error occurs while applying the pinctrl.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
IRQ 1 is used by the LiteX timer, so we can't use it for the test:
gen_isr_tables.py: error: multiple registrations at table_index 1 for
irq 1 (0x1)
Existing section
['.irq.WEST_TOPDIR/zephyr/tests/kernel/gen_isr_table/src/main.c.0'],
new section .irq.WEST_TOPDIR/zephyr/drivers/timer/litex_timer.c.0
Has IRQ_CONNECT or IRQ_DIRECT_CONNECT accidentally been invoked on the
same irq multiple times?
Issue #92194
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Some boards fail to build arch.interrupt.gen_isr_table_local.riscv test
since this region is too small:
riscv64-zephyr-elf/bin/ld.bfd: zephyr/zephyr_pre0.elf section `.intList'
will not fit in region `IDT_LIST'
riscv64-zephyr-elf/bin/ld.bfd: region `IDT_LIST' overflowed by 239 bytes
This is a bogus memory region, so increasing it has no effect on the
final binary size.
Issue #92194
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Move the IronSide APIs to soc/nordic from drivers/firmware since
these are vendor specific APIs. The header files are now included
from <nrf_ironside/*.h>. Adjust code that uses these APIs accordingly.
Also move the DT binding for "nordic,ironside-call" from
bindings/firmware to bindings/misc.
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
nordic,entropy-prng does not exist in Zephyr (it is part of NCS)
but we have in both the nordic,nrf-cracen-ctrdrbg which is
an actual source of true entropy and works with this SOC.
Let's use that instead.
Fixes failures to build targeting the nrf54lm20dk any test/sample
which uses the entropy driver.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
By default west looks at the parents directory to find Zephyr base
directory. However, in the case the build directory is not a subdirectory
of zephyr base and the user run "ninja flash" directly from the build
directory, west fails to detect Zephyr base.
So, this patch explicitly add ZEPHYR_BASE in the environment.
Implementation notes:
* ZEPHYR_BASE is already set for ninja menuconfig in
cmake/modules/kconfig.cmake:201
* ZEPHYR_BASE seems better than --zephyr-base since the environment in
inherited
* BTW, --zephyr-base seems to not have any impact and seems broken
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
htons() takes uint16_t as argument. Add the 'u' suffix to the
TTL constants to ensure the correct unsigned type is used and to avoid
undefined behavior if these functions are implemented as macros using
bit shifts.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Refactored the code to use the standard struct in_addr for
representing IPv4 addresses instead of a uint32_t combined
with the custom IP_ADDR macro.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Verify if the block number isn't negative before processing it, to
prevent potentially undefined behavior. This was reported by the
undefined behavior sanitizer.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Replace i2s_write invocation with i2s_buf_write invocation for test sine
wave playback.
When CONFIG_USE_DMIC=n, this sample attempts to play back a test sine
wave encoded in sine.h. As the i2s_write treats the given buffer as a
memory slab, it overwrites parts of it, resulting in data corruption and
improper playback. i2s_buf_write accepts a buffer existing outside the
playback queue (heap).
Manually tested on mimxrt595_evk/mimxrt595s/cm33 where it was first
observed.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
SonarQube reports: cast from 'const struct _snode *' to 'struct _snode *'
drops const qualifier. Fix it by removing the const.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
(cherry picked from commit 7982ee0df13b7f9e54595f799e32f38c464b0f9e)
1. bt_sdp_discover may be called in two tasks at the same time:
(1) If the 2 calls are for 2 acl conns,
the same session may be new allocated to two acl conns.
(2) If the 2 calls are for the same acl conn, the same session should be
used.
Use the bt_conn_index to map acl conn with session to fix it.
2. fix that bt_sdp_discover may use one session that is disconnecting,
put req to reqs_next and process it after disconnected.
3. remove memset of session, reset each members individually.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
(cherry picked from commit dcbe5d7dc5d72ce0d2915cf2b291cc84a916a536)
Defaults cannot be overidden (even with configdefault extension), they
only work if the original symbol is defined after the override e.g.,
"drivers and then subsys/net" but for kernel symbols,the default value
overrides don't work due "kernel and drivers" order, the kernel defines
the original symbol with the default and then it cannot be overridden.
Move the kernel symbol override to the original definition to make it
affect. Else any sample that uses nRF70 but doesn't enable WPA
supplicant ends up with 1024 and crashes.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Using ms and converting to us is a bad idea as we still get ms
granualrity in us units. Use the proper API to get us granularity.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>