Fix regression in adding the state for Connection Parameter
Request being rejected where in Connection Parameter Request
Procedure state machine was prematurely reset before the
reject PDU was enqueued.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix missing initialization of ticks_to_offset value on
instantiation of new peripheral context.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix repeated offsets in LE Connection Parameter Request PDU
due to rounding errors. Use tick units of connection
interval to calculate the offset units.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix deferred Connection Parameter Request offset population
by introduction of explicit states waiting for the offset
calculations to complete in the ULL_LOW context.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix deferred Connection Update offset population by
introduction of explicit states waiting for the offset
calculation to complete in the ULL_LOW context.
Fixes#29636.
The problem was, in an encrypted connection the enqueued PDU
to be transmitted is encrypt in the prepare callback by the
hardware and swapped to a different buffer for transmission;
the deferred offset population did not reflect in the
transmitted PDU as it was filled in the cleartext buffer
while encryption completed into the encrypted buffer.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Update EDTT version to include increased Connection
Parameter Request Procedure test timeout calculations.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
MCUboot version with bugfix for following issue:
CONFIG_LOG_MINIMAL was replaced by
CONFIG_LOG_MODE_MINIMAL by
zephyrproject-rtos/zephyr#31404 which
broke MCUboot default build.
fixes#31640
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Use the @option directive to ensure the generated documentation links
to the specified Kconfig option.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Confirm that several ways of producing formatted output on the console
all work, and support evaluating the relative space requirements for
each.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This allows applications that may not use minimal libc avoid the cost
of a second printf-like formatting infrastructure by using printfcb()
instead of printf() for output. It also helps make sure that the
formatting support (e.g. floats) is consistent between user-directed
output and the logging infrastructure.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
A prototype missed the condition for its availability; another
documented arguments that are not present.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
cbprintf should not pull in stdio.h unless it needs to, specifically
to get the FILE type for prototyping the stream substitutions. The
unit test assumes that these functions are always declared. For unit
testing where Kconfig isn't involved we need to tell the build system
to always provide them.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Still seeing a few timeouts after recently bumping up the number of
builds. Bump this again to hopefully address the issue for now.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
i2c_shell uses "I2C_" label prefix to get the device. However, NPCX
uses controller-port architecture. Users should access the ports
instead of the controllers. Change I2C_CTRLX & I2CX_PORTX to I2CCTRL_X
& I2C_X_PORT_X to guarantee i2c_shell could get the correct device by
autocomplete.
Signed-off-by: Wealian Liao <WHLIAO@nuvoton.com>
As of today, Zephyr misses any kind of info page with overall
support status of ARC processors, their HW features and SW tools.
Fix that.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
SPARC systems take a huge penalty in stack usage due to register window
saves. A recent patch reverted SPARC-specific increases to various
stack sizes, causing this test to fail.
Other platforms are excluded because of stack limits, so do that here
too.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
These were removed in commit 6b58e2c0a3
but mistakenly reintroduced in
commit 51c34bb609
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Mcumgr-cli application doesn't accept log on the communication
channel. Since #30370 was merged log messages are generated from
MCUBOOT_UTIL by default. That made `mcumgr image upload` failing.
Patch disables logging via shell which cure the issue.
It is not necessary if another application on the host intercepts
log messages (like picocom can).
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
../src/main.c:662:13: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]
662 | int sock = (int)p1;
| ^
../src/main.c: In function 'spawn_child':
../src/main.c:671:4: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
671 | (void *)sock, NULL, NULL, 0, K_USER,
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Fix error introduced by pull request:
https://github.com/zephyrproject-rtos/zephyr/pull/31591
Zephyrs CMake extension function zephyr_library_sources_ifdef()
does not allow to use complex conditions to toggle if
sources should be included in build or not.
It allows to use only single variable as an input for
feature_toggle argument because it is double-expanded
in contition statement in the function.
In case there is a requirement that source file is included
when more complicated condition is true we have to fall-back
to reqular if() statement and zephyr_library_sources().
The fix is required because without it radio_df.c source
is never compiled. If DF functionality is enabled build
will fail because of missing functions implementation.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add a new Kconfig CONFIG_BUILD_OUTPUT_EFI and select that for boards
that want to generate an EFI application.
Make qemu_x86_64 also generate an EFI file, however do not enable this
by default yet.
Goal is to boot qemu using EFI to be able to test this path in the
future.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Added ap_enable and ap_disable api. The driver will open create an
access point with DHCP Server ip 192.168.1.1 and no security.
Added a small fix for the AF_INET issue.
Added parent and remote to accept routine context.
Added put implementation.
Signed-off-by: Nicolai Glud <nicolai.glud@prevas.dk>
Fixes: #30553
The `;` in a list must be escaped when used as for execute_process and
add_custom_target, as those functions are using `cmake -E env` to setup
correct environment before executing kconfig and menuconfig.
This commits escapes `SHIELD_AS_LIST` variable list correctly before
using it.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Both _IRQ_VECTOR_TABLE_SECTION_NAME and _SW_ISR_TABLE_SECTION_NAME
are defined with asterisk at the end in an attempt to include
all related symbols in the linker script. However, these two
macros are also being used in the source code to specify
the destination sections for variables. Asterisks in the name
results in older GCC (4.x) complaining about those asterisks.
So create new macros for use in linker script, and keep
the names asterisk free.
Fixes#29936
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Fix the documentation of the usage of --*-file, which were renamed from
--kernel-*.
Fixes#31630.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
We've already enabled full RAM mapping if ACPI is enabled, also
set a large 3GB address space size, these systems are not RAM-
constrained (they are PC platforms) and they have large MMIO
config spaces for PCIe.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
net_context contains both net_sock_type and net_ip_protocol, which are
static during the lifetime of net_context. net_context has basically the
ownership of esp_socket, so we can be sure 'type' and 'ip_proto' are
always accessible through net_context API.
Remove 'type' and 'ip_proto' members from 'esp_socket' structure, as
those are already accessible by net_context API.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Change type of esp_socket->flags from uint8_t to atomic_t, so that read
and write access to those flags is done in atomic (thread-safe) manner.
Introduce esp_socket_ref() and esp_socket_unref() functions, which
operate on atomic refcount variable. esp_socket_ref() role is to
increase refcount if it was already non-zero. If it was zero then NULL
is returned, which means that socket is not used by net_context at the
moment.
Role of refcount:
* socket instance is assured to be between net_offload->get() and
net_offload->put() when refcount > 0,
* makes sure that socket instance can be used (its members can be
dereferenced) when refcount > 0,
* 'context' member is always valid and its members can be dereferenced
when refcount > 0.
esp_socket_get() gets unused socket, as previously. Additionally it sets
refcount to 1 at the end of call, which basically means that from that
point such socket can be referenced by other parts of the driver. Each
esp_socket_get() call should be followed by esp_socket_unref() and
esp_socket_put() to properly invalidate socket and prevent other parts
of driver from using it.
Add ESP_SOCK_WORKQ_STOPPED flag, which is now used to prevent scheduling
more work into driver workqueue. This flag is set in net_offload->put()
callback, so that no more socket work (such as processing RX/TX packets
or closing socket because of errors) is submitted after that.
Introduce mutex lock, which has following role:
* protects dst, connect_cb + conn_user_data, recv_cb + recv_user_data,
* assures that checking ESP_SOCK_WORKQ_STOPPED flag and actually
submitting (or not if net_offload->put was already called) new socket
work to workqueue is done in atomic way.
As there is a mechanism to prevent submitting new work items to
workqueue when net_offload->put() has been executed, then there is no
need to explicitly call esp_socket_ref() in esp_workq thread. This is
because one reference is being held by net_context (after calling
net_context->get()). This is why all the esp_socket_in_use() were simply
dropped. Code running from esp_rx thread on the other hand always uses
esp_socket_ref_from_link_id() helper function (which is backed by
esp_socket_ref()), so that it replaces previous esp_socket_in_use()
calls and additionally makes sure that socket stays valid ("in use")
until esp_socket_unref() is called.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Correct functioning of spinlocks requires that they be memory barriers.
Most architectures achieve this by using the GCC extended asm syntax to
force a compiler soft barrier at the point the interrupt status is
changing. This clobber was missing from the SPARC definition, so add
it.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Correct functioning of spinlocks requires that they be memory barriers.
With CONFIG_SMP=y this falls out as a consequence of using sequentially
consistent atomic operations to ensure all processors are locked out.
With CONFIG_SMP=n a spinlock uses arch_irq_lock/unlock(), so the barrier
behavior must come from that function.
As arch_irq_lock/unlock() delegates to irq_lock/unlock() for
documentation, document the barrier requirement there.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
the implementation of spinlock validation uses two LSB bits in the
bottom of a pointer union to store a CPU index, which only has space
for 4 CPUS. the MP_NUM_CPUS should be <= 4.
Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
The way the test is implemented requires some adaptation to
be effective on all STM32 boards.
I'm not adding per board code on purpose, as this would be a
never ending story.
Fixes#31582
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Customers have asked for further details on the sensors available for
the product in the readme file.
Also corrects an issue where the product LEDs were mapped
backwards in the DTS file.
Signed-off-by: Greg Leach <greg.leach@lairdconnect.com>