From 2dfbe160584ba0d3964181d73a0d5cda613dabfa Mon Sep 17 00:00:00 2001 From: Chaitanya Tata Date: Tue, 6 Aug 2024 21:10:39 +0530 Subject: [PATCH] drivers: wifi: Add support for keepalive To handle interoperability issue with few APs, add a feature to keep sending keepalive frames periodically to avoid AP disconnecting the STA. This is disabled by default to avoid unnecessary power consumption as it's only seen with few old APs. Signed-off-by: Chaitanya Tata --- nrf_wifi/fw_if/umac_if/src/cmd.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nrf_wifi/fw_if/umac_if/src/cmd.c b/nrf_wifi/fw_if/umac_if/src/cmd.c index cd7cb50c24..3c1993240a 100644 --- a/nrf_wifi/fw_if/umac_if/src/cmd.c +++ b/nrf_wifi/fw_if/umac_if/src/cmd.c @@ -158,6 +158,14 @@ enum nrf_wifi_status umac_cmd_init(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, nrf_wifi_osal_log_info(fmac_dev_ctx->fpriv->opriv, "Management buffer offload enabled\n"); #endif /* CONFIG_NRF_WIFI_MGMT_BUFF_OFFLOAD */ +#ifdef CONFIG_NRF_WIFI_FEAT_KEEPALIVE + umac_cmd_data->keep_alive_enable = KEEP_ALIVE_ENABLED; + umac_cmd_data->keep_alive_period = CONFIG_NRF_WIFI_KEEPALIVE_PERIOD_S; + nrf_wifi_osal_log_dbg(fmac_dev_ctx->fpriv->opriv, + "Keepalive enabled with period %d\n", + umac_cmd_data->keepalive_period); +#endif /* CONFIG_NRF_WIFI_FEAT_KEEPALIVE */ + #ifndef CONFIG_NRF700X_RADIO_TEST nrf_wifi_osal_mem_cpy(fmac_dev_ctx->fpriv->opriv, umac_cmd_data->rx_buf_pools,