Commit Graph

93496 Commits

Author SHA1 Message Date
Fin Maaß 792cbb9a24 drivers: ethernet: use sys_rand_get directly
use sys_rand_get() directly.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-04-05 12:28:46 +02:00
Fin Maaß 9e8e21b36f drivers: ieee802154: use sys_rand_get directly
use sys_rand_get() directly.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-04-05 12:28:46 +02:00
Krzysztof Chruściński 362389ee17 tests: drivers: uart: Re-enabling some tests on nrf52_bsim
Tests which were using the new nordic UART shim where failing
on the bsim targets. They are now fixed and tests can be
re-enabled.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-05 12:21:58 +02:00
Krzysztof Chruściński 7bededbc29 drivers: serial: nrfx_uarte2: Fix re-enabling the receiver
Move providing of the first buffer in uart_rx_enable from that
function to the callback which is called from nrfx_uarte_rx_enable
context. By doing this nrfx_uarte_rx_buffer_set is called when
RX configuration flags are already known to the driver.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-05 12:21:58 +02:00
Emil Gydesen 490fb20148 Bluetooth: Audio: Shell: CAP change microphone mute command
Adds the change microphone mute command to the CAP commander shell.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-04-05 12:21:38 +02:00
Emil Gydesen f70ba925ea tests: Bluetooth: CAP Commander Change Microphone mute unittests
Adds unittests for the CAP Commander Change Microphone mute
procedure.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-04-05 12:21:38 +02:00
Emil Gydesen 50b37cb564 tests: bsim: Bluetooth: CAP Commander Change Microphone Mute
Adds bsim test of the CAP Commander Change Microphone Mute
procedure.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-04-05 12:21:38 +02:00
Emil Gydesen 5ab37692c0 Bluetooth: CAP: Commander change microphone mute procedure
Adds the CAP Commander Change Microphone Mute procedure.
This procedure changes the microphone mute state on one or more
CAP Acceptors.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-04-05 12:21:38 +02:00
Abderrahmane Jarmouni c0ce237d9f tests: lib: gui: lvgl: add stm32 test cases
Add test cases for stm32h747i_disco_stm32h747xx_m7.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-04-05 12:21:32 +02:00
Abderrahmane Jarmouni 52f318c85e tests: lib: gui: lvgl: add LittleFS block device support
Add support for running this test on a block device (MMC/SDMMC).

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-04-05 12:21:32 +02:00
Ali Hozhabri 0252b6ff88 drivers: bluetooth: hci: Support reading long events in ST SPI v1
Provide support for reading events longer than 127 bytes in
ST SPI protocol v1 by splitting them into several SPI transactions.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-04-05 12:21:17 +02:00
Ali Hozhabri 7392bf284c drivers: bluetooth: hci: Support ISO packets in ST HCI SPI BT driver
Add support for ISO packets in ST HCI SPI BT driver.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-04-05 12:21:01 +02:00
Fin Maaß e3f182549a mgmt: hawkbit: Add support for reboot after update
Add support for automatic reboot after successful update completion

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-04-05 12:20:48 +02:00
Henrik Brix Andersen ef42f9d759 drivers: i2c: use is_null_no_warn() check in generic macro
Use is_null_no_warn() for checking the init_fn against NULL in order to
avoid compiler warning when using CONFIG_COMPILER_SAVE_TEMPS=y.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-04-05 12:20:04 +02:00
Henrik Brix Andersen 2f136f21a4 drivers: can: use is_null_no_warn() check in generic macro
Use is_null_no_warn() for checking the init_fn against NULL in order to
avoid compiler warning when using CONFIG_COMPILER_SAVE_TEMPS=y.

Fixes: #70390

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-04-05 12:20:04 +02:00
Henrik Brix Andersen 9e59a2f32f include: zephyr: sys: util: add is_null_no_warn() utility function
Some macros may need to check their arguments against NULL to support
multiple use-cases, but NULL checks can generate warnings for a given use
of those macros (where that particular argument can never be NULL).

This can happen if:
a) all macros are expanded (e.g. when using CONFIG_COMPILER_SAVE_TEMPS=y)
or
b) tracking of macro expansions are turned off (-ftrack-macro-expansion=0)

This warning can be circumvented by passing the argument to be check to an
inlined function for doing the NULL check. The compiler is still able to
optimize this out at a later stage.

