1*5113495bSYour Name /* 2*5113495bSYour Name * Copyright (c) 2013-2021, The Linux Foundation. All rights reserved. 3*5113495bSYour Name * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. 4*5113495bSYour Name * 5*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for any 6*5113495bSYour Name * purpose with or without fee is hereby granted, provided that the above 7*5113495bSYour Name * copyright notice and this permission notice appear in all copies. 8*5113495bSYour Name * 9*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10*5113495bSYour Name * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11*5113495bSYour Name * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12*5113495bSYour Name * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13*5113495bSYour Name * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14*5113495bSYour Name * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15*5113495bSYour Name * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16*5113495bSYour Name */ 17*5113495bSYour Name /** 18*5113495bSYour Name * DOC: Implement API's specific to control path stats component. 19*5113495bSYour Name */ 20*5113495bSYour Name 21*5113495bSYour Name #ifndef _WMI_UNIFIED_MC_CP_STATS_API_H_ 22*5113495bSYour Name #define _WMI_UNIFIED_MC_CP_STATS_API_H_ 23*5113495bSYour Name 24*5113495bSYour Name #include <wlan_cp_stats_mc_defs.h> 25*5113495bSYour Name 26*5113495bSYour Name /** 27*5113495bSYour Name * wmi_extract_per_chain_rssi_stats() - extract rssi stats from event 28*5113495bSYour Name * @wmi_handle: wmi handle 29*5113495bSYour Name * @evt_buf: pointer to event buffer 30*5113495bSYour Name * @index: Index into rssi stats 31*5113495bSYour Name * @rssi_stats: Pointer to hold rssi stats 32*5113495bSYour Name * 33*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 34*5113495bSYour Name */ 35*5113495bSYour Name QDF_STATUS 36*5113495bSYour Name wmi_extract_per_chain_rssi_stats(wmi_unified_t wmi_handle, void *evt_buf, 37*5113495bSYour Name uint32_t index, 38*5113495bSYour Name struct wmi_host_per_chain_rssi_stats *rssi_stats); 39*5113495bSYour Name 40*5113495bSYour Name /** 41*5113495bSYour Name * wmi_extract_peer_adv_stats() - extract advance (extd2) peer stats from event 42*5113495bSYour Name * @wmi_handle: wmi handle 43*5113495bSYour Name * @evt_buf: pointer to event buffer 44*5113495bSYour Name * @peer_adv_stats: Pointer to hold extended peer stats 45*5113495bSYour Name * 46*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 47*5113495bSYour Name */ 48*5113495bSYour Name QDF_STATUS 49*5113495bSYour Name wmi_extract_peer_adv_stats(wmi_unified_t wmi_handle, void *evt_buf, 50*5113495bSYour Name struct wmi_host_peer_adv_stats *peer_adv_stats); 51*5113495bSYour Name 52*5113495bSYour Name #ifdef WLAN_FEATURE_MIB_STATS 53*5113495bSYour Name /** 54*5113495bSYour Name * wmi_extract_mib_stats() - extract mib stats from event 55*5113495bSYour Name * @wmi_handle: wmi handle 56*5113495bSYour Name * @evt_buf: pointer to event buffer 57*5113495bSYour Name * @mib_stats: pointer to hold mib stats 58*5113495bSYour Name * 59*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 60*5113495bSYour Name */ 61*5113495bSYour Name QDF_STATUS wmi_extract_mib_stats(wmi_unified_t wmi_handle, void *evt_buf, 62*5113495bSYour Name struct mib_stats_metrics *mib_stats); 63*5113495bSYour Name #endif 64*5113495bSYour Name 65*5113495bSYour Name /** 66*5113495bSYour Name * wmi_unified_peer_stats_request_send() - send peer stats request to fw 67*5113495bSYour Name * @wmi_handle: wmi handle 68*5113495bSYour Name * @param: pointer to peer stats request parameters 69*5113495bSYour Name * 70*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 71*5113495bSYour Name */ 72*5113495bSYour Name QDF_STATUS 73*5113495bSYour Name wmi_unified_peer_stats_request_send(wmi_unified_t wmi_handle, 74*5113495bSYour Name struct peer_stats_request_params *param); 75*5113495bSYour Name 76*5113495bSYour Name /** 77*5113495bSYour Name * wmi_extract_peer_stats_param() - extract all stats count from event 78*5113495bSYour Name * @wmi_handle: wmi handle 79*5113495bSYour Name * @evt_buf: pointer to event buffer 80*5113495bSYour Name * @stats_param: Pointer to hold stats count 81*5113495bSYour Name * 82*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 83*5113495bSYour Name */ 84*5113495bSYour Name QDF_STATUS 85*5113495bSYour Name wmi_extract_peer_stats_param(wmi_unified_t wmi_handle, void *evt_buf, 86*5113495bSYour Name wmi_host_stats_event *stats_param); 87*5113495bSYour Name 88*5113495bSYour Name /** 89*5113495bSYour Name * wmi_extract_peer_stats_info() - extract peer stats info from event 90*5113495bSYour Name * @wmi_handle: wmi handle 91*5113495bSYour Name * @evt_buf: pointer to event buffer 92*5113495bSYour Name * @index: Index into beacon stats 93*5113495bSYour Name * @peer_stats_info: Pointer to hold peer stats info 94*5113495bSYour Name * 95*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 96*5113495bSYour Name */ 97*5113495bSYour Name QDF_STATUS 98*5113495bSYour Name wmi_extract_peer_stats_info(wmi_unified_t wmi_handle, void *evt_buf, 99*5113495bSYour Name uint32_t index, 100*5113495bSYour Name wmi_host_peer_stats_info *peer_stats_info); 101*5113495bSYour Name 102*5113495bSYour Name /** 103*5113495bSYour Name * wmi_extract_peer_tx_pkt_per_mcs() - extract peer tx packets per MCS 104*5113495bSYour Name * from event 105*5113495bSYour Name * @wmi_handle: wmi handle 106*5113495bSYour Name * @evt_buf: pointer to event buffer 107*5113495bSYour Name * @index: Index to tx packets per MCS for current peer 108*5113495bSYour Name * @peer_stats_info: Pointer to hold peer stats info 109*5113495bSYour Name * 110*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 111*5113495bSYour Name */ 112*5113495bSYour Name QDF_STATUS 113*5113495bSYour Name wmi_extract_peer_tx_pkt_per_mcs(wmi_unified_t wmi_handle, void *evt_buf, 114*5113495bSYour Name uint32_t index, 115*5113495bSYour Name wmi_host_peer_stats_info *peer_stats_info); 116*5113495bSYour Name 117*5113495bSYour Name /** 118*5113495bSYour Name * wmi_extract_peer_rx_pkt_per_mcs() - extract peer rx packets per MCS 119*5113495bSYour Name * from event 120*5113495bSYour Name * @wmi_handle: wmi handle 121*5113495bSYour Name * @evt_buf: pointer to event buffer 122*5113495bSYour Name * @index: Index to tx rate count for current peer 123*5113495bSYour Name * @peer_stats_info: Pointer to hold peer stats info 124*5113495bSYour Name * 125*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 126*5113495bSYour Name */ 127*5113495bSYour Name QDF_STATUS 128*5113495bSYour Name wmi_extract_peer_rx_pkt_per_mcs(wmi_unified_t wmi_handle, void *evt_buf, 129*5113495bSYour Name uint32_t index, 130*5113495bSYour Name wmi_host_peer_stats_info *peer_stats_info); 131*5113495bSYour Name 132*5113495bSYour Name #ifdef WLAN_FEATURE_BIG_DATA_STATS 133*5113495bSYour Name /** 134*5113495bSYour Name * wmi_extract_big_data_stats_param() - extract big data statsfrom event 135*5113495bSYour Name * @wmi_handle: wmi handle 136*5113495bSYour Name * @evt_buf: pointer to event buffer 137*5113495bSYour Name * @stats_param: Pointer to hold stats 138*5113495bSYour Name * 139*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 140*5113495bSYour Name */ 141*5113495bSYour Name QDF_STATUS 142*5113495bSYour Name wmi_extract_big_data_stats_param(wmi_unified_t wmi_handle, void *evt_buf, 143*5113495bSYour Name struct big_data_stats_event *stats_param); 144*5113495bSYour Name #endif 145*5113495bSYour Name 146*5113495bSYour Name #endif /* _WMI_UNIFIED_MC_CP_STATS_API_H_ */ 147