From fda1ddf107410729a7348f3943d73555afb41807 Mon Sep 17 00:00:00 2001 From: Mathieu Kardous <84793247+mkardous-silabs@users.noreply.github.com> Date: Sat, 16 Nov 2024 21:47:49 -0500 Subject: [PATCH] Update sl_net_for_lwip.c source file to work with Wiseconnect 3.4.0 (#241) --- .../network_manager/src/sl_net_for_lwip.c | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/components/service/network_manager/src/sl_net_for_lwip.c b/components/service/network_manager/src/sl_net_for_lwip.c index 011f0e3e72..e7e88bcaa5 100644 --- a/components/service/network_manager/src/sl_net_for_lwip.c +++ b/components/service/network_manager/src/sl_net_for_lwip.c @@ -38,8 +38,6 @@ sl_net_wifi_lwip_context_t *wifi_client_context = NULL; sl_net_wifi_lwip_context_t *wifi_ap_context = NULL; uint32_t gOverrunCount = 0; -extern sys_thread_t lwip_thread; - /****************************************************************************** Static Functions ******************************************************************************/ @@ -269,6 +267,11 @@ static void set_sta_link_up(sl_net_wifi_client_profile_t *profile) #if LWIP_IPV4 uint64_t addr = wifi_client_context->netif.ip_addr.addr; +#endif +#if LWIP_IPV6 + // uint64_t addr = wifi_client_context->netif.ip_addr.u_addr.ip4.addr; +#endif +#if LWIP_IPV4 SL_DEBUG_LOG("DHCP IP: %u.%u.%u.%u\n", NETIF_IPV4_ADDRESS(addr, 0), NETIF_IPV4_ADDRESS(addr, 1), @@ -300,7 +303,7 @@ static void set_sta_link_down(void) ******************************************************************************/ sl_status_t sl_net_wifi_ap_init(sl_net_interface_t interface, const void *configuration, - void *workspace, + const void *workspace, sl_net_event_handler_t event_handler) { UNUSED_PARAMETER(interface); @@ -440,3 +443,21 @@ sl_status_t sl_si91x_host_process_data_frame(sl_wifi_interface_t interface, sl_w return SL_STATUS_OK; } + +sl_status_t sl_net_configure_ip(sl_net_interface_t interface, + const sl_net_ip_configuration_t *ip_config, + uint32_t timeout) +{ + UNUSED_PARAMETER(interface); + UNUSED_PARAMETER(ip_config); + UNUSED_PARAMETER(timeout); + return SL_STATUS_WIFI_UNSUPPORTED; +} + +sl_status_t sl_net_get_ip_address(sl_net_interface_t interface, sl_net_ip_address_t *ip_address, uint32_t timeout) +{ + UNUSED_PARAMETER(interface); + UNUSED_PARAMETER(ip_address); + UNUSED_PARAMETER(timeout); + return SL_STATUS_WIFI_UNSUPPORTED; +}