blob: e87ca3b1e074fc905164afef8db0c7952d5322a4 [file] [log] [blame]
Dhanashri Atrefe5662c2016-03-25 12:57:53 -07001/*
2 * Copyright (c) 2016 The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27 /**
28 * @file cdp_txrx_host_stats.h
29 * @brief Define the host data path stats API functions
30 * called by the host control SW and the OS interface module
31 */
32#ifndef _CDP_TXRX_HOST_STATS_H_
33#define _CDP_TXRX_HOST_STATS_H_
34
35#include <cdp_txrx_stats_struct.h>
36/* WIN */
37/* Need to remove the "req" parameter */
38/* Need to rename the function to reflect the functionality "show" / "display"
39 * WIN -- to figure out whether to change OSIF to converge (not an immediate AI)
40 * */
Houston Hoffmane421a3c2016-07-12 18:38:55 -070041#if WLAN_FEATURE_FASTPATH
Dhanashri Atrefe5662c2016-03-25 12:57:53 -070042int ol_txrx_host_stats_get(
43 ol_txrx_vdev_handle vdev,
44 struct ol_txrx_stats_req *req);
45
46
47void
48ol_txrx_host_stats_clr(ol_txrx_vdev_handle vdev);
49
50void
51ol_txrx_host_ce_stats(ol_txrx_vdev_handle vdev);
52
53int
54ol_txrx_stats_publish(ol_txrx_pdev_handle pdev, struct ol_txrx_stats *buf);
55/**
56 * @brief Enable enhanced stats functionality.
57 *
58 * @param pdev - the physical device object
59 * @return - void
60 */
61void
62ol_txrx_enable_enhanced_stats(ol_txrx_pdev_handle pdev);
63
64/**
65 * @brief Disable enhanced stats functionality.
66 *
67 * @param pdev - the physical device object
68 * @return - void
69 */
70void
71ol_txrx_disable_enhanced_stats(ol_txrx_pdev_handle pdev);
72
73#if ENHANCED_STATS
74/**
75 * @brief Get the desired stats from the message.
76 *
77 * @param pdev - the physical device object
78 * @param stats_base - stats buffer recieved from FW
79 * @param type - stats type.
80 * @return - pointer to requested stat identified by type
81 */
82uint32_t *ol_txrx_get_stats_base(ol_txrx_pdev_handle pdev,
83 uint32_t *stats_base, uint32_t msg_len, uint8_t type);
84#endif
Houston Hoffmane421a3c2016-07-12 18:38:55 -070085#endif /* WLAN_FEATURE_FASTPATH*/
Dhanashri Atrefe5662c2016-03-25 12:57:53 -070086#if (HOST_SW_TSO_ENABLE || HOST_SW_TSO_SG_ENABLE)
87void
88ol_tx_print_tso_stats(
89 ol_txrx_vdev_handle vdev);
90
91void
92ol_tx_rst_tso_stats(ol_txrx_vdev_handle vdev);
93#endif /* HOST_SW_TSO_ENABLE || HOST_SW_TSO_SG_ENABLE */
94
95#if HOST_SW_SG_ENABLE
96void
97ol_tx_print_sg_stats(
98 ol_txrx_vdev_handle vdev);
99
100void
101ol_tx_rst_sg_stats(ol_txrx_vdev_handle vdev);
102#endif /* HOST_SW_SG_ENABLE */
103
104#if RX_CHECKSUM_OFFLOAD
105void
106ol_print_rx_cksum_stats(
107 ol_txrx_vdev_handle vdev);
108
109void
110ol_rst_rx_cksum_stats(ol_txrx_vdev_handle vdev);
111#endif /* RX_CHECKSUM_OFFLOAD */
112
Houston Hoffmane421a3c2016-07-12 18:38:55 -0700113#if (ATH_SUPPORT_IQUE && WLAN_FEATURE_FASTPATH)
Dhanashri Atrefe5662c2016-03-25 12:57:53 -0700114A_STATUS
115ol_txrx_host_me_stats(ol_txrx_vdev_handle vdev);
Houston Hoffmane421a3c2016-07-12 18:38:55 -0700116#endif /* WLAN_FEATURE_FASTPATH */
Dhanashri Atrefe5662c2016-03-25 12:57:53 -0700117#if PEER_FLOW_CONTROL
118extern void
119ol_txrx_per_peer_stats(struct ol_txrx_pdev_t *pdev, char *addr);
120#endif
Houston Hoffmane421a3c2016-07-12 18:38:55 -0700121#if WLAN_FEATURE_FASTPATH && PEER_FLOW_CONTROL
Dhanashri Atrefe5662c2016-03-25 12:57:53 -0700122int ol_txrx_host_msdu_ttl_stats(
123 ol_txrx_vdev_handle vdev,
124 struct ol_txrx_stats_req *req);
125#endif
126
127#define BSS_CHAN_INFO_READ 1
128#define BSS_CHAN_INFO_READ_AND_CLEAR 2
129
130#define TX_FRAME_TYPE_DATA 0
131#define TX_FRAME_TYPE_MGMT 1
132#define TX_FRAME_TYPE_BEACON 2
133
134#if HOST_SW_LRO_ENABLE
135void
136ol_print_lro_stats(ol_txrx_vdev_handle vdev);
137
138void
139ol_reset_lro_stats(ol_txrx_vdev_handle vdev);
140#endif /* HOST_SW_LRO_ENABLE */
141
142#endif