From 3791346fbda6d7c52968255cc5ec7dcafc03c116 Mon Sep 17 00:00:00 2001 From: Rohan Sahay Date: Mon, 19 Jun 2023 18:32:52 +0530 Subject: [PATCH] [Silabs] Adds fix for stalling LwIP SLAAC process (#27263) * Adds fix to invoke SLAAC when LwIP is not invoking it * Ports LwIP SLAAC fix for SoC * Added logs and refactored it --- examples/platform/silabs/SiWx917/SiWx917/rsi_if.c | 12 +++++++++++- examples/platform/silabs/efr32/rs911x/rsi_if.c | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/examples/platform/silabs/SiWx917/SiWx917/rsi_if.c b/examples/platform/silabs/SiWx917/SiWx917/rsi_if.c index d05a0d132a5d8e..9dc57d81636733 100644 --- a/examples/platform/silabs/SiWx917/SiWx917/rsi_if.c +++ b/examples/platform/silabs/SiWx917/SiWx917/rsi_if.c @@ -44,6 +44,7 @@ #include "rsi_wlan_config.h" #include "dhcp_client.h" +#include "lwip/nd6.h" #include "wfx_rsi.h" /* Rsi driver Task will use as its stack */ @@ -558,7 +559,16 @@ void wfx_rsi_task(void * arg) hasNotifiedIPV4 = false; } #endif /* CHIP_DEVICE_CONFIG_ENABLE_IPV4 */ - /* Checks if the assigned IPv6 address is preferred by evaluating + /* + * Checks if the IPv6 event has been notified, if not invoke the nd6_tmr, + * which starts the duplicate address detectation. + */ + if (!hasNotifiedIPV6) + { + nd6_tmr(); + } + /* + * Checks if the assigned IPv6 address is preferred by evaluating * the first block of IPv6 address ( block 0) */ if ((ip6_addr_ispreferred(netif_ip6_addr_state(sta_netif, 0))) && !hasNotifiedIPV6) diff --git a/examples/platform/silabs/efr32/rs911x/rsi_if.c b/examples/platform/silabs/efr32/rs911x/rsi_if.c index 86238374ef175f..f29cf010a79e73 100644 --- a/examples/platform/silabs/efr32/rs911x/rsi_if.c +++ b/examples/platform/silabs/efr32/rs911x/rsi_if.c @@ -50,6 +50,7 @@ #include "rsi_wlan_config.h" #include "dhcp_client.h" +#include "lwip/nd6.h" #include "wfx_host_events.h" #include "wfx_rsi.h" @@ -624,7 +625,16 @@ void wfx_rsi_task(void * arg) hasNotifiedIPV4 = false; } #endif /* CHIP_DEVICE_CONFIG_ENABLE_IPV4 */ - /* Checks if the assigned IPv6 address is preferred by evaluating + /* + * Checks if the IPv6 event has been notified, if not invoke the nd6_tmr, + * which starts the duplicate address detectation. + */ + if (!hasNotifiedIPV6) + { + nd6_tmr(); + } + /* + * Checks if the assigned IPv6 address is preferred by evaluating * the first block of IPv6 address ( block 0) */ if ((ip6_addr_ispreferred(netif_ip6_addr_state(sta_netif, 0))) && !hasNotifiedIPV6)