Skip to content

Commit

Permalink
drivers: wifi: Option for Qos NULL frame based power save
Browse files Browse the repository at this point in the history
[SHEL-2947] QoS null frame based legacy power save support.

Signed-off-by: Ajay Parida <[email protected]>
  • Loading branch information
ajayparida committed Jul 16, 2024
1 parent 5cefd50 commit d6bdda2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
12 changes: 12 additions & 0 deletions drivers/wifi/nrf700x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -403,3 +403,15 @@ 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.

choice NRF_WIFI_PS_DATA_RETRIEVAL_MODE
prompt "Power save data retrieval mode"
default NRF_WIFI_PS_POLL_BASED_RETRIEVAL
help
Select the mechanism to retrieve buffered data from AP.
config NRF_WIFI_PS_POLL_BASED_RETRIEVAL
bool "PS-Poll based mechanism to retrieve buffered data from AP"
config NRF_WIFI_QOS_NULL_BASED_RETRIEVAL
bool "QoS null frame based mechanism to retrieve buffered data from AP"

endchoice
14 changes: 7 additions & 7 deletions drivers/wifi/nrf700x/osal/fw_if/umac_if/inc/fw/host_rpu_sys_if.h
Original file line number Diff line number Diff line change
Expand Up @@ -785,12 +785,12 @@ enum op_band {
* from the AP in power save mode.
*/
enum data_retrieve_frame {
/** Retrieves data from the AP using a PS-Poll frame */
PS_POLL_FRAME,
/** Retrieves data from the AP using a QoS Null frame */
QOS_NULL_FRAME,
/** For future implementation. The RPU will decide which frame to use */
AUTOMATIC
/** Retrieves data from the AP using a PS-Poll frame */
PS_POLL_FRAME,
/** Retrieves data from the AP using a QoS Null frame */
QOS_NULL_FRAME,
/** For future implementation. The RPU will decide which frame to use */
AUTOMATIC
};

#define TWT_EXTEND_SP_EDCA 0x1
Expand Down Expand Up @@ -839,7 +839,7 @@ struct nrf_wifi_cmd_sys_init {
*/
unsigned int discon_timeout;
/** RPU uses QoS null frame or PS-Poll frame to retrieve buffered frames
* from the AP in power save @ref data_retrieve_frame.
* from the AP in power save @ref data_retrieve_frame.
*/
unsigned char ps_data_retrieval_mode;
} __NRF_WIFI_PKD;
Expand Down
8 changes: 7 additions & 1 deletion drivers/wifi/nrf700x/osal/fw_if/umac_if/src/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,13 @@ enum nrf_wifi_status umac_cmd_init(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx,
umac_cmd_data->disable_beamforming = 1;
}

status = nrf_wifi_hal_ctrl_cmd_send(fmac_dev_ctx->hal_dev_ctx,
#if defined(CONFIG_NRF_WIFI_QOS_NULL_BASED_RETRIEVAL)
umac_cmd_data->ps_data_retrieval_mode = QOS_NULL_FRAME;
#else
umac_cmd_data->ps_data_retrieval_mode = PS_POLL_FRAME;
#endif /* CONFIG_NRF_WIFI_QOS_NULL_BASED_RETRIEVAL */

status = nrf_wifi_hal_ctrl_cmd_send(fmac_dev_ctx->hal_dev_ctx,
umac_cmd,
(sizeof(*umac_cmd) + len));

Expand Down

0 comments on commit d6bdda2

Please sign in to comment.