qcacmn: Add support to extract RRM sta stats
Add support to extarct sta stats from WMI_CTRL_PATH_STATS_EVENTID by extracting wmi_ctrl_path_sta_rrm_stats_struct data Change-Id: I7235b8cb0237d828b0fe5e5eab0feadc016d9269 CRs-Fixed: 3583920
Este commit está contenido en:

cometido por
Rahul Choudhary

padre
03f89b0b85
commit
2ba3bfc4f7
@@ -97,6 +97,26 @@ void target_if_infra_cp_stats_free_stats_event(struct infra_cp_stats_event *ev)
|
|||||||
}
|
}
|
||||||
#endif /* WLAN_SUPPORT_TWT */
|
#endif /* WLAN_SUPPORT_TWT */
|
||||||
|
|
||||||
|
static
|
||||||
|
void target_if_infra_cp_stats_rrm_sta_stats_event_free(
|
||||||
|
struct infra_cp_stats_event *ev)
|
||||||
|
{
|
||||||
|
qdf_mem_free(ev->sta_stats);
|
||||||
|
ev->sta_stats = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static QDF_STATUS
|
||||||
|
target_if_infra_cp_stats_rrm_sta_stats_event_alloc(
|
||||||
|
struct infra_cp_stats_event *ev)
|
||||||
|
{
|
||||||
|
ev->sta_stats =
|
||||||
|
qdf_mem_malloc(sizeof(*ev->sta_stats));
|
||||||
|
if (!ev->sta_stats) {
|
||||||
|
return QDF_STATUS_E_NOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
#ifdef CONFIG_WLAN_BMISS
|
#ifdef CONFIG_WLAN_BMISS
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -157,6 +177,7 @@ void target_if_infra_cp_stats_event_free(struct infra_cp_stats_event *ev)
|
|||||||
{
|
{
|
||||||
target_if_infra_cp_stats_twt_event_free(ev);
|
target_if_infra_cp_stats_twt_event_free(ev);
|
||||||
target_if_infra_cp_stats_bmiss_event_free(ev);
|
target_if_infra_cp_stats_bmiss_event_free(ev);
|
||||||
|
target_if_infra_cp_stats_rrm_sta_stats_event_free(ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -173,11 +194,15 @@ target_if_infra_cp_stats_event_alloc(struct infra_cp_stats_event *ev)
|
|||||||
QDF_STATUS status;
|
QDF_STATUS status;
|
||||||
|
|
||||||
status = target_if_infra_cp_stats_twt_event_alloc(ev);
|
status = target_if_infra_cp_stats_twt_event_alloc(ev);
|
||||||
if (status)
|
if (QDF_IS_STATUS_ERROR(status))
|
||||||
return QDF_STATUS_E_NOMEM;
|
return QDF_STATUS_E_NOMEM;
|
||||||
|
|
||||||
status = target_if_infra_cp_stats_bmiss_event_alloc(ev);
|
status = target_if_infra_cp_stats_bmiss_event_alloc(ev);
|
||||||
if (status)
|
if (QDF_IS_STATUS_ERROR(status))
|
||||||
|
return QDF_STATUS_E_NOMEM;
|
||||||
|
|
||||||
|
status = target_if_infra_cp_stats_rrm_sta_stats_event_alloc(ev);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status))
|
||||||
return QDF_STATUS_E_NOMEM;
|
return QDF_STATUS_E_NOMEM;
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
|
@@ -157,6 +157,47 @@ static void wmi_twt_extract_stats_struct(void *tag_buf,
|
|||||||
}
|
}
|
||||||
#endif /* WLAN_SUPPORT_TWT */
|
#endif /* WLAN_SUPPORT_TWT */
|
||||||
|
|
||||||
|
#ifdef WLAN_SUPPORT_INFRA_CTRL_PATH_STATS
|
||||||
|
static void
|
||||||
|
wmi_extract_ctrl_path_rrm_sta_stats_tlv(void *tag_buf,
|
||||||
|
struct cp_sta_stats *param)
|
||||||
|
{
|
||||||
|
wmi_ctrl_path_sta_rrm_stats_struct *wmi_stats_buf =
|
||||||
|
(wmi_ctrl_path_sta_rrm_stats_struct *)tag_buf;
|
||||||
|
param->group.counter_stats.group_transmitted_frame_count =
|
||||||
|
wmi_stats_buf->dot11GroupTransmittedFrameCount;
|
||||||
|
param->group.counter_stats.group_received_frame_count =
|
||||||
|
wmi_stats_buf->dot11GroupReceivedFrameCount;
|
||||||
|
param->group.counter_stats.transmitted_frame_count =
|
||||||
|
wmi_stats_buf->dot11TransmittedFrameCount;
|
||||||
|
param->group.mac_stats.ack_failure_count =
|
||||||
|
wmi_stats_buf->dot11AckFailureCount;
|
||||||
|
param->group.counter_stats.failed_count =
|
||||||
|
wmi_stats_buf->dot11FailedCount;
|
||||||
|
param->group.counter_stats.fcs_error_count =
|
||||||
|
wmi_stats_buf->dot11FCSErrorCount;
|
||||||
|
param->group.mac_stats.rts_success_count =
|
||||||
|
wmi_stats_buf->dot11RTSSuccessCount;
|
||||||
|
param->group.mac_stats.rts_failure_count =
|
||||||
|
wmi_stats_buf->dot11RTSFailureCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
wmi_rrm_extract_sta_stats_struct(void *tag_buf,
|
||||||
|
struct infra_cp_stats_event *params)
|
||||||
|
{
|
||||||
|
struct cp_sta_stats *rrm_sta_stats;
|
||||||
|
|
||||||
|
rrm_sta_stats = params->sta_stats;
|
||||||
|
wmi_extract_ctrl_path_rrm_sta_stats_tlv(tag_buf, rrm_sta_stats);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline void
|
||||||
|
wmi_rrm_extract_sta_stats_struct(void *tag_buf,
|
||||||
|
struct infra_cp_stats_event *params)
|
||||||
|
{}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_WLAN_BMISS
|
#ifdef CONFIG_WLAN_BMISS
|
||||||
static void
|
static void
|
||||||
wmi_extract_ctrl_path_bmiss_stats_tlv(void *tag_buf,
|
wmi_extract_ctrl_path_bmiss_stats_tlv(void *tag_buf,
|
||||||
@@ -343,6 +384,10 @@ static void wmi_stats_extract_tag_struct(wmi_unified_t wmi_handle,
|
|||||||
wmi_pmlo_extract_stats_struct(wmi_handle, tag_buf, params);
|
wmi_pmlo_extract_stats_struct(wmi_handle, tag_buf, params);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case WMITLV_TAG_STRUC_wmi_ctrl_path_sta_rrm_stats_struct:
|
||||||
|
wmi_rrm_extract_sta_stats_struct(tag_buf, params);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Referencia en una nueva incidencia
Block a user