drivers: wifi: Introduce SiWx91x WiFi driver

This driver allow to use Zephyr native IP stack or the IP stack provided
by HAL / WiseConnect.

The WiseConnect implementation may take advantage of the specific
features provided by the 917 (power consumption, speed,
validation...).

Some notable features are not available with this interface:
  - It seems Zephyr does not provide API to offload multicast membership
    management. User should be to directly call WiseConnect APIs
  - Support for ICMP frames is difficult. Note that WiseConnect
    automatically answer to ping request. It is just not possible to
    send ping requests and receive ping responses.
  - Zephyr and WiseConnect both support TLS offloading. However this
    patch does not implement it.
  - Reentrancy in the WiseConnect side is uncertain.

This implementation has been tested with samples/net/wifi/ (which relies
on subsys/net/lib/shell).

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
This commit is contained in:
Jérôme Pouiller 2025-02-03 14:48:09 +01:00 committed by Benjamin Cabé
commit 1544354862
11 changed files with 988 additions and 2 deletions

View file

@ -62,6 +62,36 @@ zephyr_library_sources_ifdef(CONFIG_DMA_SILABS_SIWX91X
${WISECONNECT_DIR}/components/device/silabs/si91x/mcu/drivers/rom_driver/src/rsi_rom_table_si91x.c
)
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/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
)
zephyr_compile_definitions_ifdef(CONFIG_NET_IPV6
SLI_SI91X_ENABLE_IPV6
)
zephyr_compile_definitions_ifdef(CONFIG_WIFI_SILABS_SIWX91X_NET_STACK_OFFLOAD
SLI_SI91X_OFFLOAD_NETWORK_STACK
SLI_SI91X_SOCKETS
)
zephyr_include_directories_ifdef(CONFIG_WIFI_SILABS_SIWX91X_NET_STACK_OFFLOAD
# Needed for <sys/socket.h>
${ZEPHYR_BASE}/include/zephyr/posix
)
zephyr_library_sources_ifdef(CONFIG_WIFI_SILABS_SIWX91X_NET_STACK_OFFLOAD
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/socket/src/sl_si91x_socket_utility.c
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/asynchronous_socket/src/sl_si91x_socket.c
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/sl_net/src/sl_net_si91x_callback_framework.c
${WISECONNECT_DIR}/components/service/network_manager/src/sl_net.c
)
endif() # CONFIG_WIFI_SILABS_SIWX91X
if(CONFIG_BT_SILABS_SIWX91X)
zephyr_compile_definitions(
SLI_SI91X_ENABLE_BLE