Commit Graph

972 Commits

Author SHA1 Message Date
Nazar Palamar a83d2dad8d wifi: airoc: remove dependency on CYHAL
Removing dependency on cyhal in airoc wifi driver.

It need to build airoc wifi driver with different than
PSoC 6 Soc like STM32

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-04-09 16:57:49 +02:00
Nikodem Kastelik 9949645dd4 modules: hal_nordic: nrfx: add support for nRF54 PWM
Add Kconfig-to-nrfx symbol redefinitions so that PWM instances
found on nRF54H20 and nRF54L15 devices are supported.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-04-09 11:05:46 +02:00
Andrzej Głąbek 902351a2e5 modules: hal_nordic: Add missing nrfx_config entries for nRF54L15
Add nrfx_grtc related entries that were introduced in nrfx 3.4.0,
especially NRFX_GRTC_CONFIG_AUTOSTART that should be by default
set to 1.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-04-08 12:27:21 +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
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
Kyle Dunn a846b81d58 drivers: sensor: lis2dux12: Add lis2dux12 driver
Adds support for the STMicroelectronics LIS2DUX12 3-axis accelerometer.

Signed-off-by: Kyle Dunn <kdunn926@gmail.com>
2024-04-04 09:45:49 +01:00
Damian Krolik 42d928ee93 drivers: ieee802154: fix configuring CSL IE in ACK
The code was assigning a pointer to a scoped buffer to
an object outside that scope. This would cause the driver
would receive garbage instead of a well-formatted IE and
would likely reject the IE. This in turn caused CSL IE
not being included in enhanced ACKs (verified with
wireshark).

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2024-04-03 13:57:50 +03:00
Dave Lacerte 379ac5e394 modules: openthread: platform: radio: Time Sync OT Feature support
Add missing otRadioIeInfo structure and add plaform time to transmit frame

Signed-off-by: Dave Lacerte <lacerte.dave@hydroquebec.com>
2024-03-28 16:05:21 -05:00
Daniel Leung 6cd7936f57 kernel: align kernel stack size declaration
When kernel stack is defined as an array, K_KERNEL_STACK_LEN()
is used to calculate the size for each stack in the array.
However, standalone kernel stack has its size calculated by
Z_KERNEL_STACK_SIZE_ADJUST() instead. Depending on the arch
alignment requirement, they may not be the same... which
could cause some confusions. So align them both to use
K_KERNEL_STACK_LEN().

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-27 19:27:10 -04:00
Marco Widmer 1a899ee414 modules: hal_nordic: nrfx_glue: Fix unused argument
NRFX_IRQ_PRIORITY_SET is defined as empty. This causes an unused
argument warning in many callers (e.g. nrfy_gpiote_int_init). Fix it by
using ARG_UNUSED for the priority argument.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2024-03-26 11:19:05 -05:00
Marco Widmer 0e46701d6d modules: hal_nordic: nrfx_glue: Fix coding style
We will touch these lines in the next commit. Convert the comment style
to C89 instead of C99 and the indentation to tabs instead of spaces.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2024-03-26 11:19:05 -05:00
Ledion Daja 93af8754ec modules: hal_ethos_u: add support for log level NONE
Add support for log level NONE by disabling Ethos-U driver logging.

Signed-off-by: Ledion Daja <ledion.daja@arm.com>
2024-03-21 09:07:35 +01:00
Ledion Daja 2fff293cc7 modules: hal_ethos_u: fix log configuration in CMake file
The core driver ETHOSU_LOG_SEVERITY CMake variable is a cache variable,
and thus will not be configured by the ETHOSU_LOG_SEVERITY CMake
variable of the hal_ethos_u module with local scope.
Change ETHOSU_LOG_SEVERITY local variable to be a cache var.

In addition, change condition test from LESS_EQUAL to LESS in order
to prevent an out-of-range index when accessing list variable.