Move the private ___is_null() helper function introduced in
d51f874158 to include/zephyr/sys/utils.h and
rename it to is_null_no_warn() to facilitate reuse.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-04-05 12:20:04 +02:00
Jukka Rissanen ef909b9aaa west.yaml: Update hostap module
This contains cherry-pick from Nordic downstream hostap repo
as how it is today (20240326)

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Jukka Rissanen af75192910 hostap: Comment out offeding mbedtls configs
Comment out mbedtls symbols that do not have a proper Kconfig
setting. Future commits will need to add relevant support in mbedtls
side to provided needed symbols so that they can be used in hostap
and uncomment these.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata 873106faf1 hostap: Add configuration options for NW selection
To cater for different needs add an configuration options for WPA
supplicant network selection (scan results sorting). The default is
still left unchanged.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata e2d267c92c hostap: Fix band selection
If user selects a band, then we should restrict scanning channels to
that band, but using freq_list will only filter the results.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Ravi Dondaputi 688fe9afe5 hostap: Resolve build warning with strncpy
Make sure to copy LEN -1 bytes to the destination, to
accommodate the terminating null byte.

Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata 2e9b17158a hostap: Always allow disconnect
Even if the interface is not in connected state, allow disconnect to be
accepted, this behaviour regressed when the mode check was introduced
and if not connected then SSID will be NULL.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata a62f85c2ee hostap: Reduce WPA supplicant heap when MbedTLS heap is enabled
If MbedTLS uses its own heap which is a static heap (not libc heap),
then WPA supplicant heap usage will come down, so, reduce 8K (minimum
MbedTLS heap for Wi-Fi) from the libc heap size.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata fa2b192df4 hostap: Free association response event deep copy
Free the deep copied data of the association response event.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata 26418cba14 hostap: Fix interface name copy in removal
Using a macro here that can potentially limit the interface name
compared to add can lead to issues, so, to mimic what we do in add, use
the sizeof with a boundary check.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata d777c8654f hostap: Add return value checks for interface removal
These were missed earlier, and if event send fails, no point in waiting
for the state to change.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata df70640f60 hostap: Limit only to WPA2 for SAP
Due to AP-MLME being in the host and expensive computation WPA3 is not
working reliably, so, for now this is being disabled.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata 86c3e0ade4 hostap: SAP mode needs more heap
SAP mode adds more functionality that increases the heap usage, based on
experiments, 40000 works well to avoid startup failures.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata dbb5914f95 hostap: Free the buffer for TX status
Now that TX status buffer is allocated on heap by Zephyr driver, free
the buffer once its processed.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Vidar Lillebø 6f5d50fec9 hostap: Select MBEDTLS_PKCS5_C
For WPA_SUPP_CRYPTO_LEGACY, MBEDTLS_PKCS5_C is needed.

Signed-off-by: Vidar Lillebø <vidar.lillebo@nordicsemi.no>
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Sebastian Bøe acd0aa7bb3 hostap: Add missing deps in WPA_SUPP_CRYPTO_
Add missing MBEDTLS_PK_C dependcy for legacy crypto.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata 58efe79683 hostap: Fix key management for SAP
Key management for SAP should be retrieved from the network block rather
than using the per-interface global structure.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata 2f29c1057f hostap: Reserve the heap
By default (-1) libc uses all the available heap, this is good to
efficiently use the RAM, but for scenarios which there isn't enough RAM
the build will be success, but we see runtime failures.

Reserved the necessary RAM based on tests ahead to catch such scenarios,
of course this would mean that we might be no using full RAM in case
more is left, but that's never the case the with Wi-Fi :).

And this also adds the constant evaluation and fine tuneing like we do
for kernel heap and other parameters.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Chaitanya Tata 3186c70e41 hostap: Fix the disconnect wait timeout
The timeout should be 5s, not 50s. Fix and rename the variables to
better reflect their meaning.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:55 +02:00
Flavio Ceolin 68c0c55419 doc: pm: Clarify a device pm note
Clarify conditions that prevent the cpu to enter low power
state.

