Commit graph

1956 commits

Author SHA1 Message Date
Chaitanya Tata
3ade4bed27 modules: hostap: Fix heap pool allocation
Now that hostap is used k_heap, it needs to reserve the kernel heap not
libc heap.

Fixes #79477.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-10 10:07:41 +02:00
Chaitanya Tata
bcef9ac6ea modules: hostap: Use OS primitive even in native code
This was we can modify it in a single place that works both for native
and OS specific code.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-10 10:07:41 +02:00
Rafal Dyla
ec77fc399c modules: hal_nordic: Add global domain power request service
Service for powering peripherals that use GPIO pins
in the global power domains:
- Active Fast
- Active Slow
- Main Slow

Signed-off-by: Rafal Dyla <rafal.dyla@nordicsemi.no>
2024-10-09 18:36:47 +01:00
Fengming Ye
e40eef2d58 hostap: add crypto module test kconfig option
Add crypto module test kconfig option
CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_TEST,
which is default n and hidden.
It is only available by developer for crypto module test.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-10-09 13:45:30 +02:00
Jukka Rissanen
4b83b2346f hostap: Use proper value when generating supplicant event
The previous NET_EVENT_SUPPLICANT_CMD_INT_EVENT is from
"enum net_event_supplicant_cmd" but the supplicant_send_wifi_mgmt_event()
has the event parameter as an "enum net_event_wifi_cmd" and those event
number spaces are different.

This meant that the wrong event value NET_EVENT_SUPPLICANT_CMD_INT_EVENT
maps to NET_EVENT_WIFI_CMD_TWT (from "enum net_event_wifi_cmd") which
fortunately did not cause issue in this case because the
supplicant_send_wifi_mgmt_event() has no handling for this TWT event value.

It is important we fix this as this can cause great confusion in the
future.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-08 18:17:42 +01:00
Jamie McCrae
c952f09a79 cmake: mcuboot: Use imgtool instead of west for signing
Uses imgtool directly to sign images instead of calling west sign,
this also removes the MCUBOOT_CMAKE_WEST_SIGN_PARAMS Kconfig option
as this has no effect

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-08 17:00:46 +02:00
Jamie McCrae
890787ded3 modules: mcuboot: Add Kconfig for firmware updater image
Adds a Kconfig which can be selected when building for firmware
updater mode to select if this is the application or the firmware
updater image that is being built

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-08 17:00:46 +02:00
Torsten Rasmussen
46a3e61bc7 cmake: nordic: save build information regarding SVD file used.
Save information regarding SVD file in use in vendor-specific section
of the build info file.

Information is stored under Nordic section.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-08 17:00:30 +02:00
Pavel Vasilyev
86b666548b modules: mbedtls: Enable back Mbed TLS PSA Crypto Storage C
This partially reverts 4b479016a7
to fix Bluetooth mesh tests with bsim.

Fixes #79533

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-10-08 13:44:22 +02:00
TOKITA Hiroshi
6a2aafe286 modules: hal_rpi_pico: Update to fit for 2.0.0 directory structure
The directory structure has changed in 2.0.0,
so we update it accordingly.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:23 -04:00
Rex Chen
5a195001e3 net: wifi: shell: add reg domain support
Supp api add reg domain support.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-10-08 06:00:36 -04:00
Jordan Yates
a29db9800e modules: mbedtls: compile PAKE with PSA
When building with `MBEDTLS_PSA_CRYPTO_C` enabled, compile in the
PAKE (Password-authenticated key exchange) implementation.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-08 05:59:16 -04:00
Gerard Marull-Paretas
72ab376c24 modules: hal_nordic: nrfs: add support for nRF54H20 EngB
Make nrfs compatible with the EngB soc revision.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Gerard Marull-Paretas
40f5ca03b5 modules: hal_nordic: add support for nRF54H20 EngB
Add support for nRF54H20 EngB in the Nordic HAL glue code.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Adam Kondraciuk
bc7a5b6781 drivers: timer: nrf_grtc_timer: Align Zephyr to new AUTOEN read manner
The new GRTC reading manner of the SYSCOUNTER uses hardware mechanism which
allows to keep it alive when any of CPUs is not sleeping. Otherwise
the SYSCOUNTER goes into sleep mode. Thus there is no
longer need to maintain the `CONFIG_NRF_GRTC_SLEEP_ALLOWED` symbol, however
if the user wants to have the SYSCOUNTER enabled all the time the
`CONFIG_NRF_GRTC_ALWAYS_ON` can be used instead.
The nrfx_grtc  driver no longer provides the `wakeup-read-sleep` reading
manner.
Also setting the GRTC clock source is performed by the nrfx_grtc driver so
it has been removed from the `sys_clock_driver_init()` function.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-10-07 18:42:14 +02:00
Gerard Marull-Paretas
9d82a03444 modules: hal_nordic: add nrf54l system sources to bsim build
Include system_nrf54l.c file when building for bsim.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Gerard Marull-Paretas
97dff5bccb modules: hal_nordic: align PDM configuration
Introduce instance 0, PDM0, following nrfx 3.7.0 update.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Chaitanya Tata
2dec9313e4 modules: hostap: Use net_mgmt context
Using a separate workqueue causes issues without any special locking to
synchronize with networking threads e.g., interface being removed while
the workqueue is trying to synchronize with WPA supplicant.

