mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
qcacmn: classify qmi/wmi for WMI_REQUEST_STATS_CMDID
Classify qmi/wmi by request type, only TYPE_STATION_STATS is designed to be sent by qmi so far. other type will continue go with wmi. Change-Id: Ibaee99c0a9d59b0db634e84f3c0b6e40b65a185d CRs-Fixed: 3077792
This commit is contained in:
parent
b2aa7520e0
commit
c8e095d931
4 changed files with 21 additions and 7 deletions
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -366,6 +367,7 @@ static inline int wmi_process_qmi_fw_event(void *wmi_cb_ctx, void *buf, int len)
|
|||
* @buf: wmi command buffer
|
||||
* @buflen: wmi command buffer length
|
||||
* @cmd_id: WMI cmd id
|
||||
* @is_qmi_send_support:send by qmi is supported
|
||||
*
|
||||
* Note, it is NOT safe to access buf after calling this function!
|
||||
*
|
||||
|
|
@ -373,7 +375,8 @@ static inline int wmi_process_qmi_fw_event(void *wmi_cb_ctx, void *buf, int len)
|
|||
*/
|
||||
QDF_STATUS wmi_unified_cmd_send_pm_chk(struct wmi_unified *wmi_handle,
|
||||
wmi_buf_t buf, uint32_t buflen,
|
||||
uint32_t cmd_id);
|
||||
uint32_t cmd_id,
|
||||
bool is_qmi_send_support);
|
||||
|
||||
/**
|
||||
* wmi_unified_register_event() - WMI event handler
|
||||
|
|
|
|||
|
|
@ -813,12 +813,14 @@ typedef struct {
|
|||
* @vdev_id: vdev id
|
||||
* @pdev_id: pdev_id
|
||||
* @wmi_host_inst_rssi_args: Instantaneous rssi stats args
|
||||
* @is_qmi_send_support: support to send by qmi or not
|
||||
*/
|
||||
struct stats_request_params {
|
||||
uint32_t stats_id;
|
||||
uint8_t vdev_id;
|
||||
uint8_t pdev_id;
|
||||
wmi_host_inst_rssi_args rssi_args;
|
||||
bool is_qmi_send_support;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -392,6 +392,7 @@ send_stats_request_cmd_tlv(wmi_unified_t wmi_handle,
|
|||
wmi_request_stats_cmd_fixed_param *cmd;
|
||||
wmi_buf_t buf;
|
||||
uint16_t len = sizeof(wmi_request_stats_cmd_fixed_param);
|
||||
bool is_qmi_send_support;
|
||||
|
||||
buf = wmi_buf_alloc(wmi_handle, len);
|
||||
if (!buf)
|
||||
|
|
@ -407,15 +408,18 @@ send_stats_request_cmd_tlv(wmi_unified_t wmi_handle,
|
|||
cmd->pdev_id = wmi_handle->ops->convert_pdev_id_host_to_target(
|
||||
wmi_handle,
|
||||
param->pdev_id);
|
||||
is_qmi_send_support = param->is_qmi_send_support;
|
||||
|
||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(macaddr, &cmd->peer_macaddr);
|
||||
|
||||
wmi_debug("STATS REQ STATS_ID:%d VDEV_ID:%d PDEV_ID:%d-->",
|
||||
cmd->stats_id, cmd->vdev_id, cmd->pdev_id);
|
||||
wmi_debug("STATS REQ STATS_ID:%d VDEV_ID:%d PDEV_ID:%d, is_qmi_send_support %d",
|
||||
cmd->stats_id, cmd->vdev_id, cmd->pdev_id,
|
||||
is_qmi_send_support);
|
||||
|
||||
wmi_mtrace(WMI_REQUEST_STATS_CMDID, cmd->vdev_id, 0);
|
||||
ret = wmi_unified_cmd_send_pm_chk(wmi_handle, buf, len,
|
||||
WMI_REQUEST_STATS_CMDID);
|
||||
WMI_REQUEST_STATS_CMDID,
|
||||
is_qmi_send_support);
|
||||
|
||||
if (ret) {
|
||||
wmi_err("Failed to send stats request to fw =%d", ret);
|
||||
|
|
|
|||
|
|
@ -718,8 +718,12 @@ qdf_export_symbol(wmi_mtrace);
|
|||
|
||||
QDF_STATUS wmi_unified_cmd_send_pm_chk(struct wmi_unified *wmi_handle,
|
||||
wmi_buf_t buf,
|
||||
uint32_t buflen, uint32_t cmd_id)
|
||||
uint32_t buflen, uint32_t cmd_id,
|
||||
bool is_qmi_send_support)
|
||||
{
|
||||
if (!is_qmi_send_support)
|
||||
goto send_over_wmi;
|
||||
|
||||
if (!wmi_is_qmi_stats_enabled(wmi_handle))
|
||||
goto send_over_wmi;
|
||||
|
||||
|
|
@ -5292,7 +5296,7 @@ static QDF_STATUS send_process_ll_stats_get_cmd_tlv(wmi_unified_t wmi_handle,
|
|||
|
||||
wmi_mtrace(WMI_REQUEST_LINK_STATS_CMDID, cmd->vdev_id, 0);
|
||||
ret = wmi_unified_cmd_send_pm_chk(wmi_handle, buf, len,
|
||||
WMI_REQUEST_LINK_STATS_CMDID);
|
||||
WMI_REQUEST_LINK_STATS_CMDID, true);
|
||||
if (ret) {
|
||||
wmi_buf_free(buf);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
|
@ -5375,7 +5379,8 @@ static QDF_STATUS send_unified_ll_stats_get_sta_cmd_tlv(
|
|||
} else {
|
||||
ret = wmi_unified_cmd_send_pm_chk(
|
||||
wmi_handle, buf, len,
|
||||
WMI_REQUEST_UNIFIED_LL_GET_STA_CMDID);
|
||||
WMI_REQUEST_UNIFIED_LL_GET_STA_CMDID,
|
||||
true);
|
||||
}
|
||||
|
||||
if (QDF_IS_STATUS_ERROR(ret)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue