Skip to content

Commit 92977e7

Browse files
committed
drivers: wifi: siwx91x: SiWx91x high performance configurations
To enhance throughput performance on the SiWx91x series, certain configurations need to be enabled in the SiWx91x. Signed-off-by: Rahul Gurram <[email protected]>
1 parent 8aba2e3 commit 92977e7

File tree

3 files changed

+47
-12
lines changed

3 files changed

+47
-12
lines changed

drivers/wifi/siwx91x/Kconfig.siwx91x

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,11 @@ config WIFI_SILABS_SIWX91X_ENABLE_INSTANT_SCAN
178178
# This device supports filtering scan results for only one SSID.
179179
config WIFI_MGMT_SCAN_SSID_FILT_MAX
180180
default 1
181+
182+
config WIFI_SIWX91X_HIGH_THROUGHPUT
183+
bool "high throughput"
184+
help
185+
Enable this option to improve the throughput performance of the SiWx91x
186+
series. This feature provides enhanced data transfer capabilities and
187+
improved network performance.
181188
endif

dts/arm/silabs/siwg917.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
* Less memory is allocated to Zephyr, more memory is allocated
6565
* to NWP, better are the WiFi and BLE performances.
6666
*/
67-
reg = <0x00000400 DT_SIZE_K(255)>;
67+
reg = <0x00000400 DT_SIZE_K(319)>;
6868
};
6969

7070
sram_dma1: memory-dma@24061c00 {

soc/silabs/silabs_siwx91x/siwg917/siwx91x_nwp.c

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,20 @@ BUILD_ASSERT(DT_REG_SIZE(DT_CHOSEN(zephyr_sram)) == KB(195) ||
3535
DT_REG_SIZE(DT_CHOSEN(zephyr_sram)) == KB(255) ||
3636
DT_REG_SIZE(DT_CHOSEN(zephyr_sram)) == KB(319));
3737

38+
#ifdef CONFIG_WIFI_SIWX91X_HIGH_THROUGHPUT
39+
#ifndef TX_POOL_RATIO
40+
#define TX_POOL_RATIO 1
41+
#endif
42+
43+
#ifndef RX_POOL_RATIO
44+
#define RX_POOL_RATIO 1
45+
#endif
46+
47+
#ifndef GLOBAL_POOL_RATIO
48+
#define GLOBAL_POOL_RATIO 1
49+
#endif
50+
#endif
51+
3852
struct siwx91x_nwp_data {
3953
char current_country_code[WIFI_COUNTRY_CODE_LEN];
4054
};
@@ -173,8 +187,10 @@ static void siwx91x_configure_sta_mode(sl_si91x_boot_configuration_t *boot_confi
173187
#ifdef CONFIG_WIFI_SILABS_SIWX91X
174188
boot_config->ext_tcp_ip_feature_bit_map = SL_SI91X_CONFIG_FEAT_EXTENSION_VALID;
175189
boot_config->ext_custom_feature_bit_map |=
176-
SL_SI91X_EXT_FEAT_IEEE_80211W |
177190
SL_SI91X_EXT_FEAT_FRONT_END_SWITCH_PINS_ULP_GPIO_4_5_0;
191+
if (!IS_ENABLED(CONFIG_WIFI_SIWX91X_HIGH_THROUGHPUT)) {
192+
boot_config->ext_custom_feature_bit_map |= SL_SI91X_EXT_FEAT_IEEE_80211W;
193+
}
178194
if (IS_ENABLED(CONFIG_WIFI_SILABS_SIWX91X_ENHANCED_MAX_PSP)) {
179195
boot_config->config_feature_bit_map = SL_SI91X_ENABLE_ENHANCED_MAX_PSP;
180196
}
@@ -318,17 +334,29 @@ static int siwx91x_get_nwp_config(const struct device *dev,
318334
SL_SI91X_FEAT_SECURITY_PSK | SL_SI91X_FEAT_AGGREGATION |
319335
SL_SI91X_FEAT_HIDE_PSK_CREDENTIALS,
320336
.tcp_ip_feature_bit_map = SL_SI91X_TCP_IP_FEAT_EXTENSION_VALID,
321-
.custom_feature_bit_map = SL_SI91X_CUSTOM_FEAT_EXTENSION_VALID |
322-
SL_SI91X_CUSTOM_FEAT_ASYNC_CONNECTION_STATUS |
323-
SL_SI91X_CUSTOM_FEAT_RTC_FROM_HOST,
337+
.custom_feature_bit_map =
338+
IS_ENABLED(CONFIG_WIFI_SIWX91X_HIGH_THROUGHPUT)
339+
? (SL_SI91X_CUSTOM_FEAT_SOC_CLK_CONFIG_160MHZ |
340+
SL_SI91X_CUSTOM_FEAT_EXTENSION_VALID)
341+
: (SL_SI91X_CUSTOM_FEAT_EXTENSION_VALID |
342+
SL_SI91X_CUSTOM_FEAT_ASYNC_CONNECTION_STATUS |
343+
SL_SI91X_CUSTOM_FEAT_RTC_FROM_HOST),
324344
.ext_custom_feature_bit_map =
325-
SL_SI91X_EXT_FEAT_XTAL_CLK | SL_SI91X_EXT_FEAT_1P8V_SUPPORT |
326-
SL_SI91X_EXT_FEAT_DISABLE_XTAL_CORRECTION |
327-
SL_SI91X_EXT_FEAT_NWP_QSPI_80MHZ_CLK_ENABLE |
328-
SL_SI91X_EXT_FEAT_FRONT_END_SWITCH_PINS_ULP_GPIO_4_5_0 |
329-
SL_SI91X_EXT_FEAT_FRONT_END_INTERNAL_SWITCH |
330-
SL_SI91X_EXT_FEAT_XTAL_CLK,
331-
}
345+
IS_ENABLED(CONFIG_WIFI_SIWX91X_HIGH_THROUGHPUT)
346+
? SL_SI91X_EXT_FEAT_FRONT_END_SWITCH_PINS_ULP_GPIO_4_5_0
347+
: (SL_SI91X_EXT_FEAT_XTAL_CLK |
348+
SL_SI91X_EXT_FEAT_1P8V_SUPPORT |
349+
SL_SI91X_EXT_FEAT_DISABLE_XTAL_CORRECTION |
350+
SL_SI91X_EXT_FEAT_NWP_QSPI_80MHZ_CLK_ENABLE |
351+
SL_SI91X_EXT_FEAT_FRONT_END_SWITCH_PINS_ULP_GPIO_4_5_0 |
352+
SL_SI91X_EXT_FEAT_FRONT_END_INTERNAL_SWITCH |
353+
SL_SI91X_EXT_FEAT_XTAL_CLK),
354+
},
355+
#if IS_ENABLED(CONFIG_WIFI_SIWX91X_HIGH_THROUGHPUT)
356+
.ta_pool = {.tx_ratio_in_buffer_pool = TX_POOL_RATIO,
357+
.rx_ratio_in_buffer_pool = RX_POOL_RATIO,
358+
.global_ratio_in_buffer_pool = GLOBAL_POOL_RATIO}
359+
#endif
332360
};
333361

334362
sl_si91x_boot_configuration_t *boot_config = &default_config.boot_config;

0 commit comments

Comments
 (0)