Skip to content

Commit 8986e3e

Browse files
committed
drivers: wifi: siwx91x: MQTT NetStack Application
To support the SiWx917 MQTT 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 Signed-off-by: Rahul Gurram <rahul.gurram@silabs.com>
1 parent fc347cf commit 8986e3e

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

drivers/wifi/siwx91x/Kconfig.siwx91x

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,15 @@ config WIFI_SILABS_SIWX91X_HTTP_CLIENT
8989
than the Zephyr one. See also sl_http_client.h in Silabs HAL for more
9090
information about the API.
9191

92+
config WIFI_SILABS_SIWX91X_MQTT_CLIENT
93+
bool "Offloaded implementation of MQTT client"
94+
help
95+
Enable this option to allow to use the MQTT(Message Queuing Telemetry
96+
Transport) implementation provided by the Network Co-Processor present
97+
on SiWx91x series. This implementation usually require less resources
98+
than the Zephyr one. See also sl_mqtt_client.h in Silabs HAL for more
99+
information about the API.
100+
92101
config WIFI_SILABS_SIWX91X_ENABLE_ROAMING
93102
bool "WiFi roaming support"
94103
default y

modules/hal_silabs/wiseconnect/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,16 @@ if(CONFIG_WIFI_SILABS_SIWX91X_NET_STACK_OFFLOAD)
133133
${WISECONNECT_DIR}/components/service/http_client/si91x_socket/sl_http_client.c
134134
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/src/sl_si91x_http_client_callback_framework.c
135135
)
136+
zephyr_compile_definitions_ifdef(CONFIG_WIFI_SILABS_SIWX91X_MQTT_CLIENT
137+
SLI_SI91X_EMBEDDED_MQTT_CLIENT
138+
)
139+
zephyr_include_directories_ifdef(CONFIG_WIFI_SILABS_SIWX91X_MQTT_CLIENT
140+
${WISECONNECT_DIR}/components/service/mqtt/inc
141+
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/inc/mqtt/inc
142+
)
143+
zephyr_library_sources_ifdef(CONFIG_WIFI_SILABS_SIWX91X_MQTT_CLIENT
144+
${WISECONNECT_DIR}/components/service/mqtt/si91x/sl_mqtt_client.c
145+
)
136146
endif() # CONFIG_WIFI_SILABS_SIWX91X_NET_STACK_OFFLOAD
137147
if(CONFIG_BT_SILABS_SIWX91X)
138148
zephyr_compile_definitions(

soc/silabs/silabs_siwx91x/siwg917/nwp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ static void siwx91x_configure_network_stack(sl_si91x_boot_configuration_t *boot_
133133
if (IS_ENABLED(CONFIG_WIFI_SILABS_SIWX91X_HTTP_CLIENT)) {
134134
boot_config->tcp_ip_feature_bit_map |= SL_SI91X_TCP_IP_FEAT_HTTP_CLIENT;
135135
}
136+
if (IS_ENABLED(CONFIG_WIFI_SILABS_SIWX91X_MQTT_CLIENT)) {
137+
boot_config->ext_tcp_ip_feature_bit_map |= SL_SI91X_EXT_EMB_MQTT_ENABLE;
138+
}
136139
boot_config->ext_tcp_ip_feature_bit_map |= SL_SI91X_EXT_TCP_IP_WINDOW_SCALING;
137140
boot_config->ext_tcp_ip_feature_bit_map |= SL_SI91X_EXT_TCP_IP_TOTAL_SELECTS(10);
138141

0 commit comments

Comments
 (0)