Dhanashri Atre | fe5662c | 2016-03-25 12:57:53 -0700 | [diff] [blame] | 1 | /* |
| 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 Hoffman | e421a3c | 2016-07-12 18:38:55 -0700 | [diff] [blame] | 41 | #if WLAN_FEATURE_FASTPATH |
Dhanashri Atre | fe5662c | 2016-03-25 12:57:53 -0700 | [diff] [blame] | 42 | int ol_txrx_host_stats_get( |
| 43 | ol_txrx_vdev_handle vdev, |
| 44 | struct ol_txrx_stats_req *req); |
| 45 | |
| 46 | |
| 47 | void |
| 48 | ol_txrx_host_stats_clr(ol_txrx_vdev_handle vdev); |
| 49 | |
| 50 | void |
| 51 | ol_txrx_host_ce_stats(ol_txrx_vdev_handle vdev); |
| 52 | |
| 53 | int |
| 54 | ol_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 | */ |
| 61 | void |
| 62 | ol_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 | */ |
| 70 | void |
| 71 | ol_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 | */ |
| 82 | uint32_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 Hoffman | e421a3c | 2016-07-12 18:38:55 -0700 | [diff] [blame] | 85 | #endif /* WLAN_FEATURE_FASTPATH*/ |
Dhanashri Atre | fe5662c | 2016-03-25 12:57:53 -0700 | [diff] [blame] | 86 | #if (HOST_SW_TSO_ENABLE || HOST_SW_TSO_SG_ENABLE) |
| 87 | void |
| 88 | ol_tx_print_tso_stats( |
| 89 | ol_txrx_vdev_handle vdev); |
| 90 | |
| 91 | void |
| 92 | ol_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 |
| 96 | void |
| 97 | ol_tx_print_sg_stats( |
| 98 | ol_txrx_vdev_handle vdev); |
| 99 | |
| 100 | void |
| 101 | ol_tx_rst_sg_stats(ol_txrx_vdev_handle vdev); |
| 102 | #endif /* HOST_SW_SG_ENABLE */ |
| 103 | |
| 104 | #if RX_CHECKSUM_OFFLOAD |
| 105 | void |
| 106 | ol_print_rx_cksum_stats( |
| 107 | ol_txrx_vdev_handle vdev); |
| 108 | |
| 109 | void |
| 110 | ol_rst_rx_cksum_stats(ol_txrx_vdev_handle vdev); |
| 111 | #endif /* RX_CHECKSUM_OFFLOAD */ |
| 112 | |
Houston Hoffman | e421a3c | 2016-07-12 18:38:55 -0700 | [diff] [blame] | 113 | #if (ATH_SUPPORT_IQUE && WLAN_FEATURE_FASTPATH) |
Dhanashri Atre | fe5662c | 2016-03-25 12:57:53 -0700 | [diff] [blame] | 114 | A_STATUS |
| 115 | ol_txrx_host_me_stats(ol_txrx_vdev_handle vdev); |
Houston Hoffman | e421a3c | 2016-07-12 18:38:55 -0700 | [diff] [blame] | 116 | #endif /* WLAN_FEATURE_FASTPATH */ |
Dhanashri Atre | fe5662c | 2016-03-25 12:57:53 -0700 | [diff] [blame] | 117 | #if PEER_FLOW_CONTROL |
| 118 | extern void |
| 119 | ol_txrx_per_peer_stats(struct ol_txrx_pdev_t *pdev, char *addr); |
| 120 | #endif |
Houston Hoffman | e421a3c | 2016-07-12 18:38:55 -0700 | [diff] [blame] | 121 | #if WLAN_FEATURE_FASTPATH && PEER_FLOW_CONTROL |
Dhanashri Atre | fe5662c | 2016-03-25 12:57:53 -0700 | [diff] [blame] | 122 | int 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 |
| 135 | void |
| 136 | ol_print_lro_stats(ol_txrx_vdev_handle vdev); |
| 137 | |
| 138 | void |
| 139 | ol_reset_lro_stats(ol_txrx_vdev_handle vdev); |
| 140 | #endif /* HOST_SW_LRO_ENABLE */ |
| 141 | |
| 142 | #endif |