From 174689655cb1bb3c9dbdb78ff70a07e526eb2a8b Mon Sep 17 00:00:00 2001 From: wyhong <30567533+wy-hh@users.noreply.github.com> Date: Wed, 30 Nov 2022 23:19:02 +0800 Subject: [PATCH] [Bouffalolab] Fix BL602 IPv6 address generation failure (#23821) * Update sdk repo for local link address duplicate * Fix restyle --- .../bouffalolab/BL602/lwip_default_hooks.h | 17 +++++++++++++++++ third_party/bouffalolab/bl602/bl602_sdk.gni | 4 ++++ third_party/bouffalolab/repo | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 src/platform/bouffalolab/BL602/lwip_default_hooks.h diff --git a/src/platform/bouffalolab/BL602/lwip_default_hooks.h b/src/platform/bouffalolab/BL602/lwip_default_hooks.h new file mode 100644 index 00000000000000..3c1d1d186c8836 --- /dev/null +++ b/src/platform/bouffalolab/BL602/lwip_default_hooks.h @@ -0,0 +1,17 @@ +#ifndef _LWIP_DEFAULT_HOOKS_H_ +#define _LWIP_DEFAULT_HOOKS_H_ +#include "lwip/arch.h" +#include "lwip/err.h" +#include "lwip/ip_addr.h" + +#ifdef CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT +extern struct netif * lwip_hook_ip6_route(const ip6_addr_t * src, const ip6_addr_t * dest); +#define LWIP_HOOK_IP6_ROUTE lwip_hook_ip6_route +#endif + +#ifdef CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT +extern const ip6_addr_t * lwip_hook_nd6_get_gw(struct netif * netif, const ip6_addr_t * dest); +#define LWIP_HOOK_ND6_GET_GW lwip_hook_nd6_get_gw +#endif + +#endif /* _LWIP_DEFAULT_HOOKS_H_ */ diff --git a/third_party/bouffalolab/bl602/bl602_sdk.gni b/third_party/bouffalolab/bl602/bl602_sdk.gni index 7c21ecdc63830d..fb8a661ef263ae 100644 --- a/third_party/bouffalolab/bl602/bl602_sdk.gni +++ b/third_party/bouffalolab/bl602/bl602_sdk.gni @@ -129,6 +129,7 @@ template("bl602_sdk") { "${bl602_sdk_root}/components/network/wifi_manager/bl60x_wifi_driver/include", "${bl602_sdk_root}/components/network/wifi_manager/bl60x_wifi_driver", "${bl602_sdk_root}/components/network/dns_server/include", + "${bl602_sdk_root}/components/network/rfparam_adapter_tmp/rftlv", "${bl602_sdk_root}/components/platform/soc/bl602/bl602_std/bl602_std/StdDriver/Inc", "${bl602_sdk_root}/components/security/blcrypto_suite/inc/blcrypto_suite", @@ -259,6 +260,7 @@ template("bl602_sdk") { #include defines "OS_USING_FREERTOS", "BL602_MATTER_SUPPORT", + "PBUF_POOL_SIZE=20", "TD_DIAGNOSIS_STA", "CONFIG_ENABLE_IPV6_ADDR_CALLBACK", "CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT", @@ -320,6 +322,7 @@ template("bl602_sdk") { "${bl602_sdk_root}/components/stage/easyflash4/src/ef_utils.c", "${bl602_sdk_root}/components/sys/blmtd/bl_mtd.c", "${bl602_sdk_root}/components/sys/blota/bl_sys_ota_cli.c", + "${bl602_sdk_root}/components/utils/src/utils_hex.c", "${bl602_sdk_root}/components/utils/src/utils_hexdump.c", "${bl602_sdk_root}/components/utils/src/utils_sha256.c", "${chip_root}/third_party/mbedtls/repo/library/aes.c", @@ -548,6 +551,7 @@ template("bl602_sdk") { "${bl602_sdk_root}/components/utils/src/utils_rbtree.c", #rebase add + "${bl602_sdk_root}/components/network/rfparam_adapter_tmp/rftlv/phy_rftlv.c", "${bl602_sdk_root}/components/network/wifi_hosal/port/wifi_hosal_bl602.c", "${bl602_sdk_root}/components/network/wifi_hosal/wifi_hosal.c", "${bl602_sdk_root}/components/os/bl_os_adapter/bl_os_adapter/bl_os_hal.c", diff --git a/third_party/bouffalolab/repo b/third_party/bouffalolab/repo index 2d6f06e8f05dca..ae0622d85476ed 160000 --- a/third_party/bouffalolab/repo +++ b/third_party/bouffalolab/repo @@ -1 +1 @@ -Subproject commit 2d6f06e8f05dca5c24afa342c9c1b867a3ad400e +Subproject commit ae0622d85476ed838ebc3efde9743c376bc9f96d