Skip to content

Commit

Permalink
drivers: wifi: siwx917: Drop unused features
Browse files Browse the repository at this point in the history
Since SiWx917 is able to use natice network stack, some NWP features are
not needed anymore.

This commit also try to keep WiFi features inside the "#ifdef
CONFIG_WIFI_SIWX917" statement.

Signed-off-by: Jérôme Pouiller <[email protected]>
  • Loading branch information
jerome-pouiller committed Oct 15, 2024
1 parent 6d0f902 commit 0dd9c71
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions soc/silabs/silabs_siwx917/siwg917/nwp_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,31 +37,35 @@ 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,
.custom_feature_bit_map = SL_SI91X_CUSTOM_FEAT_EXTENSION_VALID,
.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
Expand Down

0 comments on commit 0dd9c71

Please sign in to comment.