Skip to content

Commit 971bcf6

Browse files
kartbenswamidas1998
authored andcommitted
drivers: wifi: siwx91x: SNTP NetStack Application protocol
To support the SiWx917 SNTP 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 fd6b05c commit 971bcf6

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

drivers/wifi/siwx91x/Kconfig.siwx91x

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ config WIFI_SILABS_SIWX91X_LIMIT_PACKET_BUF_PER_STA
7171
would be buffered when the STA is in Power Save (PS) mode.
7272
This helps manage buffer usage and ensures efficient packet handling.
7373

74+
config WIFI_SILABS_SIWX91X_SNTP_CLIENT
75+
bool "Offloaded implementation of SNTP client"
76+
help
77+
Enable this option to allow to use the SNTP (Simple Network Time
78+
protocol) implementation provided by the Network Co-Processor present
79+
on SiWx91x series. This implementation usually require less resources
80+
than the Zephyr one. See also sl_sntp.h in Silabs HAL for more
81+
information about the API.
82+
7483
config WIFI_SILABS_SIWX91X_ENABLE_ROAMING
7584
bool "WiFi roaming support"
7685
default y

modules/hal_silabs/wiseconnect/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,18 @@ if(CONFIG_WIFI_SILABS_SIWX91X)
110110
)
111111
endif() # CONFIG_WIFI_SILABS_SIWX91X
112112

113+
if(CONFIG_WIFI_SILABS_SIWX91X_NET_STACK_OFFLOAD)
114+
zephyr_compile_definitions_ifdef(CONFIG_WIFI_SILABS_SIWX91X_SNTP_CLIENT
115+
SLI_SI91X_INTERNAL_SNTP_CLIENT
116+
)
117+
zephyr_include_directories_ifdef(CONFIG_WIFI_SILABS_SIWX91X_SNTP_CLIENT
118+
${WISECONNECT_DIR}/components/service/sntp/inc
119+
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/inc/sntp
120+
)
121+
zephyr_library_sources_ifdef(CONFIG_WIFI_SILABS_SIWX91X_SNTP_CLIENT
122+
${WISECONNECT_DIR}/components/service/sntp/si91x/sl_sntp.c
123+
)
124+
endif() # CONFIG_WIFI_SILABS_SIWX91X_NET_STACK_OFFLOAD
113125
if(CONFIG_BT_SILABS_SIWX91X)
114126
zephyr_compile_definitions(
115127
SLI_SI91X_ENABLE_BLE

soc/silabs/silabs_siwx91x/siwg917/nwp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ static void siwx91x_configure_network_stack(sl_si91x_boot_configuration_t *boot_
127127
}
128128

129129
boot_config->tcp_ip_feature_bit_map |= SL_SI91X_TCP_IP_FEAT_ICMP;
130+
if (IS_ENABLED(CONFIG_WIFI_SILABS_SIWX91X_SNTP_CLIENT)) {
131+
boot_config->tcp_ip_feature_bit_map |= SL_SI91X_TCP_IP_FEAT_SNTP_CLIENT;
132+
}
130133
boot_config->ext_tcp_ip_feature_bit_map |= SL_SI91X_EXT_TCP_IP_WINDOW_SCALING;
131134
boot_config->ext_tcp_ip_feature_bit_map |= SL_SI91X_EXT_TCP_IP_TOTAL_SELECTS(10);
132135

west.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ manifest:
235235
groups:
236236
- hal
237237
- name: hal_silabs
238-
revision: a0095a7ac356a04e12188bb563e6207594f8e6b2
238+
revision: pull/100/head
239239
path: modules/hal/silabs
240240
groups:
241241
- hal

0 commit comments

Comments
 (0)