Skip to content

Commit 54b0040

Browse files
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>
1 parent e37b68b commit 54b0040

File tree

4 files changed

+19
-16
lines changed

4 files changed

+19
-16
lines changed

drivers/wifi/siwx91x/siwx91x_wifi.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ struct siwx91x_dev {
2424

2525
#ifdef CONFIG_WIFI_SILABS_SIWX91X_NET_STACK_OFFLOAD
2626
struct k_event fds_recv_event;
27-
sl_si91x_fd_set fds_watch;
27+
sl_si91x_fdset_t fds_watch;
2828
struct {
2929
net_context_recv_cb_t cb;
3030
void *user_data;
3131
struct net_context *context;
32-
} fds_cb[NUMBER_OF_SOCKETS];
32+
} fds_cb[SLI_NUMBER_OF_SOCKETS];
3333
#endif
3434
};
3535

drivers/wifi/siwx91x/siwx91x_wifi_socket.c

+10-10
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
LOG_MODULE_DECLARE(siwx91x_wifi);
2121

22-
BUILD_ASSERT(NUMBER_OF_SOCKETS < sizeof(uint32_t) * 8);
23-
BUILD_ASSERT(NUMBER_OF_SOCKETS < SIZEOF_FIELD(sl_si91x_fd_set, __fds_bits) * 8);
22+
BUILD_ASSERT(SLI_NUMBER_OF_SOCKETS < sizeof(uint32_t) * 8);
23+
BUILD_ASSERT(SLI_NUMBER_OF_SOCKETS < SIZEOF_FIELD(sl_si91x_fdset_t, __fds_bits) * 8);
2424

2525
NET_BUF_POOL_FIXED_DEFINE(siwx91x_tx_pool, 1, NET_ETH_MTU, 0, NULL);
2626
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,
143143
return ret;
144144
}
145145

146-
static void siwx91x_sock_on_recv(sl_si91x_fd_set *read_fd, sl_si91x_fd_set *write_fd,
147-
sl_si91x_fd_set *except_fd, int status)
146+
static void siwx91x_sock_on_recv(sl_si91x_fdset_t *read_fd, sl_si91x_fdset_t *write_fd,
147+
sl_si91x_fdset_t *except_fd, int status)
148148
{
149149
/* When CONFIG_NET_SOCKETS_OFFLOAD is set, only one interface exist */
150150
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
162162
}
163163
}
164164

165-
sl_si91x_select(NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
165+
sl_si91x_select(SLI_NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
166166
siwx91x_sock_on_recv);
167167
}
168168

@@ -189,7 +189,7 @@ static int siwx91x_sock_put(struct net_context *context)
189189