Fixes #69647

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-04-05 12:19:46 +02:00
Lauren Murphy 8590f6a469 checkpatch: ignore EXPORT_SYMBOL
checkpatch isn't smart enough to detect a function / variable has
been declared e.g. with K_SEM_DEFINE and will incorrectly flag
such cases.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-04-05 12:19:36 +02:00
Lauren Murphy 83ccc8e29b llext: add threads and kernel object test case
Tests threads and kernel objects with userspace. Includes cleanups
suggested by Luca Burelli.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-04-05 12:19:36 +02:00
Jukka Rissanen 83d879bb1a net: if: No error if mcast group join fails because iface down
If we fail to join all nodes or solicit node multicast groups
when the interface is down, then there is no need to print an
error message. The groups are automatically re-joined when the
interface comes up.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-05 12:19:27 +02:00
Sreeram Tatapudi cc2898e6fe modules: hal_infineon: wifi_host_driver: Fix blob case
FIx the name of the cyw43xx_fw_bin

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-04-05 11:55:04 +02:00
Fin Maaß 89c057a95a mgmt: hawkbit: optimize poll_sleep
remove unnecessary condition for CONFIG_HAWKBIT_POLL_INTERVAL,
changes poll_sleep to be in seconds,
change type of sleep_time in hawkbit_update_sleep(), so the return
value of hawkbit_time2sec() is interpreted correctly.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-04-05 11:54:47 +02:00
Fabio Baltieri e9dceed173 doc: guidelines: add a note about ascii and emojis
Add a note about source files encoding and emojis.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-04-05 11:54:39 +02:00
Luca Burelli 4867c56a51 llext: invalidate instruction cache after loading extension
In addition to flushing the dcache, to ensure that the new code is
actually read by the CPU when loading an extension, the icache must
be invalidated as well.

Without this, some tests are failing in hardware because the CPU is
executing stale code from its instruction cache.

Fixes #70906 on arduino_giga_r1/stm32h747xx/m7.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-04-05 11:54:31 +02:00
Fin Maaß 97eb8bf78c mgmt: hawkbit: little cleanup
a little cleanup in start_http_client().

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-04-05 11:54:22 +02:00
Yong Cong Sin cd2c7874b9 posix: uname: use BUILD_VERSION only if not empty
The `BUILD_VERSION` can be defined but empty when built
without git, causing version to be missing from the uname
version string:

```
*** Booting Zephyr OS build 3.5.0 ***

Printing everything in utsname...
sysname[7]: Zephyr
nodename[7]: zephyr
release[13]: 3.5.0
version[61]:  Apr  1 2024 23:48:30
machine[8]: riscv64

uart:~$
```

Let's check if it is empty before using it, so that
`KERNEL_VERSION_STRING`, which is generated independently
with cmake can be used as a fallback:

```
*** Booting Zephyr OS build 3.5.0 ***

Printing everything in utsname...
sysname[7]: Zephyr
nodename[7]: zephyr
release[13]: 3.5.0
version[61]: 3.5.0 Apr  1 2024 23:53:48
machine[8]: riscv64

uart:~$
```

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-04-04 23:47:33 +02:00
Yong Cong Sin fbaf7dfdc1 kernel: banner: use BUILD_VERSION only if not empty
The `BUILD_VERSION` can be defined but empty when built
without git, causing version to be missing from the banner:

```
*** Booting Zephyr OS build  ***
Hello World! qemu_riscv64
```

Let's check if it is empty before using it, so that
`KERNEL_VERSION_STRING`, which is generated independently
with cmake can be used as a fallback:

```
*** Booting Zephyr OS build 3.5.0 ***
Hello World! qemu_riscv64
```

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-04-04 23:47:33 +02:00
Daniel DeGrasse 20b7b6e1d4 boards: shield: adafruit_2_8_tft_touch_v2: add support for RD_RW612_BGA
Add support for the RD RW612 BGA board for the adafruit_2_8_tft_touch_v2
shield. This board uses a custom LCDIC MIPI DBI controller, which
requires a specific board overlay to enable the shield.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-04 23:59:37 +03:00
Daniel DeGrasse b530202871 boards: nxp: rd_rw612_bga: add support for LCDIC
Enable support for LCDIC on rd_rw612_bga. This support also enables
acceleration features such as DMA for LVGL, to improve performance

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-04 23:59:37 +03:00
Daniel DeGrasse 049b2d8620 boards: nxp: rd_rw612_bga: add support for arduino header
Add arduino header support for rd_rw612_bga, so this board can be used
with arduino shields

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-04 23:59:37 +03:00
Daniel DeGrasse b6477deb4a soc: nxp: rw: add reset code for LCDIC
Clear LCDIC reset signal at init when the LCDIC peripheral is enabled.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-04 23:59:37 +03:00
Daniel DeGrasse cc3de261aa dts: arm: nxp_rw6xx: add LCDIC node
Add LCDIC devicetree node or RW6xx SOC

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-04 23:59:37 +03:00