Files
android_kernel_samsung_sm86…/dp/wifi3.0/dp_hist.h
Ripan Deuri ae12b7c45f qcacmn: Add Hist buckets for hardware Tx completion delay
HW Tx delay to be calculated in microseconds based on the timestamp
provided by HW. A new type of hist bucket is added for this delay.

Change-Id: I3cae5e78459f675b5ac7f670bdec950f9a62c78f
CRs-Fixed: 3202312
2022-05-27 03:36:40 -07:00

46 lines
1.6 KiB
C

/*
* Copyright (c) 2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 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
* above copyright notice and this permission notice appear in all
* copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/**
* @file dp_hist.h
* @brief: histogram header file
*/
#ifndef __DP_HIST_H_
#define __DP_HIST_H_
#define HIST_AVG_WEIGHT_DENOM 4
/*
* dp_hist_update_stats: Update histogram stats
* @hist_delay: Delay histogram
* @value: Delay value
*
* Return: void
*/
void dp_hist_update_stats(struct cdp_hist_stats *hist_stats, int value);
void dp_hist_init(struct cdp_hist_stats *hist_stats,
enum cdp_hist_types hist_type);
void dp_accumulate_hist_stats(struct cdp_hist_stats *src_hist_stats,
struct cdp_hist_stats *dst_hist_stats);
void dp_copy_hist_stats(struct cdp_hist_stats *src_hist_stats,
struct cdp_hist_stats *dst_hist_stats);
const char *dp_hist_tx_hw_delay_str(uint8_t index);
#endif /* __DP_HIST_H_ */