diff --git a/.gitmodules b/.gitmodules index 6683ee97ecb02e..1cce5933d07eb6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -149,10 +149,6 @@ path = third_party/infineon/psoc6/psoc6_sdk/libs/wifi-host-driver url = https://github.com/Infineon/wifi-host-driver platforms = infineon -[submodule "p6/wifi-mw-core"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/wifi-mw-core - url = https://github.com/Infineon/wifi-mw-core - platforms = infineon [submodule "p6/TARGET_CY8CKIT-062S2-43012"] path = third_party/infineon/psoc6/psoc6_sdk/libs/TARGET_CY8CKIT-062S2-43012 url = https://github.com/Infineon/TARGET_CY8CKIT-062S2-43012 @@ -324,3 +320,7 @@ url = https://github.com/STMicroelectronics/STM32CubeWB.git branch = v1.17.0 platforms = stm32 +[submodule "p6/lwip-network-interface-integration"] + path = third_party/infineon/psoc6/psoc6_sdk/libs/lwip-network-interface-integration + url = https://github.com/Infineon/lwip-network-interface-integration.git + platforms = infineon diff --git a/src/platform/Infineon/PSOC6/ConfigurationManagerImpl.cpp b/src/platform/Infineon/PSOC6/ConfigurationManagerImpl.cpp index 753b82369512a2..67ed7f1d8eab4b 100644 --- a/src/platform/Infineon/PSOC6/ConfigurationManagerImpl.cpp +++ b/src/platform/Infineon/PSOC6/ConfigurationManagerImpl.cpp @@ -118,7 +118,7 @@ CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * buf) CHIP_ERROR err = CHIP_NO_ERROR; cy_rslt_t result = CY_RSLT_SUCCESS; cy_wcm_mac_t mac; - result = cy_wcm_get_mac_addr(CY_WCM_INTERFACE_TYPE_STA, &mac, 1); + result = cy_wcm_get_mac_addr(CY_WCM_INTERFACE_TYPE_STA, &mac); if (result != CY_RSLT_SUCCESS) { err = CHIP_ERROR_INTERNAL; diff --git a/src/platform/Infineon/PSOC6/ConnectivityManagerImpl.cpp b/src/platform/Infineon/PSOC6/ConnectivityManagerImpl.cpp index 7e23d7dfaf5a00..d33b3f611c2f5c 100644 --- a/src/platform/Infineon/PSOC6/ConnectivityManagerImpl.cpp +++ b/src/platform/Infineon/PSOC6/ConnectivityManagerImpl.cpp @@ -43,8 +43,8 @@ #include #include +#include "cy_network_mw_core.h" #include "lwip/opt.h" -#include #include #include @@ -634,7 +634,7 @@ void ConnectivityManagerImpl::UpdateInternetConnectivityState(void) // If the WiFi station is currently in the connected state... if ((mWiFiStationState == kWiFiStationState_Connected) || stationConnected) { - net_interface = cy_lwip_get_interface(CY_LWIP_STA_NW_INTERFACE); + net_interface = (netif *) cy_network_get_nw_interface(CY_NETWORK_WIFI_STA_INTERFACE, 0); if (net_interface != NULL && netif_is_up(net_interface) && netif_is_link_up(net_interface)) { if (!ip4_addr_isany(netif_ip4_addr(net_interface)) && !ip4_addr_isany(netif_ip4_gw(net_interface))) diff --git a/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.cpp b/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.cpp index 761e04286d075d..b09fd83cecc5df 100644 --- a/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.cpp @@ -23,8 +23,8 @@ #include +#include "cy_network_mw_core.h" #include "cyhal_system.h" -#include #include #include #include @@ -155,7 +155,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** struct netif * net_interface; CHIP_ERROR err = CHIP_NO_ERROR; NetworkInterface * ifp = new NetworkInterface(); - net_interface = cy_lwip_get_interface(CY_LWIP_STA_NW_INTERFACE); + net_interface = (netif *) cy_network_get_nw_interface(CY_NETWORK_WIFI_STA_INTERFACE, 0); if (net_interface) { /* Update Network Interface list */ diff --git a/src/platform/Infineon/PSOC6/P6Utils.cpp b/src/platform/Infineon/PSOC6/P6Utils.cpp index 62cdb83f96f711..2964cc4b5dfa5b 100644 --- a/src/platform/Infineon/PSOC6/P6Utils.cpp +++ b/src/platform/Infineon/PSOC6/P6Utils.cpp @@ -24,7 +24,7 @@ /* this file behaves like a config.h, comes first */ #include -#include +#include "cy_network_mw_core.h" #include #include #include @@ -472,7 +472,7 @@ CHIP_ERROR P6Utils::p6_start_ap(void) } /* Link Local IPV6 AP address for AP */ cy_wcm_ip_address_t ipv6_addr; - result = cy_wcm_get_ipv6_addr(CY_WCM_INTERFACE_TYPE_AP, CY_WCM_IPV6_LINK_LOCAL, &ipv6_addr, 1); + result = cy_wcm_get_ipv6_addr(CY_WCM_INTERFACE_TYPE_AP, CY_WCM_IPV6_LINK_LOCAL, &ipv6_addr); if (result != CY_RSLT_SUCCESS) { ChipLogError(DeviceLayer, "cy_wcm_get_ipv6_addr() failed result %ld", result); @@ -727,7 +727,7 @@ CHIP_ERROR P6Utils::ping_init(void) { CHIP_ERROR err = CHIP_NO_ERROR; struct netif * net_interface = NULL; - net_interface = cy_lwip_get_interface(CY_LWIP_STA_NW_INTERFACE); + net_interface = (netif *) cy_network_get_nw_interface(CY_NETWORK_WIFI_STA_INTERFACE, 0); ping_target = &net_interface->gw; /* Ping to Gateway address */ diff --git a/third_party/infineon/psoc6/psoc6_sdk/build/CY8CKIT-062S2-43012/Debug/GCC_ARM.json b/third_party/infineon/psoc6/psoc6_sdk/build/CY8CKIT-062S2-43012/Debug/GCC_ARM.json index e96bb45ea363fe..d55c68af229eda 100644 --- a/third_party/infineon/psoc6/psoc6_sdk/build/CY8CKIT-062S2-43012/Debug/GCC_ARM.json +++ b/third_party/infineon/psoc6/psoc6_sdk/build/CY8CKIT-062S2-43012/Debug/GCC_ARM.json @@ -186,8 +186,9 @@ "-I./libs/wifi-host-driver/WiFi_Host_Driver/src", "-I./libs/wifi-host-driver/WiFi_Host_Driver/src/bus_protocols", "-I./libs/wifi-host-driver/WiFi_Host_Driver/src/include", - "-I./libs/wifi-mw-core", - "-I./libs/wifi-mw-core/lwip-whd-port", + "-I./libs/lwip-network-interface-integration", + "-I./libs/lwip-network-interface-integration/source", + "-I./libs/lwip-network-interface-integration/include", "-I./ota/config" ], "defines": [ @@ -557,8 +558,8 @@ "./libs/wifi-host-driver/WiFi_Host_Driver/src/whd_wifi.c", "./libs/wifi-host-driver/WiFi_Host_Driver/src/whd_wifi_api.c", "./libs/wifi-host-driver/WiFi_Host_Driver/src/whd_wifi_p2p.c", - "./libs/wifi-mw-core/lwip-whd-port/cy_lwip.c", - "./libs/wifi-mw-core/lwip-whd-port/cy_lwip_dhcp_server.c", + "./libs/lwip-network-interface-integration/source/cy_network_mw_core.c", + "./libs/lwip-network-interface-integration/source/cy_lwip_dhcp_server.c", "./libs/clib-support/TOOLCHAIN_GCC_ARM/cy_clib_support_newlib.c", "./libs/TARGET_CY8CKIT-062S2-43012/bluetooth/cybsp_bt_config.c", "./libs/TARGET_CY8CKIT-062S2-43012/cybsp.c", @@ -616,7 +617,7 @@ "./libs/secure-sockets/source/COMPONENT_MBEDTLS/cy_tls.c", "./libs/secure-sockets/source/COMPONENT_MBEDTLS/iot_crypto.c", "./libs/whd-bsp-integration/COMPONENT_LWIP/cy_network_buffer_lwip.c", - "./libs/wifi-connection-manager/source/COMPONENT_LWIP/cy_wcm.c", + "./libs/wifi-connection-manager/source/cy_wcm.c", "./libs/wifi-connection-manager/source/COMPONENT_MBEDTLS/cy_wps_aes_ctr_ccm.c", "./libs/wifi-connection-manager/source/COMPONENT_MBEDTLS/cy_wps_crypto.c", "./libs/wifi-host-driver/WiFi_Host_Driver/resources/clm/COMPONENT_43012/43012C0-mfgtest_clm_blob.c", diff --git a/third_party/infineon/psoc6/psoc6_sdk/build/CY8CKIT-062S2-43012/Release/GCC_ARM.json b/third_party/infineon/psoc6/psoc6_sdk/build/CY8CKIT-062S2-43012/Release/GCC_ARM.json index f31178e379e213..d8859347f78d72 100644 --- a/third_party/infineon/psoc6/psoc6_sdk/build/CY8CKIT-062S2-43012/Release/GCC_ARM.json +++ b/third_party/infineon/psoc6/psoc6_sdk/build/CY8CKIT-062S2-43012/Release/GCC_ARM.json @@ -186,8 +186,9 @@ "-I./libs/wifi-host-driver/WiFi_Host_Driver/src", "-I./libs/wifi-host-driver/WiFi_Host_Driver/src/bus_protocols", "-I./libs/wifi-host-driver/WiFi_Host_Driver/src/include", - "-I./libs/wifi-mw-core", - "-I./libs/wifi-mw-core/lwip-whd-port", + "-I./libs/lwip-network-interface-integration", + "-I./libs/lwip-network-interface-integration/source", + "-I./libs/lwip-network-interface-integration/include", "-I./ota/config" ], "defines": [ @@ -557,8 +558,8 @@ "./libs/wifi-host-driver/WiFi_Host_Driver/src/whd_wifi.c", "./libs/wifi-host-driver/WiFi_Host_Driver/src/whd_wifi_api.c", "./libs/wifi-host-driver/WiFi_Host_Driver/src/whd_wifi_p2p.c", - "./libs/wifi-mw-core/lwip-whd-port/cy_lwip.c", - "./libs/wifi-mw-core/lwip-whd-port/cy_lwip_dhcp_server.c", + "./libs/lwip-network-interface-integration/source/cy_network_mw_core.c", + "./libs/lwip-network-interface-integration/source/cy_lwip_dhcp_server.c", "./libs/clib-support/TOOLCHAIN_GCC_ARM/cy_clib_support_newlib.c", "./libs/TARGET_CY8CKIT-062S2-43012/bluetooth/cybsp_bt_config.c", "./libs/TARGET_CY8CKIT-062S2-43012/cybsp.c", @@ -616,7 +617,7 @@ "./libs/secure-sockets/source/COMPONENT_MBEDTLS/cy_tls.c", "./libs/secure-sockets/source/COMPONENT_MBEDTLS/iot_crypto.c", "./libs/whd-bsp-integration/COMPONENT_LWIP/cy_network_buffer_lwip.c", - "./libs/wifi-connection-manager/source/COMPONENT_LWIP/cy_wcm.c", + "./libs/wifi-connection-manager/source/cy_wcm.c", "./libs/wifi-connection-manager/source/COMPONENT_MBEDTLS/cy_wps_aes_ctr_ccm.c", "./libs/wifi-connection-manager/source/COMPONENT_MBEDTLS/cy_wps_crypto.c", "./libs/wifi-host-driver/WiFi_Host_Driver/resources/clm/COMPONENT_43012/43012C0-mfgtest_clm_blob.c", diff --git a/third_party/infineon/psoc6/psoc6_sdk/libs/connectivity-utilities b/third_party/infineon/psoc6/psoc6_sdk/libs/connectivity-utilities index 7b2f441dce5b74..25d71a735e2165 160000 --- a/third_party/infineon/psoc6/psoc6_sdk/libs/connectivity-utilities +++ b/third_party/infineon/psoc6/psoc6_sdk/libs/connectivity-utilities @@ -1 +1 @@ -Subproject commit 7b2f441dce5b748173cdf2a2f3871d7f4562a6e5 +Subproject commit 25d71a735e2165e777948469cd68c419fd75b3a5 diff --git a/third_party/infineon/psoc6/psoc6_sdk/libs/lwip-network-interface-integration b/third_party/infineon/psoc6/psoc6_sdk/libs/lwip-network-interface-integration new file mode 160000 index 00000000000000..9e1660130f6113 --- /dev/null +++ b/third_party/infineon/psoc6/psoc6_sdk/libs/lwip-network-interface-integration @@ -0,0 +1 @@ +Subproject commit 9e1660130f611364c8772bc01147ddb2916c8d8d diff --git a/third_party/infineon/psoc6/psoc6_sdk/libs/secure-sockets b/third_party/infineon/psoc6/psoc6_sdk/libs/secure-sockets index afb9546877915d..f7508f942e1c25 160000 --- a/third_party/infineon/psoc6/psoc6_sdk/libs/secure-sockets +++ b/third_party/infineon/psoc6/psoc6_sdk/libs/secure-sockets @@ -1 +1 @@ -Subproject commit afb9546877915d22f226afd1ddb3b15a1df38bd3 +Subproject commit f7508f942e1c25f74f5317422ed8289b2b930cb1 diff --git a/third_party/infineon/psoc6/psoc6_sdk/libs/wifi-connection-manager b/third_party/infineon/psoc6/psoc6_sdk/libs/wifi-connection-manager index 43a355a7c42349..2567493ff15459 160000 --- a/third_party/infineon/psoc6/psoc6_sdk/libs/wifi-connection-manager +++ b/third_party/infineon/psoc6/psoc6_sdk/libs/wifi-connection-manager @@ -1 +1 @@ -Subproject commit 43a355a7c4234953f35860e9bf52ad1376bd62ba +Subproject commit 2567493ff1545989e24f6415254a70d24b7a76e6 diff --git a/third_party/infineon/psoc6/psoc6_sdk/libs/wifi-host-driver b/third_party/infineon/psoc6/psoc6_sdk/libs/wifi-host-driver index 40a7ec2273a950..919d9213128860 160000 --- a/third_party/infineon/psoc6/psoc6_sdk/libs/wifi-host-driver +++ b/third_party/infineon/psoc6/psoc6_sdk/libs/wifi-host-driver @@ -1 +1 @@ -Subproject commit 40a7ec2273a950fbf89353d3eac98c5c1c2fd8cd +Subproject commit 919d921312886057411efcf2271c99296f87afb8 diff --git a/third_party/infineon/psoc6/psoc6_sdk/libs/wifi-mw-core b/third_party/infineon/psoc6/psoc6_sdk/libs/wifi-mw-core deleted file mode 160000 index 1024dbf4a0ff97..00000000000000 --- a/third_party/infineon/psoc6/psoc6_sdk/libs/wifi-mw-core +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1024dbf4a0ff979a233169558d9b8ca7e79b34ee