qcacmn: Add WMI support to force power save active MLO links
Add WMI command support to force power save on all the active MLO links for a defined number of beacon periods. Force power save allows the firmware to suspend STA links for X beacon periods and remain asleep even if the AP advertises TIM as opposed to regular power save mode where STA links wake up if the AP indicates that it has buffered data to send. Change-Id: I381a107f3f5f479b0eee4f526a49d6fc886aced0 CRs-Fixed: 3509543
This commit is contained in:

committed by
Rahul Choudhary

parent
2d67497cfb
commit
61a91c820d
@@ -76,6 +76,16 @@ QDF_STATUS wmi_send_mlo_link_removal_cmd(
|
|||||||
wmi_unified_t wmi,
|
wmi_unified_t wmi,
|
||||||
const struct mlo_link_removal_cmd_params *param);
|
const struct mlo_link_removal_cmd_params *param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wmi_send_mlo_vdev_pause() - Send WMI command for MLO vdev pause
|
||||||
|
* @wmi: wmi handle
|
||||||
|
* @info: MLO vdev pause information
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS of operation
|
||||||
|
*/
|
||||||
|
QDF_STATUS wmi_send_mlo_vdev_pause(wmi_unified_t wmi,
|
||||||
|
struct mlo_vdev_pause *info);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wmi_extract_mlo_link_removal_evt_fixed_param() - Extract fixed parameters TLV
|
* wmi_extract_mlo_link_removal_evt_fixed_param() - Extract fixed parameters TLV
|
||||||
* from the MLO link removal WMI event
|
* from the MLO link removal WMI event
|
||||||
|
@@ -3099,6 +3099,10 @@ QDF_STATUS
|
|||||||
(*send_mlo_link_set_active_cmd)(wmi_unified_t wmi_handle,
|
(*send_mlo_link_set_active_cmd)(wmi_unified_t wmi_handle,
|
||||||
struct mlo_link_set_active_param *param);
|
struct mlo_link_set_active_param *param);
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
(*send_mlo_vdev_pause)(wmi_unified_t wmi_handle,
|
||||||
|
struct mlo_vdev_pause *info);
|
||||||
|
|
||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
(*extract_mlo_link_set_active_resp)(wmi_unified_t wmi_handle,
|
(*extract_mlo_link_set_active_resp)(wmi_unified_t wmi_handle,
|
||||||
void *evt_buf,
|
void *evt_buf,
|
||||||
|
@@ -164,6 +164,15 @@ QDF_STATUS wmi_send_mlo_link_removal_cmd(
|
|||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDF_STATUS wmi_send_mlo_vdev_pause(wmi_unified_t wmi,
|
||||||
|
struct mlo_vdev_pause *info)
|
||||||
|
{
|
||||||
|
if (wmi->ops->send_mlo_vdev_pause)
|
||||||
|
return wmi->ops->send_mlo_vdev_pause(wmi, info);
|
||||||
|
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_mlo_link_removal_evt_fixed_param(
|
QDF_STATUS wmi_extract_mlo_link_removal_evt_fixed_param(
|
||||||
struct wmi_unified *wmi,
|
struct wmi_unified *wmi,
|
||||||
void *buf,
|
void *buf,
|
||||||
|
@@ -720,6 +720,59 @@ static QDF_STATUS send_mlo_link_removal_cmd_tlv(
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* send_mlo_vdev_pause_cmd_tlv() - Send WMI command for MLO vdev pause
|
||||||
|
* @wmi_handle: wmi handle
|
||||||
|
* @info: MLO vdev pause information
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS of operation
|
||||||
|
*/
|
||||||
|
static QDF_STATUS send_mlo_vdev_pause_cmd_tlv(wmi_unified_t wmi_handle,
|
||||||
|
struct mlo_vdev_pause *info)
|
||||||
|
{
|
||||||
|
wmi_vdev_pause_cmd_fixed_param *fixed_params;
|
||||||
|
wmi_buf_t buf;
|
||||||
|
uint32_t buf_len = 0;
|
||||||
|
QDF_STATUS ret;
|
||||||
|
|
||||||
|
if (!info) {
|
||||||
|
wmi_err("ML vdev pause info is NULL");
|
||||||
|
return QDF_STATUS_E_NULL_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
buf_len = sizeof(*fixed_params);
|
||||||
|
|
||||||
|
buf = wmi_buf_alloc(wmi_handle, buf_len);
|
||||||
|
if (!buf) {
|
||||||
|
wmi_err("wmi buf alloc failed for vdev pause cmd: psoc (%pK) vdev(%u)",
|
||||||
|
wmi_handle->soc->wmi_psoc, info->vdev_id);
|
||||||
|
return QDF_STATUS_E_NOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Populate fixed params TLV */
|
||||||
|
fixed_params = (wmi_vdev_pause_cmd_fixed_param *)wmi_buf_data(buf);
|
||||||
|
WMITLV_SET_HDR(&fixed_params->tlv_header,
|
||||||
|
WMITLV_TAG_STRUC_wmi_vdev_pause_cmd_fixed_param,
|
||||||
|
WMITLV_GET_STRUCT_TLVLEN(wmi_vdev_pause_cmd_fixed_param));
|
||||||
|
fixed_params->vdev_id = info->vdev_id;
|
||||||
|
fixed_params->pause_dur_ms = info->vdev_pause_duration;
|
||||||
|
fixed_params->pause_type = WMI_VDEV_PAUSE_TYPE_MLO_LINK;
|
||||||
|
wmi_debug("vdev id: %d pause duration: %d pause type %d",
|
||||||
|
fixed_params->vdev_id, fixed_params->pause_dur_ms,
|
||||||
|
fixed_params->pause_type);
|
||||||
|
|
||||||
|
wmi_mtrace(WMI_VDEV_PAUSE_CMDID, fixed_params->vdev_id, 0);
|
||||||
|
ret = wmi_unified_cmd_send(wmi_handle, buf, buf_len,
|
||||||
|
WMI_VDEV_PAUSE_CMDID);
|
||||||
|
if (QDF_IS_STATUS_ERROR(ret)) {
|
||||||
|
wmi_err("Failed to send vdev pause cmd: psoc (%pK) vdev(%u)",
|
||||||
|
wmi_handle->soc->wmi_psoc, info->vdev_id);
|
||||||
|
wmi_buf_free(buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* extract_mlo_link_removal_evt_fixed_param_tlv() - Extract fixed parameters TLV
|
* extract_mlo_link_removal_evt_fixed_param_tlv() - Extract fixed parameters TLV
|
||||||
* from the MLO link removal WMI event
|
* from the MLO link removal WMI event
|
||||||
@@ -1848,4 +1901,6 @@ void wmi_11be_attach_tlv(wmi_unified_t wmi_handle)
|
|||||||
extract_mgmt_rx_mlo_link_removal_info_tlv;
|
extract_mgmt_rx_mlo_link_removal_info_tlv;
|
||||||
ops->extract_mlo_link_disable_request_evt_param =
|
ops->extract_mlo_link_disable_request_evt_param =
|
||||||
extract_mlo_link_disable_request_evt_param_tlv;
|
extract_mlo_link_disable_request_evt_param_tlv;
|
||||||
|
ops->send_mlo_vdev_pause =
|
||||||
|
send_mlo_vdev_pause_cmd_tlv;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user