mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
qcacmn: Add pdev_id for stats request command
Currently CP stats component does not fill the proper pdev_id in the command for the stats request. This causes the value sent to firmware to be 0 bydeafult. As per the logic in firmware, if the value is zero then the stats for all the pdevs are sent. To get only stats for a single pdev, send the pdev_id along with the vdev_id in the stats request command. Change-Id: Ic4ecad132c8764196b9f5ed6af76fe4f2778d8d1 CRs-Fixed: 2502459
This commit is contained in:
parent
0375108ffa
commit
0391a23ca3
1 changed files with 28 additions and 0 deletions
|
|
@ -34,6 +34,9 @@
|
|||
#include <wlan_cp_stats_utils_api.h>
|
||||
#include <wlan_cp_stats_mc_tgt_api.h>
|
||||
#include "../../../umac/cmn_services/utils/inc/wlan_utility.h"
|
||||
#ifdef WLAN_POLICY_MGR_ENABLE
|
||||
#include <wlan_policy_mgr_api.h>
|
||||
#endif
|
||||
|
||||
static void target_if_cp_stats_free_stats_event(struct stats_event *ev)
|
||||
{
|
||||
|
|
@ -595,6 +598,30 @@ static uint32_t get_stats_id(enum stats_req_type type)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef WLAN_POLICY_MGR_ENABLE
|
||||
static void
|
||||
target_if_cp_stats_update_pdev_id(struct stats_request_params *param,
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t vdev_id)
|
||||
{
|
||||
uint8_t pdev_id;
|
||||
QDF_STATUS status;
|
||||
|
||||
status = policy_mgr_get_mac_id_by_session_id(psoc, vdev_id, &pdev_id);
|
||||
if (!QDF_IS_STATUS_ERROR(status))
|
||||
param->pdev_id = pdev_id + 1;
|
||||
|
||||
cp_stats_debug("pdev id is %d", param->pdev_id);
|
||||
}
|
||||
#else
|
||||
static void
|
||||
target_if_cp_stats_update_pdev_id(struct stats_request_params *data,
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t vdev_id)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* target_if_cp_stats_send_stats_req() - API to send stats request to wmi
|
||||
* @psoc: pointer to psoc object
|
||||
|
|
@ -620,6 +647,7 @@ static QDF_STATUS target_if_cp_stats_send_stats_req(
|
|||
param.stats_id = get_stats_id(type);
|
||||
param.vdev_id = req->vdev_id;
|
||||
param.pdev_id = req->pdev_id;
|
||||
target_if_cp_stats_update_pdev_id(¶m, psoc, req->vdev_id);
|
||||
|
||||
return wmi_unified_stats_request_send(wmi_handle, req->peer_mac_addr,
|
||||
¶m);
|
||||
|
|
|
|||
Loading…
Reference in a new issue