qcacmn: Support to get dpd status from FW

WMI changes to rerieve current dpd status from target.

CRs-Fixed: 2885488
Change-Id: Iddfcbf63fccac87b52d3ac242ba078f8210cb6d0
This commit is contained in:
Shwetha G K
2021-03-30 18:00:53 +05:30
کامیت شده توسط snandini
والد f0df95498a
کامیت 23d574115e
5فایلهای تغییر یافته به همراه77 افزوده شده و 0 حذف شده

مشاهده پرونده

@@ -4291,4 +4291,15 @@ QDF_STATUS wmi_unified_send_set_tpc_power_cmd(wmi_unified_t wmi_handle,
uint8_t vdev_id, uint8_t vdev_id,
struct reg_tpc_power_info *param); struct reg_tpc_power_info *param);
/**
* wmi_extract_dpd_status_ev_param() - extract dpd status from FW event
* @wmi_handle: wmi handle
* @evt_buf: pointer to event buf
* @param: dpd status info
*
* Return: QDF_STATUS_SUCCESS for success or error code
*/
QDF_STATUS wmi_extract_dpd_status_ev_param(wmi_unified_t wmi_handle,
void *evt_buf,
struct wmi_host_pdev_get_dpd_status_event *param);
#endif /* _WMI_UNIFIED_API_H_ */ #endif /* _WMI_UNIFIED_API_H_ */

مشاهده پرونده

@@ -4615,6 +4615,7 @@ typedef enum {
wmi_peer_create_conf_event_id, wmi_peer_create_conf_event_id,
wmi_pdev_cp_fwstats_eventid, wmi_pdev_cp_fwstats_eventid,
wmi_vdev_send_big_data_p2_eventid, wmi_vdev_send_big_data_p2_eventid,
wmi_pdev_get_dpd_status_event_id,
wmi_events_max, wmi_events_max,
} wmi_conv_event_id; } wmi_conv_event_id;
@@ -7922,4 +7923,21 @@ struct wmi_raw_event_buffer {
void *evt_raw_buf; void *evt_raw_buf;
void *evt_processed_buf; void *evt_processed_buf;
}; };
/* dpd_status fron WMI_PDEV_GET_DPD_STATUS_EVENTID */
enum wmi_host_dpd_status {
WMI_HOST_DPD_STATUS_FAIL = 0,
WMI_HOST_DPD_STATUS_PASS = 1,
WMI_HOST_DPD_STATUS_INVALID = 2,
};
/**
* struct wmi_host_pdev_get_dpd_status_event
* @pdev_id: pdev id
* @dpd_status: dpd status from FW - FAIL/PASS/INVALID
*/
struct wmi_host_pdev_get_dpd_status_event {
uint32_t pdev_id;
enum wmi_host_dpd_status dpd_status;
};
#endif /* _WMI_UNIFIED_PARAM_H_ */ #endif /* _WMI_UNIFIED_PARAM_H_ */

مشاهده پرونده

@@ -2531,6 +2531,9 @@ QDF_STATUS (*send_big_data_stats_request_cmd)(
wmi_unified_t wmi_handle, wmi_unified_t wmi_handle,
struct stats_request_params *param); struct stats_request_params *param);
#endif #endif
QDF_STATUS (*extract_dpd_status_ev_param)(wmi_unified_t wmi_handle,
void *evt_buf,
struct wmi_host_pdev_get_dpd_status_event *param);
}; };
/* Forward declartion for psoc*/ /* Forward declartion for psoc*/

مشاهده پرونده

@@ -3412,3 +3412,15 @@ QDF_STATUS wmi_unified_send_set_tpc_power_cmd(wmi_unified_t wmi_handle,
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
} }
QDF_STATUS
wmi_extract_dpd_status_ev_param(wmi_unified_t wmi_handle,
void *evt_buf,
struct wmi_host_pdev_get_dpd_status_event *param)
{
if (wmi_handle->ops->extract_dpd_status_ev_param)
return wmi_handle->ops->extract_dpd_status_ev_param(
wmi_handle, evt_buf, param);
return QDF_STATUS_E_FAILURE;
}

مشاهده پرونده

@@ -14881,6 +14881,36 @@ static QDF_STATUS send_set_tpc_power_cmd_tlv(wmi_unified_t wmi_handle,
return ret; return ret;
} }
/**
* extract_dpd_status_ev_param_tlv() - extract dpd status from FW event
* @wmi_handle: wmi handle
* @evt_buf: event buffer
* @param: dpd status info
*
* Return: QDF_STATUS_SUCCESS for success or error code
*/
static QDF_STATUS
extract_dpd_status_ev_param_tlv(wmi_unified_t wmi_handle,
void *evt_buf,
struct wmi_host_pdev_get_dpd_status_event *param)
{
WMI_PDEV_GET_DPD_STATUS_EVENTID_param_tlvs *param_buf;
wmi_pdev_get_dpd_status_evt_fixed_param *dpd_status;
param_buf = (WMI_PDEV_GET_DPD_STATUS_EVENTID_param_tlvs *)evt_buf;
if (!param_buf) {
wmi_err("Invalid get dpd_status event");
return QDF_STATUS_E_INVAL;
}
dpd_status = param_buf->fixed_param;
param->pdev_id = wmi_handle->ops->convert_pdev_id_target_to_host
(wmi_handle, dpd_status->pdev_id);
param->dpd_status = dpd_status->dpd_status;
return QDF_STATUS_SUCCESS;
}
struct wmi_ops tlv_ops = { struct wmi_ops tlv_ops = {
.send_vdev_create_cmd = send_vdev_create_cmd_tlv, .send_vdev_create_cmd = send_vdev_create_cmd_tlv,
.send_vdev_delete_cmd = send_vdev_delete_cmd_tlv, .send_vdev_delete_cmd = send_vdev_delete_cmd_tlv,
@@ -15247,6 +15277,7 @@ struct wmi_ops tlv_ops = {
.extract_pdev_csa_switch_count_status = .extract_pdev_csa_switch_count_status =
extract_pdev_csa_switch_count_status_tlv, extract_pdev_csa_switch_count_status_tlv,
.send_set_tpc_power_cmd = send_set_tpc_power_cmd_tlv, .send_set_tpc_power_cmd = send_set_tpc_power_cmd_tlv,
.extract_dpd_status_ev_param = extract_dpd_status_ev_param_tlv,
}; };
/** /**
@@ -15651,6 +15682,8 @@ event_ids[wmi_roam_scan_chan_list_id] =
WMI_CTRL_PATH_STATS_EVENTID; WMI_CTRL_PATH_STATS_EVENTID;
event_ids[wmi_vdev_send_big_data_p2_eventid] = event_ids[wmi_vdev_send_big_data_p2_eventid] =
WMI_VDEV_SEND_BIG_DATA_P2_EVENTID; WMI_VDEV_SEND_BIG_DATA_P2_EVENTID;
event_ids[wmi_pdev_get_dpd_status_event_id] =
WMI_PDEV_GET_DPD_STATUS_EVENTID;
} }
#ifdef WLAN_FEATURE_LINK_LAYER_STATS #ifdef WLAN_FEATURE_LINK_LAYER_STATS