190190
SL_SI91X_FD_CLR(sockfd, &sidev->fds_watch);
191191
memset(&sidev->fds_cb[sockfd], 0, sizeof(sidev->fds_cb[sockfd]));
192-
sl_si91x_select(NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
192+
sl_si91x_select(SLI_NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
193193
siwx91x_sock_on_recv);
194194
ret = sl_si91x_shutdown(sockfd, 0);
195195
if (ret < 0) {
@@ -221,7 +221,7 @@ static int siwx91x_sock_bind(struct net_context *context,
221221
/* WiseConnect refuses to run select on TCP listening sockets */
222222
if (net_context_get_proto(context) == IPPROTO_UDP) {
223223
SL_SI91X_FD_SET(sockfd, &sidev->fds_watch);
224-
sl_si91x_select(NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
224+
sl_si91x_select(SLI_NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
225225
siwx91x_sock_on_recv);
226226
}
227227
return 0;
@@ -243,7 +243,7 @@ static int siwx91x_sock_connect(struct net_context *context,
243243
ret = -errno;
244244
}
245245
SL_SI91X_FD_SET(sockfd, &sidev->fds_watch);
246-
sl_si91x_select(NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
246+
sl_si91x_select(SLI_NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
247247
siwx91x_sock_on_recv);
248248
net_context_set_state(context, NET_CONTEXT_CONNECTED);
249249
if (cb) {
@@ -301,7 +301,7 @@ static int siwx91x_sock_accept(struct net_context *context,
301301
siwx91x_sockaddr_swap_bytes(&newcontext->remote, &addr_le, sizeof(addr_le));
302302

303303
SL_SI91X_FD_SET(ret, &sidev->fds_watch);
304-
sl_si91x_select(NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
304+
sl_si91x_select(SLI_NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
305305
siwx91x_sock_on_recv);
306306
if (cb) {
307307
cb(newcontext, &addr_le, sizeof(addr_le), 0, user_data);
@@ -388,7 +388,7 @@ static int siwx91x_sock_recv(struct net_context *context,
388388
SL_SI91X_FD_SET(sockfd, &sidev->fds_watch);
389389
}
390390

391-
sl_si91x_select(NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
391+
sl_si91x_select(SLI_NUMBER_OF_SOCKETS, &sidev->fds_watch, NULL, NULL, NULL,
392392
siwx91x_sock_on_recv);
393393
return ret;
394394
}

modules/hal_silabs/wiseconnect/CMakeLists.txt

+6-3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ zephyr_include_directories(
3535
${WISECONNECT_DIR}/components/device/silabs/si91x/mcu/drivers/cmsis_driver/config
3636
${WISECONNECT_DIR}/components/device/silabs/si91x/mcu/drivers/cmsis_driver
3737
${WISECONNECT_DIR}/components/device/silabs/si91x/mcu/drivers/cmsis_driver/CMSIS/Driver/Include
38+
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/firmware_upgrade
3839
)
3940

4041
zephyr_library_sources(
@@ -70,12 +71,11 @@ zephyr_library_sources_ifdef(CONFIG_DMA_SILABS_SIWX91X
7071

7172
if(CONFIG_WIFI_SILABS_SIWX91X)
7273
zephyr_library_sources(
73-
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/sl_net/src/sl_si91x_net_credentials.c
7474
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/sl_net/src/sl_si91x_net_internal_stack.c
7575
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/sl_net/src/sl_net_si91x_integration_handler.c
7676
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/sl_net/src/sl_net_rsi_utility.c
77+
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/sl_net/src/sli_net_si91x_utility.c
7778
${WISECONNECT_DIR}/components/protocol/wifi/src/sl_wifi_basic_credentials.c
78-
${WISECONNECT_DIR}/components/service/network_manager/si91x/sl_net_si91x.c
7979
${WISECONNECT_DIR}/components/service/network_manager/src/sl_net_basic_profiles.c
8080
${WISECONNECT_DIR}/components/service/network_manager/src/sl_net_credentials.c
8181
)
@@ -132,6 +132,7 @@ if(CONFIG_WISECONNECT_NETWORK_STACK)
132132
${WISECONNECT_DIR}/components/device/silabs/si91x/mcu/core/chip/config
133133
${WISECONNECT_DIR}/components/protocol/wifi/inc
134134
${WISECONNECT_DIR}/components/service/network_manager/inc
135+
${WISECONNECT_DIR}/components/sli_wifi_command_engine/inc
135136
)
136137
zephyr_library_sources(
137138
${WISECONNECT_DIR}/components/common/src/sl_utility.c
@@ -145,9 +146,11 @@ if(CONFIG_WISECONNECT_NETWORK_STACK)
145146
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/memory/malloc_buffers.c
146147
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/src/sl_rsi_utility.c
147148
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/src/sl_si91x_driver.c
148-
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/threading/sli_si91x_multithreaded.c
149149
${WISECONNECT_DIR}/components/protocol/wifi/si91x/sl_wifi.c
150150
${WISECONNECT_DIR}/components/protocol/wifi/src/sl_wifi_callback_framework.c
151+
${WISECONNECT_DIR}/components/service/network_manager/src/sli_net_common_utility.c
152+
${WISECONNECT_DIR}/components/sli_si91x_wifi_event_handler/src/sli_si91x_wifi_event_handler.c
153+
${WISECONNECT_DIR}/components/sli_wifi_command_engine/src/sli_wifi_command_engine.c
151154
)
152155
endif() # CONFIG_WISECONNECT_NETWORK_STACK
153156

west.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ manifest:
233233
groups:
234234
- hal
235235
- name: hal_silabs
236-
revision: 40a0237e4812241de677441e02131d6c75830636
236+
revision: pull/97/head
237237
path: modules/hal/silabs
238238
groups:
239239
- hal

0 commit comments

Comments
 (0)