modules: hal_silabs: Update WiseConnect SDK

Import the new version of the WiseConnect SDK.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
This commit is contained in:
Jérôme Pouiller 2025-04-23 17:24:19 +02:00 committed by Benjamin Cabé
commit 31646fd06e
4 changed files with 19 additions and 16 deletions

View file

@ -24,12 +24,12 @@ struct siwx91x_dev {
#ifdef CONFIG_WIFI_SILABS_SIWX91X_NET_STACK_OFFLOAD
struct k_event fds_recv_event;
sl_si91x_fd_set fds_watch;
sl_si91x_fdset_t fds_watch;
struct {
net_context_recv_cb_t cb;
void *user_data;
struct net_context *context;
} fds_cb[NUMBER_OF_SOCKETS];
} fds_cb[SLI_NUMBER_OF_SOCKETS];
#endif
};

View file

@ -19,8 +19,8 @@
LOG_MODULE_DECLARE(siwx91x_wifi);
BUILD_ASSERT(NUMBER_OF_SOCKETS < sizeof(uint32_t) * 8);
BUILD_ASSERT(NUMBER_OF_SOCKETS < SIZEOF_FIELD(sl_si91x_fd_set, __fds_bits) * 8);
BUILD_ASSERT(SLI_NUMBER_OF_SOCKETS < sizeof(uint32_t) * 8);
BUILD_ASSERT(SLI_NUMBER_OF_SOCKETS < SIZEOF_FIELD(sl_si91x_fdset_t, __fds_bits) * 8);
NET_BUF_POOL_FIXED_DEFINE(siwx91x_tx_pool, 1, NET_ETH_MTU, 0, NULL);
NET_BUF_POOL_FIXED_DEFINE(siwx91x_rx_pool, 10, NET_ETH_MTU, 0, NULL);
@ -143,8 +143,8 @@ static int siwx91x_sock_recv_sync(struct net_context *context,
return ret;
}
static void siwx91x_sock_on_recv(sl_si91x_fd_set *read_fd, sl_si91x_fd_set *write_fd,
sl_si91x_fd_set *except_fd, int status)
static void siwx91x_sock_on_recv(sl_si91x_fdset_t *read_fd, sl_si91x_fdset_t *write_fd,
sl_si91x_fdset_t *except_fd, int status)
{
/* When CONFIG_NET_SOCKETS_OFFLOAD is set, only one interface exist */
struct siwx91x_dev *sidev = net_if_get_first_wifi()->if_dev->dev->data;
@ -162,7 +162,7 @@ static void siwx91x_sock_on_recv(sl_si91x_fd_set *read_fd, sl_si91x_fd_set *writ
}
}
sl_si91x_select(NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
sl_si91x_select(SLI_NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
siwx91x_sock_on_recv);
}
@ -189,7 +189,7 @@ static int siwx91x_sock_put(struct net_context *context)
SL_SI91X_FD_CLR(sockfd, &sidev->fds_watch);
memset(&sidev->fds_cb[sockfd], 0, sizeof(sidev->fds_cb[sockfd]));
sl_si91x_select(NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
sl_si91x_select(SLI_NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
siwx91x_sock_on_recv);
ret = sl_si91x_shutdown(sockfd, 0);
if (ret < 0) {
@ -221,7 +221,7 @@ static int siwx91x_sock_bind(struct net_context *context,
/* WiseConnect refuses to run select on TCP listening sockets */
if (net_context_get_proto(context) == IPPROTO_UDP) {
SL_SI91X_FD_SET(sockfd, &sidev->fds_watch);
sl_si91x_select(NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
sl_si91x_select(SLI_NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
siwx91x_sock_on_recv);
}
return 0;
@ -243,7 +243,7 @@ static int siwx91x_sock_connect(struct net_context *context,
ret = -errno;
}
SL_SI91X_FD_SET(sockfd, &sidev->fds_watch);
sl_si91x_select(NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
sl_si91x_select(SLI_NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
siwx91x_sock_on_recv);
net_context_set_state(context, NET_CONTEXT_CONNECTED);
if (cb) {
@ -301,7 +301,7 @@ static int siwx91x_sock_accept(struct net_context *context,
siwx91x_sockaddr_swap_bytes(&newcontext->remote, &addr_le, sizeof(addr_le));
SL_SI91X_FD_SET(ret, &sidev->fds_watch);
sl_si91x_select(NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
sl_si91x_select(SLI_NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
siwx91x_sock_on_recv);
if (cb) {
cb(newcontext, &addr_le, sizeof(addr_le), 0, user_data);
@ -388,7 +388,7 @@ static int siwx91x_sock_recv(struct net_context *context,
SL_SI91X_FD_SET(sockfd, &sidev->fds_watch);
}
sl_si91x_select(NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
sl_si91x_select(SLI_NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
siwx91x_sock_on_recv);
return ret;
}

View file

@ -35,6 +35,7 @@ zephyr_include_directories(
${WISECONNECT_DIR}/components/device/silabs/si91x/mcu/drivers/cmsis_driver/config
${WISECONNECT_DIR}/components/device/silabs/si91x/mcu/drivers/cmsis_driver
${WISECONNECT_DIR}/components/device/silabs/si91x/mcu/drivers/cmsis_driver/CMSIS/Driver/Include
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/firmware_upgrade
)
zephyr_library_sources(
@ -70,12 +71,11 @@ zephyr_library_sources_ifdef(CONFIG_DMA_SILABS_SIWX91X
if(CONFIG_WIFI_SILABS_SIWX91X)
zephyr_library_sources(
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/sl_net/src/sl_si91x_net_credentials.c
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/sl_net/src/sl_si91x_net_internal_stack.c
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/sl_net/src/sl_net_si91x_integration_handler.c
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/sl_net/src/sl_net_rsi_utility.c
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/sl_net/src/sli_net_si91x_utility.c
${WISECONNECT_DIR}/components/protocol/wifi/src/sl_wifi_basic_credentials.c
${WISECONNECT_DIR}/components/service/network_manager/si91x/sl_net_si91x.c
${WISECONNECT_DIR}/components/service/network_manager/src/sl_net_basic_profiles.c
${WISECONNECT_DIR}/components/service/network_manager/src/sl_net_credentials.c
)
@ -132,6 +132,7 @@ if(CONFIG_WISECONNECT_NETWORK_STACK)
${WISECONNECT_DIR}/components/device/silabs/si91x/mcu/core/chip/config
${WISECONNECT_DIR}/components/protocol/wifi/inc
${WISECONNECT_DIR}/components/service/network_manager/inc
${WISECONNECT_DIR}/components/sli_wifi_command_engine/inc
)
zephyr_library_sources(
${WISECONNECT_DIR}/components/common/src/sl_utility.c
@ -145,9 +146,11 @@ if(CONFIG_WISECONNECT_NETWORK_STACK)
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/memory/malloc_buffers.c
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/src/sl_rsi_utility.c
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/src/sl_si91x_driver.c
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/threading/sli_si91x_multithreaded.c
${WISECONNECT_DIR}/components/protocol/wifi/si91x/sl_wifi.c
${WISECONNECT_DIR}/components/protocol/wifi/src/sl_wifi_callback_framework.c
${WISECONNECT_DIR}/components/service/network_manager/src/sli_net_common_utility.c
${WISECONNECT_DIR}/components/sli_si91x_wifi_event_handler/src/sli_si91x_wifi_event_handler.c
${WISECONNECT_DIR}/components/sli_wifi_command_engine/src/sli_wifi_command_engine.c
)
endif() # CONFIG_WISECONNECT_NETWORK_STACK

View file

@ -235,7 +235,7 @@ manifest:
groups:
- hal
- name: hal_silabs
revision: 40a0237e4812241de677441e02131d6c75830636
revision: 15994d76eac4be404825fbef35a1ef1a42e4fc50
path: modules/hal/silabs
groups:
- hal