It's easier to use the net_mgmt thread which is in better sync with
networking.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-07 17:12:24 +01:00
Chaitanya Tata
56d7e9a487 modules: hostap: Fix typo in NM unregistration
The module name is not modified in remove.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-07 17:12:24 +01:00
Chaitanya Tata
c44aa6b18e modules: hostap: Fix double free in case of error conditions
In case of error conditions post successfully sending the message, the
event is already freed but we attempt to free it again.

Rejig the labels to easily reflect thier purpose.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-07 17:12:24 +01:00
Chaitanya Tata
2d7c995395 modules: hostap: Fix double free of the event
When an event is sent the receiver gets is asynchronously and hence is
responsible for free the event, the sender should only free in case of
error conditions i.e., unable to send.

Else, this causes a tough to debug double-free.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-07 17:12:24 +01:00
Chaitanya Tata
1da74ef705 net: wifi: Fix DPP disabled build
In case WPA supplicant disabled DPP, we need to compile out the
corresponding DPP code in Wi-Fi shell too.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-07 17:12:16 +01:00
Tomi Fontanilles
4b479016a7 modules: mbedtls: enable persistent keys when CONFIG_SECURE_STORAGE
With the secure storage subsystem now providing an implementation of
the PSA ITS API, let Mbed TLS use it when it's enabled.
This allows the use of persistent keys in the PSA Crypto API.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-10-07 13:38:43 +02:00
Rex Chen
82ec1d7862 net: wifi: shell: add wps support
Add wps pin and wps pbc L2 layer cmd support.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-10-05 14:07:48 -04:00
Jordan Yates
8354fc5c3c modules: tfm: default version numbers from VERSION
Populate the TFM application version numbers from the application
`VERSION` file if it exists.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-04 22:51:04 +01:00
Yong Cong Sin
52a202309b zephyr: bulk update to DT_NODE_HAS_STATUS_OKAY
Change instances of:

DT_NODE_HAS_STATUS(<node_id>, okay)

to

DT_NODE_HAS_STATUS_OKAY(<node_id>)

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-03 17:06:52 +01:00
Maciej Baczmanski
9655c2f61b net: openthread: add OPENTHREAD_STORE_FRAME_COUNTER_AHEAD
Add `OPENTHREAD_STORE_FRAME_COUNTER_AHEAD` Kconfig option
and set it to 100000, as after calculations it appears to
be a more suitable value.

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2024-10-02 10:16:16 +02:00
Maciej Baczmanski
539cc1ddfa manifest: openthread: Regular OpenThread upmerge
Update OpenThread up to `2aeb8b8` and align KConfig options

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2024-10-02 10:16:16 +02:00
Krzysztof Sychla
5d76b563ea arch: Add Cortex-R8 support
Enable Cortex R8 support, similar to Cortex-R5.

Signed-off-by: Krzysztof Sychla <ksychla@antmicro.com>
Signed-off-by: Marek Slowinski <mslowinski@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-10-01 09:58:22 +02:00
Gero Schwäricke
5bcb5242ed modules: lvgl: fix multiple LVGL inputs
The LVGL input callback does not use an instance specific name, so we
can only ever have one instance of this type. This issue was evident by
a build error, e.g., when using "zephyr,lvgl-keypad-input" nodes twice:

  error: redefinition of '_input_callback__lvgl_keypad_process_event'

Signed-off-by: Gero Schwäricke <gero.schwaericke@posteo.de>
2024-09-30 12:10:29 +01:00
Jukka Rissanen
2f47de60a0 hostap: The security keys were checked in wrong function
The security check case statements were in frequency band
setting checks. This is totally wrong and will cause compiler
warnings. Moving the checks to correct function.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-27 21:06:44 +01:00
Gang Li
4bfdb64386 hostap: add AP configuration cmd support
Implement AP configuration parameter operations.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2024-09-27 10:56:57 +01:00
Gaofeng Zhang
94386e103e zephyr: hostap: fix eap secure mode print UNKNOWN
wpas_key_mgmt_to_zephyr doesn't support eap secure mode, add code to
support eap secure mode.

Signed-off-by: Gaofeng Zhang <gaofeng.zhang@nxp.com>
2024-09-27 10:56:16 +01:00
David Brown
bd46e8d849 modules: Add placeholder for CONFIG_RUST
In order to be able to ifdef based on `CONFIG_RUST`, the config must be
defined in the main repo (because the rust module is optional).  Add
this as a placeholder.  If the module is not availabe, the symbol will
be present, and always disabled.  The module will provide a full
definition for the Kconfig.

