Skip to content

Commit fc347cf

Browse files
drivers: wifi: siwx91x: HTTP NetStack Application
To support the SiWx917 HTTP Network Stack Application protocol offloading, we need to integrate the Silicon Labs APIs, so adding the corresponding source files and include files in the kconfig and CMakelist Co-authored-by: Swami Das Nampalli <swami.das@silabs.com> Signed-off-by: Swami Das Nampalli <swami.das@silabs.com> Signed-off-by: Rahul Gurram <rahul.gurram@silabs.com>
1 parent e6811d5 commit fc347cf

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

drivers/wifi/siwx91x/Kconfig.siwx91x

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,15 @@ config WIFI_SILABS_SIWX91X_SNTP_CLIENT
8080
than the Zephyr one. See also sl_sntp.h in Silabs HAL for more
8181
information about the API.
8282

83+
config WIFI_SILABS_SIWX91X_HTTP_CLIENT
84+
bool "Offloaded implementation of HTTP client"
85+
help
86+
Enable this option to allow to use the HTTP (hypertext transfer
87+
protocol) implementation provided by the Network Co-Processor present
88+
on SiWx91x series. This implementation usually require less resources
89+
than the Zephyr one. See also sl_http_client.h in Silabs HAL for more
90+
information about the API.
91+
8392
config WIFI_SILABS_SIWX91X_ENABLE_ROAMING
8493
bool "WiFi roaming support"
8594
default y

modules/hal_silabs/wiseconnect/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ zephyr_include_directories(
4040

4141
zephyr_library_sources(
4242
${SISDK_DIR}/platform/common/src/sl_core_cortexm.c
43+
${SISDK_DIR}/platform/common/src/sl_slist.c
4344
${WISECONNECT_DIR}/components/device/silabs/si91x/mcu/core/chip/src/rsi_deepsleep_soc.c
4445
${WISECONNECT_DIR}/components/device/silabs/si91x/mcu/core/chip/src/system_si91x.c
4546
${WISECONNECT_DIR}/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/clock_update.c
@@ -121,6 +122,17 @@ if(CONFIG_WIFI_SILABS_SIWX91X_NET_STACK_OFFLOAD)
121122
zephyr_library_sources_ifdef(CONFIG_WIFI_SILABS_SIWX91X_SNTP_CLIENT
122123
${WISECONNECT_DIR}/components/service/sntp/si91x/sl_sntp.c
123124
)
125+
zephyr_compile_definitions_ifdef(CONFIG_WIFI_SILABS_SIWX91X_HTTP_CLIENT
126+
SLI_SI91X_INTERNAL_HTTP_CLIENT
127+
)
128+
zephyr_include_directories_ifdef(CONFIG_WIFI_SILABS_SIWX91X_HTTP_CLIENT
129+
${WISECONNECT_DIR}/components/service/http_client/inc
130+
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/inc/http_client/inc
131+
)
132+
zephyr_library_sources_ifdef(CONFIG_WIFI_SILABS_SIWX91X_HTTP_CLIENT
133+
${WISECONNECT_DIR}/components/service/http_client/si91x_socket/sl_http_client.c
134+
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/src/sl_si91x_http_client_callback_framework.c
135+
)
124136
endif() # CONFIG_WIFI_SILABS_SIWX91X_NET_STACK_OFFLOAD
125137
if(CONFIG_BT_SILABS_SIWX91X)
126138
zephyr_compile_definitions(

soc/silabs/silabs_siwx91x/siwg917/nwp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ static void siwx91x_configure_network_stack(sl_si91x_boot_configuration_t *boot_
130130
if (IS_ENABLED(CONFIG_WIFI_SILABS_SIWX91X_SNTP_CLIENT)) {
131131
boot_config->tcp_ip_feature_bit_map |= SL_SI91X_TCP_IP_FEAT_SNTP_CLIENT;
132132
}
133+
if (IS_ENABLED(CONFIG_WIFI_SILABS_SIWX91X_HTTP_CLIENT)) {
134+
boot_config->tcp_ip_feature_bit_map |= SL_SI91X_TCP_IP_FEAT_HTTP_CLIENT;
135+
}
133136
boot_config->ext_tcp_ip_feature_bit_map |= SL_SI91X_EXT_TCP_IP_WINDOW_SCALING;
134137
boot_config->ext_tcp_ip_feature_bit_map |= SL_SI91X_EXT_TCP_IP_TOTAL_SELECTS(10);
135138

0 commit comments

Comments
 (0)