Sleeping in sysworkq is a very bad idea, it can trash any hope of
realtimeness at best, deadlock the whole system at worse.
Add a check to input_report to downgrade the event to K_NO_WAIT
automatically when called from the sysworkq, similarly to what's done by
other APIs (netbuf and bluetooth), though only log if messages are
actually dropped.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This adds a test that checks that the Subnet Bridge behaves correctly
when one or more of the involved subnets are undergoing the Key Refresh
Procedure.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
This introduces a global variable controlling the number of remote nodes
used in a given test case. This allows removal of the `TEST_TYPE_...`
enums and further tests in the future that can use different remote node
counts.
This also cleans up the test source by extracting common tester
initialization to separate functions, avoiding repetition.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
Initializes the `net_idx` field of the ack context properly for KRP
functions in the Config Client.
This fixes a problem where `bt_mesh_cfg_cli_krp_get` and
`bt_mesh_cfg_cli_krp_set` would always fail the ack ctx comparison if
`key_net_idx` was != 0.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
This reverts commit ec0b9ccbc1.
This commit has two issues:
1. We already query signal poll just above, so, wastes time querying the
infor from the firmware.
2. Doesn't handle modes, i.e., queries even for AP mode as well.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Use the regex mode for zephyr-keep-sorted to verify alphabetical order
of projects.
Sort accordingly
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Use the regex mode for zephyr-keep-sorted to verify alphabetical order
of projects.
Sort accordingly
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Release HSI CLK48 semaphore when going to sleep to allow C2 (M0)
core to start and stop clock as needed while C1 core is not running.
CLK48 is shared between RNG and USB. RNG is needed by M0 during BLE
advertisement. If semaphore is locked, C2 core can start it when it
needs to but not stop it.
Fixes zephyrproject-rtos#69955.
Signed-off-by: Jonny Gellhaar <jonny.gellhaar@prevas.se>
Ambiq USB HAL do not expect endpoint transaction request when an
endpoint is stalled. This commit addresses this behavior in shim driver
by checking for endpoint's stall status when enqueue request is
received, and defer it until endpoint stall is cleared.
Signed-off-by: Chew Zeh Yang <zeon.chew@ambiq.com>
Apply nRF54H20 `min-residency-us` and `exit-latency-us` values for
existing power states.
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
Add 128 MHz clock source and use it for uart00. Baudrate setting
must be adjusted based on uart clock source so without this
change there is wrong baudrate on uart00.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The test interfaces registered addresses within the same subnet. As now
only the subnet part of the address is verified when choosing source
address or interface, it was not deterministic which interface would be
selected. Therefore, make the two interfaces use two different subnets
so that tests that verified which address/interface was used work
reliably as earlier.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
When IPv4 address is added, currently the netmask remains empty. This
makes it impossible to use the address now that the netmask is
considered during address selection if the application does not
specify the netmask manually. Therefore specify a default netmask for
IPv4 addresses added to an interface with Kconfig.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Bit-wise comparing of the entire IPv4 addresses doesn't make much sense
as when selecting the source address for communication, what really
matters is the subnet part.
Doing so may actually lead to unexpected results, i. e. two addresses
within the same subnet should be considered equally good for
communication within the subnet, yet comparing the unique part of
the address (beyond the netmask) may lead to different results.
This is a problem for the mechanism of preferring the default interface
for LL communication if two interfaces have LL addresses with the
default subnet mask.
Fix this by filtering out the subnet from the IPv4 address before
passing it to net_if_ipv4_get_best_match() function.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add a test case which validates that if two network interfaces are
equally good wrt net mask for LL IPv4 communication, the default
interface is preferred.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Currently we blindly return the LL address found on the default
interface or else on the first interface that has a valid LL address
configured.
This doesn't work well, if different interfaces have LL addresses
configured with a different subnet mask. Therefore, instead of blindly
selecting the address based on the first LL address encountered, use
net_if_ipv4_get_best_match() function for LL addresses to find the best
match for the given interface.
The rework takes into account current behavior, i. e. default interface
still gets the preference if there is no better candidate.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add a test case verifying that a proper source IPv4 address and
interface is selected for a given LL destination address.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Accessing DWC2 otg core registers before the clock starts results in
complete system hang. Add a 1 us busy wait to make sure that software
won't access registers before the clock is started.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
The PSA Crypto implementation provided by Mbed TLS generally requires
some amount of heap to function, so enable the arena unconditionally
to make the test compatible with MINIMAL_LIBC configurations where the
arena is disabled by default.
Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves signal tests into a singular
testsuite at tests/posix/signals app directory.
Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
With recent changes the regulatory domain is handled via the hostap
rather than by passing and going through the driver and hostap doesn't
have any option for forcing the regulatory domain, so, add a note to
reflect that this is implementation dependent to cover both hostap as
well other offloaded implementations.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Instead of depending on SPI/GPIO. This allows to just enable
CONFIG_LORA=y + DT node in the application layer. The same
pattern is nowadays followed by most drivers.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Add DT definitions for the RAK3172 LoRaWAN module, based on
STM32WLE5.
Ref. https://docs.rakwireless.com/product-categories/wisduo/
rak3172-module/low-level-development/
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
The dns_unpack_answer() did not check the length of the message
properly which can cause out of bounds read.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
If the packet parsing fails in dns_unpack_response_query(), then
do not continue further but bail out early.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
As the error print strings are very similar, construct the final
output at runtime to save some flash space.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Follow net coding style and remove extra new lines between
variable set and checking its value.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
We must do null check before trying to access the fields.
Fixes#81980
Coverify-CID: 434549
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
These devices have an architecturally fixed 13 MHz clock device. But
thankfully you can put a default into a DTS binding so we don't have
to repeat it for all of them.
Signed-off-by: Andy Ross <andyross@google.com>
Add Zephyr support for the Audio DSP on the MT8196 SOC. This is a
very similar device to previous designs. Most of this patch is just
DTS.
The biggest delta is the more complicated second level interrupt
controller, though it is still able to be represented using some
vaguely clever DTS config over the older intc_mtk_adsp driver.
Also the memory layout is slightly different, requiring a little
indirection to set the initial boot stack address and log output
buffer. And the timer "irq_ack" register bits moved.
Signed-off-by: Andy Ross <andyross@google.com>
New platform has different mappings. Auto-detect rather than parse
dts or similar, as this is is really just a simple format for testing.
Signed-off-by: Andy Ross <andyross@google.com>
The early boot function got renamed to a pseudo-standard "z_prep_c",
but this isn't an actual API and doesn't have a prototype in the
headers anywhere, so the compiler started whining about an undeclared
function.
Signed-off-by: Andy Ross <andyross@google.com>
Add a twister YAML file for these devices. Right now they're flagged
as xt-clang only, though xcc and SOF-derived gcc toolchains are known
to work too. We'll enable the zephyr SDK once sdk-ng support lands.
Signed-off-by: Andy Ross <andyross@google.com>