diff --git a/bundle.json b/bundle.json index 25e283d2821f37b03f30ab680fa6bb991e4019d7..1ab0cc40db20305fe25f40a67f5e0de9633e8893 100644 --- a/bundle.json +++ b/bundle.json @@ -39,6 +39,7 @@ "deps": { "components": [ "drivers_peripheral_wlan", + "drivers_peripheral_ethernet", "certificate_manager", "c_utils", "hdf_core", diff --git a/wpa_supplicant-2.9_standard/BUILD.gn b/wpa_supplicant-2.9_standard/BUILD.gn index 9d075a2511e9ce9962ac698de0cfc233ac26456d..b606667d4b28ea4e78ac5e5d64b0789660afa93f 100644 --- a/wpa_supplicant-2.9_standard/BUILD.gn +++ b/wpa_supplicant-2.9_standard/BUILD.gn @@ -551,7 +551,10 @@ ohos_shared_library("wpa_sys") { } if (wpa_supplicant_config_ext_auth) { - external_deps += [ "drivers_peripheral_wlan:wpa_hdi_client" ] + external_deps += [ + "drivers_peripheral_wlan:wpa_hdi_client", + "drivers_peripheral_ethernet:ethernet_hdi_client", + ] } if ("${CONFIG_DRIVER}" == "nl80211") { @@ -702,6 +705,11 @@ ohos_shared_library("wpa") { ] if (wpa_supplicant_config_ext_auth) { cflags += [ "-DEXT_AUTHENTICATION_SUPPORT" ] + cflags += [ "-DCONFIG_DRIVER_WIRED" ] + sources += [ + "$WPA_ROOT_DIR/src/drivers/driver_wired.c", + "$WPA_ROOT_DIR/src/drivers/driver_wired_common.c", + ] } if ("${CONFIG_CTRL_IFACE}" == "udp") { cflags += [ "-DCONFIG_CTRL_IFACE_UDP" ] @@ -737,6 +745,7 @@ ohos_shared_library("wpa") { "drivers_peripheral_wlan:hostapd_hdi_client", "drivers_peripheral_wlan:wifi_driver_client", "drivers_peripheral_wlan:wpa_hdi_client", + "drivers_peripheral_ethernet:ethernet_hdi_client", "huks:libhukssdk", "init:libbegetutil", ] diff --git a/wpa_supplicant-2.9_standard/src/eap_peer/eap.c b/wpa_supplicant-2.9_standard/src/eap_peer/eap.c index f1b5b2400d78683f61eeeefe7a74fcd8187c41c9..bed4362b8d497a52de0e83727f3d38a17f717a32 100644 --- a/wpa_supplicant-2.9_standard/src/eap_peer/eap.c +++ b/wpa_supplicant-2.9_standard/src/eap_peer/eap.c @@ -37,6 +37,7 @@ #include "securec.h" #ifdef CONFIG_LIBWPA_VENDOR #include "wpa_client.h" +#include "ethernet_eap_client.h" #endif #endif /* EXT_AUTHENTICATION_SUPPORT */ @@ -936,8 +937,11 @@ static void tx_ext_certification(STATE_MACHINE_DATA *sm) wpa_printf(MSG_ERROR, "snprintf_s error: %d", res); return; } - - WpaEventReport(g_ifnameToString[ifname], WPA_EVENT_STA_NOTIFY, (void *) param); + if (ifname == IFNAME_ETH0) { + EthEapClientEventReport(g_ifnameToString[ifname], (char *)param); + } else { + WpaEventReport(g_ifnameToString[ifname], WPA_EVENT_STA_NOTIFY, (void *) param); + } clear_eap_data(); eapol_set_bool(sm, EAPOL_eapResp, false); #endif diff --git a/wpa_supplicant-2.9_standard/src/eapol_supp/eapol_supp_sm.c b/wpa_supplicant-2.9_standard/src/eapol_supp/eapol_supp_sm.c index 94f27bde1d14bba0cfa7c982e3566abd05059a47..4dced64a225cb28cb905cbae249d6adc510ec419 100644 --- a/wpa_supplicant-2.9_standard/src/eapol_supp/eapol_supp_sm.c +++ b/wpa_supplicant-2.9_standard/src/eapol_supp/eapol_supp_sm.c @@ -27,6 +27,7 @@ #include "securec.h" #ifdef CONFIG_LIBWPA_VENDOR #include "wpa_client.h" +#include "ethernet_eap_client.h" #endif #endif /* EXT_AUTHENTICATION_SUPPORT */ @@ -1206,7 +1207,11 @@ static void rx_ext_certification(struct eapol_sm *sm) return; } free(base64Parm); - WpaEventReport(g_ifnameToString[ifname], WPA_EVENT_STA_NOTIFY, (void *)param); + if (ifname == IFNAME_ETH0) { + EthEapClientEventReport(g_ifnameToString[ifname], (char *)param); + } else { + WpaEventReport(g_ifnameToString[ifname], WPA_EVENT_STA_NOTIFY, (void *)param); + } #endif } #endif /* EXT_AUTHENTICATION_SUPPORT */