modules: hostap: fix hostap compile error and support enterprise

Fix compile error when enable enterprise security mode.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
This commit is contained in:
Maochen Wang 2024-05-22 12:11:34 +08:00 committed by Alberto Escolar
parent 762169034b
commit 001ac3976a
5 changed files with 46 additions and 18 deletions

View file

@ -92,6 +92,9 @@ struct net_eth_addr {
#if !defined(ETH_P_ECAT)
#define ETH_P_ECAT NET_ETH_PTYPE_ECAT
#endif
#if !defined(ETH_P_EAPOL)
#define ETH_P_EAPOL NET_ETH_PTYPE_EAPOL
#endif
#if !defined(ETH_P_IEEE802154)
#define ETH_P_IEEE802154 NET_ETH_PTYPE_IEEE802154
#endif

View file

@ -971,7 +971,7 @@ struct net_wifi_mgmt_offload {
#if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT) || defined(__DOXYGEN__)
/** Wi-Fi supplicant driver API */
void *wifi_drv_ops;
const void *wifi_drv_ops;
#endif
};

View file

@ -16,9 +16,19 @@ set(CMAKE_EXE_LINKER_FLAGS "--specs=nosys.specs -lnosys")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMISSING_SYSCALL_NAMES")
zephyr_include_directories(
src/
${HOSTAP_BASE}/
${WIFI_NM_WPA_SUPPLICANT_BASE}/
${HOSTAP_SRC_BASE}/
${HOSTAP_SRC_BASE}/utils/
${HOSTAP_SRC_BASE}/common/
${HOSTAP_SRC_BASE}/eap_common
${HOSTAP_SRC_BASE}/eap_server
${HOSTAP_SRC_BASE}/radius
${HOSTAP_SRC_BASE}/crypto/
${HOSTAP_SRC_BASE}/ap/
${HOSTAP_SRC_BASE}/drivers/
${HOSTAP_SRC_BASE}/rsn_supp
)
zephyr_library_compile_definitions(
@ -28,6 +38,8 @@ zephyr_library_compile_definitions(
CONFIG_CTRL_IFACE
CONFIG_NO_RANDOM_POOL
CONFIG_SHA256
CONFIG_SHA384
CONFIG_SHA512
CONFIG_CTRL_IFACE_ZEPHYR
CONFIG_SUITEB192
)
@ -88,6 +100,7 @@ zephyr_library_sources(
${HOSTAP_SRC_BASE}/drivers/driver_common.c
${HOSTAP_SRC_BASE}/drivers/drivers.c
${HOSTAP_SRC_BASE}/utils/crc32.c
${HOSTAP_SRC_BASE}/utils/base64.c
${HOSTAP_SRC_BASE}/utils/common.c
${HOSTAP_SRC_BASE}/utils/wpabuf.c
@ -154,6 +167,7 @@ zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_AP
${HOSTAP_SRC_BASE}/ap/bss_load.c
${HOSTAP_SRC_BASE}/ap/dfs.c
${HOSTAP_SRC_BASE}/ap/drv_callbacks.c
${HOSTAP_SRC_BASE}/ap/ctrl_iface_ap.c
${HOSTAP_SRC_BASE}/ap/eap_user_db.c
${HOSTAP_SRC_BASE}/ap/hostapd.c
${HOSTAP_SRC_BASE}/ap/hw_features.c
@ -333,21 +347,25 @@ zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE
)
zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE
CONFIG_EAP_TLS
CONFIG_IEEE8021X_EAPOL
CONFIG_EAP_PEAP
CONFIG_EAP_TTLS
CONFIG_EAP_MD5
CONFIG_EAP_MSCHAPv2
CONFIG_EAP_LEAP
CONFIG_EAP_PSK
CONFIG_EAP_FAST
CONFIG_EAP_PAX
CONFIG_EAP_SAKE
CONFIG_EAP_GPSK
CONFIG_EAP_PWD
CONFIG_EAP_EKE
CONFIG_EAP_IKEv2
EAP_TLS
IEEE8021X_EAPOL
EAP_PEAP
EAP_TTLS
EAP_MD5
EAP_MSCHAPv2
EAP_LEAP
EAP_PSK
EAP_FAST
EAP_PAX
EAP_SAKE
EAP_GPSK
EAP_PWD
EAP_EKE
EAP_IKEv2
)
zephyr_library_compile_definitions_ifndef(CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE
CONFIG_NO_CONFIG_BLOBS
)
zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_EAPOL
@ -359,7 +377,7 @@ zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_EAPOL
)
zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_EAPOL
CONFIG_IEEE8021X_EAPOL
IEEE8021X_EAPOL
)
zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_NW_SEL_RELIABILITY

View file

@ -10,6 +10,7 @@ config WIFI_NM_WPA_SUPPLICANT
select POSIX_TIMERS
select POSIX_SIGNALS
select POSIX_API
select FILE_SYSTEM
select NET_SOCKETS
select NET_SOCKETS_PACKET
select NET_SOCKETPAIR
@ -372,6 +373,12 @@ config SAE
config SHA256
bool
config SHA384
bool
config SHA512
bool
config SUITEB192
bool

View file

@ -29,7 +29,7 @@ static int cmd_wpa_cli(const struct shell *sh,
argc++;
/* Remove wpa_cli from the argument list */
return z_wpa_ctrl_zephyr_cmd(argc - 1, &argv[1]);
return zephyr_wpa_ctrl_zephyr_cmd(argc - 1, &argv[1]);
}
/* Persisting with "wpa_cli" naming for compatibility with Wi-Fi