Skip to content

Commit

Permalink
drivers: wifi: Add support for keepalive
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
krish2718 authored and carlescufi committed Oct 17, 2024
1 parent 94f9fb9 commit 7c3d342
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/wifi/nrfwifi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,14 @@ zephyr_compile_definitions_ifdef(CONFIG_NRF_WIFI_MGMT_BUFF_OFFLOAD
-DNRF_WIFI_MGMT_BUFF_OFFLOAD
)

zephyr_compile_definitions_ifdef(CONFIG_NRF_WIFI_FEAT_KEEPALIVE
-DNRF_WIFI_FEAT_KEEPALIVE
)

zephyr_compile_definitions_ifdef(CONFIG_NRF_WIFI_FEAT_KEEPALIVE
-DNRF_WIFI_KEEPALIVE_PERIOD_S=${CONFIG_NRF_WIFI_KEEPALIVE_PERIOD_S}
)

zephyr_compile_definitions(
-DNRF70_RX_NUM_BUFS=${CONFIG_NRF70_RX_NUM_BUFS}
-DNRF70_MAX_TX_TOKENS=${CONFIG_NRF70_MAX_TX_TOKENS}
Expand Down
18 changes: 18 additions & 0 deletions drivers/wifi/nrfwifi/Kconfig.nrfwifi
Original file line number Diff line number Diff line change
Expand Up @@ -777,4 +777,22 @@ config NRF_WIFI_MGMT_BUFF_OFFLOAD
having to exchange commands and events for every management packet even if it is
consumed by UMAC.

config NRF_WIFI_FEAT_KEEPALIVE
bool "Wi-Fi keepalive feature for connection maintenance"
depends on NRF70_STA_MODE
help
Enable Wi-Fi keepalive feature to keep the connection alive by sending
keepalive packets to the AP. Primarily intended to interoperate with APs
that disconnect idle clients without any explicit checks. Slightly increases
power consumption.

if NRF_WIFI_FEAT_KEEPALIVE
config NRF_WIFI_KEEPALIVE_PERIOD_S
int "Keepalive period in seconds"
range 30 3600
default 60
help
Keepalive period in seconds to send keepalive packets to the AP.
endif

endif # WIFI_NRF70

0 comments on commit 7c3d342

Please sign in to comment.