diff --git a/soc/silabs/silabs_siwx917/siwg917/nwp_init.c b/soc/silabs/silabs_siwx917/siwg917/nwp_init.c index fb8a3dc..94b7fc7 100644 --- a/soc/silabs/silabs_siwx917/siwg917/nwp_init.c +++ b/soc/silabs/silabs_siwx917/siwg917/nwp_init.c @@ -37,7 +37,6 @@ static int silabs_siwx917_nwp_init(void) .boot_config = { .oper_mode = SL_SI91X_CLIENT_MODE, .coex_mode = NWP_INIT_COEX_MODE, - .feature_bit_map = SL_SI91X_FEAT_SECURITY_OPEN | SL_SI91X_FEAT_WPS_DISABLE, .tcp_ip_feature_bit_map = SL_SI91X_TCP_IP_FEAT_EXTENSION_VALID, .ext_tcp_ip_feature_bit_map = SL_SI91X_CONFIG_FEAT_EXTENSION_VALID, .config_feature_bit_map = SL_SI91X_ENABLE_ENHANCED_MAX_PSP, @@ -45,23 +44,28 @@ static int silabs_siwx917_nwp_init(void) .ext_custom_feature_bit_map = MEMORY_CONFIG | SL_SI91X_EXT_FEAT_XTAL_CLK | - SL_SI91X_EXT_FEAT_IEEE_80211W | SL_SI91X_EXT_FEAT_FRONT_END_SWITCH_PINS_ULP_GPIO_4_5_0, - }}; + } + }; sl_si91x_boot_configuration_t *cfg = &network_config.boot_config; #ifdef CONFIG_WIFI_SIWX917 - cfg->tcp_ip_feature_bit_map |= -#ifdef CONFIG_NET_IPV6 - SL_SI91X_TCP_IP_FEAT_DHCPV6_CLIENT | SL_SI91X_TCP_IP_FEAT_IPV6 | -#endif -#ifndef CONFIG_WIFI_SIWX917_NET_STACK_OFFLOAD - SL_SI91X_TCP_IP_FEAT_BYPASS | -#endif - SL_SI91X_TCP_IP_FEAT_DHCPV4_CLIENT | SL_SI91X_TCP_IP_FEAT_DNS_CLIENT | - SL_SI91X_TCP_IP_FEAT_SSL | SL_SI91X_TCP_IP_FEAT_MDNSD | SL_SI91X_TCP_IP_FEAT_ICMP; - cfg->ext_tcp_ip_feature_bit_map |= - SL_SI91X_EXT_TCP_IP_WINDOW_SCALING | SL_SI91X_EXT_TCP_IP_TOTAL_SELECTS(10); + cfg->feature_bit_map |= SL_SI91X_FEAT_SECURITY_OPEN | SL_SI91X_FEAT_WPS_DISABLE, + cfg->ext_custom_feature_bit_map |= SL_SI91X_EXT_FEAT_IEEE_80211W; + if (IS_ENABLED(CONFIG_WIFI_SIWX917_NET_STACK_OFFLOAD)) { + cfg->ext_tcp_ip_feature_bit_map |= SL_SI91X_EXT_TCP_IP_WINDOW_SCALING; + cfg->ext_tcp_ip_feature_bit_map |= SL_SI91X_EXT_TCP_IP_TOTAL_SELECTS(10); + cfg->tcp_ip_feature_bit_map |= SL_SI91X_TCP_IP_FEAT_ICMP; + if (IS_ENABLED(CONFIG_NET_IPV6)) { + cfg->tcp_ip_feature_bit_map |= SL_SI91X_TCP_IP_FEAT_DHCPV6_CLIENT; + cfg->tcp_ip_feature_bit_map |= SL_SI91X_TCP_IP_FEAT_IPV6; + } + if (IS_ENABLED(CONFIG_NET_IPV4)) { + cfg->tcp_ip_feature_bit_map |= SL_SI91X_TCP_IP_FEAT_DHCPV4_CLIENT; + } + } else { + cfg->tcp_ip_feature_bit_map |= SL_SI91X_TCP_IP_FEAT_BYPASS; + } #endif #ifdef CONFIG_BT_SIWX917