qcacmn: Convert WMI status code for TWT get_stats
Convert firmware enum WMI_GET_STATS_TWT_STATUS_T status code into host enum WMI_HOST_GET_STATS_TWT_STATUS. Change-Id: I8fbb497bff11a3629689d6d8e2be5b8c9835b2de CRs-Fixed: 2923085
This commit is contained in:

committed by
Madan Koyyalamudi

parent
4bdf46d8ed
commit
209a75fa6c
@@ -290,6 +290,19 @@ struct wmi_twt_add_dialog_param {
|
||||
b_twt_recommendation:3;
|
||||
};
|
||||
|
||||
/* enum - status code of Get stats TWT dialog
|
||||
* @WMI_HOST_GET_STATS_TWT_STATUS_OK: Get status TWT dialog successfully completed
|
||||
* @WMI_HOST_GET_STATS_TWT_STATUS_DIALOG_ID_NOT_EXIST: TWT dialog ID does not exist
|
||||
* @WMI_HOST_GET_STATS_TWT_STATUS_INVALID_PARAM: Invalid parameters
|
||||
* @WMI_HOST_GET_STATS_TWT_STATUS_UNKNOWN_ERROR: Unknown error
|
||||
*/
|
||||
enum WMI_HOST_GET_STATS_TWT_STATUS {
|
||||
WMI_HOST_GET_STATS_TWT_STATUS_OK,
|
||||
WMI_HOST_GET_STATS_TWT_STATUS_DIALOG_ID_NOT_EXIST,
|
||||
WMI_HOST_GET_STATS_TWT_STATUS_INVALID_PARAM,
|
||||
WMI_HOST_GET_STATS_TWT_STATUS_UNKNOWN_ERROR,
|
||||
};
|
||||
|
||||
/* enum - status code of adding TWT dialog
|
||||
* @WMI_HOST_ADD_TWT_STATUS_OK: adding TWT dialog successfully completed
|
||||
* @WMI_HOST_ADD_TWT_STATUS_TWT_NOT_ENABLED: TWT not enabled
|
||||
|
@@ -29,6 +29,21 @@ get_stats_req_twt_dialog_id(struct infra_cp_stats_cmd_info *req)
|
||||
return req->dialog_id;
|
||||
}
|
||||
|
||||
static enum WMI_HOST_GET_STATS_TWT_STATUS
|
||||
wmi_get_converted_twt_get_stats_status(WMI_GET_STATS_TWT_STATUS_T tgt_status)
|
||||
{
|
||||
switch (tgt_status) {
|
||||
case WMI_GET_STATS_TWT_STATUS_OK:
|
||||
return WMI_HOST_GET_STATS_TWT_STATUS_OK;
|
||||
case WMI_GET_STATS_TWT_STATUS_DIALOG_ID_NOT_EXIST:
|
||||
return WMI_HOST_GET_STATS_TWT_STATUS_DIALOG_ID_NOT_EXIST;
|
||||
case WMI_GET_STATS_TWT_STATUS_INVALID_PARAM:
|
||||
return WMI_HOST_GET_STATS_TWT_STATUS_INVALID_PARAM;
|
||||
default:
|
||||
return WMI_HOST_GET_STATS_TWT_STATUS_UNKNOWN_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
static inline
|
||||
void wmi_extract_ctrl_path_twt_stats_tlv(void *tag_buf,
|
||||
struct twt_infra_cp_stats_event *param)
|
||||
@@ -37,7 +52,7 @@ void wmi_extract_ctrl_path_twt_stats_tlv(void *tag_buf,
|
||||
(wmi_ctrl_path_twt_stats_struct *)tag_buf;
|
||||
|
||||
param->dialog_id = wmi_stats_buf->dialog_id;
|
||||
param->status = wmi_stats_buf->status;
|
||||
param->status = wmi_get_converted_twt_get_stats_status(wmi_stats_buf->status);
|
||||
param->num_sp_cycles = wmi_stats_buf->num_sp_cycles;
|
||||
param->avg_sp_dur_us = wmi_stats_buf->avg_sp_dur_us;
|
||||
param->min_sp_dur_us = wmi_stats_buf->min_sp_dur_us;
|
||||
|
Reference in New Issue
Block a user