Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wifi: Add full AP mode support (using hostapd) #75224

Merged
merged 6 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions modules/hostap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ zephyr_library()
set(HOSTAP_BASE ${ZEPHYR_HOSTAP_MODULE_DIR})
set(WIFI_NM_WPA_SUPPLICANT_BASE ${HOSTAP_BASE}/wpa_supplicant)
set(HOSTAP_SRC_BASE ${HOSTAP_BASE}/src)
set(WIFI_NM_HOSTAPD_BASE ${HOSTAP_BASE}/hostapd)

set(CMAKE_EXE_LINKER_FLAGS "--specs=nosys.specs -lnosys")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMISSING_SYSCALL_NAMES")
Expand Down Expand Up @@ -209,11 +210,31 @@ zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_AP
CONFIG_NO_VLAN
CONFIG_NO_ACCOUNTING
NEED_AP_MLME
CONFIG_IEEE80211AC
krish2718 marked this conversation as resolved.
Show resolved Hide resolved
CONFIG_IEEE80211AX
CONFIG_EAP_SERVER
CONFIG_EAP_SERVER_IDENTITY
)

zephyr_include_directories_ifdef(CONFIG_WIFI_NM_HOSTAPD_AP
${WIFI_NM_HOSTAPD_BASE}/
)

zephyr_library_sources_ifdef(CONFIG_WIFI_NM_HOSTAPD_AP
${HOSTAP_SRC_BASE}/ap/acs.c
${HOSTAP_SRC_BASE}/utils/ip_addr.c
${WIFI_NM_HOSTAPD_BASE}/config_file.c
${WIFI_NM_HOSTAPD_BASE}/ctrl_iface.c
${WIFI_NM_HOSTAPD_BASE}/ctrl_iface_zephyr.c
${WIFI_NM_HOSTAPD_BASE}/eap_register.c
${WIFI_NM_HOSTAPD_BASE}/hostapd_cli_cmds.c
${WIFI_NM_HOSTAPD_BASE}/hostapd_cli_zephyr.c
)

zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_HOSTAPD_AP
HOSTAPD
CONFIG_ACS
)

zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_NONE
${HOSTAP_SRC_BASE}/crypto/crypto_none.c
Expand Down
16 changes: 15 additions & 1 deletion modules/hostap/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ config WIFI_NM_WPA_SUPPLICANT_WQ_PRIO
int "Thread priority of wpa_supplicant iface workqueue"
default 7

config WIFI_NM_WPA_SUPPLICANT_PRIO
int "Thread priority of wpa_supplicant"
default 0

# Currently we default ZVFS_OPEN_MAX to 16 in lib/posix/Kconfig
# l2_packet - 1
# ctrl_iface - 2 * socketpairs = 4(local and global)
Expand Down Expand Up @@ -179,7 +183,7 @@ config WIFI_NM_WPA_SUPPLICANT_WPA3
default y

config WIFI_NM_WPA_SUPPLICANT_AP
bool "AP mode support"
bool "SoftAP mode support based on WPA supplicant"

config WIFI_NM_WPA_SUPPLICANT_WPS
bool "WPS support"
Expand All @@ -202,6 +206,10 @@ config WIFI_NM_WPA_SUPPLICANT_INF_MON
bool "Monitor the net mgmt event to add/del interface"
default y

config WIFI_NM_HOSTAPD_AP
bool "FullAP mode support based on Hostapd"
depends on !WIFI_NM_WPA_SUPPLICANT_INF_MON

config WIFI_NM_WPA_SUPPLICANT_BSS_MAX_IDLE_TIME
int "BSS max idle timeout in seconds"
range 0 64000
Expand Down Expand Up @@ -439,6 +447,12 @@ config DPP2
config DPP3
bool

config ACS
bool

config IEEE80211AC
bool

config NW_SEL_RELIABILITY
bool
default y
Expand Down
Loading
Loading