diff --git a/drivers/wifi/nrf700x/Kconfig b/drivers/wifi/nrf700x/Kconfig index 0624eaf9d9de..4a5e8d98b971 100644 --- a/drivers/wifi/nrf700x/Kconfig +++ b/drivers/wifi/nrf700x/Kconfig @@ -403,3 +403,7 @@ config NRF_WIFI_AP_DEAD_DETECT_TIMEOUT help The number of seconds after which AP is declared dead if no beacons are received from the AP. Used to detect AP silently going down e.g., power off. + +config NRF_WIFI_QOS_NULLFRAME_PS + bool "Enable Wi-Fi QoS null frame based PS. RPU uses QoS null frames to retrieve buffered frames from the AP." + default n diff --git a/drivers/wifi/nrf700x/osal/fw_if/umac_if/inc/default/fmac_api.h b/drivers/wifi/nrf700x/osal/fw_if/umac_if/inc/default/fmac_api.h index e8f560653682..5c227c4522a3 100644 --- a/drivers/wifi/nrf700x/osal/fw_if/umac_if/inc/default/fmac_api.h +++ b/drivers/wifi/nrf700x/osal/fw_if/umac_if/inc/default/fmac_api.h @@ -918,6 +918,7 @@ void nrf_wifi_fmac_dev_rem(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx); * @param beamforming Enable/disable Wi-Fi beamforming. * @param tx_pwr_ctrl_params TX power control parameters to be passed to the RPU. * @param tx_pwr_ceil_params TX power ceil parameters for both frequency bands. + * @param qos_nullframe_ps Qos Null frame based power save. * * This function initializes the firmware of an RPU instance. The following is addressed * - BAL layer device initialization @@ -937,7 +938,8 @@ enum nrf_wifi_status nrf_wifi_fmac_dev_init(struct nrf_wifi_fmac_dev_ctx *fmac_d enum op_band op_band, bool beamforming, struct nrf_wifi_tx_pwr_ctrl_params *tx_pwr_ctrl_params, - struct nrf_wifi_tx_pwr_ceil_params *tx_pwr_ceil_params); + struct nrf_wifi_tx_pwr_ceil_params *tx_pwr_ceil_params, + bool qos_nullframe_ps); /** diff --git a/drivers/wifi/nrf700x/osal/fw_if/umac_if/inc/fmac_cmd.h b/drivers/wifi/nrf700x/osal/fw_if/umac_if/inc/fmac_cmd.h index 90519cc3d55f..be0ef31f5ddb 100644 --- a/drivers/wifi/nrf700x/osal/fw_if/umac_if/inc/fmac_cmd.h +++ b/drivers/wifi/nrf700x/osal/fw_if/umac_if/inc/fmac_cmd.h @@ -38,7 +38,11 @@ enum nrf_wifi_status umac_cmd_init(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, unsigned int phy_calib, enum op_band op_band, bool beamforming, - struct nrf_wifi_tx_pwr_ctrl_params *tx_pwr_ctrl_params); + struct nrf_wifi_tx_pwr_ctrl_params *tx_pwr_ctrl_params, +#ifndef CONFIG_NRF700X_RADIO_TEST + bool qos_nullframe_ps +#endif /* !CONFIG_NRF700X_RADIO_TEST */ + ); enum nrf_wifi_status umac_cmd_deinit(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx); diff --git a/drivers/wifi/nrf700x/osal/fw_if/umac_if/src/cmd.c b/drivers/wifi/nrf700x/osal/fw_if/umac_if/src/cmd.c index c05b0b47ecec..3db1d44fcba1 100644 --- a/drivers/wifi/nrf700x/osal/fw_if/umac_if/src/cmd.c +++ b/drivers/wifi/nrf700x/osal/fw_if/umac_if/src/cmd.c @@ -98,7 +98,11 @@ enum nrf_wifi_status umac_cmd_init(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, unsigned int phy_calib, enum op_band op_band, bool beamforming, - struct nrf_wifi_tx_pwr_ctrl_params *tx_pwr_ctrl_params) + struct nrf_wifi_tx_pwr_ctrl_params *tx_pwr_ctrl_params, +#ifndef CONFIG_NRF700X_RADIO_TEST + bool qos_nullframe_ps +#endif /* !CONFIG_NRF700X_RADIO_TEST */ + ) { enum nrf_wifi_status status = NRF_WIFI_STATUS_FAIL; struct host_rpu_msg *umac_cmd = NULL; @@ -193,6 +197,12 @@ enum nrf_wifi_status umac_cmd_init(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, umac_cmd_data->disable_beamforming = 1; } +#ifndef CONFIG_NRF700X_RADIO_TEST + if (qos_nullframe_ps) { + umac_cmd_data->nullframe_pwrsave = 1; + } +#endif /* !CONFIG_NRF700X_RADIO_TEST */ + status = nrf_wifi_hal_ctrl_cmd_send(fmac_dev_ctx->hal_dev_ctx, umac_cmd, (sizeof(*umac_cmd) + len)); diff --git a/drivers/wifi/nrf700x/osal/fw_if/umac_if/src/default/fmac_api.c b/drivers/wifi/nrf700x/osal/fw_if/umac_if/src/default/fmac_api.c index 2db1e6e5168c..858470953348 100644 --- a/drivers/wifi/nrf700x/osal/fw_if/umac_if/src/default/fmac_api.c +++ b/drivers/wifi/nrf700x/osal/fw_if/umac_if/src/default/fmac_api.c @@ -213,7 +213,8 @@ static enum nrf_wifi_status nrf_wifi_fmac_fw_init(struct nrf_wifi_fmac_dev_ctx * unsigned int phy_calib, enum op_band op_band, bool beamforming, - struct nrf_wifi_tx_pwr_ctrl_params *tx_pwr_ctrl) + struct nrf_wifi_tx_pwr_ctrl_params *tx_pwr_ctrl, + bool qos_nullframe_ps) { unsigned long start_time_us = 0; enum nrf_wifi_status status = NRF_WIFI_STATUS_FAIL; @@ -254,7 +255,8 @@ static enum nrf_wifi_status nrf_wifi_fmac_fw_init(struct nrf_wifi_fmac_dev_ctx * phy_calib, op_band, beamforming, - tx_pwr_ctrl); + tx_pwr_ctrl, + qos_nullframe_ps); if (status != NRF_WIFI_STATUS_SUCCESS) { nrf_wifi_osal_log_err(fmac_dev_ctx->fpriv->opriv, @@ -356,7 +358,8 @@ enum nrf_wifi_status nrf_wifi_fmac_dev_init(struct nrf_wifi_fmac_dev_ctx *fmac_d enum op_band op_band, bool beamforming, struct nrf_wifi_tx_pwr_ctrl_params *tx_pwr_ctrl_params, - struct nrf_wifi_tx_pwr_ceil_params *tx_pwr_ceil_params) + struct nrf_wifi_tx_pwr_ceil_params *tx_pwr_ceil_params, + bool qos_nullframe_ps) { enum nrf_wifi_status status = NRF_WIFI_STATUS_FAIL; struct nrf_wifi_fmac_otp_info otp_info; @@ -435,7 +438,8 @@ enum nrf_wifi_status nrf_wifi_fmac_dev_init(struct nrf_wifi_fmac_dev_ctx *fmac_d phy_calib, op_band, beamforming, - tx_pwr_ctrl_params); + tx_pwr_ctrl_params, + qos_nullframe_ps); if (status == NRF_WIFI_STATUS_FAIL) { nrf_wifi_osal_log_err(fmac_dev_ctx->fpriv->opriv, diff --git a/drivers/wifi/nrf700x/zephyr/src/zephyr_fmac_main.c b/drivers/wifi/nrf700x/zephyr/src/zephyr_fmac_main.c index 04712d10fcbf..a9c54e58891c 100644 --- a/drivers/wifi/nrf700x/zephyr/src/zephyr_fmac_main.c +++ b/drivers/wifi/nrf700x/zephyr/src/zephyr_fmac_main.c @@ -568,7 +568,9 @@ enum nrf_wifi_status nrf_wifi_fmac_dev_add_zep(struct nrf_wifi_drv_priv_zep *drv op_band, IS_ENABLED(CONFIG_NRF_WIFI_BEAMFORMING), &tx_pwr_ctrl_params, - &tx_pwr_ceil_params); + &tx_pwr_ceil_params, + IS_ENABLED(CONFIG_NRF_WIFI_QOS_NULLFRAME_PS) + ); #endif /* CONFIG_NRF700X_RADIO_TEST */