Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.6: PS exit strategy configuration #17160

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions drivers/wifi/nrf700x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -747,3 +747,24 @@ config NRF_WIFI_KEEPALIVE_PERIOD_S
help
Keepalive period in seconds to send keepalive packets to the AP.
endif

choice NRF_WIFI_PS_EXIT_STRATEGY
prompt "Power save exit strategy"
default NRF_WIFI_PS_INT_PS
help
Select the power save exit strategy to retrieve buffered data from AP.

config NRF_WIFI_PS_EXIT_EVERY_TIM
bool "Exit power save every time to retrieve buffered data from AP"
help
Exit power save every time to retrieve buffered data from AP. Entering back to
power save mode might take some time and power.

config NRF_WIFI_PS_INT_PS
bool "Exit power save based on an intelligent algorithm"
help
Exit power save based on an intelligent algorithm to retrieve buffered data from AP.
The algorithm tracks the buffered data at the AP and then dynamically decides
whether to stay in PS (for lower amount of buffered data) or exit PS (for higher
amount of buffered data).
endchoice
23 changes: 23 additions & 0 deletions drivers/wifi/nrf700x/src/wifi_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,24 @@ int nrf_wifi_set_power_save(const struct device *dev,
vif_ctx_zep->vif_idx,
params->wakeup_mode);
break;
case WIFI_PS_PARAM_EXIT_STRATEGY:
unsigned int exit_strategy;

if (params->exit_strategy == WIFI_PS_EXIT_EVERY_TIM) {
exit_strategy = EVERY_TIM;
} else if (params->exit_strategy == WIFI_PS_EXIT_CUSTOM_ALGO) {
exit_strategy = INT_PS;
} else {
params->fail_reason =
WIFI_PS_PARAM_FAIL_INVALID_EXIT_STRATEGY;
return -EINVAL;
}

status = nrf_wifi_fmac_set_ps_exit_strategy(
rpu_ctx_zep->rpu_ctx,
vif_ctx_zep->vif_idx,
exit_strategy);
break;
default:
params->fail_reason =
WIFI_PS_PARAM_FAIL_CMD_EXEC_FAIL;
Expand Down Expand Up @@ -381,6 +399,11 @@ void nrf_wifi_event_proc_get_power_save_info(void *vif_ctx,
vif_ctx_zep->ps_info->ps_params.timeout_ms = ps_info->ps_timeout;
vif_ctx_zep->ps_info->ps_params.listen_interval = ps_info->listen_interval;
vif_ctx_zep->ps_info->ps_params.wakeup_mode = ps_info->extended_ps;
if (ps_info->ps_exit_strategy == EVERY_TIM) {
vif_ctx_zep->ps_info->ps_params.exit_strategy = WIFI_PS_EXIT_EVERY_TIM;
} else if (ps_info->ps_exit_strategy == INT_PS) {
vif_ctx_zep->ps_info->ps_params.exit_strategy = WIFI_PS_EXIT_CUSTOM_ALGO;
}

for (int i = 0; i < ps_info->num_twt_flows; i++) {
struct twt_interval_float twt_interval_float;
Expand Down
4 changes: 2 additions & 2 deletions west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ manifest:
# https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html
- name: zephyr
repo-path: sdk-zephyr
revision: 02ae5d8ded21e670b9930cb00fb64ae9310ed9dc
revision: 090547835b50fc910abb58d4bf026203b9dbac05
import:
# In addition to the zephyr repository itself, NCS also
# imports the contents of zephyr/west.yml at the above
Expand Down Expand Up @@ -142,7 +142,7 @@ manifest:
- name: nrfxlib
repo-path: sdk-nrfxlib
path: nrfxlib
revision: 3cb1a198735889c7d01ece0aa295bc316b4840f8
revision: 0d57997cfc6fabd9c2ddec8cbe68cdcc228ae74d
- name: trusted-firmware-m
repo-path: sdk-trusted-firmware-m
path: modules/tee/tf-m/trusted-firmware-m
Expand Down
Loading