Signed-off-by: Ledion Daja <ledion.daja@arm.com>
2024-03-21 09:07:35 +01:00
Jukka Rissanen d5dd3a0a54 hostap: Remove PSA crypto support
The PSA is referring to Kconfig symbols that are only found
in Nordic downstream repo so we cannot use it anyway atm.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Jukka Rissanen 57b4ff137d hostap: Replace menuconfig by config
This avoid compliance warning

Found pointless 'menuconfig' symbols without children. Use regular 'config'
symbols instead. See
https://docs.zephyrproject.org/latest/build/kconfig/tips.html#menuconfig-symbols.

WIFI_NM_WPA_SUPPLICANT              modules/hostap/Kconfig:8
WIFI_NM_WPA_SUPPLICANT              modules/hostap/Kconfig:8

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Jukka Rissanen 5af390c600 hostap: Fix missing items in Kconfig and CMakeLists.txt files
Various settings in Kconfig and CMakeLists.txt file were
plain wrong or missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Jukka Rissanen e1729b44ef hostap: Fix compilation issues
The big cherry-picking left some invalid code so remove/fix
it in order to pass the compilation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata 675346705f hostap: Fix channel comparison
Due to a typo, channel and frequency were compared causing the
connection to fail for any combination.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata b3a6f8c2db hostap: Implement STA disconnect in AP mode
Use the WPA cli command to disconnect a station in AP mode.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata 2a144e8bfe hostap: Fix WPA version for WPA3 and WPA2-PSK-256
The WPA version was only been set for WPA-PSK and WPA2-PSK, but for
others it wasn't set. For AP mode this causes issues as WPA-IE is
considered and WPA3/WPA2-PSK-256 aren't allowed, they need RSN.

Explicitly set the version for all to RSN, except for WPA-PSK.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata d8600d57cc hostap: Fix the security mode in AP
For AP we should use the security mode from the SSID as stations can
have a different security than the configure one. E.g., WPA/WPA2 in AP
vs WPA in STA1 and WPA2 in STA2.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata 8729141da1 hostap: Fix SSID check
If the interface is in associated state, then current SSID will always
be set, so, add an early check and use SSID info freely after that.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata b5ed2b45f1 hostap: Add mode check for disconnect
This way we reject disconnect in AP mode and ap disable in STA mode,
though both have same functionality we treat them differently to keep
it clean.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata bf2863e3e5 hostap: Implement AP connected station events
These are to intimate the applications about connected Stations.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata 3bf20deec0 hostap: Implement AP mode events
These events are used by AP mode, tied to AP-ENABLED and AP-DISABLED
events in the hostapd/wpa_supplicant.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata ce85b6ce0a hostap: Add a connect/disconnect event helpers
These can be abstracted from the core WPA supplicant.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata f4b1c6c5d4 hostap: Add checks for mode switching
Don't allow automatic switching between modes, use disconnect/ap disable
to explicitly allow switch.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata 967bedeedc hostap: Fix management frame receive
The management frame structure in the WPA supplicant only has a pointer,
so, it need a deep-copy before passing it to WPA supplicant, else driver
ends up freeing causing invalid memory contents.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata e5972171ca hostap: Fix RSSI check for STA mode
RSSI should only be retrieved for STA mode, but the check was wrong.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Kapil Bhatt 8a5a5fb4b8 hostap: Add interactive keyword for commands
The keyword is added into array argv of wpa_cli.
The commands which require to be interactive
this keyword will allow ro print output for them.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata f0d856ff72 hostap: Skip searching for exiting networks
Before starting AP mode, we don't need to search for existing networks
and join them, as the use-case is starting SoftAP.

This speeds up the AP mode operation significantly.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata 03304184bb hostap: Skip RSSI retrieval for AP mode
RSSI is only applicable for STA mode, as for AP there are multiple
peers. This causes failure and unnecessary delay, so just skip the
retrieval.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Jukka Rissanen e648f0c24a hostap: Make sure CONFIG_AP gets enabled in AP mode
If user enables AP mode, make sure CONFIG_AP symbol
is enabled so that access point sources get compiled etc.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata f35de25ff1 hostap: Basic AP mode support
Implement AP mode Wi-Fi management operations.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00