Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 1 | /* |
Chaithanya Garrepalli | 9cc562c | 2018-11-16 18:30:41 +0530 | [diff] [blame] | 2 | * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved. |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 3 | * |
| 4 | * Permission to use, copy, modify, and/or distribute this software for |
| 5 | * any purpose with or without fee is hereby granted, provided that the |
| 6 | * above copyright notice and this permission notice appear in all |
| 7 | * copies. |
| 8 | * |
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 10 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 11 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 12 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 13 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 14 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 15 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 16 | * PERFORMANCE OF THIS SOFTWARE. |
| 17 | */ |
| 18 | |
| 19 | /** |
| 20 | * @file cdp_txrx_cmn_struct.h |
| 21 | * @brief Define the host data path converged API functions |
| 22 | * called by the host control SW and the OS interface module |
| 23 | */ |
| 24 | #ifndef _CDP_TXRX_CMN_STRUCT_H_ |
| 25 | #define _CDP_TXRX_CMN_STRUCT_H_ |
| 26 | |
Leo Chang | db6358c | 2016-09-27 17:00:52 -0700 | [diff] [blame] | 27 | /** |
| 28 | * For WIN legacy header compilation |
| 29 | * Temporary add dummy definitions |
| 30 | * should be removed properly WIN legacy code handle |
| 31 | */ |
| 32 | |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 33 | #include "htc_api.h" |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 34 | #include "qdf_types.h" |
| 35 | #include "qdf_nbuf.h" |
Pratik Gandhi | 51b6b6d | 2017-09-18 15:02:43 +0530 | [diff] [blame] | 36 | #include "qdf_atomic.h" |
Vevek Venkatesan | de31ff6 | 2019-06-11 12:50:49 +0530 | [diff] [blame] | 37 | #ifdef DP_MOB_DEFS |
Leo Chang | db6358c | 2016-09-27 17:00:52 -0700 | [diff] [blame] | 38 | #include <cdp_txrx_mob_def.h> |
Pranita Solanke | 0586296 | 2019-01-09 11:39:29 +0530 | [diff] [blame] | 39 | #endif |
c_cgodav | bd5b3c2 | 2017-06-07 12:31:40 +0530 | [diff] [blame] | 40 | #include <cdp_txrx_handle.h> |
Amir Patel | 78824b1 | 2019-02-23 10:54:32 +0530 | [diff] [blame] | 41 | #include <cdp_txrx_stats_struct.h> |
Kai Chen | 52ef33f | 2019-03-05 18:33:40 -0800 | [diff] [blame] | 42 | #ifdef WLAN_RX_PKT_CAPTURE_ENH |
| 43 | #include "cdp_txrx_extd_struct.h" |
| 44 | #endif |
Nandha Kishore Easwaran | 870abda | 2016-11-16 17:37:19 +0530 | [diff] [blame] | 45 | |
Leo Chang | db6358c | 2016-09-27 17:00:52 -0700 | [diff] [blame] | 46 | #ifndef OL_TXRX_NUM_LOCAL_PEER_IDS |
Alok Kumar | c1ec49e | 2018-11-26 19:14:36 +0530 | [diff] [blame] | 47 | /* |
| 48 | * Each AP will occupy one ID, so it will occupy two IDs for AP-AP mode. |
| 49 | * Clients will be assigned max 32 IDs. |
| 50 | * STA(associated)/P2P DEV(self-PEER) will get one ID. |
| 51 | */ |
| 52 | #define OL_TXRX_NUM_LOCAL_PEER_IDS (32 + 1 + 1 + 1) |
Leo Chang | db6358c | 2016-09-27 17:00:52 -0700 | [diff] [blame] | 53 | #endif |
| 54 | |
Soumya Bhat | 835033e | 2017-10-04 22:21:46 +0530 | [diff] [blame] | 55 | #define CDP_BA_256_BIT_MAP_SIZE_DWORDS 8 |
| 56 | #define CDP_BA_64_BIT_MAP_SIZE_DWORDS 2 |
Amir Patel | 0291157 | 2018-07-02 13:00:53 +0530 | [diff] [blame] | 57 | #define CDP_RSSI_CHAIN_LEN 8 |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 58 | |
Rakesh Pillai | 7bce1f0 | 2019-06-24 15:06:41 +0530 | [diff] [blame] | 59 | #define OL_TXRX_INVALID_PDEV_ID 0xff |
Leo Chang | db6358c | 2016-09-27 17:00:52 -0700 | [diff] [blame] | 60 | #define OL_TXRX_INVALID_LOCAL_PEER_ID 0xffff |
Ishank Jain | 1e7401c | 2017-02-17 15:38:39 +0530 | [diff] [blame] | 61 | #define CDP_INVALID_VDEV_ID 0xff |
Venkata Sharath Chandra Manchala | a405eb7 | 2017-03-06 14:35:00 -0800 | [diff] [blame] | 62 | /* Options for Dump Statistics */ |
| 63 | #define CDP_HDD_STATS 0 |
| 64 | #define CDP_TXRX_PATH_STATS 1 |
| 65 | #define CDP_TXRX_HIST_STATS 2 |
| 66 | #define CDP_TXRX_TSO_STATS 3 |
| 67 | #define CDP_HDD_NETIF_OPER_HISTORY 4 |
| 68 | #define CDP_DUMP_TX_FLOW_POOL_INFO 5 |
| 69 | #define CDP_TXRX_DESC_STATS 6 |
| 70 | #define CDP_HIF_STATS 7 |
| 71 | #define CDP_LRO_STATS 8 |
| 72 | #define CDP_NAPI_STATS 9 |
Mohit Khanna | 79db2c4 | 2017-03-29 19:08:07 -0700 | [diff] [blame] | 73 | #define CDP_WLAN_RX_BUF_DEBUG_STATS 10 |
Venkata Sharath Chandra Manchala | 918aefe | 2017-04-10 10:21:56 -0700 | [diff] [blame] | 74 | #define CDP_RX_RING_STATS 11 |
psimha | 61b1a36 | 2017-07-27 15:45:49 -0700 | [diff] [blame] | 75 | #define CDP_DP_NAPI_STATS 12 |
Mohit Khanna | 4393866 | 2018-11-28 18:37:52 -0800 | [diff] [blame] | 76 | #define CDP_DP_RX_THREAD_STATS 13 |
Venkata Sharath Chandra Manchala | a405eb7 | 2017-03-06 14:35:00 -0800 | [diff] [blame] | 77 | #define CDP_SCHEDULER_STATS 21 |
| 78 | #define CDP_TX_QUEUE_STATS 22 |
| 79 | #define CDP_BUNDLE_STATS 23 |
| 80 | #define CDP_CREDIT_STATS 24 |
Vignesh Viswanathan | 3a133b7 | 2017-09-06 12:29:07 +0530 | [diff] [blame] | 81 | #define CDP_DISCONNECT_STATS 25 |
Venkata Sharath Chandra Manchala | a405eb7 | 2017-03-06 14:35:00 -0800 | [diff] [blame] | 82 | |
Ishank Jain | 1e7401c | 2017-02-17 15:38:39 +0530 | [diff] [blame] | 83 | #define WME_AC_TO_TID(_ac) ( \ |
| 84 | ((_ac) == WME_AC_VO) ? 6 : \ |
| 85 | ((_ac) == WME_AC_VI) ? 5 : \ |
| 86 | ((_ac) == WME_AC_BK) ? 1 : \ |
| 87 | 0) |
| 88 | |
| 89 | #define TID_TO_WME_AC(_tid) ( \ |
| 90 | (((_tid) == 0) || ((_tid) == 3)) ? WME_AC_BE : \ |
| 91 | (((_tid) == 1) || ((_tid) == 2)) ? WME_AC_BK : \ |
| 92 | (((_tid) == 4) || ((_tid) == 5)) ? WME_AC_VI : \ |
| 93 | WME_AC_VO) |
Nandha Kishore Easwaran | 870abda | 2016-11-16 17:37:19 +0530 | [diff] [blame] | 94 | |
Rhythm Patwa | 803446e | 2019-03-14 17:18:34 -0700 | [diff] [blame] | 95 | #define CDP_MU_MAX_USERS 37 |
Soumya Bhat | 835033e | 2017-10-04 22:21:46 +0530 | [diff] [blame] | 96 | #define CDP_MU_MAX_USER_INDEX (CDP_MU_MAX_USERS - 1) |
phadiman | 7821bf8 | 2018-02-06 16:03:54 +0530 | [diff] [blame] | 97 | #define CDP_INVALID_PEER 0xffff |
Pratik Gandhi | 7846150 | 2018-02-05 17:22:41 +0530 | [diff] [blame] | 98 | #define CDP_INVALID_TID 31 |
Varsha Mishra | 27c5bd3 | 2019-05-28 11:54:46 +0530 | [diff] [blame] | 99 | #define CDP_INVALID_TX_ENCAP_TYPE 6 |
| 100 | #define CDP_INVALID_SEC_TYPE 12 |
Soumya Bhat | 835033e | 2017-10-04 22:21:46 +0530 | [diff] [blame] | 101 | |
Soumya Bhat | 1df9464 | 2018-01-31 15:38:21 +0530 | [diff] [blame] | 102 | #define CDP_DATA_TID_MAX 8 |
Amir Patel | 2321668 | 2019-03-28 18:16:25 +0530 | [diff] [blame] | 103 | #define CDP_DATA_NON_QOS_TID 16 |
Ankit Kumar | cd66fff | 2019-07-02 20:54:44 +0530 | [diff] [blame] | 104 | |
| 105 | #define CDP_NUM_SA_BW 4 |
| 106 | #define CDP_PERCENT_MACRO 100 |
| 107 | #define CDP_NUM_KB_IN_MB 1000 |
Pamidipati, Vijay | 6b0d2a8 | 2017-06-09 04:46:32 +0530 | [diff] [blame] | 108 | /* |
nobelj | d124b74 | 2017-10-16 11:59:12 -0700 | [diff] [blame] | 109 | * advance rx monitor filter |
| 110 | * */ |
| 111 | #define MON_FILTER_PASS 0x0001 |
| 112 | #define MON_FILTER_OTHER 0x0002 |
| 113 | #define MON_FILTER_ALL 0x0003 |
| 114 | |
| 115 | #define FILTER_MGMT_ALL 0xFFFF |
| 116 | #define FILTER_MGMT_ASSOC_REQ 0x0001 |
| 117 | #define FILTER_MGMT_ASSOC_RES 0x0002 |
| 118 | #define FILTER_MGMT_REASSOC_REQ 0x0004 |
| 119 | #define FILTER_MGMT_REASSOC_RES 0x0008 |
| 120 | #define FILTER_MGMT_PROBE_REQ 0x0010 |
| 121 | #define FILTER_MGMT_PROBE_RES 0x0020 |
| 122 | #define FILTER_MGMT_TIM_ADVT 0x0040 |
| 123 | #define FILTER_MGMT_RESERVED_7 0x0080 |
| 124 | #define FILTER_MGMT_BEACON 0x0100 |
| 125 | #define FILTER_MGMT_ATIM 0x0200 |
| 126 | #define FILTER_MGMT_DISASSOC 0x0400 |
| 127 | #define FILTER_MGMT_AUTH 0x0800 |
| 128 | #define FILTER_MGMT_DEAUTH 0x1000 |
| 129 | #define FILTER_MGMT_ACTION 0x2000 |
| 130 | #define FILTER_MGMT_ACT_NO_ACK 0x4000 |
| 131 | #define FILTER_MGMT_RESERVED_15 0x8000 |
| 132 | |
| 133 | #define FILTER_CTRL_ALL 0xFFFF |
| 134 | #define FILTER_CTRL_RESERVED_1 0x0001 |
| 135 | #define FILTER_CTRL_RESERVED_2 0x0002 |
| 136 | #define FILTER_CTRL_TRIGGER 0x0004 |
| 137 | #define FILTER_CTRL_RESERVED_4 0x0008 |
| 138 | #define FILTER_CTRL_BF_REP_POLL 0x0010 |
| 139 | #define FILTER_CTRL_VHT_NDP 0x0020 |
| 140 | #define FILTER_CTRL_FRAME_EXT 0x0040 |
| 141 | #define FILTER_CTRL_CTRLWRAP 0x0080 |
| 142 | #define FILTER_CTRL_BA_REQ 0x0100 |
| 143 | #define FILTER_CTRL_BA 0x0200 |
| 144 | #define FILTER_CTRL_PSPOLL 0x0400 |
| 145 | #define FILTER_CTRL_RTS 0x0800 |
| 146 | #define FILTER_CTRL_CTS 0x1000 |
| 147 | #define FILTER_CTRL_ACK 0x2000 |
| 148 | #define FILTER_CTRL_CFEND 0x4000 |
| 149 | #define FILTER_CTRL_CFEND_CFACK 0x8000 |
| 150 | |
| 151 | #define FILTER_DATA_ALL 0xFFFF |
| 152 | #define FILTER_DATA_MCAST 0x4000 |
| 153 | #define FILTER_DATA_UCAST 0x8000 |
| 154 | #define FILTER_DATA_DATA 0x0001 |
| 155 | #define FILTER_DATA_NULL 0x0008 |
| 156 | |
Ruchi, Agrawal | 2cbca3b | 2018-06-20 19:31:03 +0530 | [diff] [blame] | 157 | QDF_DECLARE_EWMA(tx_lag, 1024, 8) |
Amir Patel | 78824b1 | 2019-02-23 10:54:32 +0530 | [diff] [blame] | 158 | struct cdp_stats_cookie; |
Ruchi, Agrawal | 2cbca3b | 2018-06-20 19:31:03 +0530 | [diff] [blame] | 159 | |
nobelj | d124b74 | 2017-10-16 11:59:12 -0700 | [diff] [blame] | 160 | /* |
Pamidipati, Vijay | 6b0d2a8 | 2017-06-09 04:46:32 +0530 | [diff] [blame] | 161 | * DP configuration parameters |
| 162 | */ |
| 163 | enum cdp_cfg_param_type { |
| 164 | CDP_CFG_MAX_PEER_ID, |
Ruchi, Agrawal | 3472139 | 2017-11-13 18:02:09 +0530 | [diff] [blame] | 165 | CDP_CFG_CCE_DISABLE, |
Pamidipati, Vijay | 6b0d2a8 | 2017-06-09 04:46:32 +0530 | [diff] [blame] | 166 | CDP_CFG_NUM_PARAMS |
| 167 | }; |
| 168 | |
Nandha Kishore Easwaran | 870abda | 2016-11-16 17:37:19 +0530 | [diff] [blame] | 169 | /* |
| 170 | * htt_dbg_stats_type - |
| 171 | * bit positions for each stats type within a stats type bitmask |
| 172 | * The bitmask contains 24 bits. |
| 173 | */ |
| 174 | enum htt_cmn_dbg_stats_type { |
Pamidipati, Vijay | 623fbee | 2017-07-07 10:58:15 +0530 | [diff] [blame] | 175 | HTT_DBG_CMN_STATS_WAL_PDEV_TXRX = 0, /* bit 0 -> 0x1 */ |
| 176 | HTT_DBG_CMN_STATS_RX_REORDER = 1, /* bit 1 -> 0x2 */ |
| 177 | HTT_DBG_CMN_STATS_RX_RATE_INFO = 2, /* bit 2 -> 0x4 */ |
| 178 | HTT_DBG_CMN_STATS_TX_PPDU_LOG = 3, /* bit 3 -> 0x8 */ |
| 179 | HTT_DBG_CMN_STATS_TX_RATE_INFO = 4, /* bit 4 -> 0x10 */ |
| 180 | HTT_DBG_CMN_STATS_TIDQ = 5, /* bit 5 -> 0x20 */ |
| 181 | HTT_DBG_CMN_STATS_TXBF_INFO = 6, /* bit 6 -> 0x40 */ |
| 182 | HTT_DBG_CMN_STATS_SND_INFO = 7, /* bit 7 -> 0x80 */ |
| 183 | HTT_DBG_CMN_STATS_ERROR_INFO = 8, /* bit 8 -> 0x100 */ |
| 184 | HTT_DBG_CMN_STATS_TX_SELFGEN_INFO = 9, /* bit 9 -> 0x200 */ |
| 185 | HTT_DBG_CMN_STATS_TX_MU_INFO = 10, /* bit 10 -> 0x400 */ |
| 186 | HTT_DBG_CMN_STATS_SIFS_RESP_INFO = 11, /* bit 11 -> 0x800 */ |
| 187 | HTT_DBG_CMN_STATS_RESET_INFO = 12, /* bit 12 -> 0x1000 */ |
| 188 | HTT_DBG_CMN_STATS_MAC_WDOG_INFO = 13, /* bit 13 -> 0x2000 */ |
| 189 | HTT_DBG_CMN_STATS_TX_DESC_INFO = 14, /* bit 14 -> 0x4000 */ |
| 190 | HTT_DBG_CMN_STATS_TX_FETCH_MGR_INFO = 15, /* bit 15 -> 0x8000 */ |
| 191 | HTT_DBG_CMN_STATS_TX_PFSCHED_INFO = 16, /* bit 16 -> 0x10000 */ |
| 192 | HTT_DBG_CMN_STATS_TX_PATH_STATS_INFO = 17, /* bit 17 -> 0x20000 */ |
| 193 | /* bits 18-23 currently reserved */ |
Nandha Kishore Easwaran | 870abda | 2016-11-16 17:37:19 +0530 | [diff] [blame] | 194 | |
Pamidipati, Vijay | 623fbee | 2017-07-07 10:58:15 +0530 | [diff] [blame] | 195 | /* keep this last */ |
Manjunathappa Prakash | 029b665 | 2018-03-28 20:07:52 -0700 | [diff] [blame] | 196 | HTT_DBG_CMN_NUM_STATS, |
| 197 | HTT_DBG_CMN_NUM_STATS_INVALID = 31, /* bit 31 -> 0x80000000 */ |
Nandha Kishore Easwaran | 870abda | 2016-11-16 17:37:19 +0530 | [diff] [blame] | 198 | }; |
| 199 | |
Ishank Jain | bc2d91f | 2017-01-03 18:14:54 +0530 | [diff] [blame] | 200 | /* |
| 201 | * cdp_host_txrx_stats: Different types of host stats |
Venkata Sharath Chandra Manchala | a77da0d | 2017-02-27 22:44:37 -0800 | [diff] [blame] | 202 | * @TXRX_HOST_STATS_INVALID: Invalid option |
Ishank Jain | bc2d91f | 2017-01-03 18:14:54 +0530 | [diff] [blame] | 203 | * @TXRX_RX_RATE_STATS: Rx rate info |
| 204 | * @TXRX_TX_RATE_STATS: Tx rate info |
| 205 | * @TXRX_TX_HOST_STATS: Print Tx stats |
| 206 | * @TXRX_RX_HOST_STATS: Print host Rx stats |
| 207 | * @TXRX_CLEAR_STATS: clear all host stats |
sumedh baikady | 72b1c71 | 2017-08-24 12:11:46 -0700 | [diff] [blame] | 208 | * @TXRX_SRNG_PTR_STATS: Print SRNG pointer stats |
Kai Chen | 783e038 | 2018-01-25 16:29:08 -0800 | [diff] [blame] | 209 | * @TXRX_RX_MON_STATS: Print monitor mode stats |
Venkata Sharath Chandra Manchala | 0cb3198 | 2018-03-30 15:55:26 -0700 | [diff] [blame] | 210 | * @TXRX_REO_QUEUE_STATS: Print Per peer REO Queue Stats |
Venkata Sharath Chandra Manchala | f167af1 | 2018-10-09 20:23:02 -0700 | [diff] [blame] | 211 | * @TXRX_SOC_CFG_PARAMS: Print soc cfg params info |
| 212 | * @TXRX_PDEV_CFG_PARAMS: Print pdev cfg params info |
Pamidipati, Vijay | 37d107d | 2018-12-31 14:46:14 +0530 | [diff] [blame] | 213 | * @TXRX_NAPI_STATS: Print NAPI scheduling statistics |
Mohit Khanna | e5a6e94 | 2018-11-28 14:22:48 -0800 | [diff] [blame] | 214 | * @TXRX_SOC_INTERRUPT_STATS: Print soc interrupt stats |
Venkata Sharath Chandra Manchala | f167af1 | 2018-10-09 20:23:02 -0700 | [diff] [blame] | 215 | */ |
Ishank Jain | bc2d91f | 2017-01-03 18:14:54 +0530 | [diff] [blame] | 216 | enum cdp_host_txrx_stats { |
Venkata Sharath Chandra Manchala | a77da0d | 2017-02-27 22:44:37 -0800 | [diff] [blame] | 217 | TXRX_HOST_STATS_INVALID = -1, |
Venkata Sharath Chandra Manchala | 0cb3198 | 2018-03-30 15:55:26 -0700 | [diff] [blame] | 218 | TXRX_CLEAR_STATS = 0, |
| 219 | TXRX_RX_RATE_STATS = 1, |
| 220 | TXRX_TX_RATE_STATS = 2, |
| 221 | TXRX_TX_HOST_STATS = 3, |
| 222 | TXRX_RX_HOST_STATS = 4, |
| 223 | TXRX_AST_STATS = 5, |
| 224 | TXRX_SRNG_PTR_STATS = 6, |
| 225 | TXRX_RX_MON_STATS = 7, |
| 226 | TXRX_REO_QUEUE_STATS = 8, |
Venkata Sharath Chandra Manchala | f167af1 | 2018-10-09 20:23:02 -0700 | [diff] [blame] | 227 | TXRX_SOC_CFG_PARAMS = 9, |
| 228 | TXRX_PDEV_CFG_PARAMS = 10, |
Pamidipati, Vijay | 37d107d | 2018-12-31 14:46:14 +0530 | [diff] [blame] | 229 | TXRX_NAPI_STATS = 11, |
Mohit Khanna | e5a6e94 | 2018-11-28 14:22:48 -0800 | [diff] [blame] | 230 | TXRX_SOC_INTERRUPT_STATS = 12, |
Ishank Jain | 57c42a1 | 2017-04-12 10:42:22 +0530 | [diff] [blame] | 231 | TXRX_HOST_STATS_MAX, |
Ishank Jain | bc2d91f | 2017-01-03 18:14:54 +0530 | [diff] [blame] | 232 | }; |
Nandha Kishore Easwaran | 870abda | 2016-11-16 17:37:19 +0530 | [diff] [blame] | 233 | |
Pamidipati, Vijay | d7eb83e | 2017-09-20 21:19:56 +0530 | [diff] [blame] | 234 | /* |
| 235 | * cdp_ppdu_ftype: PPDU Frame Type |
| 236 | * @CDP_PPDU_FTYPE_DATA: SU or MU Data Frame |
| 237 | * @CDP_PPDU_FTYPE_CTRL: Control/Management Frames |
Chaithanya Garrepalli | be9d5fc | 2018-07-26 19:21:24 +0530 | [diff] [blame] | 238 | * @CDP_PPDU_FTYPE_BAR: SU or MU BAR frames |
Pamidipati, Vijay | d7eb83e | 2017-09-20 21:19:56 +0530 | [diff] [blame] | 239 | */ |
| 240 | enum cdp_ppdu_ftype { |
Pamidipati, Vijay | d7eb83e | 2017-09-20 21:19:56 +0530 | [diff] [blame] | 241 | CDP_PPDU_FTYPE_CTRL, |
Pamidipati, Vijay | bd9c13f | 2017-10-17 20:12:03 +0530 | [diff] [blame] | 242 | CDP_PPDU_FTYPE_DATA, |
Chaithanya Garrepalli | be9d5fc | 2018-07-26 19:21:24 +0530 | [diff] [blame] | 243 | CDP_PPDU_FTYPE_BAR, |
Pamidipati, Vijay | d7eb83e | 2017-09-20 21:19:56 +0530 | [diff] [blame] | 244 | CDP_PPDU_FTYPE_MAX |
| 245 | }; |
| 246 | |
| 247 | |
Nandha Kishore Easwaran | 870abda | 2016-11-16 17:37:19 +0530 | [diff] [blame] | 248 | /** |
| 249 | * @brief General specification of the tx frame contents |
| 250 | * |
| 251 | * @details |
| 252 | * for efficiency, the HTT packet type values correspond |
| 253 | * to the bit positions of the WAL packet type values, so the |
| 254 | * translation is a simple shift operation. |
| 255 | */ |
| 256 | enum htt_cmn_pkt_type { |
phadiman | 7821bf8 | 2018-02-06 16:03:54 +0530 | [diff] [blame] | 257 | htt_cmn_pkt_type_raw = 0, |
| 258 | htt_cmn_pkt_type_native_wifi = 1, |
| 259 | htt_cmn_pkt_type_ethernet = 2, |
| 260 | htt_cmn_pkt_type_mgmt = 3, |
| 261 | htt_cmn_pkt_type_eth2 = 4, |
Nandha Kishore Easwaran | 870abda | 2016-11-16 17:37:19 +0530 | [diff] [blame] | 262 | |
phadiman | 7821bf8 | 2018-02-06 16:03:54 +0530 | [diff] [blame] | 263 | /* keep this last */ |
| 264 | htt_cmn_pkt_num_types |
| 265 | }; |
| 266 | |
| 267 | /** |
| 268 | * @General description of HTT received packets status |
| 269 | * It is similar to htt_rx_status enum |
| 270 | * but is added as a cdp enum can be freely used in OL_IF layer |
| 271 | */ |
| 272 | enum htt_cmn_rx_status { |
| 273 | htt_cmn_rx_status_unknown = 0x0, |
| 274 | htt_cmn_rx_status_ok, |
| 275 | htt_cmn_rx_status_err_fcs, |
| 276 | htt_cmn_rx_status_err_dup, |
| 277 | htt_cmn_rx_status_err_replay, |
| 278 | htt_cmn_rx_status_inv_peer, |
| 279 | htt_cmn_rx_status_ctrl_mgmt_null = 0x08, |
| 280 | htt_cmn_rx_status_tkip_mic_err = 0x09, |
| 281 | htt_cmn_rx_status_decrypt_err = 0x0A, |
| 282 | htt_cmn_rx_status_mpdu_length_err = 0x0B, |
| 283 | htt_cmn_rx_status_err_misc = 0xFF |
Nandha Kishore Easwaran | 870abda | 2016-11-16 17:37:19 +0530 | [diff] [blame] | 284 | }; |
| 285 | |
Tallapragada Kalyan | fd1edcc | 2017-03-07 19:34:29 +0530 | [diff] [blame] | 286 | |
| 287 | enum cdp_host_reo_dest_ring { |
| 288 | cdp_host_reo_dest_ring_unknown = 0, |
| 289 | cdp_host_reo_dest_ring_1 = 1, |
| 290 | cdp_host_reo_dest_ring_2 = 2, |
| 291 | cdp_host_reo_dest_ring_3 = 3, |
| 292 | cdp_host_reo_dest_ring_4 = 4, |
| 293 | }; |
| 294 | |
Nandha Kishore Easwaran | 870abda | 2016-11-16 17:37:19 +0530 | [diff] [blame] | 295 | enum htt_cmn_t2h_en_stats_type { |
| 296 | /* keep this alwyas first */ |
| 297 | HTT_CMN_T2H_EN_STATS_TYPE_START = 0, |
| 298 | |
| 299 | /** ppdu_common_stats is the payload */ |
| 300 | HTT_CMN_T2H_EN_STATS_TYPE_COMMON = 1, |
| 301 | /** ppdu_sant_stats is the payload */ |
| 302 | HTT_CMN_T2H_EN_STATS_TYPE_SANT = 2, |
| 303 | /** ppdu_common_stats_v2 is the payload */ |
| 304 | HTT_CMN_T2H_EN_STATS_TYPE_COMMON_V2 = 3, |
| 305 | |
| 306 | /* Keep this last */ |
| 307 | HTT_CMN_T2H_EN_STATS_TYPE_END = 0x1f, |
| 308 | }; |
| 309 | |
| 310 | enum htt_cmn_t2h_en_stats_status { |
| 311 | /* Keep this first always */ |
| 312 | HTT_CMN_T2H_EN_STATS_STATUS_PARTIAL = 0, |
| 313 | HTT_CMN_T2H_EN_STATS_STATUS_PRESENT = 1, |
| 314 | HTT_CMN_T2H_EN_STATS_STATUS_ERROR = 2, |
| 315 | HTT_CMN_T2H_EN_STATS_STATUS_INVALID = 3, |
| 316 | |
| 317 | |
| 318 | /* keep this always last */ |
| 319 | HTT_CMN_T2H_EN_STATS_STATUS_SERIES_DONE = 7, |
| 320 | }; |
| 321 | |
Leo Chang | db6358c | 2016-09-27 17:00:52 -0700 | [diff] [blame] | 322 | /** |
| 323 | * struct ol_txrx_peer_state - Peer state information |
| 324 | */ |
| 325 | enum ol_txrx_peer_state { |
| 326 | OL_TXRX_PEER_STATE_INVALID, |
| 327 | OL_TXRX_PEER_STATE_DISC, /* initial state */ |
| 328 | OL_TXRX_PEER_STATE_CONN, /* authentication in progress */ |
| 329 | OL_TXRX_PEER_STATE_AUTH, /* authentication successful */ |
| 330 | }; |
| 331 | |
Radha krishna Simha Jiguru | f70f991 | 2017-08-02 18:32:22 +0530 | [diff] [blame] | 332 | /** |
| 333 | * struct ol_txrx_ast_type - AST entry type information |
| 334 | */ |
| 335 | enum cdp_txrx_ast_entry_type { |
| 336 | CDP_TXRX_AST_TYPE_NONE, /* static ast entry for connected peer */ |
Tallapragada Kalyan | 57b6bb3 | 2018-01-02 12:58:33 +0530 | [diff] [blame] | 337 | CDP_TXRX_AST_TYPE_STATIC, /* static ast entry for connected peer */ |
Pamidipati, Vijay | 3756b76 | 2018-05-12 11:10:37 +0530 | [diff] [blame] | 338 | CDP_TXRX_AST_TYPE_SELF, /* static ast entry for self peer (STA mode) */ |
Radha krishna Simha Jiguru | f70f991 | 2017-08-02 18:32:22 +0530 | [diff] [blame] | 339 | CDP_TXRX_AST_TYPE_WDS, /* WDS peer ast entry type*/ |
| 340 | CDP_TXRX_AST_TYPE_MEC, /* Multicast echo ast entry type */ |
Tallapragada Kalyan | 57b6bb3 | 2018-01-02 12:58:33 +0530 | [diff] [blame] | 341 | CDP_TXRX_AST_TYPE_WDS_HM, /* HM WDS entry */ |
Radha krishna Simha Jiguru | 2734079 | 2018-09-06 15:08:12 +0530 | [diff] [blame] | 342 | CDP_TXRX_AST_TYPE_STA_BSS, /* BSS entry(STA mode) */ |
Tallapragada Kalyan | 2ae71e0 | 2018-08-31 19:30:54 +0530 | [diff] [blame] | 343 | CDP_TXRX_AST_TYPE_DA, /* AST entry based on Destination address */ |
Tallapragada Kalyan | 5e3a39c | 2018-08-24 16:34:12 +0530 | [diff] [blame] | 344 | CDP_TXRX_AST_TYPE_WDS_HM_SEC, /* HM WDS entry for secondary radio */ |
Radha krishna Simha Jiguru | f70f991 | 2017-08-02 18:32:22 +0530 | [diff] [blame] | 345 | CDP_TXRX_AST_TYPE_MAX |
| 346 | }; |
Gurumoorthi Gnanasambandhan | ed4bcf8 | 2017-05-24 00:10:59 +0530 | [diff] [blame] | 347 | |
Chaithanya Garrepalli | 9cc562c | 2018-11-16 18:30:41 +0530 | [diff] [blame] | 348 | /* |
| 349 | * cdp_ast_free_status: status passed to callback function before freeing ast |
| 350 | * @CDP_TXRX_AST_DELETED - AST is deleted from FW and delete response received |
| 351 | * @CDP_TXRX_AST_DELETE_IN_PROGRESS - AST delete command sent to FW and host |
| 352 | * is waiting for FW response |
| 353 | */ |
| 354 | enum cdp_ast_free_status { |
| 355 | CDP_TXRX_AST_DELETED, |
| 356 | CDP_TXRX_AST_DELETE_IN_PROGRESS, |
| 357 | }; |
| 358 | |
| 359 | /** |
| 360 | * txrx_ast_free_cb - callback registered for ast free |
| 361 | * @ctrl_soc: control path soc context |
| 362 | * @cdp_soc: DP soc context |
| 363 | * @cookie: cookie |
| 364 | * @cdp_ast_free_status: ast free status |
| 365 | */ |
Akshay Kosigi | eec6db9 | 2019-07-02 14:25:54 +0530 | [diff] [blame] | 366 | typedef void (*txrx_ast_free_cb)(struct cdp_ctrl_objmgr_psoc *ctrl_soc, |
Akshay Kosigi | 4002f76 | 2019-07-08 23:04:36 +0530 | [diff] [blame] | 367 | struct cdp_soc *cdp_soc, |
Chaithanya Garrepalli | 9cc562c | 2018-11-16 18:30:41 +0530 | [diff] [blame] | 368 | void *cookie, |
| 369 | enum cdp_ast_free_status); |
| 370 | |
Chaithanya Garrepalli | 9cc562c | 2018-11-16 18:30:41 +0530 | [diff] [blame] | 371 | /** |
| 372 | * struct cdp_ast_entry_info - AST entry information |
| 373 | * @peer_mac_addr: mac address of peer on which AST entry is added |
| 374 | * @type: ast entry type |
| 375 | * @vdev_id: vdev_id |
| 376 | * @pdev_id: pdev_id |
| 377 | * @peer_id: peer_id |
| 378 | * |
| 379 | * This structure holds the ast entry information |
| 380 | * |
| 381 | */ |
| 382 | struct cdp_ast_entry_info { |
Srinivas Girigowda | 2751b6d | 2019-02-27 12:28:13 -0800 | [diff] [blame] | 383 | uint8_t peer_mac_addr[QDF_MAC_ADDR_SIZE]; |
Chaithanya Garrepalli | 9cc562c | 2018-11-16 18:30:41 +0530 | [diff] [blame] | 384 | enum cdp_txrx_ast_entry_type type; |
| 385 | uint8_t vdev_id; |
| 386 | uint8_t pdev_id; |
| 387 | uint16_t peer_id; |
| 388 | }; |
| 389 | |
Rakshith Suresh Patkar | d863f8d | 2019-07-16 16:30:59 +0530 | [diff] [blame] | 390 | #define MIC_SEQ_CTR_SIZE 6 |
| 391 | |
| 392 | enum cdp_rx_frame_type { |
| 393 | cdp_rx_frame_type_802_11, |
| 394 | cdp_rx_frame_type_802_3, |
| 395 | }; |
| 396 | |
| 397 | /** |
| 398 | * struct cdp_rx_mic_err_info - rx mic error information |
| 399 | * @frame_type: frame type - 0 - 802.11 frame |
| 400 | * - 1 - 802.3 frame |
| 401 | * @data: 802.11 frame |
| 402 | * @ta_mac_addr: transmitter mac address |
| 403 | * @da_mac_addr: destination mac address |
| 404 | * @tsc: sequence number |
| 405 | * @key_id: Key ID |
| 406 | * @multicast: flag for multicast |
| 407 | * @vdev_id: vdev ID |
| 408 | * |
| 409 | * This structure holds rx mic error information |
| 410 | * |
| 411 | */ |
| 412 | struct cdp_rx_mic_err_info { |
| 413 | uint8_t frame_type; |
| 414 | uint8_t *data; |
| 415 | struct qdf_mac_addr ta_mac_addr; |
| 416 | struct qdf_mac_addr da_mac_addr; |
| 417 | uint8_t tsc[MIC_SEQ_CTR_SIZE]; |
| 418 | uint8_t key_id; |
| 419 | bool multicast; |
| 420 | uint16_t vdev_id; |
| 421 | }; |
| 422 | |
Gurumoorthi Gnanasambandhan | ed4bcf8 | 2017-05-24 00:10:59 +0530 | [diff] [blame] | 423 | /** |
| 424 | * struct cdp_sec_type - security type information |
| 425 | */ |
| 426 | enum cdp_sec_type { |
| 427 | cdp_sec_type_none, |
| 428 | cdp_sec_type_wep128, |
| 429 | cdp_sec_type_wep104, |
| 430 | cdp_sec_type_wep40, |
| 431 | cdp_sec_type_tkip, |
| 432 | cdp_sec_type_tkip_nomic, |
| 433 | cdp_sec_type_aes_ccmp, |
| 434 | cdp_sec_type_wapi, |
| 435 | cdp_sec_type_aes_ccmp_256, |
| 436 | cdp_sec_type_aes_gcmp, |
| 437 | cdp_sec_type_aes_gcmp_256, |
| 438 | |
| 439 | /* keep this last! */ |
| 440 | cdp_num_sec_types |
| 441 | }; |
| 442 | |
Prathyusha Guduri | be41d97 | 2018-01-19 14:17:14 +0530 | [diff] [blame] | 443 | /** |
| 444 | * struct cdp_tx_exception_metadata - Exception path parameters |
| 445 | * @peer_id: Peer id of the peer |
| 446 | * @tid: Transmit Identifier |
| 447 | * @tx_encap_type: Transmit encap type (i.e. Raw, Native Wi-Fi, Ethernet) |
| 448 | * @sec_type: sec_type to be passed to HAL |
Varsha Mishra | 27c5bd3 | 2019-05-28 11:54:46 +0530 | [diff] [blame] | 449 | * @is_tx_sniffer: Indicates if the packet has to be sniffed |
| 450 | * @ppdu_cookie: 16-bit ppdu cookie that has to be replayed back in completions |
Prathyusha Guduri | be41d97 | 2018-01-19 14:17:14 +0530 | [diff] [blame] | 451 | * |
| 452 | * This structure holds the parameters needed in the exception path of tx |
| 453 | * |
| 454 | */ |
| 455 | struct cdp_tx_exception_metadata { |
| 456 | uint16_t peer_id; |
| 457 | uint8_t tid; |
| 458 | uint16_t tx_encap_type; |
| 459 | enum cdp_sec_type sec_type; |
Varsha Mishra | 27c5bd3 | 2019-05-28 11:54:46 +0530 | [diff] [blame] | 460 | uint8_t is_tx_sniffer; |
| 461 | uint16_t ppdu_cookie; |
Prathyusha Guduri | be41d97 | 2018-01-19 14:17:14 +0530 | [diff] [blame] | 462 | }; |
| 463 | |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 464 | typedef struct cdp_soc_t *ol_txrx_soc_handle; |
| 465 | |
| 466 | /** |
| 467 | * ol_txrx_vdev_delete_cb - callback registered during vdev |
| 468 | * detach |
| 469 | */ |
| 470 | typedef void (*ol_txrx_vdev_delete_cb)(void *context); |
| 471 | |
| 472 | /** |
Alok Kumar | 2e254c5 | 2018-11-28 17:26:53 +0530 | [diff] [blame] | 473 | * ol_txrx_peer_unmap_sync_cb - callback registered during peer detach sync |
| 474 | */ |
| 475 | typedef QDF_STATUS(*ol_txrx_peer_unmap_sync_cb)(uint8_t vdev_id, |
| 476 | uint32_t peer_id_cnt, |
| 477 | uint16_t *peer_id_list); |
| 478 | |
| 479 | /** |
Pranita Solanke | afcd0f1 | 2018-08-29 22:49:23 +0530 | [diff] [blame] | 480 | * ol_txrx_pkt_direction - Packet Direction |
| 481 | * @rx_direction: rx path packet |
| 482 | * @tx_direction: tx path packet |
| 483 | */ |
| 484 | enum txrx_direction { |
| 485 | rx_direction = 1, |
| 486 | tx_direction = 0, |
| 487 | }; |
| 488 | |
| 489 | /** |
Akshay Kosigi | a4f6e17 | 2018-09-03 21:42:27 +0530 | [diff] [blame] | 490 | * cdp_capabilities- DP capabilities |
| 491 | */ |
| 492 | enum cdp_capabilities { |
| 493 | CDP_CFG_DP_TSO, |
| 494 | CDP_CFG_DP_LRO, |
| 495 | CDP_CFG_DP_SG, |
| 496 | CDP_CFG_DP_GRO, |
| 497 | CDP_CFG_DP_OL_TX_CSUM, |
| 498 | CDP_CFG_DP_OL_RX_CSUM, |
| 499 | CDP_CFG_DP_RAWMODE, |
| 500 | CDP_CFG_DP_PEER_FLOW_CTRL, |
| 501 | }; |
| 502 | |
| 503 | /** |
Pranita Solanke | afcd0f1 | 2018-08-29 22:49:23 +0530 | [diff] [blame] | 504 | * ol_txrx_nbuf_classify - Packet classification object |
| 505 | * @peer_id: unique peer identifier from fw |
| 506 | * @tid: traffic identifier(could be overridden) |
| 507 | * @pkt_tid: traffic identifier(cannot be overridden) |
| 508 | * @pkt_tos: ip header tos value |
| 509 | * @pkt_dscp: ip header dscp value |
| 510 | * @tos: index value in map |
| 511 | * @dscp: DSCP_TID map index |
| 512 | * @is_mcast: multicast pkt check |
| 513 | * @is_eap: eapol pkt check |
| 514 | * @is_arp: arp pkt check |
| 515 | * @is_tcp: tcp pkt check |
| 516 | * @is_dhcp: dhcp pkt check |
| 517 | * @is_igmp: igmp pkt check |
| 518 | * @is_ipv4: ip version 4 pkt check |
| 519 | * @is_ipv6: ip version 6 pkt check |
| 520 | */ |
| 521 | struct ol_txrx_nbuf_classify { |
| 522 | uint16_t peer_id; |
| 523 | uint8_t tid; |
| 524 | uint8_t pkt_tid; |
| 525 | uint8_t pkt_tos; |
| 526 | uint8_t pkt_dscp; |
| 527 | uint8_t tos; |
| 528 | uint8_t dscp; |
| 529 | uint8_t is_mcast; |
| 530 | uint8_t is_eap; |
| 531 | uint8_t is_arp; |
| 532 | uint8_t is_tcp; |
| 533 | uint8_t is_dhcp; |
| 534 | uint8_t is_igmp; |
| 535 | uint8_t is_ipv4; |
| 536 | uint8_t is_ipv6; |
| 537 | }; |
| 538 | |
| 539 | /** |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 540 | * ol_osif_vdev_handle - paque handle for OS shim virtual device |
| 541 | * object |
| 542 | */ |
| 543 | struct ol_osif_vdev_t; |
| 544 | typedef struct ol_osif_vdev_t *ol_osif_vdev_handle; |
| 545 | |
| 546 | /** |
| 547 | * wlan_op_mode - Virtual device operation mode |
| 548 | * @wlan_op_mode_unknown: Unknown mode |
| 549 | * @wlan_op_mode_ap: AP mode |
| 550 | * @wlan_op_mode_ibss: IBSS mode |
| 551 | * @wlan_op_mode_sta: STA (client) mode |
| 552 | * @wlan_op_mode_monitor: Monitor mode |
| 553 | * @wlan_op_mode_ocb: OCB mode |
| 554 | */ |
| 555 | enum wlan_op_mode { |
| 556 | wlan_op_mode_unknown, |
| 557 | wlan_op_mode_ap, |
| 558 | wlan_op_mode_ibss, |
| 559 | wlan_op_mode_sta, |
| 560 | wlan_op_mode_monitor, |
| 561 | wlan_op_mode_ocb, |
Leo Chang | db6358c | 2016-09-27 17:00:52 -0700 | [diff] [blame] | 562 | wlan_op_mode_ndi, |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 563 | }; |
| 564 | |
| 565 | /** |
Rakesh Pillai | 01b9b68 | 2019-07-27 18:58:21 -0700 | [diff] [blame] | 566 | * enum wlan_op_subtype - Virtual device subtype |
| 567 | * @wlan_op_subtype_none: Subtype not applicable |
| 568 | * @wlan_op_subtype_p2p_device: P2P device |
| 569 | * @wlan_op_subtye_p2p_cli: P2P Client |
| 570 | * @wlan_op_subtype_p2p_go: P2P GO |
| 571 | * |
| 572 | * This enum lists the subtypes of a particular virtual |
| 573 | * device. |
| 574 | */ |
| 575 | enum wlan_op_subtype { |
| 576 | wlan_op_subtype_none, |
| 577 | wlan_op_subtype_p2p_device, |
| 578 | wlan_op_subtype_p2p_cli, |
| 579 | wlan_op_subtype_p2p_go, |
| 580 | }; |
| 581 | |
| 582 | /** |
Poddar, Siddarth | 8d33d9b | 2018-01-16 12:29:36 +0530 | [diff] [blame] | 583 | * connectivity_stats_pkt_status - data pkt type |
| 584 | * @PKT_TYPE_REQ: Request packet |
| 585 | * @PKT_TYPE_RSP: Response packet |
| 586 | * @PKT_TYPE_TX_DROPPED: TX packet dropped |
| 587 | * @PKT_TYPE_RX_DROPPED: RX packet dropped |
| 588 | * @PKT_TYPE_RX_DELIVERED: RX packet delivered |
| 589 | * @PKT_TYPE_RX_REFUSED: RX packet refused |
| 590 | * @PKT_TYPE_TX_HOST_FW_SENT: TX packet FW sent |
| 591 | * @PKT_TYPE_TX_ACK_CNT:TC packet acked |
| 592 | * @PKT_TYPE_NONE: Invalid packet |
| 593 | */ |
| 594 | enum connectivity_stats_pkt_status { |
| 595 | PKT_TYPE_REQ, |
| 596 | PKT_TYPE_RSP, |
| 597 | PKT_TYPE_TX_DROPPED, |
| 598 | PKT_TYPE_RX_DROPPED, |
| 599 | PKT_TYPE_RX_DELIVERED, |
| 600 | PKT_TYPE_RX_REFUSED, |
| 601 | PKT_TYPE_TX_HOST_FW_SENT, |
| 602 | PKT_TYPE_TX_ACK_CNT, |
| 603 | PKT_TYPE_NONE, |
| 604 | }; |
| 605 | |
| 606 | /** |
Lin Bai | 324f491 | 2018-12-13 16:13:24 +0800 | [diff] [blame] | 607 | * ol_txrx_mgmt_tx_cb - tx management delivery notification |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 608 | * callback function |
| 609 | */ |
| 610 | typedef void |
| 611 | (*ol_txrx_mgmt_tx_cb)(void *ctxt, qdf_nbuf_t tx_mgmt_frm, int had_error); |
| 612 | |
| 613 | /** |
Kabilan Kannan | 60e3b30 | 2017-09-07 20:06:17 -0700 | [diff] [blame] | 614 | * ol_txrx_data_tx_cb - Function registered with the data path |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 615 | * that is called when tx frames marked as "no free" are |
| 616 | * done being transmitted |
| 617 | */ |
| 618 | typedef void |
| 619 | (*ol_txrx_data_tx_cb)(void *ctxt, qdf_nbuf_t tx_frm, int had_error); |
| 620 | |
| 621 | /** |
| 622 | * ol_txrx_tx_fp - top-level transmit function |
| 623 | * @data_vdev - handle to the virtual device object |
| 624 | * @msdu_list - list of network buffers |
| 625 | */ |
Akshay Kosigi | c74162c | 2019-06-10 12:25:10 +0530 | [diff] [blame] | 626 | typedef qdf_nbuf_t (*ol_txrx_tx_fp)(struct cdp_vdev *data_vdev, |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 627 | qdf_nbuf_t msdu_list); |
Prathyusha Guduri | be41d97 | 2018-01-19 14:17:14 +0530 | [diff] [blame] | 628 | |
| 629 | /** |
| 630 | * ol_txrx_tx_exc_fp - top-level transmit function on exception path |
| 631 | * @data_vdev - handle to the virtual device object |
| 632 | * @msdu_list - list of network buffers |
| 633 | * @tx_exc_metadata - structure that holds parameters to exception path |
| 634 | */ |
Akshay Kosigi | c74162c | 2019-06-10 12:25:10 +0530 | [diff] [blame] | 635 | typedef qdf_nbuf_t (*ol_txrx_tx_exc_fp)(struct cdp_vdev *data_vdev, |
Prathyusha Guduri | be41d97 | 2018-01-19 14:17:14 +0530 | [diff] [blame] | 636 | qdf_nbuf_t msdu_list, |
| 637 | struct cdp_tx_exception_metadata |
| 638 | *tx_exc_metadata); |
| 639 | |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 640 | /** |
Yun Park | aadee8c | 2018-06-04 11:21:40 -0700 | [diff] [blame] | 641 | * ol_txrx_completion_fp - top-level transmit function |
| 642 | * for tx completion |
| 643 | * @skb: skb data |
| 644 | * @osif_dev: the virtual device's OS shim object |
| 645 | */ |
| 646 | typedef void (*ol_txrx_completion_fp)(qdf_nbuf_t skb, |
| 647 | void *osif_dev); |
| 648 | /** |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 649 | * ol_txrx_tx_flow_control_fp - tx flow control notification |
| 650 | * function from txrx to OS shim |
| 651 | * @osif_dev - the virtual device's OS shim object |
| 652 | * @tx_resume - tx os q should be resumed or not |
| 653 | */ |
| 654 | typedef void (*ol_txrx_tx_flow_control_fp)(void *osif_dev, |
| 655 | bool tx_resume); |
| 656 | |
| 657 | /** |
bings | 4dcaf8b | 2017-08-11 10:37:46 +0800 | [diff] [blame] | 658 | * ol_txrx_tx_flow_control_is_pause_fp - is tx paused by flow control |
| 659 | * function from txrx to OS shim |
| 660 | * @osif_dev - the virtual device's OS shim object |
| 661 | * |
| 662 | * Return: true if tx is paused by flow control |
| 663 | */ |
| 664 | typedef bool (*ol_txrx_tx_flow_control_is_pause_fp)(void *osif_dev); |
| 665 | |
| 666 | /** |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 667 | * ol_txrx_rx_fp - receive function to hand batches of data |
| 668 | * frames from txrx to OS shim |
| 669 | * @data_vdev - handle to the OSIF virtual device object |
| 670 | * @msdu_list - list of network buffers |
| 671 | */ |
| 672 | typedef QDF_STATUS(*ol_txrx_rx_fp)(void *osif_dev, qdf_nbuf_t msdu_list); |
| 673 | |
| 674 | /** |
Rakesh Pillai | 534a143 | 2019-10-24 06:44:11 +0530 | [diff] [blame] | 675 | * ol_txrx_rx_flush_fp - receive function to hand batches of data |
| 676 | * frames from txrx to OS shim |
| 677 | * @osif_dev: handle to the OSIF virtual device object |
| 678 | * @vdev_id: vdev_if of the packets to be flushed |
| 679 | */ |
| 680 | typedef QDF_STATUS(*ol_txrx_rx_flush_fp)(void *osif_dev, uint8_t vdev_id); |
| 681 | |
| 682 | /** |
Mohit Khanna | 698987c | 2019-07-28 21:38:05 -0700 | [diff] [blame] | 683 | * ol_txrx_rx_gro_flush_ind - function to send GRO flush indication to stack |
| 684 | * for a given RX Context Id. |
| 685 | * @osif_dev - handle to the OSIF virtual device object |
| 686 | * @rx_ctx_id - Rx context Id for which gro flush should happen |
| 687 | */ |
| 688 | typedef QDF_STATUS(*ol_txrx_rx_gro_flush_ind_fp)(void *osif_dev, |
| 689 | int rx_ctx_id); |
| 690 | |
| 691 | /** |
Poddar, Siddarth | 8d33d9b | 2018-01-16 12:29:36 +0530 | [diff] [blame] | 692 | * ol_txrx_stats_rx_fp - receive function to hand batches of data |
| 693 | * frames from txrx to OS shim |
| 694 | * @skb: skb data |
| 695 | * @osif_dev: the virtual device's OS shim object |
| 696 | * @action: data packet type |
| 697 | * @pkt_type: packet data type |
| 698 | */ |
| 699 | typedef void (*ol_txrx_stats_rx_fp)(struct sk_buff *skb, |
| 700 | void *osif_dev, enum connectivity_stats_pkt_status action, |
| 701 | uint8_t *pkt_type); |
| 702 | |
| 703 | /** |
Venkateswara Swamy Bandaru | 3f4e1c4 | 2017-07-10 19:47:09 +0530 | [diff] [blame] | 704 | * ol_txrx_get_key_fp - function to gey key based on keyix and peer |
| 705 | * mac address |
| 706 | * @osif_dev - the virtual device's OS shim object |
| 707 | * @key_buf - pointer to store key |
| 708 | * @mac_addr - pointer to mac address |
| 709 | * @keyix - key id |
| 710 | */ |
| 711 | typedef QDF_STATUS(*ol_txrx_get_key_fp)(void *osif_dev, uint8_t *key_buf, uint8_t *mac_addr, uint8_t keyix); |
| 712 | |
| 713 | /** |
Venkateswara Swamy Bandaru | bfbef4f | 2016-12-16 19:12:31 +0530 | [diff] [blame] | 714 | * ol_txrx_rsim_rx_decap_fp - raw mode simulation function to decap the |
| 715 | * packets in receive path. |
| 716 | * @osif_dev - the virtual device's OS shim object |
| 717 | * @list_head - poniter to head of receive packet queue to decap |
| 718 | * @list_tail - poniter to tail of receive packet queue to decap |
c_cgodav | bd5b3c2 | 2017-06-07 12:31:40 +0530 | [diff] [blame] | 719 | * @peer - Peer handler |
Venkateswara Swamy Bandaru | bfbef4f | 2016-12-16 19:12:31 +0530 | [diff] [blame] | 720 | */ |
| 721 | typedef QDF_STATUS(*ol_txrx_rsim_rx_decap_fp)(void *osif_dev, |
| 722 | qdf_nbuf_t *list_head, |
c_cgodav | bd5b3c2 | 2017-06-07 12:31:40 +0530 | [diff] [blame] | 723 | qdf_nbuf_t *list_tail, |
| 724 | struct cdp_peer *peer); |
Venkateswara Swamy Bandaru | bfbef4f | 2016-12-16 19:12:31 +0530 | [diff] [blame] | 725 | |
Venkateswara Swamy Bandaru | 9748234 | 2017-02-16 12:04:50 +0530 | [diff] [blame] | 726 | /* ol_txrx_rx_fp - external tx free function to read per packet stats and |
| 727 | * free tx buffer externally |
| 728 | * @netbuf - tx network buffer |
| 729 | */ |
| 730 | typedef void (*ol_txrx_tx_free_ext_fp)(qdf_nbuf_t netbuf); |
| 731 | |
Venkateswara Swamy Bandaru | bfbef4f | 2016-12-16 19:12:31 +0530 | [diff] [blame] | 732 | /** |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 733 | * ol_txrx_rx_check_wai_fp - OSIF WAPI receive function |
| 734 | */ |
| 735 | typedef bool (*ol_txrx_rx_check_wai_fp)(ol_osif_vdev_handle vdev, |
| 736 | qdf_nbuf_t mpdu_head, |
| 737 | qdf_nbuf_t mpdu_tail); |
| 738 | /** |
| 739 | * ol_txrx_rx_mon_fp - OSIF monitor mode receive function for single |
| 740 | * MPDU (802.11 format) |
| 741 | */ |
| 742 | typedef void (*ol_txrx_rx_mon_fp)(ol_osif_vdev_handle vdev, |
| 743 | qdf_nbuf_t mpdu, |
| 744 | void *rx_status); |
| 745 | |
| 746 | /** |
| 747 | * ol_txrx_proxy_arp_fp - proxy arp function pointer |
| 748 | */ |
| 749 | typedef int (*ol_txrx_proxy_arp_fp)(ol_osif_vdev_handle vdev, |
| 750 | qdf_nbuf_t netbuf); |
| 751 | |
Ishank Jain | c838b13 | 2017-02-17 11:08:18 +0530 | [diff] [blame] | 752 | /* |
| 753 | * ol_txrx_mcast_me_fp - function pointer for multicast enhancement |
| 754 | */ |
| 755 | typedef int (*ol_txrx_mcast_me_fp)(ol_osif_vdev_handle vdev, |
| 756 | qdf_nbuf_t netbuf); |
| 757 | |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 758 | /** |
| 759 | * ol_txrx_stats_callback - statistics notify callback |
| 760 | */ |
| 761 | typedef void (*ol_txrx_stats_callback)(void *ctxt, |
Nandha Kishore Easwaran | 870abda | 2016-11-16 17:37:19 +0530 | [diff] [blame] | 762 | enum htt_cmn_dbg_stats_type type, |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 763 | uint8_t *buf, int bytes); |
| 764 | |
| 765 | /** |
Lin Bai | 324f491 | 2018-12-13 16:13:24 +0800 | [diff] [blame] | 766 | * ol_txrx_pktdump_cb - callback for packet dump feature |
| 767 | */ |
Jingxiang Ge | 434105d | 2019-03-08 17:06:19 +0800 | [diff] [blame] | 768 | typedef void (*ol_txrx_pktdump_cb)(ol_txrx_soc_handle soc, |
Rakesh Pillai | d295d1e | 2019-09-11 08:00:36 +0530 | [diff] [blame] | 769 | uint8_t pdev_id, |
| 770 | uint8_t vdev_id, |
| 771 | qdf_nbuf_t netbuf, |
| 772 | uint8_t status, |
| 773 | uint8_t type); |
Lin Bai | 324f491 | 2018-12-13 16:13:24 +0800 | [diff] [blame] | 774 | |
| 775 | /** |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 776 | * ol_txrx_ops - (pointers to) the functions used for tx and rx |
| 777 | * data xfer |
| 778 | * |
| 779 | * There are two portions of these txrx operations. |
| 780 | * The rx portion is filled in by OSIF SW before calling |
| 781 | * ol_txrx_osif_vdev_register; inside the ol_txrx_osif_vdev_register |
| 782 | * the txrx SW stores a copy of these rx function pointers, to use |
| 783 | * as it delivers rx data frames to the OSIF SW. |
| 784 | * The tx portion is filled in by the txrx SW inside |
| 785 | * ol_txrx_osif_vdev_register; when the function call returns, |
| 786 | * the OSIF SW stores a copy of these tx functions to use as it |
| 787 | * delivers tx data frames to the txrx SW. |
| 788 | * |
| 789 | * @tx.std - the tx function pointer for standard data |
| 790 | * frames This function pointer is set by the txrx SW |
| 791 | * perform host-side transmit operations based on |
| 792 | * whether a HL or LL host/target interface is in use. |
| 793 | * @tx.flow_control_cb - the transmit flow control |
| 794 | * function that is registered by the |
| 795 | * OSIF which is called from txrx to |
| 796 | * indicate whether the transmit OS |
| 797 | * queues should be paused/resumed |
Mohit Khanna | 7ac554b | 2018-05-24 11:58:13 -0700 | [diff] [blame] | 798 | * @rx.rx - the OS shim rx function to deliver rx data |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 799 | * frames to. This can have different values for |
| 800 | * different virtual devices, e.g. so one virtual |
| 801 | * device's OS shim directly hands rx frames to the OS, |
| 802 | * but another virtual device's OS shim filters out P2P |
| 803 | * messages before sending the rx frames to the OS. The |
| 804 | * netbufs delivered to the osif_rx function are in the |
| 805 | * format specified by the OS to use for tx and rx |
Mohit Khanna | 7ac554b | 2018-05-24 11:58:13 -0700 | [diff] [blame] | 806 | * frames (either 802.3 or native WiFi). In case RX Threads are enabled, pkts |
| 807 | * are given to the thread, instead of the stack via this pointer. |
| 808 | * @rx.stack - function to give packets to the stack. Differs from @rx.rx. |
| 809 | * In case RX Threads are enabled, this pointer holds the callback to give |
| 810 | * packets to the stack. |
Mohit Khanna | 698987c | 2019-07-28 21:38:05 -0700 | [diff] [blame] | 811 | * @rx.rx_gro_flush - GRO flush indication to stack for a given RX CTX ID |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 812 | * @rx.wai_check - the tx function pointer for WAPI frames |
| 813 | * @rx.mon - the OS shim rx monitor function to deliver |
| 814 | * monitor data to Though in practice, it is probable |
| 815 | * that the same function will be used for delivering |
| 816 | * rx monitor data for all virtual devices, in theory |
| 817 | * each different virtual device can have a different |
| 818 | * OS shim function for accepting rx monitor data. The |
| 819 | * netbufs delivered to the osif_rx_mon function are in |
| 820 | * 802.11 format. Each netbuf holds a 802.11 MPDU, not |
| 821 | * an 802.11 MSDU. Depending on compile-time |
| 822 | * configuration, each netbuf may also have a |
| 823 | * monitor-mode encapsulation header such as a radiotap |
| 824 | * header added before the MPDU contents. |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 825 | * @rx.std - the OS shim rx function to deliver rx data |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 826 | * @proxy_arp - proxy arp function pointer - specified by |
| 827 | * OS shim, stored by txrx |
Venkateswara Swamy Bandaru | 3f4e1c4 | 2017-07-10 19:47:09 +0530 | [diff] [blame] | 828 | * @get_key - function pointer to get key of the peer with |
| 829 | * specific key index |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 830 | */ |
| 831 | struct ol_txrx_ops { |
| 832 | /* tx function pointers - specified by txrx, stored by OS shim */ |
| 833 | struct { |
| 834 | ol_txrx_tx_fp tx; |
Prathyusha Guduri | be41d97 | 2018-01-19 14:17:14 +0530 | [diff] [blame] | 835 | ol_txrx_tx_exc_fp tx_exception; |
Venkateswara Swamy Bandaru | 9748234 | 2017-02-16 12:04:50 +0530 | [diff] [blame] | 836 | ol_txrx_tx_free_ext_fp tx_free_ext; |
Yun Park | aadee8c | 2018-06-04 11:21:40 -0700 | [diff] [blame] | 837 | ol_txrx_completion_fp tx_comp; |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 838 | } tx; |
| 839 | |
| 840 | /* rx function pointers - specified by OS shim, stored by txrx */ |
| 841 | struct { |
| 842 | ol_txrx_rx_fp rx; |
Mohit Khanna | 7ac554b | 2018-05-24 11:58:13 -0700 | [diff] [blame] | 843 | ol_txrx_rx_fp rx_stack; |
Rakesh Pillai | 534a143 | 2019-10-24 06:44:11 +0530 | [diff] [blame] | 844 | ol_txrx_rx_flush_fp rx_flush; |
Mohit Khanna | 698987c | 2019-07-28 21:38:05 -0700 | [diff] [blame] | 845 | ol_txrx_rx_gro_flush_ind_fp rx_gro_flush; |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 846 | ol_txrx_rx_check_wai_fp wai_check; |
| 847 | ol_txrx_rx_mon_fp mon; |
Poddar, Siddarth | 8d33d9b | 2018-01-16 12:29:36 +0530 | [diff] [blame] | 848 | ol_txrx_stats_rx_fp stats_rx; |
Venkateswara Swamy Bandaru | bfbef4f | 2016-12-16 19:12:31 +0530 | [diff] [blame] | 849 | ol_txrx_rsim_rx_decap_fp rsim_rx_decap; |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 850 | } rx; |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 851 | /* proxy arp function pointer - specified by OS shim, stored by txrx */ |
| 852 | ol_txrx_proxy_arp_fp proxy_arp; |
Ishank Jain | c838b13 | 2017-02-17 11:08:18 +0530 | [diff] [blame] | 853 | ol_txrx_mcast_me_fp me_convert; |
Venkateswara Swamy Bandaru | 3f4e1c4 | 2017-07-10 19:47:09 +0530 | [diff] [blame] | 854 | |
| 855 | ol_txrx_get_key_fp get_key; |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 856 | }; |
| 857 | |
| 858 | /** |
| 859 | * ol_txrx_stats_req - specifications of the requested |
| 860 | * statistics |
| 861 | */ |
| 862 | struct ol_txrx_stats_req { |
| 863 | uint32_t stats_type_upload_mask; /* which stats to upload */ |
| 864 | uint32_t stats_type_reset_mask; /* which stats to reset */ |
| 865 | |
| 866 | /* stats will be printed if either print element is set */ |
| 867 | struct { |
| 868 | int verbose; /* verbose stats printout */ |
| 869 | int concise; /* concise stats printout (takes precedence) */ |
| 870 | } print; /* print uploaded stats */ |
| 871 | |
| 872 | /* stats notify callback will be invoked if fp is non-NULL */ |
| 873 | struct { |
| 874 | ol_txrx_stats_callback fp; |
| 875 | void *ctxt; |
| 876 | } callback; |
| 877 | |
| 878 | /* stats will be copied into the specified buffer if buf is non-NULL */ |
| 879 | struct { |
| 880 | uint8_t *buf; |
| 881 | int byte_limit; /* don't copy more than this */ |
| 882 | } copy; |
| 883 | |
| 884 | /* |
| 885 | * If blocking is true, the caller will take the specified semaphore |
| 886 | * to wait for the stats to be uploaded, and the driver will release |
| 887 | * the semaphore when the stats are done being uploaded. |
| 888 | */ |
| 889 | struct { |
| 890 | int blocking; |
| 891 | /*Note: this needs to change to some qdf_* type */ |
| 892 | qdf_semaphore_t *sem_ptr; |
| 893 | } wait; |
| 894 | }; |
| 895 | |
| 896 | |
| 897 | /* DP soc struct definition */ |
| 898 | struct cdp_soc_t { |
| 899 | struct cdp_ops *ops; |
Leo Chang | db6358c | 2016-09-27 17:00:52 -0700 | [diff] [blame] | 900 | struct ol_if_ops *ol_ops; |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 901 | }; |
| 902 | |
Ishank Jain | 9f174c6 | 2017-03-30 18:37:42 +0530 | [diff] [blame] | 903 | /* |
Soumya Bhat | cfbb895 | 2017-10-03 15:04:09 +0530 | [diff] [blame] | 904 | * cdp_pdev_param_type: different types of parameters |
| 905 | * to set values in pdev |
Soumya Bhat | 6fee59c | 2017-10-31 13:12:37 +0530 | [diff] [blame] | 906 | * @CDP_CONFIG_DEBUG_SNIFFER: Enable debug sniffer feature |
Vinay Adella | 873dc40 | 2018-05-28 12:06:34 +0530 | [diff] [blame] | 907 | * @CDP_CONFIG_BPR_ENABLE: Enable bcast probe feature |
Pamidipati, Vijay | 13f5ec2 | 2018-08-06 17:34:21 +0530 | [diff] [blame] | 908 | * @CDP_CONFIG_PRIMARY_RADIO: Configure radio as primary |
Varsha Mishra | a6e5892 | 2019-01-17 18:26:55 +0530 | [diff] [blame] | 909 | * @CDP_CONFIG_ENABLE_PERPKT_TXSTATS: Enable per packet statistics |
| 910 | * @CDP_CONFIG_IGMPMLD_OVERRIDE: Override IGMP/MLD |
| 911 | * @CDP_CONFIG_IGMPMLD_TID: Configurable TID value when igmmld_override is set |
| 912 | * @CDP_CONFIG_ARP_DBG_CONF: Enable ARP debug |
Ankit Kumar | 8dc0e2a | 2019-02-28 18:17:15 +0530 | [diff] [blame] | 913 | * @CDP_CONFIG_CAPTURE_LATENCY: Capture time latency |
Varsha Mishra | 1828179 | 2019-03-06 17:57:23 +0530 | [diff] [blame] | 914 | * @CDP_INGRESS_STATS: Accumulate ingress statistics |
| 915 | * @CDP_OSIF_DROP: Accumulate drops in OSIF layer |
Kai Chen | 52ef33f | 2019-03-05 18:33:40 -0800 | [diff] [blame] | 916 | * @CDP_CONFIG_ENH_RX_CAPTURE: Enable enhanced RX capture |
Soumya Bhat | cfbb895 | 2017-10-03 15:04:09 +0530 | [diff] [blame] | 917 | */ |
| 918 | enum cdp_pdev_param_type { |
Soumya Bhat | 6fee59c | 2017-10-31 13:12:37 +0530 | [diff] [blame] | 919 | CDP_CONFIG_DEBUG_SNIFFER, |
Vinay Adella | 873dc40 | 2018-05-28 12:06:34 +0530 | [diff] [blame] | 920 | CDP_CONFIG_BPR_ENABLE, |
Pamidipati, Vijay | 13f5ec2 | 2018-08-06 17:34:21 +0530 | [diff] [blame] | 921 | CDP_CONFIG_PRIMARY_RADIO, |
Varsha Mishra | a6e5892 | 2019-01-17 18:26:55 +0530 | [diff] [blame] | 922 | CDP_CONFIG_ENABLE_PERPKT_TXSTATS, |
| 923 | CDP_CONFIG_IGMPMLD_OVERRIDE, |
| 924 | CDP_CONFIG_IGMPMLD_TID, |
| 925 | CDP_CONFIG_ARP_DBG_CONF, |
Ankit Kumar | 8dc0e2a | 2019-02-28 18:17:15 +0530 | [diff] [blame] | 926 | CDP_CONFIG_CAPTURE_LATENCY, |
Varsha Mishra | 1828179 | 2019-03-06 17:57:23 +0530 | [diff] [blame] | 927 | CDP_INGRESS_STATS, |
| 928 | CDP_OSIF_DROP, |
Kai Chen | 52ef33f | 2019-03-05 18:33:40 -0800 | [diff] [blame] | 929 | CDP_CONFIG_ENH_RX_CAPTURE, |
nobelj | debe2b3 | 2019-04-23 11:18:47 -0700 | [diff] [blame] | 930 | CDP_CONFIG_TX_CAPTURE, |
Kai Chen | 52ef33f | 2019-03-05 18:33:40 -0800 | [diff] [blame] | 931 | }; |
| 932 | |
| 933 | /** |
| 934 | * cdp_rx_enh_capture_mode - Rx enhanced capture modes |
| 935 | * @CDP_RX_ENH_CAPTURE_DISABLED: Disable Rx enhance capture |
| 936 | * @CDP_RX_ENH_CAPTURE_MPDU: Enable capture of 128 bytes of each MPDU |
| 937 | * @CDP_RX_ENH_CAPTURE_MPDU_MSDU: Enable capture of 128 bytes of each MSDU |
| 938 | */ |
| 939 | enum cdp_rx_enh_capture_mode { |
| 940 | CDP_RX_ENH_CAPTURE_DISABLED = 0, |
| 941 | CDP_RX_ENH_CAPTURE_MPDU, |
| 942 | CDP_RX_ENH_CAPTURE_MPDU_MSDU, |
Vinay Adella | 873dc40 | 2018-05-28 12:06:34 +0530 | [diff] [blame] | 943 | }; |
| 944 | |
Sumeet Rao | 511db29 | 2019-07-22 11:42:48 -0700 | [diff] [blame] | 945 | /** |
Kai Chen | 99efa0d | 2019-08-20 17:51:27 -0700 | [diff] [blame] | 946 | * cdp_rx_enh_capture_peer - Rx enhanced capture peer filtering |
| 947 | * @CDP_RX_ENH_CAPTURE_PEER_DISABLED: Disable Rx ENH capture peer filtering |
| 948 | * @CDP_RX_ENH_CAPTURE_PEER_ENABLED: Enable Rx ENH capture peer filtering |
| 949 | */ |
| 950 | enum cdp_rx_enh_capture_peer { |
| 951 | CDP_RX_ENH_CAPTURE_PEER_DISABLED = 0, |
| 952 | CDP_RX_ENH_CAPTURE_PEER_ENABLED, |
| 953 | }; |
| 954 | |
| 955 | /** |
Sumeet Rao | 511db29 | 2019-07-22 11:42:48 -0700 | [diff] [blame] | 956 | * cdp_tx_enh_capture_mode - Tx enhanced capture modes |
| 957 | * @CDP_TX_ENH_CAPTURE_DISABLED: Disable Tx enhance capture for all peers |
| 958 | * @CDP_TX_ENH_CAPTURE_ENABLE_ALL_PEERS: Enable tx capture for all peers |
| 959 | * @CDP_TX_ENH_CAPTURE_ENDIS_PER_PEER: Enable/disable per peer as necessary |
| 960 | */ |
| 961 | enum cdp_tx_enh_capture_mode { |
| 962 | CDP_TX_ENH_CAPTURE_DISABLED = 0, |
| 963 | CDP_TX_ENH_CAPTURE_ENABLE_ALL_PEERS, |
| 964 | CDP_TX_ENH_CAPTURE_ENDIS_PER_PEER, |
| 965 | }; |
| 966 | |
Vinay Adella | 873dc40 | 2018-05-28 12:06:34 +0530 | [diff] [blame] | 967 | /* |
| 968 | * enum cdp_pdev_bpr_param - different types of parameters |
| 969 | * to set value in pdev |
| 970 | * @CDP_BPR_DISABLE: Set bpr to disable state |
| 971 | * @CDP_BPR_ENABLE: set bpr to enable state |
| 972 | * |
| 973 | * Enum indicating bpr state to enable/disable. |
| 974 | */ |
| 975 | enum cdp_pdev_bpr_param { |
| 976 | CDP_BPR_DISABLE, |
| 977 | CDP_BPR_ENABLE, |
Soumya Bhat | cfbb895 | 2017-10-03 15:04:09 +0530 | [diff] [blame] | 978 | }; |
| 979 | |
| 980 | /* |
Ishank Jain | 9f174c6 | 2017-03-30 18:37:42 +0530 | [diff] [blame] | 981 | * cdp_vdev_param_type: different types of parameters |
| 982 | * to set values in vdev |
| 983 | * @CDP_ENABLE_NAWDS: set nawds enable/disable |
| 984 | * @CDP_ENABLE_MCAST_EN: enable/disable multicast enhancement |
Kabilan Kannan | 56bfd8f | 2017-04-26 13:26:47 -0700 | [diff] [blame] | 985 | * @CDP_ENABLE_WDS: wds sta |
phadiman | 4213e9c | 2018-10-29 12:50:02 +0530 | [diff] [blame] | 986 | * @CDP_ENABLE_MEC: MEC enable flags |
Kabilan Kannan | 56bfd8f | 2017-04-26 13:26:47 -0700 | [diff] [blame] | 987 | * @CDP_ENABLE_PROXYSTA: proxy sta |
| 988 | * @CDP_UPDATE_TDLS_FLAGS: tdls link flags |
URAJ SASAN | 81d9571 | 2017-08-21 20:51:03 +0530 | [diff] [blame] | 989 | * @CDP_ENABLE_AP_BRIDGE: set ap_bridging enable/disable |
ruchi agrawal | 45f3ac4 | 2017-10-25 09:03:28 +0530 | [diff] [blame] | 990 | * @CDP_ENABLE_CIPHER : set cipher type based on security |
Nandha Kishore Easwaran | 47e7416 | 2017-12-12 11:54:01 +0530 | [diff] [blame] | 991 | * @CDP_ENABLE_QWRAP_ISOLATION: qwrap isolation mode |
Ishank Jain | 9f174c6 | 2017-03-30 18:37:42 +0530 | [diff] [blame] | 992 | */ |
| 993 | enum cdp_vdev_param_type { |
| 994 | CDP_ENABLE_NAWDS, |
| 995 | CDP_ENABLE_MCAST_EN, |
Pamidipati, Vijay | c9a13a5 | 2017-04-06 17:45:49 +0530 | [diff] [blame] | 996 | CDP_ENABLE_WDS, |
phadiman | 4213e9c | 2018-10-29 12:50:02 +0530 | [diff] [blame] | 997 | CDP_ENABLE_MEC, |
| 998 | CDP_ENABLE_DA_WAR, |
Pamidipati, Vijay | c9a13a5 | 2017-04-06 17:45:49 +0530 | [diff] [blame] | 999 | CDP_ENABLE_PROXYSTA, |
Kabilan Kannan | 56bfd8f | 2017-04-26 13:26:47 -0700 | [diff] [blame] | 1000 | CDP_UPDATE_TDLS_FLAGS, |
Pamidipati, Vijay | b8bbf16 | 2017-06-26 23:47:39 +0530 | [diff] [blame] | 1001 | CDP_CFG_WDS_AGING_TIMER, |
URAJ SASAN | 81d9571 | 2017-08-21 20:51:03 +0530 | [diff] [blame] | 1002 | CDP_ENABLE_AP_BRIDGE, |
Nandha Kishore Easwaran | 47e7416 | 2017-12-12 11:54:01 +0530 | [diff] [blame] | 1003 | CDP_ENABLE_CIPHER, |
Varsha Mishra | 6e1760c | 2019-07-27 22:51:42 +0530 | [diff] [blame] | 1004 | CDP_ENABLE_QWRAP_ISOLATION, |
| 1005 | CDP_UPDATE_MULTIPASS |
Ishank Jain | 9f174c6 | 2017-03-30 18:37:42 +0530 | [diff] [blame] | 1006 | }; |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 1007 | |
| 1008 | #define TXRX_FW_STATS_TXSTATS 1 |
| 1009 | #define TXRX_FW_STATS_RXSTATS 2 |
| 1010 | #define TXRX_FW_STATS_RX_RATE_INFO 3 |
| 1011 | #define TXRX_FW_STATS_PHYSTATS 4 |
| 1012 | #define TXRX_FW_STATS_PHYSTATS_CONCISE 5 |
| 1013 | #define TXRX_FW_STATS_TX_RATE_INFO 6 |
| 1014 | #define TXRX_FW_STATS_TID_STATE 7 |
| 1015 | #define TXRX_FW_STATS_HOST_STATS 8 |
| 1016 | #define TXRX_FW_STATS_CLEAR_HOST_STATS 9 |
| 1017 | #define TXRX_FW_STATS_CE_STATS 10 |
| 1018 | #define TXRX_FW_STATS_VOW_UMAC_COUNTER 11 |
| 1019 | #define TXRX_FW_STATS_ME_STATS 12 |
| 1020 | #define TXRX_FW_STATS_TXBF_INFO 13 |
| 1021 | #define TXRX_FW_STATS_SND_INFO 14 |
| 1022 | #define TXRX_FW_STATS_ERROR_INFO 15 |
| 1023 | #define TXRX_FW_STATS_TX_SELFGEN_INFO 16 |
| 1024 | #define TXRX_FW_STATS_TX_MU_INFO 17 |
| 1025 | #define TXRX_FW_SIFS_RESP_INFO 18 |
| 1026 | #define TXRX_FW_RESET_STATS 19 |
| 1027 | #define TXRX_FW_MAC_WDOG_STATS 20 |
| 1028 | #define TXRX_FW_MAC_DESC_STATS 21 |
| 1029 | #define TXRX_FW_MAC_FETCH_MGR_STATS 22 |
| 1030 | #define TXRX_FW_MAC_PREFETCH_MGR_STATS 23 |
Nandha Kishore Easwaran | 46249e4 | 2016-11-15 14:46:35 +0530 | [diff] [blame] | 1031 | #define TXRX_FW_STATS_DURATION_INFO 24 |
| 1032 | #define TXRX_FW_STATS_DURATION_INFO_RESET 25 |
Basamma Yakkanahalli | 51ddfbc | 2017-10-05 22:03:30 +0530 | [diff] [blame] | 1033 | #define TXRX_FW_HALPHY_STATS 26 |
phadiman | 6c99bef | 2017-09-28 12:24:08 +0530 | [diff] [blame] | 1034 | #define TXRX_FW_COEX_STATS 27 |
Nandha Kishore Easwaran | 46249e4 | 2016-11-15 14:46:35 +0530 | [diff] [blame] | 1035 | |
| 1036 | #define PER_RADIO_FW_STATS_REQUEST 0 |
| 1037 | #define PER_VDEV_FW_STATS_REQUEST 1 |
Poddar, Siddarth | 5c57a89 | 2017-09-04 12:16:38 +0530 | [diff] [blame] | 1038 | /** |
| 1039 | * enum data_stall_log_event_indicator - Module triggering data stall |
| 1040 | * @DATA_STALL_LOG_INDICATOR_UNUSED: Unused |
| 1041 | * @DATA_STALL_LOG_INDICATOR_HOST_DRIVER: Host driver indicates data stall |
| 1042 | * @DATA_STALL_LOG_INDICATOR_FIRMWARE: FW indicates data stall |
| 1043 | * @DATA_STALL_LOG_INDICATOR_FRAMEWORK: Framework indicates data stall |
| 1044 | * |
| 1045 | * Enum indicating the module that indicates data stall event |
| 1046 | */ |
| 1047 | enum data_stall_log_event_indicator { |
| 1048 | DATA_STALL_LOG_INDICATOR_UNUSED, |
| 1049 | DATA_STALL_LOG_INDICATOR_HOST_DRIVER, |
| 1050 | DATA_STALL_LOG_INDICATOR_FIRMWARE, |
| 1051 | DATA_STALL_LOG_INDICATOR_FRAMEWORK, |
| 1052 | }; |
| 1053 | |
| 1054 | /** |
| 1055 | * enum data_stall_log_event_type - data stall event type |
| 1056 | * @DATA_STALL_LOG_NONE |
| 1057 | * @DATA_STALL_LOG_FW_VDEV_PAUSE |
| 1058 | * @DATA_STALL_LOG_HWSCHED_CMD_FILTER |
| 1059 | * @DATA_STALL_LOG_HWSCHED_CMD_FLUSH |
| 1060 | * @DATA_STALL_LOG_FW_RX_REFILL_FAILED |
| 1061 | * @DATA_STALL_LOG_FW_RX_FCS_LEN_ERROR |
| 1062 | * @DATA_STALL_LOG_FW_WDOG_ERRORS |
| 1063 | * @DATA_STALL_LOG_BB_WDOG_ERROR |
Poddar, Siddarth | ec4b2a9 | 2017-12-26 14:46:46 +0530 | [diff] [blame] | 1064 | * @DATA_STALL_LOG_POST_TIM_NO_TXRX_ERROR |
Poddar, Siddarth | 5c57a89 | 2017-09-04 12:16:38 +0530 | [diff] [blame] | 1065 | * @DATA_STALL_LOG_HOST_STA_TX_TIMEOUT |
| 1066 | * @DATA_STALL_LOG_HOST_SOFTAP_TX_TIMEOUT |
| 1067 | * @DATA_STALL_LOG_NUD_FAILURE |
| 1068 | * |
| 1069 | * Enum indicating data stall event type |
| 1070 | */ |
| 1071 | enum data_stall_log_event_type { |
| 1072 | DATA_STALL_LOG_NONE, |
| 1073 | DATA_STALL_LOG_FW_VDEV_PAUSE, |
| 1074 | DATA_STALL_LOG_HWSCHED_CMD_FILTER, |
| 1075 | DATA_STALL_LOG_HWSCHED_CMD_FLUSH, |
| 1076 | DATA_STALL_LOG_FW_RX_REFILL_FAILED, |
| 1077 | DATA_STALL_LOG_FW_RX_FCS_LEN_ERROR, |
| 1078 | DATA_STALL_LOG_FW_WDOG_ERRORS, |
| 1079 | DATA_STALL_LOG_BB_WDOG_ERROR, |
Poddar, Siddarth | ec4b2a9 | 2017-12-26 14:46:46 +0530 | [diff] [blame] | 1080 | DATA_STALL_LOG_POST_TIM_NO_TXRX_ERROR, |
| 1081 | /* Stall events triggered by host/framework start from 0x100 onwards. */ |
| 1082 | DATA_STALL_LOG_HOST_STA_TX_TIMEOUT = 0x100, |
Poddar, Siddarth | 5c57a89 | 2017-09-04 12:16:38 +0530 | [diff] [blame] | 1083 | DATA_STALL_LOG_HOST_SOFTAP_TX_TIMEOUT, |
| 1084 | DATA_STALL_LOG_NUD_FAILURE, |
| 1085 | }; |
| 1086 | |
| 1087 | /** |
| 1088 | * enum data_stall_log_recovery_type - data stall recovery type |
| 1089 | * @DATA_STALL_LOG_RECOVERY_NONE, |
| 1090 | * @DATA_STALL_LOG_RECOVERY_CONNECT_DISCONNECT, |
| 1091 | * @DATA_STALL_LOG_RECOVERY_TRIGGER_PDR |
| 1092 | * |
| 1093 | * Enum indicating data stall recovery type |
| 1094 | */ |
| 1095 | enum data_stall_log_recovery_type { |
| 1096 | DATA_STALL_LOG_RECOVERY_NONE = 0, |
| 1097 | DATA_STALL_LOG_RECOVERY_CONNECT_DISCONNECT, |
| 1098 | DATA_STALL_LOG_RECOVERY_TRIGGER_PDR, |
| 1099 | }; |
| 1100 | |
| 1101 | /** |
| 1102 | * struct data_stall_event_info - data stall info |
| 1103 | * @indicator: Module triggering data stall |
| 1104 | * @data_stall_type: data stall event type |
| 1105 | * @vdev_id_bitmap: vdev_id_bitmap |
| 1106 | * @pdev_id: pdev id |
| 1107 | * @recovery_type: data stall recovery type |
| 1108 | */ |
| 1109 | struct data_stall_event_info { |
| 1110 | uint32_t indicator; |
| 1111 | uint32_t data_stall_type; |
| 1112 | uint32_t vdev_id_bitmap; |
| 1113 | uint32_t pdev_id; |
| 1114 | uint32_t recovery_type; |
| 1115 | }; |
| 1116 | |
| 1117 | typedef void (*data_stall_detect_cb)(struct data_stall_event_info *); |
| 1118 | |
Venkata Sharath Chandra Manchala | a77da0d | 2017-02-27 22:44:37 -0800 | [diff] [blame] | 1119 | /* |
Venkata Sharath Chandra Manchala | f167af1 | 2018-10-09 20:23:02 -0700 | [diff] [blame] | 1120 | * enum cdp_stats - options for host and firmware |
Venkata Sharath Chandra Manchala | a77da0d | 2017-02-27 22:44:37 -0800 | [diff] [blame] | 1121 | * statistics |
Venkata Sharath Chandra Manchala | f167af1 | 2018-10-09 20:23:02 -0700 | [diff] [blame] | 1122 | * @CDP_TXRX_STATS_1: HTT Pdev tx stats |
| 1123 | * @CDP_TXRX_STATS_2: HTT Pdev rx stats |
| 1124 | * @CDP_TXRX_STATS_3: HTT Pdev Tx HW Queue stats |
| 1125 | * @CDP_TXRX_STATS_4: HTT Pdev Tx HW Sched stats |
| 1126 | * @CDP_TXRX_STATS_5: HTT Pdev error stats |
| 1127 | * @CDP_TXRX_STATS_6: HTT TQM stats |
| 1128 | * @CDP_TXRX_STATS_7: HTT TQM CMDQ stats |
| 1129 | * @CDP_TXRX_STATS_8: HTT Tx_de_cmn thread stats |
| 1130 | * @CDP_TXRX_STATS_9: HTT Pdev Tx rate stats |
| 1131 | * @CDP_TXRX_STATS_10: HTT Pdev Rx rate stats |
| 1132 | * @CDP_TXRX_STATS_11: HTT Peer stats |
| 1133 | * @CDP_TXRX_STATS_12: HTT Tx Self Gen Info |
| 1134 | * @CDP_TXRX_STATS_13: HTT Tx MU HWQ stats |
| 1135 | * @CDP_TXRX_STATS_14: HTT Ring interface info stats |
| 1136 | * @CDP_TXRX_STATS_15: HTT SRNG info stats |
| 1137 | * @CDP_TXRX_STATS_16: HTT SFM info stats |
| 1138 | * @CDP_TXRX_STATS_17: HTT Pdev tx mu mimo sched info |
| 1139 | * @CDP_TXRX_STATS_18: HTT Peer list details |
| 1140 | * @CDP_TXRX_STATS_19: Reserved |
| 1141 | * @CDP_TXRX_STATS_20: Reset Host stats |
| 1142 | * @CDP_TXRX_STATS_21: Host Rx rate stats |
| 1143 | * @CDP_TXRX_STATS_22: Host Tx rate stats |
| 1144 | * @CDP_TXRX_STATS_23: Host Tx stats |
| 1145 | * @CDP_TXRX_STATS_24: Host Rx stats |
| 1146 | * @CDP_TXRX_STATS_25: Host Ast stats |
| 1147 | * @CDP_TXRX_STATS_26: Host Head/Tail Pointer stats |
| 1148 | * @CDP_TXRX_STATS_27: Host Monitor mode stats |
| 1149 | * @CDP_TXRX_STATS_28: Host Peer entry stats |
| 1150 | * @CDP_TXRX_STATS_29: Host Soc config params info |
| 1151 | * @CDP_TXRX_STATS_30: Host Pdev config params info |
Mohit Khanna | e5a6e94 | 2018-11-28 14:22:48 -0800 | [diff] [blame] | 1152 | * @CDP_TXRX_STATS_31: Host DP Interrupt Stats |
Venkata Sharath Chandra Manchala | f167af1 | 2018-10-09 20:23:02 -0700 | [diff] [blame] | 1153 | */ |
Venkata Sharath Chandra Manchala | a77da0d | 2017-02-27 22:44:37 -0800 | [diff] [blame] | 1154 | enum cdp_stats { |
| 1155 | CDP_TXRX_STATS_0 = 0, |
| 1156 | CDP_TXRX_STATS_1, |
| 1157 | CDP_TXRX_STATS_2, |
| 1158 | CDP_TXRX_STATS_3, |
| 1159 | CDP_TXRX_STATS_4, |
| 1160 | CDP_TXRX_STATS_5, |
| 1161 | CDP_TXRX_STATS_6, |
| 1162 | CDP_TXRX_STATS_7, |
| 1163 | CDP_TXRX_STATS_8, |
| 1164 | CDP_TXRX_STATS_9, |
| 1165 | CDP_TXRX_STATS_10, |
| 1166 | CDP_TXRX_STATS_11, |
| 1167 | CDP_TXRX_STATS_12, |
| 1168 | CDP_TXRX_STATS_13, |
| 1169 | CDP_TXRX_STATS_14, |
| 1170 | CDP_TXRX_STATS_15, |
| 1171 | CDP_TXRX_STATS_16, |
| 1172 | CDP_TXRX_STATS_17, |
| 1173 | CDP_TXRX_STATS_18, |
| 1174 | CDP_TXRX_STATS_19, |
| 1175 | CDP_TXRX_STATS_20, |
| 1176 | CDP_TXRX_STATS_21, |
| 1177 | CDP_TXRX_STATS_22, |
| 1178 | CDP_TXRX_STATS_23, |
| 1179 | CDP_TXRX_STATS_24, |
| 1180 | CDP_TXRX_STATS_25, |
| 1181 | CDP_TXRX_STATS_26, |
| 1182 | CDP_TXRX_STATS_27, |
Venkata Sharath Chandra Manchala | 0cb3198 | 2018-03-30 15:55:26 -0700 | [diff] [blame] | 1183 | CDP_TXRX_STATS_28, |
Venkata Sharath Chandra Manchala | f167af1 | 2018-10-09 20:23:02 -0700 | [diff] [blame] | 1184 | CDP_TXRX_STATS_29, |
| 1185 | CDP_TXRX_STATS_30, |
Mohit Khanna | e5a6e94 | 2018-11-28 14:22:48 -0800 | [diff] [blame] | 1186 | CDP_TXRX_STATS_31, |
Ishank Jain | 6290a3c | 2017-03-21 10:49:39 +0530 | [diff] [blame] | 1187 | CDP_TXRX_STATS_HTT_MAX = 256, |
Venkata Sharath Chandra Manchala | 599b14c | 2018-08-06 10:59:11 -0700 | [diff] [blame] | 1188 | CDP_TXRX_MAX_STATS = 265, |
Venkata Sharath Chandra Manchala | a77da0d | 2017-02-27 22:44:37 -0800 | [diff] [blame] | 1189 | }; |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 1190 | |
Ishank Jain | 1e7401c | 2017-02-17 15:38:39 +0530 | [diff] [blame] | 1191 | /* |
| 1192 | * Different Stat update types sent to OL_IF |
| 1193 | * @UPDATE_PEER_STATS: update peer stats |
| 1194 | * @UPDATE_VDEV_STATS: update vdev stats |
| 1195 | * @UPDATE_PDE_STATS: Update pdev stats |
| 1196 | */ |
| 1197 | enum cdp_stat_update_type { |
| 1198 | UPDATE_PEER_STATS = 0, |
| 1199 | UPDATE_VDEV_STATS = 1, |
| 1200 | UPDATE_PDEV_STATS = 2, |
| 1201 | }; |
Pamidipati, Vijay | 623fbee | 2017-07-07 10:58:15 +0530 | [diff] [blame] | 1202 | |
Amir Patel | 0291157 | 2018-07-02 13:00:53 +0530 | [diff] [blame] | 1203 | /* |
| 1204 | * struct cdp_tx_sojourn_stats - Tx sojourn stats |
| 1205 | * @ppdu_seq_id: ppdu_seq_id from tx completion |
| 1206 | * @avg_sojourn_msdu: average sojourn msdu time |
| 1207 | * @sum_sojourn_msdu: sum sojourn msdu time |
| 1208 | * @num_msdu: number of msdus per ppdu |
Amir Patel | 78824b1 | 2019-02-23 10:54:32 +0530 | [diff] [blame] | 1209 | * @cookie: cookie to be used by upper layer |
Amir Patel | 0291157 | 2018-07-02 13:00:53 +0530 | [diff] [blame] | 1210 | */ |
| 1211 | struct cdp_tx_sojourn_stats { |
| 1212 | uint32_t ppdu_seq_id; |
Ruchi, Agrawal | 2cbca3b | 2018-06-20 19:31:03 +0530 | [diff] [blame] | 1213 | qdf_ewma_tx_lag avg_sojourn_msdu[CDP_DATA_TID_MAX]; |
Amir Patel | 0291157 | 2018-07-02 13:00:53 +0530 | [diff] [blame] | 1214 | uint32_t sum_sojourn_msdu[CDP_DATA_TID_MAX]; |
| 1215 | uint32_t num_msdus[CDP_DATA_TID_MAX]; |
Amir Patel | 78824b1 | 2019-02-23 10:54:32 +0530 | [diff] [blame] | 1216 | struct cdp_stats_cookie *cookie; |
Amir Patel | 0291157 | 2018-07-02 13:00:53 +0530 | [diff] [blame] | 1217 | }; |
| 1218 | |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1219 | /** |
nobelj | 7b0e273 | 2019-05-31 00:19:07 -0700 | [diff] [blame] | 1220 | * struct cdp_delayed_tx_completion_ppdu_user - Delayed Tx PPDU completion |
| 1221 | * per-user information |
| 1222 | * @frame_ctrl: frame control field in 802.11 header |
| 1223 | * @qos_ctrl: QoS control field in 802.11 header |
| 1224 | * @mpdu_tried: number of mpdus tried |
| 1225 | * @ltf_size: ltf_size |
| 1226 | * @stbc: stbc |
| 1227 | * @he_re: he_re (range extension) |
| 1228 | * @txbf: txbf |
| 1229 | * @bw: Transmission bandwidth |
| 1230 | * <enum 2 transmit_bw_20_MHz> |
| 1231 | * <enum 3 transmit_bw_40_MHz> |
| 1232 | * <enum 4 transmit_bw_80_MHz> |
| 1233 | * <enum 5 transmit_bw_160_MHz> |
| 1234 | * @nss: NSS 1,2, ...8 |
| 1235 | * @mcs: MCS index |
| 1236 | * @preamble: preamble |
| 1237 | * @gi: guard interval 800/400/1600/3200 ns |
| 1238 | * @dcm: dcm |
| 1239 | * @ldpc: ldpc |
| 1240 | * @ru_start: RU start index |
| 1241 | * @ru_tones: RU tones length |
| 1242 | * @is_mcast: MCAST or UCAST |
| 1243 | * @user_pos: user position |
| 1244 | * @mu_group_id: mu group id |
| 1245 | */ |
| 1246 | struct cdp_delayed_tx_completion_ppdu_user { |
| 1247 | uint32_t frame_ctrl:16, |
| 1248 | qos_ctrl:16; |
| 1249 | uint32_t mpdu_tried_ucast:16, |
| 1250 | mpdu_tried_mcast:16; |
| 1251 | uint32_t ltf_size:2, |
| 1252 | stbc:1, |
| 1253 | he_re:1, |
| 1254 | txbf:4, |
| 1255 | bw:4, |
| 1256 | nss:4, |
| 1257 | mcs:4, |
| 1258 | preamble:4, |
| 1259 | gi:4, |
| 1260 | dcm:1, |
| 1261 | ldpc:1, |
| 1262 | delayed_ba:1; |
| 1263 | uint16_t ru_start; |
| 1264 | uint16_t ru_tones; |
| 1265 | bool is_mcast; |
| 1266 | uint32_t user_pos; |
| 1267 | uint32_t mu_group_id; |
| 1268 | }; |
| 1269 | |
| 1270 | /** |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1271 | * struct cdp_tx_completion_ppdu_user - Tx PPDU completion per-user information |
| 1272 | * @completion_status: completion status - OK/Filter/Abort/Timeout |
| 1273 | * @tid: TID number |
| 1274 | * @peer_id: Peer ID |
Karunakar Dasineni | 6342933 | 2019-10-15 18:49:33 -0700 | [diff] [blame] | 1275 | * @ba_size: Block-Ack size |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1276 | * @frame_ctrl: frame control field in 802.11 header |
| 1277 | * @qos_ctrl: QoS control field in 802.11 header |
| 1278 | * @mpdu_tried: number of mpdus tried |
| 1279 | * @mpdu_success: number of mpdus successfully transmitted |
| 1280 | * @long_retries: long retries |
| 1281 | * @short_retries: short retries |
| 1282 | * @is_ampdu: mpdu aggregate or non-aggregate? |
| 1283 | * @success_bytes: bytes successfully transmitted |
| 1284 | * @retry_bytes: bytes retried |
| 1285 | * @failed_msdus: MSDUs failed transmission |
| 1286 | * @duration: user duration in ppdu |
| 1287 | * @ltf_size: ltf_size |
| 1288 | * @stbc: stbc |
| 1289 | * @he_re: he_re (range extension) |
| 1290 | * @txbf: txbf |
| 1291 | * @bw: Transmission bandwidth |
Pranita Solanke | d7e10ba | 2017-12-13 15:40:38 +0530 | [diff] [blame] | 1292 | * <enum 2 transmit_bw_20_MHz> |
| 1293 | * <enum 3 transmit_bw_40_MHz> |
| 1294 | * <enum 4 transmit_bw_80_MHz> |
| 1295 | * <enum 5 transmit_bw_160_MHz> |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1296 | * @nss: NSS 1,2, ...8 |
| 1297 | * @mcs: MCS index |
| 1298 | * @preamble: preamble |
| 1299 | * @gi: guard interval 800/400/1600/3200 ns |
| 1300 | * @dcm: dcm |
| 1301 | * @ldpc: ldpc |
Chaithanya Garrepalli | be9d5fc | 2018-07-26 19:21:24 +0530 | [diff] [blame] | 1302 | * @delayed_ba: delayed ba bit |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1303 | * @ppdu_type: SU/MU_MIMO/MU_OFDMA/MU_MIMO_OFDMA/UL_TRIG/BURST_BCN/UL_BSR_RESP/ |
| 1304 | * UL_BSR_TRIG/UNKNOWN |
| 1305 | * @ba_seq_no: Block Ack sequence number |
| 1306 | * @ba_bitmap: Block Ack bitmap |
| 1307 | * @start_seqa: Sequence number of first MPDU |
| 1308 | * @enq_bitmap: Enqueue MPDU bitmap |
nobelj | 4e9d51f | 2018-08-07 19:36:47 -0700 | [diff] [blame] | 1309 | * @ru_start: RU start index |
| 1310 | * @ru_tones: RU tones length |
Soumya Bhat | 1c73aa6 | 2017-09-20 22:18:22 +0530 | [diff] [blame] | 1311 | * @is_mcast: MCAST or UCAST |
Pranita Solanke | a12b4b3 | 2017-11-20 23:04:14 +0530 | [diff] [blame] | 1312 | * @tx_rate: Transmission Rate |
nobelj | 4e9d51f | 2018-08-07 19:36:47 -0700 | [diff] [blame] | 1313 | * @user_pos: user position |
| 1314 | * @mu_group_id: mu group id |
Amir Patel | 78824b1 | 2019-02-23 10:54:32 +0530 | [diff] [blame] | 1315 | * @rix: rate index |
| 1316 | * @cookie: cookie to used by upper layer |
Varsha Mishra | 27c5bd3 | 2019-05-28 11:54:46 +0530 | [diff] [blame] | 1317 | * @is_ppdu_cookie_valid : Indicates that ppdu_cookie is valid |
| 1318 | * @ppdu_cookie: 16-bit ppdu_cookie |
Subrat Mishra | 3948e3f | 2019-07-25 14:37:43 +0530 | [diff] [blame] | 1319 | * @sa_is_training: smart antenna training packets indication |
| 1320 | * @rssi_chain: rssi chain per bandwidth |
| 1321 | * @sa_tx_antenna: antenna in which packet is transmitted |
| 1322 | * @sa_max_rates: smart antenna tx feedback info max rates |
| 1323 | * @sa_goodput: smart antenna tx feedback info goodput |
Ankit Kumar | cd66fff | 2019-07-02 20:54:44 +0530 | [diff] [blame] | 1324 | * @current_rate_per: Moving average per |
Karunakar Dasineni | 6342933 | 2019-10-15 18:49:33 -0700 | [diff] [blame] | 1325 | * @last_enq_seq: last equeue sequence number |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1326 | */ |
| 1327 | struct cdp_tx_completion_ppdu_user { |
| 1328 | uint32_t completion_status:8, |
| 1329 | tid:8, |
| 1330 | peer_id:16; |
| 1331 | uint8_t mac_addr[6]; |
Karunakar Dasineni | 6342933 | 2019-10-15 18:49:33 -0700 | [diff] [blame] | 1332 | uint16_t ba_size; |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1333 | uint32_t frame_ctrl:16, |
| 1334 | qos_ctrl:16; |
Soumya Bhat | 539ecfa | 2017-09-08 12:50:30 +0530 | [diff] [blame] | 1335 | uint32_t mpdu_tried_ucast:16, |
| 1336 | mpdu_tried_mcast:16; |
| 1337 | uint16_t mpdu_success:16; |
Amir Patel | 0291157 | 2018-07-02 13:00:53 +0530 | [diff] [blame] | 1338 | uint16_t mpdu_failed:16; |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1339 | uint32_t long_retries:4, |
| 1340 | short_retries:4, |
Ankit Kumar | cd66fff | 2019-07-02 20:54:44 +0530 | [diff] [blame] | 1341 | tx_ratecode:16, |
Soumya Bhat | 835033e | 2017-10-04 22:21:46 +0530 | [diff] [blame] | 1342 | is_ampdu:1, |
| 1343 | ppdu_type:5; |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1344 | uint32_t success_bytes; |
| 1345 | uint32_t retry_bytes; |
| 1346 | uint32_t failed_bytes; |
| 1347 | uint32_t success_msdus:16, |
| 1348 | retry_msdus:16; |
| 1349 | uint32_t failed_msdus:16, |
| 1350 | duration:16; |
| 1351 | uint32_t ltf_size:2, |
| 1352 | stbc:1, |
| 1353 | he_re:1, |
| 1354 | txbf:4, |
| 1355 | bw:4, |
| 1356 | nss:4, |
| 1357 | mcs:4, |
| 1358 | preamble:4, |
| 1359 | gi:4, |
| 1360 | dcm:1, |
Chaithanya Garrepalli | be9d5fc | 2018-07-26 19:21:24 +0530 | [diff] [blame] | 1361 | ldpc:1, |
| 1362 | delayed_ba:1; |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1363 | uint32_t ba_seq_no; |
| 1364 | uint32_t ba_bitmap[CDP_BA_256_BIT_MAP_SIZE_DWORDS]; |
| 1365 | uint32_t start_seq; |
| 1366 | uint32_t enq_bitmap[CDP_BA_256_BIT_MAP_SIZE_DWORDS]; |
Amir Patel | 0291157 | 2018-07-02 13:00:53 +0530 | [diff] [blame] | 1367 | uint32_t failed_bitmap[CDP_BA_256_BIT_MAP_SIZE_DWORDS]; |
Soumya Bhat | 539ecfa | 2017-09-08 12:50:30 +0530 | [diff] [blame] | 1368 | uint32_t num_mpdu:9, |
| 1369 | num_msdu:16; |
Soumya Bhat | 1c73aa6 | 2017-09-20 22:18:22 +0530 | [diff] [blame] | 1370 | uint32_t tx_duration; |
nobelj | 4e9d51f | 2018-08-07 19:36:47 -0700 | [diff] [blame] | 1371 | uint16_t ru_start; |
Soumya Bhat | 2854111 | 2017-11-22 16:58:29 +0530 | [diff] [blame] | 1372 | uint16_t ru_tones; |
Soumya Bhat | 1c73aa6 | 2017-09-20 22:18:22 +0530 | [diff] [blame] | 1373 | bool is_mcast; |
Pranita Solanke | a12b4b3 | 2017-11-20 23:04:14 +0530 | [diff] [blame] | 1374 | uint32_t tx_rate; |
Amir Patel | 0291157 | 2018-07-02 13:00:53 +0530 | [diff] [blame] | 1375 | uint32_t tx_ratekbps; |
| 1376 | /*ack rssi for separate chains*/ |
| 1377 | uint32_t ack_rssi[CDP_RSSI_CHAIN_LEN]; |
Anish Nataraj | 7235d9b | 2018-08-20 13:10:25 +0530 | [diff] [blame] | 1378 | bool ack_rssi_valid; |
nobelj | 4e9d51f | 2018-08-07 19:36:47 -0700 | [diff] [blame] | 1379 | uint32_t user_pos; |
| 1380 | uint32_t mu_group_id; |
Amir Patel | 78824b1 | 2019-02-23 10:54:32 +0530 | [diff] [blame] | 1381 | uint32_t rix; |
| 1382 | struct cdp_stats_cookie *cookie; |
Varsha Mishra | 27c5bd3 | 2019-05-28 11:54:46 +0530 | [diff] [blame] | 1383 | uint8_t is_ppdu_cookie_valid; |
| 1384 | uint16_t ppdu_cookie; |
Subrat Mishra | 3948e3f | 2019-07-25 14:37:43 +0530 | [diff] [blame] | 1385 | uint8_t sa_is_training; |
| 1386 | uint32_t rssi_chain[CDP_RSSI_CHAIN_LEN]; |
| 1387 | uint32_t sa_tx_antenna; |
Ankit Kumar | cd66fff | 2019-07-02 20:54:44 +0530 | [diff] [blame] | 1388 | /*Max rates for BW: 20MHZ, 40MHZ and 80MHZ and 160MHZ |
| 1389 | * |---------------------------------------| |
| 1390 | * | 16 bits | 16 bits | 16 bits | 16 bits | |
| 1391 | * | BW-1 | BW-2 | BW-3 | BW-4 | |
| 1392 | * | /\ \ | |
| 1393 | * | / \ \ | |
| 1394 | * | / \ \ | |
| 1395 | * | / \ \ | |
| 1396 | * | / \ \ | |
| 1397 | * | / \ \ | |
| 1398 | * |/ \ \ | |
| 1399 | * |[11|8] [5|8] \ | |
| 1400 | * | BW1 PADDED \ | |
| 1401 | * |---------------------------------------| |
| 1402 | */ |
| 1403 | uint16_t sa_max_rates[CDP_NUM_SA_BW]; |
Subrat Mishra | 3948e3f | 2019-07-25 14:37:43 +0530 | [diff] [blame] | 1404 | uint32_t sa_goodput; |
Ankit Kumar | cd66fff | 2019-07-02 20:54:44 +0530 | [diff] [blame] | 1405 | /* below field is used to calculate goodput in non-training period |
| 1406 | * Note: As host is exposing goodput and hence current_rate_per is |
| 1407 | * of no use. It is just for Host computation. |
| 1408 | */ |
| 1409 | uint32_t current_rate_per; |
Karunakar Dasineni | 6342933 | 2019-10-15 18:49:33 -0700 | [diff] [blame] | 1410 | uint32_t last_enq_seq; |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1411 | }; |
| 1412 | |
| 1413 | /** |
nobelj | debe2b3 | 2019-04-23 11:18:47 -0700 | [diff] [blame] | 1414 | * struct cdp_tx_indication_mpdu_info - Tx MPDU completion information |
| 1415 | * @ppdu_id: PPDU id |
| 1416 | * @duration: user duration in ppdu |
| 1417 | * @frame_type: frame type MGMT/CTRL/DATA/BAR |
| 1418 | * @frame_ctrl: frame control field in 802.11 header |
| 1419 | * @qos_ctrl: QoS control field in 802.11 header |
| 1420 | * @tid: TID number |
| 1421 | * @num_msdu: number of msdu in MPDU |
| 1422 | * @seq_no: Sequence number of first MPDU |
| 1423 | * @ltf_size: ltf_size |
| 1424 | * @stbc: stbc |
| 1425 | * @he_re: he_re (range extension) |
| 1426 | * @txbf: txbf |
| 1427 | * @bw: Transmission bandwidth |
| 1428 | * <enum 2 transmit_bw_20_MHz> |
| 1429 | * <enum 3 transmit_bw_40_MHz> |
| 1430 | * <enum 4 transmit_bw_80_MHz> |
| 1431 | * <enum 5 transmit_bw_160_MHz> |
| 1432 | * @nss: NSS 1,2, ...8 |
| 1433 | * @mcs: MCS index |
| 1434 | * @preamble: preamble |
| 1435 | * @gi: guard interval 800/400/1600/3200 ns |
nobelj | 68930ca | 2019-10-03 17:22:47 -0700 | [diff] [blame] | 1436 | * @resp_type: response type |
| 1437 | * @mprot_type: medium protection type |
| 1438 | * @rts_success: rts success |
| 1439 | * @rts failure: rts failure |
nobelj | debe2b3 | 2019-04-23 11:18:47 -0700 | [diff] [blame] | 1440 | * @channel: frequency |
| 1441 | * @channel_num: channel number |
| 1442 | * @ack_rssi: ack rssi |
| 1443 | * @ldpc: ldpc |
| 1444 | * @tx_rate: Transmission Rate |
| 1445 | * @mac_address: peer mac address |
| 1446 | * @bss_mac_address: bss mac address |
| 1447 | * @ppdu_start_timestamp: TSF at PPDU start |
| 1448 | * @ppdu_end_timestamp: TSF at PPDU end |
| 1449 | * @ba_start_seq: Block Ack sequence number |
| 1450 | * @ba_bitmap: Block Ack bitmap |
Varsha Mishra | 27c5bd3 | 2019-05-28 11:54:46 +0530 | [diff] [blame] | 1451 | * @ppdu_cookie: 16-bit ppdu_cookie |
nobelj | 68930ca | 2019-10-03 17:22:47 -0700 | [diff] [blame] | 1452 | * @long_retries: long retries |
| 1453 | * @short_retries: short retries |
| 1454 | * @completion_status: completion status - OK/Filter/Abort/Timeout |
nobelj | debe2b3 | 2019-04-23 11:18:47 -0700 | [diff] [blame] | 1455 | */ |
| 1456 | struct cdp_tx_indication_mpdu_info { |
| 1457 | uint32_t ppdu_id; |
| 1458 | uint32_t tx_duration; |
| 1459 | uint16_t frame_type; |
| 1460 | uint16_t frame_ctrl; |
| 1461 | uint16_t qos_ctrl; |
| 1462 | uint8_t tid; |
| 1463 | uint32_t num_msdu; |
| 1464 | uint32_t seq_no; |
| 1465 | uint32_t ltf_size:2, |
| 1466 | he_re:1, |
| 1467 | txbf:4, |
| 1468 | bw:4, |
| 1469 | nss:4, |
| 1470 | mcs:4, |
| 1471 | preamble:4, |
| 1472 | gi:4; |
| 1473 | uint32_t channel; |
| 1474 | uint8_t channel_num; |
| 1475 | uint32_t ack_rssi; |
| 1476 | uint32_t ldpc; |
| 1477 | uint32_t tx_rate; |
| 1478 | uint8_t mac_address[QDF_MAC_ADDR_SIZE]; |
| 1479 | uint8_t bss_mac_address[QDF_MAC_ADDR_SIZE]; |
nobelj | 182938a | 2019-11-25 14:09:08 -0800 | [diff] [blame] | 1480 | uint64_t ppdu_start_timestamp; |
| 1481 | uint64_t ppdu_end_timestamp; |
nobelj | debe2b3 | 2019-04-23 11:18:47 -0700 | [diff] [blame] | 1482 | uint32_t ba_start_seq; |
| 1483 | uint32_t ba_bitmap[CDP_BA_256_BIT_MAP_SIZE_DWORDS]; |
Varsha Mishra | 27c5bd3 | 2019-05-28 11:54:46 +0530 | [diff] [blame] | 1484 | uint16_t ppdu_cookie; |
nobelj | 68930ca | 2019-10-03 17:22:47 -0700 | [diff] [blame] | 1485 | uint16_t long_retries:4, |
| 1486 | short_retries:4, |
| 1487 | completion_status:8; |
| 1488 | uint16_t resp_type:4, |
| 1489 | mprot_type:3, |
| 1490 | rts_success:1, |
| 1491 | rts_failure:1; |
nobelj | debe2b3 | 2019-04-23 11:18:47 -0700 | [diff] [blame] | 1492 | }; |
| 1493 | |
| 1494 | /** |
| 1495 | * struct cdp_tx_indication_info - Tx capture information |
| 1496 | * @mpdu_info: Tx MPDU completion information |
| 1497 | * @mpdu_nbuf: reconstructed mpdu packet |
| 1498 | */ |
| 1499 | struct cdp_tx_indication_info { |
| 1500 | struct cdp_tx_indication_mpdu_info mpdu_info; |
| 1501 | qdf_nbuf_t mpdu_nbuf; |
| 1502 | }; |
| 1503 | |
| 1504 | /** |
nobelj | cf57a9a | 2019-12-06 14:23:27 -0800 | [diff] [blame] | 1505 | * struct cdp_tx_mgmt_comp_info - Tx mgmt comp info |
| 1506 | * @ppdu_id: ppdu_id |
| 1507 | * @is_sgen_pkt: payload recevied from wmi or htt path |
| 1508 | * @retries_count: retries count |
| 1509 | * @tx_tsf: 64 bit timestamp |
| 1510 | */ |
| 1511 | struct cdp_tx_mgmt_comp_info { |
| 1512 | uint32_t ppdu_id; |
| 1513 | bool is_sgen_pkt; |
| 1514 | uint16_t retries_count; |
| 1515 | uint64_t tx_tsf; |
| 1516 | }; |
| 1517 | |
| 1518 | /** |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1519 | * struct cdp_tx_completion_ppdu - Tx PPDU completion information |
| 1520 | * @completion_status: completion status - OK/Filter/Abort/Timeout |
| 1521 | * @ppdu_id: PPDU Id |
Amir Patel | 0291157 | 2018-07-02 13:00:53 +0530 | [diff] [blame] | 1522 | * @ppdu_seq_id: ppdu sequence id for sojourn stats |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1523 | * @vdev_id: VAP Id |
nobelj | 7b0e273 | 2019-05-31 00:19:07 -0700 | [diff] [blame] | 1524 | * @bar_num_users: BA response user count, based on completion common TLV |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1525 | * @num_users: Number of users |
Karunakar Dasineni | 6342933 | 2019-10-15 18:49:33 -0700 | [diff] [blame] | 1526 | * @pending_retries: pending MPDUs (retries) |
nobelj | 0e00776 | 2019-12-13 12:59:14 -0800 | [diff] [blame^] | 1527 | * @drop_reason: drop reason from flush status |
| 1528 | * @is_flush: is_flush is set based on flush tlv |
| 1529 | * @flow_type: tx flow type from flush status |
| 1530 | * @queue_type: queue type from flush status |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1531 | * @num_mpdu: Number of MPDUs in PPDU |
| 1532 | * @num_msdu: Number of MSDUs in PPDU |
Anish Nataraj | b9e7d01 | 2018-02-16 00:38:10 +0530 | [diff] [blame] | 1533 | * @frame_type: frame SU or MU |
nobelj | 68930ca | 2019-10-03 17:22:47 -0700 | [diff] [blame] | 1534 | * @htt_frame_type: frame type from htt |
Anish Nataraj | b9e7d01 | 2018-02-16 00:38:10 +0530 | [diff] [blame] | 1535 | * @frame_ctrl: frame control of 80211 header |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1536 | * @channel: Channel informartion |
nobelj | 68930ca | 2019-10-03 17:22:47 -0700 | [diff] [blame] | 1537 | * @resp_type: response type |
| 1538 | * @mprot_type: medium protection type |
| 1539 | * @rts_success: rts success |
| 1540 | * @rts failure: rts failure |
| 1541 | * @phymode: phy mode |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1542 | * @ack_rssi: RSSI value of last ack packet (units=dB above noise floor) |
Pranita Solanke | a12b4b3 | 2017-11-20 23:04:14 +0530 | [diff] [blame] | 1543 | * @tx_duration: PPDU airtime |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1544 | * @ppdu_start_timestamp: TSF at PPDU start |
| 1545 | * @ppdu_end_timestamp: TSF at PPDU end |
| 1546 | * @ack_timestamp: TSF at the reception of ACK |
nobelj | 7b0e273 | 2019-05-31 00:19:07 -0700 | [diff] [blame] | 1547 | * @delayed_ba: Delayed ba flag |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1548 | * @user: per-User stats (array of per-user structures) |
nobelj | debe2b3 | 2019-04-23 11:18:47 -0700 | [diff] [blame] | 1549 | * @mpdu_q: queue of mpdu in a ppdu |
Karunakar Dasineni | 6342933 | 2019-10-15 18:49:33 -0700 | [diff] [blame] | 1550 | * @mpdus: MPDU list based on enqueue sequence bitmap |
nobelj | 68930ca | 2019-10-03 17:22:47 -0700 | [diff] [blame] | 1551 | * @bar_ppdu_id: BAR ppdu_id |
| 1552 | * @bar_tx_duration: BAR tx duration |
| 1553 | * @bar_ppdu_start_timestamp: BAR start timestamp |
| 1554 | * @bar_ppdu_end_timestamp: BAR end timestamp |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1555 | */ |
| 1556 | struct cdp_tx_completion_ppdu { |
| 1557 | uint32_t ppdu_id; |
Amir Patel | 0291157 | 2018-07-02 13:00:53 +0530 | [diff] [blame] | 1558 | uint32_t ppdu_seq_id; |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1559 | uint16_t vdev_id; |
nobelj | 7b0e273 | 2019-05-31 00:19:07 -0700 | [diff] [blame] | 1560 | uint16_t bar_num_users; |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1561 | uint32_t num_users; |
Santosh Anbu | 4de9ffb | 2019-03-01 17:20:29 +0530 | [diff] [blame] | 1562 | uint8_t last_usr_index; |
Karunakar Dasineni | 6342933 | 2019-10-15 18:49:33 -0700 | [diff] [blame] | 1563 | uint32_t pending_retries; |
nobelj | 0e00776 | 2019-12-13 12:59:14 -0800 | [diff] [blame^] | 1564 | uint32_t drop_reason; |
| 1565 | uint32_t is_flush:1, |
| 1566 | flow_type:8, |
| 1567 | queue_type:8; |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1568 | uint32_t num_mpdu:9, |
| 1569 | num_msdu:16; |
Soumya Bhat | 539ecfa | 2017-09-08 12:50:30 +0530 | [diff] [blame] | 1570 | uint16_t frame_type; |
nobelj | 68930ca | 2019-10-03 17:22:47 -0700 | [diff] [blame] | 1571 | uint16_t htt_frame_type; |
Anish Nataraj | b9e7d01 | 2018-02-16 00:38:10 +0530 | [diff] [blame] | 1572 | uint16_t frame_ctrl; |
Soumya Bhat | 539ecfa | 2017-09-08 12:50:30 +0530 | [diff] [blame] | 1573 | uint16_t channel; |
nobelj | 68930ca | 2019-10-03 17:22:47 -0700 | [diff] [blame] | 1574 | uint16_t resp_type:4, |
| 1575 | mprot_type:3, |
| 1576 | rts_success:1, |
| 1577 | rts_failure:1; |
Soumya Bhat | 539ecfa | 2017-09-08 12:50:30 +0530 | [diff] [blame] | 1578 | uint16_t phy_mode; |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1579 | uint32_t ack_rssi; |
Pranita Solanke | a12b4b3 | 2017-11-20 23:04:14 +0530 | [diff] [blame] | 1580 | uint32_t tx_duration; |
nobelj | 182938a | 2019-11-25 14:09:08 -0800 | [diff] [blame] | 1581 | uint64_t ppdu_start_timestamp; |
| 1582 | uint64_t ppdu_end_timestamp; |
| 1583 | uint64_t ack_timestamp; |
nobelj | 7b0e273 | 2019-05-31 00:19:07 -0700 | [diff] [blame] | 1584 | bool delayed_ba; |
Soumya Bhat | 835033e | 2017-10-04 22:21:46 +0530 | [diff] [blame] | 1585 | struct cdp_tx_completion_ppdu_user user[CDP_MU_MAX_USERS]; |
nobelj | debe2b3 | 2019-04-23 11:18:47 -0700 | [diff] [blame] | 1586 | qdf_nbuf_queue_t mpdu_q; |
Karunakar Dasineni | 6342933 | 2019-10-15 18:49:33 -0700 | [diff] [blame] | 1587 | qdf_nbuf_t *mpdus; |
nobelj | 68930ca | 2019-10-03 17:22:47 -0700 | [diff] [blame] | 1588 | uint32_t bar_ppdu_id; |
| 1589 | uint32_t bar_tx_duration; |
| 1590 | uint32_t bar_ppdu_start_timestamp; |
| 1591 | uint32_t bar_ppdu_end_timestamp; |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1592 | }; |
| 1593 | |
| 1594 | /** |
Anish Nataraj | f12b0a3 | 2018-03-14 14:27:13 +0530 | [diff] [blame] | 1595 | * struct cdp_dev_stats - Network device stats structure |
| 1596 | * @tx_packets: Tx total packets transmitted |
| 1597 | * @tx_bytes : Tx total bytes transmitted |
| 1598 | * @tx_errors : Tx error due to FW tx failure, Ring failure DMA etc |
| 1599 | * @tx_dropped: Tx dropped is same as tx errors as above |
| 1600 | * @rx_packets: Rx total packets transmitted |
| 1601 | * @rx_bytes : Rx total bytes transmitted |
Ankit Kumar | b5029b0 | 2019-07-24 14:46:12 +0530 | [diff] [blame] | 1602 | * @rx_errors : Rx erros |
Ankit Kumar | 1c69ca1 | 2019-07-30 14:03:12 +0530 | [diff] [blame] | 1603 | * @rx_dropped: Rx dropped stats |
Anish Nataraj | f12b0a3 | 2018-03-14 14:27:13 +0530 | [diff] [blame] | 1604 | */ |
| 1605 | struct cdp_dev_stats { |
| 1606 | uint32_t tx_packets; |
| 1607 | uint32_t tx_bytes; |
| 1608 | uint32_t tx_errors; |
| 1609 | uint32_t tx_dropped; |
| 1610 | uint32_t rx_packets; |
| 1611 | uint32_t rx_bytes; |
Ankit Kumar | b5029b0 | 2019-07-24 14:46:12 +0530 | [diff] [blame] | 1612 | uint32_t rx_errors; |
Ankit Kumar | 1c69ca1 | 2019-07-30 14:03:12 +0530 | [diff] [blame] | 1613 | uint32_t rx_dropped; |
Anish Nataraj | f12b0a3 | 2018-03-14 14:27:13 +0530 | [diff] [blame] | 1614 | }; |
| 1615 | |
| 1616 | /** |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1617 | * struct cdp_rate_stats - Tx/Rx Rate statistics |
| 1618 | * @bw: Indicates the BW of the upcoming transmission - |
Pranita Solanke | d7e10ba | 2017-12-13 15:40:38 +0530 | [diff] [blame] | 1619 | * <enum 2 transmit_bw_20_MHz> |
| 1620 | * <enum 3 transmit_bw_40_MHz> |
| 1621 | * <enum 4 transmit_bw_80_MHz> |
| 1622 | * <enum 5 transmit_bw_160_MHz> |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1623 | * @pkt_type: Transmit Packet Type |
| 1624 | * @stbc: When set, STBC transmission rate was used |
| 1625 | * @ldpc: When set, use LDPC transmission rates |
| 1626 | * @sgi: <enum 0 0_8_us_sgi > Legacy normal GI |
| 1627 | * <enum 1 0_4_us_sgi > Legacy short GI |
| 1628 | * <enum 2 1_6_us_sgi > HE related GI |
| 1629 | * <enum 3 3_2_us_sgi > HE |
| 1630 | * @mcs: Transmit MCS Rate |
| 1631 | * @ofdma: Set when the transmission was an OFDMA transmission |
| 1632 | * @tones_in_ru: The number of tones in the RU used. |
| 1633 | * @tsf: Lower 32 bits of the TSF (timestamp when ppdu transmission finished) |
| 1634 | * @peer_id: Peer ID of the flow or MPDU queue |
| 1635 | * @tid: TID of the flow or MPDU queue |
| 1636 | */ |
| 1637 | struct cdp_rate_stats { |
| 1638 | uint32_t rate_stats_info_valid:1, |
| 1639 | bw:2, |
| 1640 | pkt_type:4, |
| 1641 | stbc:1, |
| 1642 | ldpc:1, |
| 1643 | sgi:2, |
| 1644 | mcs:4, |
| 1645 | ofdma:1, |
| 1646 | tones_in_ru:12, |
| 1647 | resvd0:4; |
| 1648 | uint32_t tsf; |
| 1649 | uint16_t peer_id; |
| 1650 | uint8_t tid; |
| 1651 | }; |
| 1652 | |
| 1653 | /** |
| 1654 | * struct cdp_tx_completion_msdu - Tx MSDU completion descriptor |
| 1655 | * @ppdu_id: PPDU to which this MSDU belongs |
| 1656 | * @transmit_cnt: Number of times this frame has been transmitted |
| 1657 | * @ack_frame_rssi: RSSI of the received ACK or BA frame |
| 1658 | * @first_msdu: Indicates this MSDU is the first MSDU in AMSDU |
| 1659 | * @last_msdu: Indicates this MSDU is the last MSDU in AMSDU |
| 1660 | * @msdu_part_of_amsdu : Indicates this MSDU was part of an A-MSDU in MPDU |
| 1661 | * @extd: Extended structure containing rate statistics |
| 1662 | */ |
| 1663 | struct cdp_tx_completion_msdu { |
| 1664 | uint32_t ppdu_id; |
| 1665 | uint8_t transmit_cnt; |
| 1666 | uint32_t ack_frame_rssi:8, |
| 1667 | resvd0:1, |
| 1668 | first_msdu:1, |
| 1669 | last_msdu:1, |
| 1670 | msdu_part_of_amsdu:1, |
| 1671 | resvd1:20; |
| 1672 | struct cdp_rate_stats extd; |
| 1673 | }; |
| 1674 | |
| 1675 | /** |
nobelj | 1453164 | 2019-06-25 17:41:55 -0700 | [diff] [blame] | 1676 | * struct cdp_rx_stats_ppdu_user -- per user RX stats |
| 1677 | * @peer_id: Peer ID |
| 1678 | * @vdev_id: VAP ID |
| 1679 | * @is_ampdu: mpdu aggregate or non-aggregate? |
Kai Chen | a8cf594 | 2019-10-14 17:42:24 -0700 | [diff] [blame] | 1680 | * @mu_ul_info_valid: MU UL info valid |
nobelj | 1453164 | 2019-06-25 17:41:55 -0700 | [diff] [blame] | 1681 | * @ofdma_ru_start_index: RU index number(0-73) |
| 1682 | * @ofdma_ru_width: size of RU in units of 1(26tone)RU |
| 1683 | * @nss: NSS 1,2, ...8 |
| 1684 | * @mcs: MCS index |
| 1685 | * @user_index: user ID in multi-user case |
| 1686 | * @ast_index: ast index in multi-user case |
| 1687 | * @tid: TID number |
| 1688 | * @num_msdu: Number of MSDUs in PPDU |
| 1689 | * @udp_msdu_count: Number of UDP MSDUs in PPDU |
| 1690 | * @tcp_msdu_count: Number of TCP MSDUs in PPDU |
| 1691 | * @other_msdu_count: Number of MSDUs other than UDP and TCP MSDUs in PPDU |
| 1692 | * @frame_control: frame control field |
| 1693 | * @frame_control_info_valid: frame_control valid |
| 1694 | * @data_sequence_control_info_valid: data_sequence_control_info valid |
| 1695 | * @first_data_seq_ctrl: Sequence control field of first data frame |
| 1696 | * @preamble: preamble |
| 1697 | * @ht_flag: ht flag |
| 1698 | * @vht_flag: vht flag |
| 1699 | * @he_re: he_re (range extension) |
| 1700 | * @mpdu_cnt_fcs_ok: Number of MPDUs in PPDU with fcs ok |
| 1701 | * @mpdu_cnt_fcs_err: Number of MPDUs in PPDU with fcs err |
| 1702 | * @mpdu_fcs_ok_bitmap - MPDU with fcs ok bitmap |
| 1703 | * @retried - number of retries |
| 1704 | * @mac_addr: Peer MAC Address |
| 1705 | */ |
| 1706 | struct cdp_rx_stats_ppdu_user { |
| 1707 | uint16_t peer_id; |
| 1708 | uint8_t vdev_id; |
| 1709 | bool is_ampdu; |
Kai Chen | a8cf594 | 2019-10-14 17:42:24 -0700 | [diff] [blame] | 1710 | uint32_t mu_ul_info_valid:1, |
nobelj | 1453164 | 2019-06-25 17:41:55 -0700 | [diff] [blame] | 1711 | ofdma_ru_start_index:7, |
| 1712 | ofdma_ru_width:7, |
| 1713 | nss:4, |
| 1714 | mcs:4; |
| 1715 | /* user id */ |
| 1716 | uint8_t user_index; |
| 1717 | uint32_t ast_index; |
| 1718 | uint32_t tid; |
Kai Chen | a8cf594 | 2019-10-14 17:42:24 -0700 | [diff] [blame] | 1719 | uint32_t num_msdu; |
nobelj | 1453164 | 2019-06-25 17:41:55 -0700 | [diff] [blame] | 1720 | uint16_t tcp_msdu_count; |
| 1721 | uint16_t udp_msdu_count; |
| 1722 | uint16_t other_msdu_count; |
| 1723 | uint16_t frame_control; |
| 1724 | uint8_t frame_control_info_valid; |
| 1725 | uint8_t data_sequence_control_info_valid; |
| 1726 | uint16_t first_data_seq_ctrl; |
| 1727 | uint32_t preamble_type; |
| 1728 | uint16_t ht_flags; |
| 1729 | uint16_t vht_flags; |
| 1730 | uint16_t he_flags; |
| 1731 | uint32_t mpdu_cnt_fcs_ok; |
| 1732 | uint32_t mpdu_cnt_fcs_err; |
Chaithanya Garrepalli | 1f89b97 | 2019-07-31 12:33:53 +0530 | [diff] [blame] | 1733 | uint32_t mpdu_fcs_ok_bitmap[QDF_MON_STATUS_MPDU_FCS_BMAP_NWORDS]; |
nobelj | 1453164 | 2019-06-25 17:41:55 -0700 | [diff] [blame] | 1734 | uint32_t mpdu_ok_byte_count; |
| 1735 | uint32_t mpdu_err_byte_count; |
| 1736 | uint32_t retries; |
| 1737 | uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; |
| 1738 | }; |
| 1739 | |
| 1740 | /** |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1741 | * struct cdp_rx_indication_ppdu - Rx PPDU indication structure |
| 1742 | * @ppdu_id: PPDU Id |
| 1743 | * @is_ampdu: mpdu aggregate or non-aggregate? |
| 1744 | * @num_mpdu: Number of MPDUs in PPDU |
Pamidipati, Vijay | 57a435a | 2017-10-17 11:03:39 +0530 | [diff] [blame] | 1745 | * @reserved: Reserved bits for future use |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1746 | * @num_msdu: Number of MSDUs in PPDU |
Pamidipati, Vijay | 57a435a | 2017-10-17 11:03:39 +0530 | [diff] [blame] | 1747 | * @udp_msdu_count: Number of UDP MSDUs in PPDU |
| 1748 | * @tcp_msdu_count: Number of TCP MSDUs in PPDU |
| 1749 | * @other_msdu_count: Number of MSDUs other than UDP and TCP MSDUs in PPDU |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1750 | * @duration: PPDU duration |
| 1751 | * @tid: TID number |
| 1752 | * @peer_id: Peer ID |
Pamidipati, Vijay | d7eb83e | 2017-09-20 21:19:56 +0530 | [diff] [blame] | 1753 | * @vdev_id: VAP ID |
| 1754 | * @mac_addr: Peer MAC Address |
| 1755 | * @first_data_seq_ctrl: Sequence control field of first data frame |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1756 | * @ltf_size: ltf_size |
| 1757 | * @stbc: When set, STBC rate was used |
| 1758 | * @he_re: he_re (range extension) |
| 1759 | * @bw: Bandwidth |
| 1760 | * <enum 0 bw_20_MHz> |
| 1761 | * <enum 1 bw_40_MHz> |
| 1762 | * <enum 2 bw_80_MHz> |
| 1763 | * <enum 3 bw_160_MHz> |
| 1764 | * @nss: NSS 1,2, ...8 |
| 1765 | * @mcs: MCS index |
| 1766 | * @preamble: preamble |
| 1767 | * @gi: <enum 0 0_8_us_sgi > Legacy normal GI |
| 1768 | * <enum 1 0_4_us_sgi > Legacy short GI |
| 1769 | * <enum 2 1_6_us_sgi > HE related GI |
| 1770 | * <enum 3 3_2_us_sgi > HE |
| 1771 | * @dcm: dcm |
| 1772 | * @ldpc: ldpc |
| 1773 | * @ppdu_type: SU/MU_MIMO/MU_OFDMA/MU_MIMO_OFDMA/UL_TRIG/BURST_BCN/UL_BSR_RESP/ |
| 1774 | * UL_BSR_TRIG/UNKNOWN |
| 1775 | * @rssi: RSSI value (units = dB above noise floor) |
| 1776 | * @timestamp: TSF at the reception of PPDU |
nobelj | 9ab76e2 | 2018-02-13 18:10:54 -0800 | [diff] [blame] | 1777 | * @length: PPDU length |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1778 | * @channel: Channel informartion |
| 1779 | * @lsig_A: L-SIG in 802.11 PHY header |
Anish Nataraj | eb30aa7 | 2018-09-20 16:34:01 +0530 | [diff] [blame] | 1780 | * @frame_ctrl: frame control field |
Amir Patel | 78824b1 | 2019-02-23 10:54:32 +0530 | [diff] [blame] | 1781 | * @rix: rate index |
| 1782 | * @rssi_chain: rssi chain per nss per bw |
| 1783 | * @cookie: cookie to used by upper layer |
nobelj | 1453164 | 2019-06-25 17:41:55 -0700 | [diff] [blame] | 1784 | * @user: per user stats in MU-user case |
| 1785 | * @nf: noise floor |
| 1786 | * @per_chain_rssi: rssi per antenna |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1787 | */ |
| 1788 | struct cdp_rx_indication_ppdu { |
| 1789 | uint32_t ppdu_id; |
Pamidipati, Vijay | 57a435a | 2017-10-17 11:03:39 +0530 | [diff] [blame] | 1790 | uint16_t is_ampdu:1, |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1791 | num_mpdu:9, |
Pamidipati, Vijay | 57a435a | 2017-10-17 11:03:39 +0530 | [diff] [blame] | 1792 | reserved:6; |
| 1793 | uint32_t num_msdu; |
Amir Patel | 78824b1 | 2019-02-23 10:54:32 +0530 | [diff] [blame] | 1794 | uint32_t num_bytes; |
Pamidipati, Vijay | 57a435a | 2017-10-17 11:03:39 +0530 | [diff] [blame] | 1795 | uint16_t udp_msdu_count; |
| 1796 | uint16_t tcp_msdu_count; |
| 1797 | uint16_t other_msdu_count; |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1798 | uint16_t duration; |
| 1799 | uint32_t tid:8, |
| 1800 | peer_id:16; |
Pamidipati, Vijay | d7eb83e | 2017-09-20 21:19:56 +0530 | [diff] [blame] | 1801 | uint8_t vdev_id; |
| 1802 | uint8_t mac_addr[6]; |
| 1803 | uint16_t first_data_seq_ctrl; |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1804 | union { |
| 1805 | uint32_t rate_info; |
| 1806 | struct { |
| 1807 | uint32_t ltf_size:2, |
| 1808 | stbc:1, |
| 1809 | he_re:1, |
| 1810 | bw:4, |
| 1811 | nss:4, |
| 1812 | mcs:4, |
| 1813 | preamble:4, |
| 1814 | gi:4, |
| 1815 | dcm:1, |
| 1816 | ldpc:1, |
Pranita Solanke | b3cc9b7 | 2018-10-16 12:36:49 +0530 | [diff] [blame] | 1817 | ppdu_type:5; |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1818 | }; |
| 1819 | } u; |
Amir Patel | 78824b1 | 2019-02-23 10:54:32 +0530 | [diff] [blame] | 1820 | uint32_t rix; |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1821 | uint32_t lsig_a; |
| 1822 | uint32_t rssi; |
Anish Nataraj | 57614da | 2018-02-07 23:04:24 +0530 | [diff] [blame] | 1823 | uint64_t timestamp; |
nobelj | 9ab76e2 | 2018-02-13 18:10:54 -0800 | [diff] [blame] | 1824 | uint32_t length; |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1825 | uint8_t channel; |
nobelj | d803959 | 2018-03-13 16:59:42 -0700 | [diff] [blame] | 1826 | uint8_t beamformed; |
Amir Patel | 0291157 | 2018-07-02 13:00:53 +0530 | [diff] [blame] | 1827 | |
| 1828 | uint32_t rx_ratekbps; |
| 1829 | uint32_t ppdu_rx_rate; |
| 1830 | |
| 1831 | uint32_t retries; |
| 1832 | uint32_t rx_byte_count; |
Ankit Kumar | cd66fff | 2019-07-02 20:54:44 +0530 | [diff] [blame] | 1833 | uint16_t rx_ratecode; |
Amir Patel | 0291157 | 2018-07-02 13:00:53 +0530 | [diff] [blame] | 1834 | uint8_t fcs_error_mpdus; |
Anish Nataraj | eb30aa7 | 2018-09-20 16:34:01 +0530 | [diff] [blame] | 1835 | uint16_t frame_ctrl; |
Amir Patel | 1d4ac98 | 2019-04-25 11:49:01 +0530 | [diff] [blame] | 1836 | int8_t rssi_chain[SS_COUNT][MAX_BW]; |
Amir Patel | 78824b1 | 2019-02-23 10:54:32 +0530 | [diff] [blame] | 1837 | struct cdp_stats_cookie *cookie; |
Amir Patel | 5a8bbbe | 2019-07-17 21:59:39 +0530 | [diff] [blame] | 1838 | struct cdp_rx_su_evm_info evm_info; |
| 1839 | uint32_t rx_antenna; |
nobelj | 1453164 | 2019-06-25 17:41:55 -0700 | [diff] [blame] | 1840 | uint8_t num_users; |
| 1841 | struct cdp_rx_stats_ppdu_user user[CDP_MU_MAX_USERS]; |
| 1842 | uint32_t nf; |
| 1843 | uint8_t per_chain_rssi[MAX_CHAIN]; |
| 1844 | uint8_t is_mcast_bcast; |
Pamidipati, Vijay | 038d090 | 2017-07-17 09:53:31 +0530 | [diff] [blame] | 1845 | }; |
| 1846 | |
| 1847 | /** |
| 1848 | * struct cdp_rx_indication_msdu - Rx MSDU info |
| 1849 | * @ppdu_id: PPDU to which the MSDU belongs |
| 1850 | * @msdu_len: Length of MSDU in bytes |
| 1851 | * @ack_frame_rssi: RSSI of the received ACK or BA frame |
| 1852 | * @first_msdu: Indicates this MSDU is the first MSDU in AMSDU |
| 1853 | * @last_msdu: Indicates this MSDU is the last MSDU in AMSDU |
| 1854 | * @msdu_part_of_amsdu : Indicates this MSDU was part of an A-MSDU in MPDU |
| 1855 | * @extd: Extended structure containing rate statistics |
| 1856 | */ |
| 1857 | struct cdp_rx_indication_msdu { |
| 1858 | uint32_t ppdu_id; |
| 1859 | uint16_t msdu_len; |
| 1860 | uint32_t ack_frame_rssi:8, |
| 1861 | resvd0:1, |
| 1862 | first_msdu:1, |
| 1863 | last_msdu:1, |
| 1864 | msdu_part_of_amsdu:1, |
| 1865 | msdu_part_of_ampdu:1, |
| 1866 | resvd1:19; |
| 1867 | struct cdp_rate_stats extd; |
| 1868 | }; |
Venkata Sharath Chandra Manchala | 3e8add8 | 2017-07-10 11:59:54 -0700 | [diff] [blame] | 1869 | |
| 1870 | /** |
| 1871 | * struct cdp_config_params - Propagate configuration parameters to datapath |
| 1872 | * @tso_enable: Enable/Disable TSO |
| 1873 | * @lro_enable: Enable/Disable LRO |
Mohit Khanna | 16816ae | 2018-10-30 14:12:03 -0700 | [diff] [blame] | 1874 | * @gro_enable: Enable/Disable GRO |
| 1875 | * @flow_steering_enable: Enable/Disable Rx Hash based flow steering |
Venkata Sharath Chandra Manchala | 3e8add8 | 2017-07-10 11:59:54 -0700 | [diff] [blame] | 1876 | * @tcp_Udp_ChecksumOffload: Enable/Disable tcp-Udp checksum Offload |
| 1877 | * @napi_enable: Enable/Disable Napi |
Mohit Khanna | 81179cb | 2018-08-16 20:50:43 -0700 | [diff] [blame] | 1878 | * @ipa_enable: Flag indicating if IPA is enabled or not |
Venkata Sharath Chandra Manchala | 3e8add8 | 2017-07-10 11:59:54 -0700 | [diff] [blame] | 1879 | * @tx_flow_stop_queue_threshold: Value to Pause tx queues |
| 1880 | * @tx_flow_start_queue_offset: Available Tx descriptors to unpause |
| 1881 | * tx queue |
Mohit Khanna | e5a6e94 | 2018-11-28 14:22:48 -0800 | [diff] [blame] | 1882 | * @tx_comp_loop_pkt_limit: Max # of packets to be processed in 1 tx comp loop |
| 1883 | * @rx_reap_loop_pkt_limit: Max # of packets to be processed in 1 rx reap loop |
| 1884 | * @rx_hp_oos_update_limit: Max # of HP OOS (out of sync) updates |
Venkata Sharath Chandra Manchala | 3e8add8 | 2017-07-10 11:59:54 -0700 | [diff] [blame] | 1885 | */ |
| 1886 | struct cdp_config_params { |
| 1887 | unsigned int tso_enable:1; |
| 1888 | unsigned int lro_enable:1; |
Mohit Khanna | 16816ae | 2018-10-30 14:12:03 -0700 | [diff] [blame] | 1889 | unsigned int gro_enable:1; |
Venkata Sharath Chandra Manchala | 3e8add8 | 2017-07-10 11:59:54 -0700 | [diff] [blame] | 1890 | unsigned int flow_steering_enable:1; |
| 1891 | unsigned int tcp_udp_checksumoffload:1; |
| 1892 | unsigned int napi_enable:1; |
Mohit Khanna | 81179cb | 2018-08-16 20:50:43 -0700 | [diff] [blame] | 1893 | unsigned int ipa_enable:1; |
Venkata Sharath Chandra Manchala | 3e8add8 | 2017-07-10 11:59:54 -0700 | [diff] [blame] | 1894 | /* Set when QCA_LL_TX_FLOW_CONTROL_V2 is enabled */ |
| 1895 | uint8_t tx_flow_stop_queue_threshold; |
| 1896 | uint8_t tx_flow_start_queue_offset; |
Mohit Khanna | e5a6e94 | 2018-11-28 14:22:48 -0800 | [diff] [blame] | 1897 | uint32_t tx_comp_loop_pkt_limit; |
| 1898 | uint32_t rx_reap_loop_pkt_limit; |
| 1899 | uint32_t rx_hp_oos_update_limit; |
Mohit Khanna | 81179cb | 2018-08-16 20:50:43 -0700 | [diff] [blame] | 1900 | |
Venkata Sharath Chandra Manchala | 3e8add8 | 2017-07-10 11:59:54 -0700 | [diff] [blame] | 1901 | }; |
Om Prakash Tripathi | 03efb6a | 2017-08-23 22:51:28 +0530 | [diff] [blame] | 1902 | |
| 1903 | /** |
| 1904 | * cdp_txrx_stats_req: stats request wrapper |
| 1905 | * used to pass request information to cdp layer |
| 1906 | * @stats: type of stats requested |
| 1907 | * @param0: opaque argument 0 to be passed to htt |
| 1908 | * @param1: opaque argument 1 to be passed to htt |
| 1909 | * @param2: opaque argument 2 to be passed to htt |
| 1910 | * @param3: opaque argument 3 to be passed to htt |
Venkata Sharath Chandra Manchala | 4face24 | 2018-04-23 11:48:28 -0700 | [diff] [blame] | 1911 | * @mac id: mac_id |
Om Prakash Tripathi | 03efb6a | 2017-08-23 22:51:28 +0530 | [diff] [blame] | 1912 | */ |
| 1913 | struct cdp_txrx_stats_req { |
| 1914 | enum cdp_stats stats; |
| 1915 | uint32_t param0; |
| 1916 | uint32_t param1; |
| 1917 | uint32_t param2; |
| 1918 | uint32_t param3; |
Prathyusha Guduri | 43bb056 | 2018-02-12 18:30:54 +0530 | [diff] [blame] | 1919 | uint32_t cookie_val; |
Venkata Sharath Chandra Manchala | 4face24 | 2018-04-23 11:48:28 -0700 | [diff] [blame] | 1920 | uint8_t mac_id; |
Venkata Sharath Chandra Manchala | 0cb3198 | 2018-03-30 15:55:26 -0700 | [diff] [blame] | 1921 | char *peer_addr; |
Om Prakash Tripathi | 03efb6a | 2017-08-23 22:51:28 +0530 | [diff] [blame] | 1922 | }; |
nobelj | d124b74 | 2017-10-16 11:59:12 -0700 | [diff] [blame] | 1923 | |
| 1924 | /** |
| 1925 | * struct cdp_monitor_filter - monitor filter info |
| 1926 | * @mode: set filter mode |
| 1927 | * @fp_mgmt: set Filter Pass MGMT Configuration |
| 1928 | * @fp_ctrl: set Filter Pass CTRL Configuration |
| 1929 | * @fp_data: set Filter Pass DATA Configuration |
| 1930 | * @mo_mgmt: set Monitor Other MGMT Configuration |
| 1931 | * @mo_ctrl: set Monitor Other CTRL Configuration |
| 1932 | * @mo_data: set Monitor other DATA Configuration |
| 1933 | * |
| 1934 | */ |
| 1935 | struct cdp_monitor_filter { |
| 1936 | uint16_t mode; |
| 1937 | uint16_t fp_mgmt; |
| 1938 | uint16_t fp_ctrl; |
| 1939 | uint16_t fp_data; |
| 1940 | uint16_t mo_mgmt; |
| 1941 | uint16_t mo_ctrl; |
| 1942 | uint16_t mo_data; |
| 1943 | }; |
jitiphil | 60ac9aa | 2018-10-05 19:54:04 +0530 | [diff] [blame] | 1944 | |
| 1945 | /** |
| 1946 | * cdp_dp_cfg - dp ini config enum |
| 1947 | */ |
| 1948 | enum cdp_dp_cfg { |
| 1949 | cfg_dp_enable_data_stall, |
| 1950 | cfg_dp_enable_ip_tcp_udp_checksum_offload, |
| 1951 | cfg_dp_tso_enable, |
| 1952 | cfg_dp_lro_enable, |
| 1953 | cfg_dp_gro_enable, |
| 1954 | cfg_dp_tx_flow_start_queue_offset, |
| 1955 | cfg_dp_tx_flow_stop_queue_threshold, |
| 1956 | cfg_dp_ipa_uc_tx_buf_size, |
| 1957 | cfg_dp_ipa_uc_tx_partition_base, |
| 1958 | cfg_dp_ipa_uc_rx_ind_ring_count, |
| 1959 | cfg_dp_enable_flow_steering, |
| 1960 | cfg_dp_reorder_offload_supported, |
| 1961 | cfg_dp_ce_classify_enable, |
| 1962 | cfg_dp_disable_intra_bss_fwd, |
| 1963 | }; |
Amir Patel | 78824b1 | 2019-02-23 10:54:32 +0530 | [diff] [blame] | 1964 | |
| 1965 | /** |
| 1966 | * struct cdp_peer_cookie - cookie used when creating peer |
| 1967 | * @peer_id: peer id |
Pavankumar Nandeshwar | 4c7b81b | 2019-09-27 11:27:12 +0530 | [diff] [blame] | 1968 | * @pdev_id: pdev_id |
Amir Patel | 78824b1 | 2019-02-23 10:54:32 +0530 | [diff] [blame] | 1969 | * @mac_addr: MAC address of peer |
| 1970 | * @cookie: cookie to be used by consumer |
| 1971 | * @ctx: context passed to be used by consumer |
| 1972 | */ |
| 1973 | struct cdp_peer_cookie { |
Srinivas Girigowda | 2751b6d | 2019-02-27 12:28:13 -0800 | [diff] [blame] | 1974 | uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; |
Pavankumar Nandeshwar | 4c7b81b | 2019-09-27 11:27:12 +0530 | [diff] [blame] | 1975 | uint8_t peer_id; |
Amir Patel | 78824b1 | 2019-02-23 10:54:32 +0530 | [diff] [blame] | 1976 | uint8_t cookie; |
| 1977 | struct cdp_stats_cookie *ctx; |
| 1978 | }; |
Sumeet Rao | c4fa4df | 2019-07-05 02:11:19 -0700 | [diff] [blame] | 1979 | |
| 1980 | /** |
| 1981 | * cdp_flow_stats - Per-Flow (5-tuple) statistics |
| 1982 | * @msdu_count: number of rx msdus matching this flow |
| 1983 | * |
| 1984 | * HW also includes msdu_byte_count and timestamp, which |
| 1985 | * are not currently tracked in SW. |
| 1986 | */ |
| 1987 | struct cdp_flow_stats { |
| 1988 | uint32_t msdu_count; |
| 1989 | }; |
| 1990 | |
| 1991 | /** |
| 1992 | * cdp_flow_fst_operation - RX FST operations allowed |
| 1993 | */ |
| 1994 | enum cdp_flow_fst_operation { |
| 1995 | CDP_FLOW_FST_ENTRY_ADD, |
| 1996 | CDP_FLOW_FST_ENTRY_DEL, |
| 1997 | CDP_FLOW_FST_RX_BYPASS_ENABLE, |
| 1998 | CDP_FLOW_FST_RX_BYPASS_DISABLE |
| 1999 | }; |
| 2000 | |
| 2001 | /** |
| 2002 | * cdp_flow_protocol_type - RX FST supported protocol types, mapped to HW spec |
| 2003 | */ |
| 2004 | enum cdp_flow_protocol_type { |
| 2005 | CDP_FLOW_PROTOCOL_TYPE_TCP = 6, |
| 2006 | CDP_FLOW_PROTOCOL_TYPE_UDP = 17, |
| 2007 | }; |
| 2008 | |
| 2009 | /** |
| 2010 | * cdp_rx_flow_tuple_info - RX flow tuple info used for addition/deletion |
| 2011 | * @dest_ip_127_96: destination IP address bit fields 96-127 |
| 2012 | * @dest_ip_95_64: destination IP address bit fields 64-95 |
| 2013 | * @dest_ip_63_32: destination IP address bit fields 32-63 |
| 2014 | * @dest_ip_31_0: destination IP address bit fields 0-31 |
| 2015 | * @src_ip_127_96: source IP address bit fields 96-127 |
| 2016 | * @src_ip_95_64: source IP address bit fields 64-95 |
| 2017 | * @src_ip_63_32: source IP address bit fields 32-63 |
| 2018 | * @src_ip_31_0: source IP address bit fields 0-31 |
| 2019 | * @dest_port: destination port of flow |
| 2020 | * @src_port: source port of flow |
| 2021 | * @l4_protocol: protocol type in flow (TCP/UDP) |
| 2022 | */ |
| 2023 | struct cdp_rx_flow_tuple_info { |
| 2024 | uint32_t dest_ip_127_96; |
| 2025 | uint32_t dest_ip_95_64; |
| 2026 | uint32_t dest_ip_63_32; |
| 2027 | uint32_t dest_ip_31_0; |
| 2028 | uint32_t src_ip_127_96; |
| 2029 | uint32_t src_ip_95_64; |
| 2030 | uint32_t src_ip_63_32; |
| 2031 | uint32_t src_ip_31_0; |
| 2032 | uint16_t dest_port; |
| 2033 | uint16_t src_port; |
| 2034 | uint16_t l4_protocol; |
| 2035 | }; |
| 2036 | |
| 2037 | /** |
| 2038 | * cdp_rx_flow_info - RX flow info used for addition/deletion |
| 2039 | * @is_addr_ipv4: indicates whether given IP address is IPv4/IPv6 |
| 2040 | * @op_code: add/delete/enable/disable operation requested |
| 2041 | * @flow_tupe_info: structure containing tuple info |
| 2042 | * @fse_metadata: metadata to be set in RX flow |
| 2043 | */ |
| 2044 | struct cdp_rx_flow_info { |
| 2045 | bool is_addr_ipv4; |
| 2046 | enum cdp_flow_fst_operation op_code; |
| 2047 | struct cdp_rx_flow_tuple_info flow_tuple_info; |
| 2048 | uint16_t fse_metadata; |
| 2049 | }; |
Nandha Kishore Easwaran | e5444bc | 2016-10-20 13:23:23 +0530 | [diff] [blame] | 2050 | #endif |