checkpatch wants parameters to IS_ENABLED() to be Kconfig constants,
i.e. ones that start with CONFIG_. Avoid the whinage.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
TC_PRINTF doesn't append a newline, so the skip messages sometimes ran
into the test result message.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Fix crash in ATT when the response for a request is received after
the ATT timeout has fired and the ATT channel has been detached.
Add similar handling for all ATT channel operations.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
The Bluetooth receiving thread may not be able to process broadcast
packets because the system API(bt_hci_cmd_send_sync) is in block state.
If HCI driver is still waiting buffer for adv report, an assertion will
be triggered.
Fixes: #30955
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Both RS and DAD timeouts are simplified because the delay is a
constant, and by construction the list of timeouts is in increasing
time remaining.
Refactor to avoid repeating the expression that represents the time
until DAD state expires. Uniformly use unsigned operands in deadline
calculation.
Note a case where the racy idiom for retaining an existing timeout is
required in the current work API, but can be replaced with a robust
solution in the proposed new API (the reschedule API replaces any
existing pending update, but the schedule API will leave an existing
scheduled submission in place).
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The existing implementation is inconsistent in that checking for
expired routers when a timeout is processed detects end-of-life
correctly (when the remaining duration exceeds the signed maximum),
but the calculation of time remaining before expiration uses only
unsigned calculation. So when the set of routers is changed the newly
calculated timeout will not recognize routers that have expired, and
so those routers expired late. In the worst case if the only
remaining router had expired the timer may be set for almost two
months in the future.
Refactor to calculate remaining time in one place and as a signed
value. Change a function name to more clearly reflect what it does.
Avoid unnecessary race conditions in k_work API.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The net_timeout structure is documented to exist because of behavior
that is no longer true, i.e. that `k_delayed_work_submit()` supports
only delays up to INT32_MAX milliseconds. Nonetheless, use of 32-bit
timestamps within the work handlers mean the restriction is still
present.
This infrastructure is currently used for two timers with long
durations:
* address for IPv6 addresses
* prefix for IPv6 prefixes
The handling of rollover was subtly different between these: address
wraps reset the start time while prefix wraps did not.
The calculation of remaining time in ipv6_nbr was incorrect when the
original requested time in seconds was a multiple of
NET_TIMEOUT_MAX_VALUE: the remainder value would be zero while the
wrap counter was positive, causing the calculation to indicate no time
remained.
The maximum value was set to allow a 100 ms latency between elapse of
the deadline and assessment of a given timer, but detection of
rollover assumed that the captured time in the work handler was
precisely the expected deadline, which is unlikely to be true. Use of
the shared system work queue also risks observed latency exceeding 100
ms. These calculations could produce delays to next event that
exceeded the maximum delay, which introduced special cases.
Refactor so all operations that use this structure are encapsulated
into API that is documented and has a full-coverage unit test. Switch
to the standard mechanism of detecting completed deadlines by
calculating the signed difference between the deadline and the current
time, which eliminates some special cases.
Uniformly rely on the scanning the set of timers to determine the next
deadline, rather than assuming that the most recent update is always
next.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Swap the `net_buf_*` -> `net_buf_simple_*` conversion `#define`s to
`static inline` functions. This is to provide better type checking on
the use of these functions.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
z_free_fd() is called twice then you close(). For example in ublox sara
r4 driver offload_close() calls modem_socket_put() where z_free_fd() is
called first time. Then this same function is called another time in
socket.c in z_impl_zsock_close() after this function has called
offload_close() in ublox sara r4 driver. This causes socket
descriptor leak.
Fixes#26819
Signed-off-by: Akseli Peltola <peltsu1324@gmail.com>
Flash size is specified in bits by SFDP and devicetree, but the stored
flash size is in bytes. Correct the divisor.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
SWI IRQ line mapping for nRF5340 shall use
CONFIG_SOC_NRF5340_CPUNET for conditional compilation
instead of the board define, so as to allow new boards to
use the BLE controller implementation.
Fixes#30488.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This patch adds the driver for Omnivision OV7725
Color CMOS VGA Sensor.
The driver currently provides a simple capture
function, the output format only provides
RGB565,640x480.
Signed-off-by: Frank Li <lgl88911@163.com>
This patch includes the rtc in the doc for the
nucleo_g474re and nucleo_g431rb boards
from STMicroelectronics
Signed-off-by: Francois Ramu <francois.ramu@st.com>
This patch enables the rtc clock on the stm32g4 soc
from STMicroelectronics.
Even if the set by default (reset value of theRCC_APB1ENR)
the bit is marked as 1.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
This patch enables the rtc so that the testcase
tests/drivers/counter/counter_basic_api
can run on this nucleo_g071rb board
also when running sanity check
Signed-off-by: Francois Ramu <francois.ramu@st.com>
After system reset, the PWR interface clock must be enabled
by setting the PWREN bit of the RCC_APBENR1
This sequence is needed to use the RTC.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
The --nrf-family argument has been unnnecessary since 6628a16
(" runners: nrfjprog: boilerplate and recover rework").
Remove a few stragglers that are still using it, to avoid it being
copy/pasted into other board definitions.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add the Sound Open Firmware project as a Zephyr module under
modules/audio/sof.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Adds the Sound Open Firmware project, built as a Zephyr application,
under samples/subsys/sudio/sof.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This converts the intel_gna driver to use device tree instead of
kconfig for device configuration.
Fixes#30872
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Skip the memory mapping execution test case when code coverage enabled
for qemu_x86_64 platform. See issue #30434.
Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
Fix some issues in linker.ld when enabling coverage report feature
for qemu_x86_64 platform:
1. Fix the gcov record data should not be in BSS section.
2. Fix some test case crash due to lack of memory page align before
gcov rodata.
Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
There may be Xtensa SoCs which don't have high enough interrupt
levels for EPC6/EPS6 to exist in _restore_context. So changes
these to those which should be available according to the ISA
config file.
Fixes#30126
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Mark the EEPROM API as stable for the upcoming Zephyr v2.5.0. The EEPROM
API was introduced in Zephyr v2.1.0 and has not seen any changes since.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The following features: 'i2c' and 'netif:eth' are now used in the
ip_k66f board. Let's mark them in the "supported:" section of the
ip_k66f.yaml.
The latter one is necessary as a prerequisite to run some tests (like
e.g. netif:eth is necessary to run network related ones).
Signed-off-by: Lukasz Majewski <lukma@denx.de>