Signed-off-by: David Brown <david.brown@linaro.org>
2024-09-26 17:46:27 -04:00
Jordan Yates
cd03667a5d modules: tfm: split security counter from version
By default, TFM enables hardware rollback protection, which requires a
security counter to be embedded in the image trailer. The default
behaviour of constructing this counter from the image version breaks the
TFM `boot_nv_security_counter_update` implementation once the version
number is greater than `0.0.1024`. As such, explicitly specify the
desired security counter value. As per the MCUboot docs, this does not
need to be incremented on every firmware update.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-26 03:34:42 -04:00
Maochen Wang
e2f671ee00 hostap: only add STA interface when hostapd enabled
For add_interface(), only add STA interface when hostapd enabled,
and the Soft-AP interface will be added in zephyr_hostapd_init().

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-09-20 11:08:19 +02:00
Lukasz Stepnicki
02045f110c modules: hal_nordic: dvfs: patch medlow trim entry
DVFS medlow oppoint should use trim entry index 2,
this needs to be updated in hal/hal_nordic.
Currently this is not possible because of time
constraints that is why this temporary patch
is applied. This is the only point where
new_f_trim_entry is used.

Signed-off-by: Lukasz Stepnicki <lukasz.stepnicki@nordicsemi.no>
2024-09-18 19:55:38 +01:00
Xudong Zheng
3c092f9274 dts: bindings: clock: rpi_pico: add XOSC definition
This defines raspberrypi,pico-xosc along with a configurable startup
delay multiplier. On some boards, the XOSC takes longer to stabilize.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2024-09-18 15:31:04 +02:00
Fengming Ye
c642b44c95 net: wifi_mgmt: add DPP reconfig support
Hostap does not support wpa_cli DPP reconfig command.
So add wifi_mgmt DPP reconfig command and api.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-09-18 09:57:27 +02:00
Fengming Ye
27d882e740 hostap: add hostapd cli shell command
Add hostapd_cli shell command for test.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-09-18 09:57:27 +02:00
Fengming Ye
0961928b3a hostap: add dispatch for hostapd and wpa_supplicant wpa_msg
When we have coexistence of hostapd and wpa_supplicant,
wpa_msg has different implementation.
So to let them work together, we need to have common implementation
for wpa_msg and dispatch msgs for hostapd and wpa_supplicant.

So add register zephyr_hostap_ctrl_iface_msg_cb,
and judge if ctx is hostapd by the first integer where ctx points to.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-09-18 09:57:27 +02:00
Fengming Ye
5e9377e051 hostap: add AP DPP wpa_msg event handler
Hostapd has TODO in hostapd_dpp_handle_config_obj,
to save DPP connector using wpa_msg.

AP DPP needs to use dpp_connector, dpp_netaccesskey and dpp_csign
in DPP Peer Discovery handshake in hostapd_dpp_rx_peer_disc_req.
So add AP DPP wpa_msg event handler to store these info.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-09-18 09:57:27 +02:00
Fengming Ye
a1eee8ac0c hostap: add AP DPP dispatch mgmt api
Add hostapd mgmt ops, some use same api as wpa_supplicant,
and DPP use different ops.
supplicant_dpp_dispatch use wpa_cli and hapd_dpp_dispatch use hostapd_cli.
And use common DPP param parse.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-09-18 09:57:27 +02:00
Fengming Ye
4f93c84a94 hostap: add AP network security type DPP
Add DPP security type for AP DPP support.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-09-18 09:57:27 +02:00
Ryan McClelland
a8ae883e4d modules: tflite-micro: add batch_matmul.cc to cmakelists.txt
batch_matmul.cc was missing from the CMakeLists.txt for tflite-micro.
Add it.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-18 09:56:06 +02:00
Kapil Bhatt
ccc243c129 modules: hostap: Add wifi statistics reset support
This change will add  an API to reset the wifi statistics
when reset command is called.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-09-17 17:48:36 +01:00
Jonny Svärd
bdd894ca50 modules: tflite-micro: Fix CMakeLists.txt
Add missing file to source list

Signed-off-by: Jonny Svärd <jonny.svaerd@arm.com>
2024-09-17 09:12:23 -05:00
Johan Hedberg
bdcd54e4ca modules: Kconfig: Provide default definitions for modules with blobs
There are HCI drivers which reference the module-specific Kconfig symbols
which are auto-generated when the modules are present. Provide default
definitions for these symbols in case the modules are missing, so that
compliance checking doesn't stumble over seemingly non-existent Kconfig
options.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-09-16 10:07:13 +02:00
Kapil Bhatt
6c6f5beee7 hostap: Add rts threshold get api support
Add api to get rts threshold.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-09-13 13:42:26 +02:00
Emil Lindqvist
ca41413038 mbedtls: add ability to use custom memory section for mbedtls heap
This commit introduces the option to place the mbed TLS heap in a custom
memory section. The heap might be quite large depending on concurrent
TLS connections, thus it might be needed to place this manually

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2024-09-13 09:18:11 +02:00