Commit graph

26 commits

Author SHA1 Message Date
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 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 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
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 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
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 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 786fee7ae5 hostap: Fix WFA mandatory features
MBO and WMM-AC are mandatory for WFA certification, so cannot be
disabled for memory saving.

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
Emanuele Di Santo ef5dda3378 hostap: kconfig: let entry be a menuconfig
wpa_supplicant has a lot of entries, and it appears in the top-level menu.
Let it be a menuconfig, so that it gets its own menu page with
all the options, instead of expanding in the top-level menu when
selected.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata 99e472b79e hostap: Add support for MbedTLS builtin
This allows the WPA supplicant to build using the builtin MbedTLS.

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 c1a0ac883f hostap: Add an option to remove advanced features
For a memory constrained system, basic Wi-Fi is enough, so, add a
configuration option to compiled out advanced Wi-Fi features.

This also supports choosing individual features if needed.

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 a9e282c285 hostap: Fix missing dependencies for PSA
Due to a bug in Kconfig, both legacy and PSA crypto were enabled
earlier, so, the dependencies for PSA were missed as they were provided
by legacy.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Joakim Andersson 103a8606d9 hostap: kconfig: Enable AES key type for AES block cipher support
Enable the PSA key type which enables AES block cipher support.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Joakim Andersson 465c59f947 hostap: Kconfig: Fix PSA dependency on random numbers
Fix PSA dependency on random number support.
Random number generated is wanted, instead of a specific PRNG algorithm.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Krishna T c99aac00c4 hostap: Switch to PSA Kconfig
We need to use PSA MbedTLS template to get entropy working.
Rather than having a single set of options which makes dependency
management tough, have a separate entry for PSA based MbedTLS which
is enabled by for NS variants only.

Also, don't use MbedTLS APIs for entropy, instead use the Zephyr APIs
that can work for both NS and S builds.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Jukka Rissanen 864af13666 Revert "hostap: Remove commented Kconfig options"
The following commits will re-introduce functionality that
the earlier commit removed, so revert the earlier commit.

This reverts commit 64423e269e.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Jukka Rissanen 64423e269e hostap: Remove commented Kconfig options
Some crypto Kconfig options were commented out, so remove them.
These will be re-introduced later when adding crypto support
properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-01-26 15:52:54 +00:00
Jukka Rissanen 0e51913a18 hostap: Temporary kconfig options to pass the compliance checker
Compliance checker does not allow compile definitions without
a Kconfig option. So add dummy values for time being. These should
be removed at some point and replaced with properly namespaced
options.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-01-26 15:52:54 +00:00
Jukka Rissanen 1f79c110a7 hostap: Various changes to the API to wpa_supplicant
Changed the names of the API functions between wpa_supplicant
and Zephyr upper layers. For example replaced the z_ prefix
by zephyr_ as the z_ is only meant for internal kernel
functions.

Changed the wpa_supplicant startup so that we do not poll
but wait the network interface add event which then adds
the network interfaces to the supplicant.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-01-26 15:52:54 +00:00
Chaitanya Tata e2f4711629 hostap: Add Zephyr support
Add new files from hostap to Zephyr build.
Add wifi mgmt thread that communicates with supplicant.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-01-26 15:52:54 +00:00
Jukka Rissanen 83c875adab hostap: Move the relevant config options away from hostap
Moving the Zephyr specific config options from
modules/hostap/Kconfig to corresponding Kconfig where the
option is specified.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-10-26 09:48:47 +02:00
Sridhar Nuvusetty ab5821a8c8 hostap: Add build support for Zephyr
Only adds basic build support using Zephyr. Crypto support is disabled
till the MbedTLS integration is complete.

Signed-off-by: Sridhar Nuvusetty <sridhar.nuvusetty@nordicsemi.no>
Signed-off-by: Sachin Kulkarni <sachin.kulkarni@nordicsemi.no>
Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2023-10-26 09:48:47 +02:00