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>
diff --git a/modules/hostap/Kconfig b/modules/hostap/Kconfig
new file mode 100644
index 0000000..ae340be
--- /dev/null
+++ b/modules/hostap/Kconfig
@@ -0,0 +1,104 @@
+# WPA Supplicant configuration options
+#
+# Copyright (c) 2023 Nordic Semiconductor
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+
+config WIFI_NM_WPA_SUPPLICANT
+ bool "WPA Suplicant from hostap project [EXPERIMENTAL]"
+ select POSIX_CLOCK
+ select NET_SOCKETS
+ select NET_SOCKETS_PACKET
+ select NET_SOCKETPAIR
+ select NET_L2_WIFI_MGMT
+ select WIFI_NM
+ select EXPERIMENTAL
+ help
+ WPA supplicant as a network management backend for WIFI_NM.
+
+config WIFI_NM_WPA_SUPPLICANT_THREAD_STACK_SIZE
+ int "Stack size for wpa_supplicant thread"
+ default 8192
+
+config NET_SOCKETPAIR_BUFFER_SIZE
+ default 4096
+
+config POSIX_MAX_FDS
+ # l2_packet - 1
+ # ctrl_iface - 2 * socketpairs = 4(local and global)
+ # z_wpa_event_sock - 1 socketpair = 2
+ # Remaining left for the applications running in default configuration
+ default 16 if !POSIX_API
+
+# Control interface is stack heavy (buffers + snprintfs)
+# Making calls to RPU from net_mgmt callbacks (status - RSSI)
+config NET_MGMT_EVENT_STACK_SIZE
+ default 4096
+
+config NET_SOCKETS_POLL_MAX
+ default 6
+
+
+# Supplicant API is stack heavy (buffers + snprintfs) and control interface
+# uses socketpair which pushes the stack usage causing overflow for 2048 bytes.
+config SYSTEM_WORKQUEUE_STACK_SIZE
+ default 2560
+
+module = WIFI_NM_WPA_SUPPLICANT
+module-str = WPA supplicant
+source "subsys/logging/Kconfig.template.log_config"
+
+config WIFI_NM_WPA_SUPPLICANT_DEBUG_LEVEL
+ int "Min compiled-in debug message level for WPA supplicant"
+ default 0 if WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_DBG # MSG_EXCESSIVE
+ default 3 if WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_INF # MSG_INFO
+ default 4 if WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_WRN # MSG_WARNING
+ default 5 if WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_ERR # MSG_ERROR
+ default 6
+ help
+ Minimum priority level of a debug message emitted by WPA supplicant that
+ is compiled-in the firmware. See wpa_debug.h file of the supplicant for
+ available levels and functions for emitting the messages. Note that
+ runtime filtering can also be configured in addition to the compile-time
+ filtering.
+
+if WIFI_NM_WPA_SUPPLICANT
+
+# Create hidden config options that are used in hostap. This way we do not need
+# to mark them as allowed for CI checks, and also someone else cannot use the
+# same name options.
+
+config SME
+ bool
+ default y
+
+config NO_CONFIG_WRITE
+ bool
+ default y
+
+config NO_CONFIG_BLOBS
+ bool
+ default y
+
+config CTRL_IFACE
+ bool
+ default y
+
+config NO_RANDOM_POOL
+ bool
+ default y
+
+config NO_WPA
+ bool
+ default y
+
+config NO_PBKDF2
+ bool
+ default y
+
+config ZEPHYR
+ bool
+ default y
+
+endif # WIFI_NM_WPA_SUPPLICANT