1 /* 2 * Copyright (c) 2011-2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 /** 21 * DOC: cdp_txrx_cmn_struct.h 22 * Define the host data path converged API functions 23 * called by the host control SW and the OS interface module 24 */ 25 #ifndef _CDP_TXRX_CMN_STRUCT_H_ 26 #define _CDP_TXRX_CMN_STRUCT_H_ 27 28 /* 29 * For WIN legacy header compilation 30 * Temporary add dummy definitions 31 * should be removed properly WIN legacy code handle 32 */ 33 34 #include "htc_api.h" 35 #include "qdf_types.h" 36 #include "qdf_nbuf.h" 37 #include "qdf_atomic.h" 38 #ifdef DP_MOB_DEFS 39 #include <cdp_txrx_mob_def.h> 40 #endif 41 #include <cdp_txrx_handle.h> 42 #include <cdp_txrx_stats_struct.h> 43 #ifdef WLAN_RX_PKT_CAPTURE_ENH 44 #include "cdp_txrx_extd_struct.h" 45 #endif 46 47 #ifdef WLAN_MAX_CLIENTS_ALLOWED 48 #define OL_TXRX_NUM_LOCAL_PEER_IDS (WLAN_MAX_CLIENTS_ALLOWED + 1 + 1 + 1) 49 #endif 50 51 #ifndef OL_TXRX_NUM_LOCAL_PEER_IDS 52 /* 53 * Each AP will occupy one ID, so it will occupy two IDs for AP-AP mode. 54 * Clients will be assigned max 32 IDs. 55 * STA(associated)/P2P DEV(self-PEER) will get one ID. 56 */ 57 #define OL_TXRX_NUM_LOCAL_PEER_IDS (32 + 1 + 1 + 1) 58 #endif 59 60 #define CDP_BA_256_BIT_MAP_SIZE_DWORDS 8 61 #define CDP_BA_64_BIT_MAP_SIZE_DWORDS 2 62 #define CDP_RSSI_CHAIN_LEN 8 63 64 #define OL_TXRX_INVALID_PDEV_ID 0xff 65 #define OL_TXRX_INVALID_LOCAL_PEER_ID 0xffff 66 #define CDP_INVALID_VDEV_ID 0xff 67 68 /* Max vdev_stats_id(48) is as per the max vdevs supported by HW */ 69 #define CDP_MAX_VDEV_STATS_ID 0x30 70 /* Invalid vdev_stats_id */ 71 #define CDP_INVALID_VDEV_STATS_ID 0xFF 72 73 /* Options for Dump Statistics */ 74 #define CDP_HDD_STATS 0 75 #define CDP_TXRX_PATH_STATS 1 76 #define CDP_TXRX_HIST_STATS 2 77 #define CDP_TXRX_TSO_STATS 3 78 #define CDP_HDD_NETIF_OPER_HISTORY 4 79 #define CDP_DUMP_TX_FLOW_POOL_INFO 5 80 #define CDP_TXRX_DESC_STATS 6 81 #define CDP_HIF_STATS 7 82 #define CDP_LRO_STATS 8 83 #define CDP_NAPI_STATS 9 84 #define CDP_WLAN_RX_BUF_DEBUG_STATS 10 85 #define CDP_RX_RING_STATS 11 86 #define CDP_DP_NAPI_STATS 12 87 #define CDP_DP_RX_THREAD_STATS 13 88 #define CDP_SCHEDULER_STATS 21 89 #define CDP_TX_QUEUE_STATS 22 90 #define CDP_BUNDLE_STATS 23 91 #define CDP_CREDIT_STATS 24 92 #define CDP_DISCONNECT_STATS 25 93 #define CDP_DP_RX_FISA_STATS 26 94 #define CDP_DP_SWLM_STATS 27 95 #define CDP_DP_TX_HW_LATENCY_STATS 28 96 97 #define WME_AC_TO_TID(_ac) ( \ 98 ((_ac) == WME_AC_VO) ? 6 : \ 99 ((_ac) == WME_AC_VI) ? 5 : \ 100 ((_ac) == WME_AC_BK) ? 1 : \ 101 0) 102 103 #define TID_TO_WME_AC(_tid) ( \ 104 (((_tid) == 0) || ((_tid) == 3)) ? WME_AC_BE : \ 105 (((_tid) == 1) || ((_tid) == 2)) ? WME_AC_BK : \ 106 (((_tid) == 4) || ((_tid) == 5)) ? WME_AC_VI : \ 107 WME_AC_VO) 108 109 #define CDP_MU_MAX_USERS 37 110 #define CDP_MU_MAX_USER_INDEX (CDP_MU_MAX_USERS - 1) 111 #define CDP_INVALID_PEER 0xffff 112 #define CDP_INVALID_TID 31 113 #define CDP_INVALID_TX_ENCAP_TYPE 6 114 #define CDP_INVALID_SEC_TYPE 12 115 116 #define CDP_DATA_TID_MAX 8 117 #define CDP_DATA_NON_QOS_TID 16 118 119 #define CDP_NUM_SA_BW 4 120 #define CDP_PERCENT_MACRO 100 121 #define CDP_NUM_KB_IN_MB 1000 122 /* 123 * advance rx monitor filter 124 */ 125 #define MON_FILTER_PASS 0x0001 126 #define MON_FILTER_OTHER 0x0002 127 #define MON_FILTER_ALL 0x0003 128 129 #define FILTER_MGMT_ALL 0xFFFF 130 #define FILTER_MGMT_ASSOC_REQ 0x0001 131 #define FILTER_MGMT_ASSOC_RES 0x0002 132 #define FILTER_MGMT_REASSOC_REQ 0x0004 133 #define FILTER_MGMT_REASSOC_RES 0x0008 134 #define FILTER_MGMT_PROBE_REQ 0x0010 135 #define FILTER_MGMT_PROBE_RES 0x0020 136 #define FILTER_MGMT_TIM_ADVT 0x0040 137 #define FILTER_MGMT_RESERVED_7 0x0080 138 #define FILTER_MGMT_BEACON 0x0100 139 #define FILTER_MGMT_ATIM 0x0200 140 #define FILTER_MGMT_DISASSOC 0x0400 141 #define FILTER_MGMT_AUTH 0x0800 142 #define FILTER_MGMT_DEAUTH 0x1000 143 #define FILTER_MGMT_ACTION 0x2000 144 #define FILTER_MGMT_ACT_NO_ACK 0x4000 145 #define FILTER_MGMT_RESERVED_15 0x8000 146 147 #define FILTER_CTRL_ALL 0xFFFF 148 #define FILTER_CTRL_RESERVED_1 0x0001 149 #define FILTER_CTRL_RESERVED_2 0x0002 150 #define FILTER_CTRL_TRIGGER 0x0004 151 #define FILTER_CTRL_RESERVED_4 0x0008 152 #define FILTER_CTRL_BF_REP_POLL 0x0010 153 #define FILTER_CTRL_VHT_NDP 0x0020 154 #define FILTER_CTRL_FRAME_EXT 0x0040 155 #define FILTER_CTRL_CTRLWRAP 0x0080 156 #define FILTER_CTRL_BA_REQ 0x0100 157 #define FILTER_CTRL_BA 0x0200 158 #define FILTER_CTRL_PSPOLL 0x0400 159 #define FILTER_CTRL_RTS 0x0800 160 #define FILTER_CTRL_CTS 0x1000 161 #define FILTER_CTRL_ACK 0x2000 162 #define FILTER_CTRL_CFEND 0x4000 163 #define FILTER_CTRL_CFEND_CFACK 0x8000 164 165 #define FILTER_DATA_ALL 0xFFFF 166 #define FILTER_DATA_MCAST 0x4000 167 #define FILTER_DATA_UCAST 0x8000 168 #define FILTER_DATA_DATA 0x0001 169 #define FILTER_DATA_NULL 0x0008 170 171 /* 172 * Multiply rate by 2 to avoid float point 173 * and get rate in units of 500kbps 174 */ 175 #define CDP_11B_RATE_0MCS (11 * 2) 176 #define CDP_11B_RATE_1MCS (5.5 * 2) 177 #define CDP_11B_RATE_2MCS (2 * 2) 178 #define CDP_11B_RATE_3MCS (1 * 2) 179 #define CDP_11B_RATE_4MCS (11 * 2) 180 #define CDP_11B_RATE_5MCS (5.5 * 2) 181 #define CDP_11B_RATE_6MCS (2 * 2) 182 183 #define CDP_11A_RATE_0MCS (48 * 2) 184 #define CDP_11A_RATE_1MCS (24 * 2) 185 #define CDP_11A_RATE_2MCS (12 * 2) 186 #define CDP_11A_RATE_3MCS (6 * 2) 187 #define CDP_11A_RATE_4MCS (54 * 2) 188 #define CDP_11A_RATE_5MCS (36 * 2) 189 #define CDP_11A_RATE_6MCS (18 * 2) 190 #define CDP_11A_RATE_7MCS (9 * 2) 191 192 #define CDP_LEGACY_MCS0 0 193 #define CDP_LEGACY_MCS1 1 194 #define CDP_LEGACY_MCS2 2 195 #define CDP_LEGACY_MCS3 3 196 #define CDP_LEGACY_MCS4 4 197 #define CDP_LEGACY_MCS5 5 198 #define CDP_LEGACY_MCS6 6 199 #define CDP_LEGACY_MCS7 7 200 201 QDF_DECLARE_EWMA(tx_lag, 1024, 8) 202 struct cdp_stats_cookie; 203 204 /** 205 * enum cdp_cfg_param_type - DP configuration parameters 206 * @CDP_CFG_MAX_PEER_ID: Maximum peer id 207 * @CDP_CFG_CCE_DISABLE: CCE disable 208 * @CDP_CFG_NUM_PARAMS: Total number of params 209 */ 210 enum cdp_cfg_param_type { 211 CDP_CFG_MAX_PEER_ID, 212 CDP_CFG_CCE_DISABLE, 213 CDP_CFG_NUM_PARAMS 214 }; 215 216 /** 217 * enum CDP_PPDU_STATS_PPDU_TYPE - PPDU TYPE from FW 218 * @CDP_PPDU_STATS_PPDU_TYPE_SU: single user type 219 * @CDP_PPDU_STATS_PPDU_TYPE_MU_MIMO: multi user mu-mimo 220 * @CDP_PPDU_STATS_PPDU_TYPE_MU_OFDMA: multi user ofdma 221 * @CDP_PPDU_STATS_PPDU_TYPE_MU_MIMO_OFDMA: multi user mu-mimo ofdma 222 * @CDP_PPDU_STATS_PPDU_TYPE_UL_TRIG: ul trigger ppdu 223 * @CDP_PPDU_STATS_PPDU_TYPE_BURST_BCN: burst beacon 224 * @CDP_PPDU_STATS_PPDU_TYPE_UL_BSR_RESP: bsr respond 225 * @CDP_PPDU_STATS_PPDU_TYPE_UL_BSR_TRIG: bsr trigger 226 * @CDP_PPDU_STATS_PPDU_TYPE_UL_RESP: ul response 227 * @CDP_PPDU_STATS_PPDU_TYPE_UNKNOWN: unknown 228 */ 229 enum CDP_PPDU_STATS_PPDU_TYPE { 230 CDP_PPDU_STATS_PPDU_TYPE_SU = 0, 231 CDP_PPDU_STATS_PPDU_TYPE_MU_MIMO = 1, 232 CDP_PPDU_STATS_PPDU_TYPE_MU_OFDMA = 2, 233 CDP_PPDU_STATS_PPDU_TYPE_MU_MIMO_OFDMA = 4, 234 CDP_PPDU_STATS_PPDU_TYPE_UL_TRIG = 5, 235 CDP_PPDU_STATS_PPDU_TYPE_BURST_BCN = 6, 236 CDP_PPDU_STATS_PPDU_TYPE_UL_BSR_RESP = 7, 237 CDP_PPDU_STATS_PPDU_TYPE_UL_BSR_TRIG = 8, 238 CDP_PPDU_STATS_PPDU_TYPE_UL_RESP = 9, 239 CDP_PPDU_STATS_PPDU_TYPE_UNKNOWN = 0x1F, 240 }; 241 242 /** 243 * enum htt_cmn_dbg_stats_type - 244 * bit positions for each stats type within a stats type bitmask 245 * The bitmask contains 24 bits. 246 * @HTT_DBG_CMN_STATS_WAL_PDEV_TXRX: 247 * @HTT_DBG_CMN_STATS_RX_REORDER: 248 * @HTT_DBG_CMN_STATS_RX_RATE_INFO: 249 * @HTT_DBG_CMN_STATS_TX_PPDU_LOG: 250 * @HTT_DBG_CMN_STATS_TX_RATE_INFO: 251 * @HTT_DBG_CMN_STATS_TIDQ: 252 * @HTT_DBG_CMN_STATS_TXBF_INFO: 253 * @HTT_DBG_CMN_STATS_SND_INFO: 254 * @HTT_DBG_CMN_STATS_ERROR_INFO: 255 * @HTT_DBG_CMN_STATS_TX_SELFGEN_INFO: 256 * @HTT_DBG_CMN_STATS_TX_MU_INFO: 257 * @HTT_DBG_CMN_STATS_SIFS_RESP_INFO: 258 * @HTT_DBG_CMN_STATS_RESET_INFO: 259 * @HTT_DBG_CMN_STATS_MAC_WDOG_INFO: 260 * @HTT_DBG_CMN_STATS_TX_DESC_INFO: 261 * @HTT_DBG_CMN_STATS_TX_FETCH_MGR_INFO: 262 * @HTT_DBG_CMN_STATS_TX_PFSCHED_INFO: 263 * @HTT_DBG_CMN_STATS_TX_PATH_STATS_INFO: 264 * @HTT_DBG_CMN_NUM_STATS: 265 * @HTT_DBG_CMN_NUM_STATS_INVALID: 266 */ 267 enum htt_cmn_dbg_stats_type { 268 HTT_DBG_CMN_STATS_WAL_PDEV_TXRX = 0, /* bit 0 -> 0x1 */ 269 HTT_DBG_CMN_STATS_RX_REORDER = 1, /* bit 1 -> 0x2 */ 270 HTT_DBG_CMN_STATS_RX_RATE_INFO = 2, /* bit 2 -> 0x4 */ 271 HTT_DBG_CMN_STATS_TX_PPDU_LOG = 3, /* bit 3 -> 0x8 */ 272 HTT_DBG_CMN_STATS_TX_RATE_INFO = 4, /* bit 4 -> 0x10 */ 273 HTT_DBG_CMN_STATS_TIDQ = 5, /* bit 5 -> 0x20 */ 274 HTT_DBG_CMN_STATS_TXBF_INFO = 6, /* bit 6 -> 0x40 */ 275 HTT_DBG_CMN_STATS_SND_INFO = 7, /* bit 7 -> 0x80 */ 276 HTT_DBG_CMN_STATS_ERROR_INFO = 8, /* bit 8 -> 0x100 */ 277 HTT_DBG_CMN_STATS_TX_SELFGEN_INFO = 9, /* bit 9 -> 0x200 */ 278 HTT_DBG_CMN_STATS_TX_MU_INFO = 10, /* bit 10 -> 0x400 */ 279 HTT_DBG_CMN_STATS_SIFS_RESP_INFO = 11, /* bit 11 -> 0x800 */ 280 HTT_DBG_CMN_STATS_RESET_INFO = 12, /* bit 12 -> 0x1000 */ 281 HTT_DBG_CMN_STATS_MAC_WDOG_INFO = 13, /* bit 13 -> 0x2000 */ 282 HTT_DBG_CMN_STATS_TX_DESC_INFO = 14, /* bit 14 -> 0x4000 */ 283 HTT_DBG_CMN_STATS_TX_FETCH_MGR_INFO = 15, /* bit 15 -> 0x8000 */ 284 HTT_DBG_CMN_STATS_TX_PFSCHED_INFO = 16, /* bit 16 -> 0x10000 */ 285 HTT_DBG_CMN_STATS_TX_PATH_STATS_INFO = 17, /* bit 17 -> 0x20000 */ 286 /* bits 18-23 currently reserved */ 287 288 /* keep this last */ 289 HTT_DBG_CMN_NUM_STATS, 290 HTT_DBG_CMN_NUM_STATS_INVALID = 31, /* bit 31 -> 0x80000000 */ 291 }; 292 293 /** 294 * enum cdp_host_txrx_stats - Different types of host stats 295 * @TXRX_HOST_STATS_INVALID: Invalid option 296 * @TXRX_CLEAR_STATS: clear all host stats 297 * @TXRX_RX_RATE_STATS: Rx rate info 298 * @TXRX_TX_RATE_STATS: Tx rate info 299 * @TXRX_TX_HOST_STATS: Print Tx stats 300 * @TXRX_RX_HOST_STATS: Print host Rx stats 301 * @TXRX_AST_STATS: 302 * @TXRX_SRNG_PTR_STATS: Print SRNG pointer stats 303 * @TXRX_RX_MON_STATS: Print monitor mode stats 304 * @TXRX_REO_QUEUE_STATS: Print Per peer REO Queue Stats 305 * @TXRX_SOC_CFG_PARAMS: Print soc cfg params info 306 * @TXRX_PDEV_CFG_PARAMS: Print pdev cfg params info 307 * @TXRX_NAPI_STATS: Print NAPI scheduling statistics 308 * @TXRX_SOC_INTERRUPT_STATS: Print soc interrupt stats 309 * @TXRX_SOC_FSE_STATS: 310 * @TXRX_HAL_REG_WRITE_STATS: Hal Reg Write stats 311 * @TXRX_SOC_REO_HW_DESC_DUMP: HW REO queue desc dump 312 * @TXRX_SOC_WBM_IDLE_HPTP_DUMP: WBM idle link desc SRNG HP/TP dump 313 * @TXRX_SRNG_USAGE_WM_STATS: SRNG usage watermark stats 314 * @TXRX_HOST_STATS_MAX: 315 */ 316 enum cdp_host_txrx_stats { 317 TXRX_HOST_STATS_INVALID = -1, 318 TXRX_CLEAR_STATS = 0, 319 TXRX_RX_RATE_STATS = 1, 320 TXRX_TX_RATE_STATS = 2, 321 TXRX_TX_HOST_STATS = 3, 322 TXRX_RX_HOST_STATS = 4, 323 TXRX_AST_STATS = 5, 324 TXRX_SRNG_PTR_STATS = 6, 325 TXRX_RX_MON_STATS = 7, 326 TXRX_REO_QUEUE_STATS = 8, 327 TXRX_SOC_CFG_PARAMS = 9, 328 TXRX_PDEV_CFG_PARAMS = 10, 329 TXRX_NAPI_STATS = 11, 330 TXRX_SOC_INTERRUPT_STATS = 12, 331 TXRX_SOC_FSE_STATS = 13, 332 TXRX_HAL_REG_WRITE_STATS = 14, 333 TXRX_SOC_REO_HW_DESC_DUMP = 15, 334 TXRX_SOC_WBM_IDLE_HPTP_DUMP = 16, 335 TXRX_SRNG_USAGE_WM_STATS = 17, 336 TXRX_HOST_STATS_MAX, 337 }; 338 339 /** 340 * enum cdp_ppdu_ftype - PPDU Frame Type 341 * @CDP_PPDU_FTYPE_DATA: SU or MU Data Frame 342 * @CDP_PPDU_FTYPE_CTRL: Control/Management Frames 343 * @CDP_PPDU_FTYPE_BAR: SU or MU BAR frames 344 * @CDP_PPDU_FTYPE_MAX: Max value 345 */ 346 enum cdp_ppdu_ftype { 347 CDP_PPDU_FTYPE_CTRL, 348 CDP_PPDU_FTYPE_DATA, 349 CDP_PPDU_FTYPE_BAR, 350 CDP_PPDU_FTYPE_MAX 351 }; 352 353 354 /** 355 * enum htt_cmn_pkt_type - General specification of the tx frame contents 356 * @htt_cmn_pkt_type_raw: raw 357 * @htt_cmn_pkt_type_native_wifi: native wifi 358 * @htt_cmn_pkt_type_ethernet: ethernet 359 * @htt_cmn_pkt_type_mgmt: management 360 * @htt_cmn_pkt_type_eth2: ethernet2 361 * @htt_cmn_pkt_num_types: number of packet types 362 * 363 * for efficiency, the HTT packet type values correspond 364 * to the bit positions of the WAL packet type values, so the 365 * translation is a simple shift operation. 366 */ 367 enum htt_cmn_pkt_type { 368 htt_cmn_pkt_type_raw = 0, 369 htt_cmn_pkt_type_native_wifi = 1, 370 htt_cmn_pkt_type_ethernet = 2, 371 htt_cmn_pkt_type_mgmt = 3, 372 htt_cmn_pkt_type_eth2 = 4, 373 374 /* keep this last */ 375 htt_cmn_pkt_num_types 376 }; 377 378 /** 379 * enum htt_cmn_rx_status - description of HTT received packets status 380 * @htt_cmn_rx_status_unknown: 381 * @htt_cmn_rx_status_ok: 382 * @htt_cmn_rx_status_err_fcs: 383 * @htt_cmn_rx_status_err_dup: 384 * @htt_cmn_rx_status_err_replay: 385 * @htt_cmn_rx_status_inv_peer: 386 * @htt_cmn_rx_status_ctrl_mgmt_null: 387 * @htt_cmn_rx_status_tkip_mic_err: 388 * @htt_cmn_rx_status_decrypt_err: 389 * @htt_cmn_rx_status_mpdu_length_err: 390 * @htt_cmn_rx_status_err_misc: 391 * 392 * It is similar to htt_rx_status enum 393 * but is added as a cdp enum can be freely used in OL_IF layer 394 */ 395 enum htt_cmn_rx_status { 396 htt_cmn_rx_status_unknown = 0x0, 397 htt_cmn_rx_status_ok, 398 htt_cmn_rx_status_err_fcs, 399 htt_cmn_rx_status_err_dup, 400 htt_cmn_rx_status_err_replay, 401 htt_cmn_rx_status_inv_peer, 402 htt_cmn_rx_status_ctrl_mgmt_null = 0x08, 403 htt_cmn_rx_status_tkip_mic_err = 0x09, 404 htt_cmn_rx_status_decrypt_err = 0x0A, 405 htt_cmn_rx_status_mpdu_length_err = 0x0B, 406 htt_cmn_rx_status_err_misc = 0xFF 407 }; 408 409 410 enum cdp_host_reo_dest_ring { 411 cdp_host_reo_dest_ring_unknown = 0, 412 cdp_host_reo_dest_ring_1 = 1, 413 cdp_host_reo_dest_ring_2 = 2, 414 cdp_host_reo_dest_ring_3 = 3, 415 cdp_host_reo_dest_ring_4 = 4, 416 }; 417 418 enum htt_cmn_t2h_en_stats_type { 419 /* keep this always first */ 420 HTT_CMN_T2H_EN_STATS_TYPE_START = 0, 421 422 /** ppdu_common_stats is the payload */ 423 HTT_CMN_T2H_EN_STATS_TYPE_COMMON = 1, 424 /** ppdu_sant_stats is the payload */ 425 HTT_CMN_T2H_EN_STATS_TYPE_SANT = 2, 426 /** ppdu_common_stats_v2 is the payload */ 427 HTT_CMN_T2H_EN_STATS_TYPE_COMMON_V2 = 3, 428 429 /* Keep this last */ 430 HTT_CMN_T2H_EN_STATS_TYPE_END = 0x1f, 431 }; 432 433 enum htt_cmn_t2h_en_stats_status { 434 /* Keep this first always */ 435 HTT_CMN_T2H_EN_STATS_STATUS_PARTIAL = 0, 436 HTT_CMN_T2H_EN_STATS_STATUS_PRESENT = 1, 437 HTT_CMN_T2H_EN_STATS_STATUS_ERROR = 2, 438 HTT_CMN_T2H_EN_STATS_STATUS_INVALID = 3, 439 440 441 /* keep this always last */ 442 HTT_CMN_T2H_EN_STATS_STATUS_SERIES_DONE = 7, 443 }; 444 445 /** 446 * enum cdp_peer_type - Peer type 447 * @CDP_INVALID_PEER_TYPE: invalid peer type 448 * @CDP_LINK_PEER_TYPE: legacy peer or link peer for MLO connection 449 * @CDP_MLD_PEER_TYPE: MLD peer for MLO connection 450 * @CDP_WILD_PEER_TYPE: used to set peer type for same mld/link mac addr 451 */ 452 enum cdp_peer_type { 453 CDP_INVALID_PEER_TYPE, 454 CDP_LINK_PEER_TYPE, 455 CDP_MLD_PEER_TYPE, 456 CDP_WILD_PEER_TYPE, 457 }; 458 459 /** 460 * struct cdp_peer_setup_info - MLO connection info for cdp_peer_setup() 461 * @mld_peer_mac: mld peer mac address pointer 462 * @is_first_link: set true for first MLO link peer 463 * @is_primary_link: set true for MLO primary link peer 464 * @primary_umac_id: primary umac_id 465 * @num_links: number of links in MLO 466 */ 467 struct cdp_peer_setup_info { 468 uint8_t *mld_peer_mac; 469 uint8_t is_first_link:1, 470 is_primary_link:1; 471 uint8_t primary_umac_id; 472 uint8_t num_links; 473 }; 474 475 /** 476 * struct cdp_peer_info - peer info for dp hash find 477 * @vdev_id: Vdev ID 478 * @mac_addr: peer mac address to search 479 * @mac_addr_is_aligned: true only if mac_addr type is 480 * "union dp_align_mac_addr", otherwise set false always. 481 * @peer_type: link or MLD peer type 482 */ 483 struct cdp_peer_info { 484 uint8_t vdev_id; 485 uint8_t *mac_addr; 486 bool mac_addr_is_aligned; 487 enum cdp_peer_type peer_type; 488 }; 489 490 /** 491 * enum ol_txrx_peer_state - Peer state information 492 * @OL_TXRX_PEER_STATE_INVALID: Invalid 493 * @OL_TXRX_PEER_STATE_DISC: disconnected (initial state) 494 * @OL_TXRX_PEER_STATE_CONN: authentication in progress 495 * @OL_TXRX_PEER_STATE_AUTH: authentication successful 496 */ 497 enum ol_txrx_peer_state { 498 OL_TXRX_PEER_STATE_INVALID, 499 OL_TXRX_PEER_STATE_DISC, 500 OL_TXRX_PEER_STATE_CONN, 501 OL_TXRX_PEER_STATE_AUTH, 502 }; 503 504 /** 505 * enum cdp_txrx_ast_entry_type - AST entry type information 506 * @CDP_TXRX_AST_TYPE_NONE: static ast entry for connected peer 507 * @CDP_TXRX_AST_TYPE_STATIC: static ast entry for connected peer 508 * @CDP_TXRX_AST_TYPE_SELF: static ast entry for self peer (STA mode) 509 * @CDP_TXRX_AST_TYPE_WDS: WDS peer ast entry type 510 * @CDP_TXRX_AST_TYPE_WDS_HM: HM WDS entry 511 * @CDP_TXRX_AST_TYPE_STA_BSS: BSS entry(STA mode) 512 * @CDP_TXRX_AST_TYPE_DA: AST entry based on Destination address 513 * @CDP_TXRX_AST_TYPE_WDS_HM_SEC: HM WDS entry for secondary radio 514 * @CDP_TXRX_AST_TYPE_MLD: AST entry type for MLD peer 515 * @CDP_TXRX_AST_TYPE_MAX: 516 */ 517 enum cdp_txrx_ast_entry_type { 518 CDP_TXRX_AST_TYPE_NONE, 519 CDP_TXRX_AST_TYPE_STATIC, 520 CDP_TXRX_AST_TYPE_SELF, 521 CDP_TXRX_AST_TYPE_WDS, 522 CDP_TXRX_AST_TYPE_WDS_HM, 523 CDP_TXRX_AST_TYPE_STA_BSS, 524 CDP_TXRX_AST_TYPE_DA, 525 CDP_TXRX_AST_TYPE_WDS_HM_SEC, 526 CDP_TXRX_AST_TYPE_MLD, 527 CDP_TXRX_AST_TYPE_MAX 528 }; 529 530 /** 531 * enum cdp_ast_free_status - status passed to callback function before 532 * freeing ast 533 * @CDP_TXRX_AST_DELETED: AST is deleted from FW and delete response received 534 * @CDP_TXRX_AST_DELETE_IN_PROGRESS: AST delete command sent to FW and host 535 * is waiting for FW response 536 */ 537 enum cdp_ast_free_status { 538 CDP_TXRX_AST_DELETED, 539 CDP_TXRX_AST_DELETE_IN_PROGRESS, 540 }; 541 542 /** 543 * typedef txrx_ast_free_cb() - callback registered for ast free 544 * @ctrl_soc: control path soc context 545 * @cdp_soc: DP soc context 546 * @cookie: cookie 547 * @cdp_ast_free_status: ast free status 548 */ 549 typedef void (*txrx_ast_free_cb)(struct cdp_ctrl_objmgr_psoc *ctrl_soc, 550 struct cdp_soc *cdp_soc, 551 void *cookie, 552 enum cdp_ast_free_status); 553 554 /** 555 * struct cdp_ast_entry_info - AST entry information 556 * @peer_mac_addr: mac address of peer on which AST entry is added 557 * @type: ast entry type 558 * @vdev_id: vdev_id 559 * @pdev_id: pdev_id 560 * @peer_id: peer_id 561 * 562 * This structure holds the ast entry information 563 * 564 */ 565 struct cdp_ast_entry_info { 566 uint8_t peer_mac_addr[QDF_MAC_ADDR_SIZE]; 567 enum cdp_txrx_ast_entry_type type; 568 uint8_t vdev_id; 569 uint8_t pdev_id; 570 uint16_t peer_id; 571 }; 572 573 #define MIC_SEQ_CTR_SIZE 6 574 575 enum cdp_rx_frame_type { 576 cdp_rx_frame_type_802_11, 577 cdp_rx_frame_type_802_3, 578 }; 579 580 /** 581 * struct cdp_rx_mic_err_info - rx mic error information 582 * @frame_type: frame type - 0 - 802.11 frame 583 * - 1 - 802.3 frame 584 * @data: 802.11 frame 585 * @ta_mac_addr: transmitter mac address 586 * @da_mac_addr: destination mac address 587 * @tsc: sequence number 588 * @key_id: Key ID 589 * @multicast: flag for multicast 590 * @vdev_id: vdev ID 591 * 592 * This structure holds rx mic error information 593 * 594 */ 595 struct cdp_rx_mic_err_info { 596 uint8_t frame_type; 597 uint8_t *data; 598 struct qdf_mac_addr ta_mac_addr; 599 struct qdf_mac_addr da_mac_addr; 600 uint8_t tsc[MIC_SEQ_CTR_SIZE]; 601 uint8_t key_id; 602 bool multicast; 603 uint16_t vdev_id; 604 }; 605 606 #ifdef WLAN_SUPPORT_MSCS 607 /** 608 * struct cdp_mscs_params - MSCS parameters obtained 609 * from handshake 610 * @user_pri_bitmap: User priority bitmap 611 * @user_pri_limit: User priority limit 612 * @classifier_type: TCLAS Classifier type 613 * @classifier_mask: TCLAS Classifier mask 614 */ 615 struct cdp_mscs_params { 616 uint8_t user_pri_bitmap; 617 uint8_t user_pri_limit; 618 uint8_t classifier_type; 619 uint8_t classifier_mask; 620 }; 621 #endif 622 623 /** 624 * enum cdp_sec_type - security type information 625 * @cdp_sec_type_none: 626 * @cdp_sec_type_wep128: 627 * @cdp_sec_type_wep104: 628 * @cdp_sec_type_wep40: 629 * @cdp_sec_type_tkip: 630 * @cdp_sec_type_tkip_nomic: 631 * @cdp_sec_type_aes_ccmp: 632 * @cdp_sec_type_wapi: 633 * @cdp_sec_type_aes_ccmp_256: 634 * @cdp_sec_type_aes_gcmp: 635 * @cdp_sec_type_aes_gcmp_256: 636 * @cdp_num_sec_types: 637 */ 638 enum cdp_sec_type { 639 cdp_sec_type_none, 640 cdp_sec_type_wep128, 641 cdp_sec_type_wep104, 642 cdp_sec_type_wep40, 643 cdp_sec_type_tkip, 644 cdp_sec_type_tkip_nomic, 645 cdp_sec_type_aes_ccmp, 646 cdp_sec_type_wapi, 647 cdp_sec_type_aes_ccmp_256, 648 cdp_sec_type_aes_gcmp, 649 cdp_sec_type_aes_gcmp_256, 650 651 /* keep this last! */ 652 cdp_num_sec_types 653 }; 654 655 /** 656 * struct cdp_tx_exception_metadata - Exception path parameters 657 * @peer_id: Peer id of the peer 658 * @tid: Transmit Identifier 659 * @tx_encap_type: Transmit encap type (i.e. Raw, Native Wi-Fi, Ethernet) 660 * @sec_type: sec_type to be passed to HAL 661 * @is_tx_sniffer: Indicates if the packet has to be sniffed 662 * @is_intrabss_fwd: 663 * @ppdu_cookie: 16-bit ppdu cookie that has to be replayed back in completions 664 * @is_wds_extended: 665 * @is_mlo_mcast: Indicates if mlo_mcast enable or not 666 * 667 * This structure holds the parameters needed in the exception path of tx 668 * 669 */ 670 struct cdp_tx_exception_metadata { 671 uint16_t peer_id; 672 uint8_t tid; 673 uint16_t tx_encap_type; 674 enum cdp_sec_type sec_type; 675 uint8_t is_tx_sniffer :1, 676 is_intrabss_fwd :1; 677 uint16_t ppdu_cookie; 678 #ifdef QCA_SUPPORT_WDS_EXTENDED 679 uint8_t is_wds_extended; 680 #endif 681 #ifdef WLAN_MCAST_MLO 682 uint8_t is_mlo_mcast; 683 #endif 684 }; 685 686 /** 687 * enum wlan_op_mode - Virtual device operation mode 688 * @wlan_op_mode_unknown: Unknown mode 689 * @wlan_op_mode_ap: AP mode 690 * @wlan_op_mode_ibss: IBSS mode 691 * @wlan_op_mode_sta: STA (client) mode 692 * @wlan_op_mode_monitor: Monitor mode 693 * @wlan_op_mode_ocb: OCB mode 694 * @wlan_op_mode_ndi: NDI mode 695 */ 696 enum wlan_op_mode { 697 wlan_op_mode_unknown, 698 wlan_op_mode_ap, 699 wlan_op_mode_ibss, 700 wlan_op_mode_sta, 701 wlan_op_mode_monitor, 702 wlan_op_mode_ocb, 703 wlan_op_mode_ndi, 704 }; 705 706 /** 707 * enum wlan_op_subtype - Virtual device subtype 708 * @wlan_op_subtype_none: Subtype not applicable 709 * @wlan_op_subtype_p2p_device: P2P device 710 * @wlan_op_subtype_p2p_cli: P2P Client 711 * @wlan_op_subtype_p2p_go: P2P GO 712 * 713 * This enum lists the subtypes of a particular virtual 714 * device. 715 */ 716 enum wlan_op_subtype { 717 wlan_op_subtype_none, 718 wlan_op_subtype_p2p_device, 719 wlan_op_subtype_p2p_cli, 720 wlan_op_subtype_p2p_go, 721 }; 722 723 /** 724 * struct cdp_vdev_info - Vdev information 725 * @vdev_mac_addr: mac address of the vdev 726 * @vdev_id: ID of the vdev 727 * @vdev_stats_id: Stats ID of the vdev 728 * @op_mode: Operation mode of the vdev 729 * @subtype: subtype of the vdev 730 * @mld_mac_addr: MLD mac addr of the current vdev. 731 */ 732 struct cdp_vdev_info { 733 uint8_t *vdev_mac_addr; 734 uint8_t vdev_id; 735 uint8_t vdev_stats_id; 736 enum wlan_op_mode op_mode; 737 enum wlan_op_subtype subtype; 738 #ifdef WLAN_FEATURE_11BE_MLO 739 uint8_t *mld_mac_addr; 740 #endif 741 }; 742 743 typedef struct cdp_soc_t *ol_txrx_soc_handle; 744 745 /** 746 * typedef ol_txrx_vdev_delete_cb ()- callback registered during vdev detach 747 * @context: 748 */ 749 typedef void (*ol_txrx_vdev_delete_cb)(void *context); 750 751 /** 752 * typedef ol_txrx_peer_unmap_sync_cb() - callback registered during peer 753 * detach sync 754 * @vdev_id: 755 * @peer_id_cnt: 756 * @peer_id_list: 757 */ 758 typedef QDF_STATUS(*ol_txrx_peer_unmap_sync_cb)(uint8_t vdev_id, 759 uint32_t peer_id_cnt, 760 uint16_t *peer_id_list); 761 762 /** 763 * enum txrx_direction - Packet Direction 764 * @rx_direction: rx path packet 765 * @tx_direction: tx path packet 766 */ 767 enum txrx_direction { 768 rx_direction = 1, 769 tx_direction = 0, 770 }; 771 772 /** 773 * enum cdp_capabilities- DP capabilities 774 * @CDP_CFG_DP_TSO: TSO capability 775 * @CDP_CFG_DP_LRO: LRO capability 776 * @CDP_CFG_DP_SG: Scatter Gather capability 777 * @CDP_CFG_DP_GRO: GRO capability 778 * @CDP_CFG_DP_OL_TX_CSUM: Hardware based TX checksum capability 779 * @CDP_CFG_DP_OL_RX_CSUM: Hardware based RX checksum capability 780 * @CDP_CFG_DP_RAWMODE: RAW mode capability 781 * @CDP_CFG_DP_PEER_FLOW_CTRL: Peer flow-control capability 782 * @CDP_CFG_DP_MARK_NOTIFY_FRAME_SUPPORT: mark notify frames capability 783 */ 784 enum cdp_capabilities { 785 CDP_CFG_DP_TSO, 786 CDP_CFG_DP_LRO, 787 CDP_CFG_DP_SG, 788 CDP_CFG_DP_GRO, 789 CDP_CFG_DP_OL_TX_CSUM, 790 CDP_CFG_DP_OL_RX_CSUM, 791 CDP_CFG_DP_RAWMODE, 792 CDP_CFG_DP_PEER_FLOW_CTRL, 793 CDP_CFG_DP_MARK_NOTIFY_FRAME_SUPPORT, 794 }; 795 796 /** 797 * struct ol_txrx_nbuf_classify - Packet classification object 798 * @peer_id: unique peer identifier from fw 799 * @tid: traffic identifier(could be overridden) 800 * @pkt_tid: traffic identifier(cannot be overridden) 801 * @pkt_tos: ip header tos value 802 * @pkt_dscp: ip header dscp value 803 * @tos: index value in map 804 * @dscp: DSCP_TID map index 805 * @is_mcast: multicast pkt check 806 * @is_eap: eapol pkt check 807 * @is_arp: arp pkt check 808 * @is_tcp: tcp pkt check 809 * @is_dhcp: dhcp pkt check 810 * @is_igmp: igmp pkt check 811 * @is_ipv4: ip version 4 pkt check 812 * @is_ipv6: ip version 6 pkt check 813 */ 814 struct ol_txrx_nbuf_classify { 815 uint16_t peer_id; 816 uint8_t tid; 817 uint8_t pkt_tid; 818 uint8_t pkt_tos; 819 uint8_t pkt_dscp; 820 uint8_t tos; 821 uint8_t dscp; 822 uint8_t is_mcast; 823 uint8_t is_eap; 824 uint8_t is_arp; 825 uint8_t is_tcp; 826 uint8_t is_dhcp; 827 uint8_t is_igmp; 828 uint8_t is_ipv4; 829 uint8_t is_ipv6; 830 }; 831 832 /* 833 * typedef ol_osif_vdev_handle - opaque handle for OS shim virtual 834 * device object 835 */ 836 struct ol_osif_vdev_t; 837 typedef struct ol_osif_vdev_t *ol_osif_vdev_handle; 838 839 #ifdef QCA_SUPPORT_WDS_EXTENDED 840 struct ol_osif_peer_t; 841 typedef struct ol_osif_peer_t *ol_osif_peer_handle; 842 #endif 843 844 /** 845 * enum connectivity_stats_pkt_status - data pkt type 846 * @PKT_TYPE_REQ: Request packet 847 * @PKT_TYPE_RSP: Response packet 848 * @PKT_TYPE_TX_DROPPED: TX packet dropped 849 * @PKT_TYPE_RX_DROPPED: RX packet dropped 850 * @PKT_TYPE_RX_DELIVERED: RX packet delivered 851 * @PKT_TYPE_RX_REFUSED: RX packet refused 852 * @PKT_TYPE_TX_HOST_FW_SENT: TX packet FW sent 853 * @PKT_TYPE_TX_ACK_CNT:TC packet acked 854 * @PKT_TYPE_NONE: Invalid packet 855 */ 856 enum connectivity_stats_pkt_status { 857 PKT_TYPE_REQ, 858 PKT_TYPE_RSP, 859 PKT_TYPE_TX_DROPPED, 860 PKT_TYPE_RX_DROPPED, 861 PKT_TYPE_RX_DELIVERED, 862 PKT_TYPE_RX_REFUSED, 863 PKT_TYPE_TX_HOST_FW_SENT, 864 PKT_TYPE_TX_ACK_CNT, 865 PKT_TYPE_NONE, 866 }; 867 868 /** 869 * typedef ol_txrx_mgmt_tx_cb() - tx management delivery notification 870 * callback function 871 * @ctxt: 872 * @tx_mgmt_frm: 873 * @had_error: 874 */ 875 typedef void 876 (*ol_txrx_mgmt_tx_cb)(void *ctxt, qdf_nbuf_t tx_mgmt_frm, int had_error); 877 878 /** 879 * typedef ol_txrx_data_tx_cb() - Function registered with the data path 880 * that is called when tx frames marked as "no free" are 881 * done being transmitted 882 * @ctxt: 883 * @tx_frm: 884 * @had_error: 885 */ 886 typedef void 887 (*ol_txrx_data_tx_cb)(void *ctxt, qdf_nbuf_t tx_frm, int had_error); 888 889 /** 890 * typedef ol_txrx_tx_fp() - top-level transmit function 891 * @soc: dp soc handle 892 * @vdev_id: handle to the virtual device object 893 * @msdu_list: list of network buffers 894 */ 895 typedef qdf_nbuf_t (*ol_txrx_tx_fp)(struct cdp_soc_t *soc, uint8_t vdev_id, 896 qdf_nbuf_t msdu_list); 897 898 /** 899 * typedef ol_txrx_tx_fast_fp() - top-level fast transmit function 900 * @soc: dp soc handle 901 * @vdev_id: handle to the virtual device object 902 * @msdu_list: list of network buffers 903 */ 904 typedef qdf_nbuf_t (*ol_txrx_tx_fast_fp)(struct cdp_soc_t *soc, uint8_t vdev_id, 905 qdf_nbuf_t msdu_list); 906 907 /** 908 * typedef ol_txrx_tx_exc_fp() - top-level transmit function on exception path 909 * @soc: dp soc handle 910 * @vdev_id: handle to the virtual device object 911 * @msdu_list: list of network buffers 912 * @tx_exc_metadata: structure that holds parameters to exception path 913 */ 914 typedef qdf_nbuf_t (*ol_txrx_tx_exc_fp)(struct cdp_soc_t *soc, uint8_t vdev_id, 915 qdf_nbuf_t msdu_list, 916 struct cdp_tx_exception_metadata 917 *tx_exc_metadata); 918 919 /** 920 * typedef ol_txrx_completion_fp() - top-level transmit function 921 * for tx completion 922 * @skb: skb data 923 * @osif_dev: the virtual device's OS shim object 924 * @flag: flag 925 */ 926 typedef void (*ol_txrx_completion_fp)(qdf_nbuf_t skb, 927 void *osif_dev, uint16_t flag); 928 929 /** 930 * typedef ol_txrx_classify_critical_pkt_fp() - classification cb for critical 931 * frames 932 * @osif_dev: the virtual device's OS shim object 933 * @skb: skb data 934 */ 935 typedef void (*ol_txrx_classify_critical_pkt_fp)(void *osif_dev, 936 qdf_nbuf_t skb); 937 /** 938 * typedef ol_txrx_tx_flow_control_fp() - tx flow control notification 939 * function from txrx to OS shim 940 * @osif_dev: the virtual device's OS shim object 941 * @tx_resume: tx os q should be resumed or not 942 */ 943 typedef void (*ol_txrx_tx_flow_control_fp)(void *osif_dev, 944 bool tx_resume); 945 946 /** 947 * typedef ol_txrx_tx_flow_control_is_pause_fp() - is tx paused by flow control 948 * function from txrx to OS shim 949 * @osif_dev: the virtual device's OS shim object 950 * 951 * Return: true if tx is paused by flow control 952 */ 953 typedef bool (*ol_txrx_tx_flow_control_is_pause_fp)(void *osif_dev); 954 955 /** 956 * typedef ol_txrx_rx_fp() - receive function to hand batches of data 957 * frames from txrx to OS shim 958 * @osif_dev: handle to the OSIF virtual device object 959 * @msdu_list: list of network buffers 960 */ 961 typedef QDF_STATUS(*ol_txrx_rx_fp)(void *osif_dev, qdf_nbuf_t msdu_list); 962 963 typedef QDF_STATUS(*ol_txrx_fisa_rx_fp)(void *soc, 964 void *dp_vdev, 965 qdf_nbuf_t msdu_list); 966 967 typedef QDF_STATUS(*ol_txrx_fisa_flush_fp)(void *soc, int ring_num); 968 969 /** 970 * typedef ol_txrx_rx_flush_fp() - receive function to hand batches of 971 * data frames from txrx to OS shim 972 * @osif_dev: handle to the OSIF virtual device object 973 * @vdev_id: vdev_if of the packets to be flushed 974 */ 975 typedef QDF_STATUS(*ol_txrx_rx_flush_fp)(void *osif_dev, uint8_t vdev_id); 976 977 /** 978 * typedef ol_txrx_rx_gro_flush_ind_fp() - function to send GRO flush 979 * indication to stack for a given 980 * RX Context Id. 981 * @osif_dev: handle to the OSIF virtual device object 982 * @rx_ctx_id: Rx context Id for which gro flush should happen 983 */ 984 typedef QDF_STATUS(*ol_txrx_rx_gro_flush_ind_fp)(void *osif_dev, 985 int rx_ctx_id); 986 987 /** 988 * typedef ol_txrx_stats_rx_fp() - receive function to hand batches of 989 * data frames from txrx to OS shim 990 * @skb: skb data 991 * @osif_dev: the virtual device's OS shim object 992 * @action: data packet type 993 * @pkt_type: packet data type 994 */ 995 typedef void (*ol_txrx_stats_rx_fp)(struct sk_buff *skb, 996 void *osif_dev, enum connectivity_stats_pkt_status action, 997 uint8_t *pkt_type); 998 999 /** 1000 * typedef ol_txrx_get_key_fp() - function to gey key based on keyix 1001 * and peer mac address 1002 * @osif_dev: the virtual device's OS shim object 1003 * @key_buf: pointer to store key 1004 * @mac_addr: pointer to mac address 1005 * @keyix: key id 1006 */ 1007 typedef QDF_STATUS(*ol_txrx_get_key_fp)(void *osif_dev, uint8_t *key_buf, 1008 uint8_t *mac_addr, uint8_t keyix); 1009 1010 /** 1011 * typedef ol_txrx_rsim_rx_decap_fp() - raw mode simulation function 1012 * to decap the packets in 1013 * receive path. 1014 * @osif_dev: the virtual device's OS shim object 1015 * @list_head: pointer to head of receive packet queue to decap 1016 * @list_tail: pointer to tail of receive packet queue to decap 1017 * @peer_mac: mac address of peer handler 1018 */ 1019 typedef QDF_STATUS(*ol_txrx_rsim_rx_decap_fp)(void *osif_dev, 1020 qdf_nbuf_t *list_head, 1021 qdf_nbuf_t *list_tail); 1022 1023 /** 1024 * typedef ol_txrx_tx_free_ext_fp() - external tx free function to 1025 * read per packet stats and free 1026 * tx buffer externally 1027 * @netbuf: tx network buffer 1028 */ 1029 typedef void (*ol_txrx_tx_free_ext_fp)(qdf_nbuf_t netbuf); 1030 1031 /** 1032 * typedef ol_txrx_rx_check_wai_fp() - OSIF WAPI receive function 1033 * @vdev: 1034 * @mpdu_head: 1035 * @mpdu_tail: 1036 */ 1037 typedef bool (*ol_txrx_rx_check_wai_fp)(ol_osif_vdev_handle vdev, 1038 qdf_nbuf_t mpdu_head, 1039 qdf_nbuf_t mpdu_tail); 1040 /** 1041 * typedef ol_txrx_rx_mon_fp() - OSIF monitor mode receive function for single 1042 * MPDU (802.11 format) 1043 * @vdev: 1044 * @mpdu: 1045 * @rx_status: 1046 */ 1047 typedef void (*ol_txrx_rx_mon_fp)(ol_osif_vdev_handle vdev, 1048 qdf_nbuf_t mpdu, 1049 void *rx_status); 1050 1051 /** 1052 * typedef ol_txrx_proxy_arp_fp() - proxy arp function pointer 1053 * @vdev: 1054 * @netbuf: 1055 */ 1056 typedef int (*ol_txrx_proxy_arp_fp)(ol_osif_vdev_handle vdev, 1057 qdf_nbuf_t netbuf); 1058 1059 /** 1060 * typedef ol_txrx_mcast_me_fp() - function pointer for multicast enhancement 1061 * @vdev: 1062 * @netbuf: 1063 */ 1064 typedef int (*ol_txrx_mcast_me_fp)(ol_osif_vdev_handle vdev, 1065 qdf_nbuf_t netbuf); 1066 1067 /** 1068 * typedef ol_txrx_stats_callback() - statistics notify callback 1069 * @ctxt: 1070 * @type: 1071 * @buf: 1072 * @bytes: 1073 */ 1074 typedef void (*ol_txrx_stats_callback)(void *ctxt, 1075 enum htt_cmn_dbg_stats_type type, 1076 uint8_t *buf, int bytes); 1077 1078 /** 1079 * typedef ol_txrx_pktdump_cb() - callback for packet dump feature 1080 * @soc: 1081 * @pdev_id: 1082 * @vdev_id: 1083 * @netbuf: 1084 * @status: 1085 * @type: 1086 */ 1087 typedef void (*ol_txrx_pktdump_cb)(ol_txrx_soc_handle soc, 1088 uint8_t pdev_id, 1089 uint8_t vdev_id, 1090 qdf_nbuf_t netbuf, 1091 enum qdf_dp_tx_rx_status status, 1092 enum qdf_pkt_type type); 1093 1094 /** 1095 * typedef ol_txrx_get_tsf_time() - callback to get tsf time 1096 * @osif_dev: 1097 * @input_time: 1098 * @tsf_time: 1099 */ 1100 typedef QDF_STATUS(*ol_txrx_get_tsf_time)(void *osif_dev, uint64_t input_time, 1101 uint64_t *tsf_time); 1102 1103 /** 1104 * struct ol_txrx_ops - (pointers to) the functions used for tx and rx 1105 * data xfer 1106 * 1107 * There are two portions of these txrx operations. 1108 * The rx portion is filled in by OSIF SW before calling 1109 * ol_txrx_osif_vdev_register; inside the ol_txrx_osif_vdev_register 1110 * the txrx SW stores a copy of these rx function pointers, to use 1111 * as it delivers rx data frames to the OSIF SW. 1112 * The tx portion is filled in by the txrx SW inside 1113 * ol_txrx_osif_vdev_register; when the function call returns, 1114 * the OSIF SW stores a copy of these tx functions to use as it 1115 * delivers tx data frames to the txrx SW. 1116 * 1117 * @tx: tx function pointers - specified by txrx, stored by OS shim 1118 * @tx.std: the tx function pointer for standard data 1119 * frames This function pointer is set by the txrx SW 1120 * perform host-side transmit operations based on 1121 * whether a HL or LL host/target interface is in use. 1122 * @tx.flow_control_cb: the transmit flow control 1123 * function that is registered by the 1124 * OSIF which is called from txrx to 1125 * indicate whether the transmit OS 1126 * queues should be paused/resumed 1127 * @rx: rx function pointers - specified by OS shim, stored by txrx 1128 * @rx.rx: the OS shim rx function to deliver rx data 1129 * frames to. This can have different values for 1130 * different virtual devices, e.g. so one virtual 1131 * device's OS shim directly hands rx frames to the OS, 1132 * but another virtual device's OS shim filters out P2P 1133 * messages before sending the rx frames to the OS. The 1134 * netbufs delivered to the osif_rx function are in the 1135 * format specified by the OS to use for tx and rx 1136 * frames (either 802.3 or native WiFi). In case RX Threads are enabled, pkts 1137 * are given to the thread, instead of the stack via this pointer. 1138 * @rx.rx_eapol: This rx function pointer used to receive only eapol frames 1139 * @rx.stack: function to give packets to the stack. Differs from @rx.rx. 1140 * In case RX Threads are enabled, this pointer holds the callback to give 1141 * packets to the stack. 1142 * @rx.rx_gro_flush: GRO flush indication to stack for a given RX CTX ID 1143 * @rx.wai_check: the tx function pointer for WAPI frames 1144 * @rx.mon: the OS shim rx monitor function to deliver 1145 * monitor data to Though in practice, it is probable 1146 * that the same function will be used for delivering 1147 * rx monitor data for all virtual devices, in theory 1148 * each different virtual device can have a different 1149 * OS shim function for accepting rx monitor data. The 1150 * netbufs delivered to the osif_rx_mon function are in 1151 * 802.11 format. Each netbuf holds a 802.11 MPDU, not 1152 * an 802.11 MSDU. Depending on compile-time 1153 * configuration, each netbuf may also have a 1154 * monitor-mode encapsulation header such as a radiotap 1155 * header added before the MPDU contents. 1156 * @rx.std: the OS shim rx function to deliver rx data 1157 * @proxy_arp: proxy arp function pointer - specified by 1158 * OS shim, stored by txrx 1159 * @me_convert: 1160 * @get_key: function pointer to get key of the peer with 1161 * specific key index 1162 * @get_tsf_time: function pointer to get TSF 1163 */ 1164 struct ol_txrx_ops { 1165 struct { 1166 ol_txrx_tx_fp tx; 1167 ol_txrx_tx_fast_fp tx_fast; 1168 ol_txrx_tx_exc_fp tx_exception; 1169 ol_txrx_tx_free_ext_fp tx_free_ext; 1170 ol_txrx_completion_fp tx_comp; 1171 ol_txrx_classify_critical_pkt_fp tx_classify_critical_pkt_cb; 1172 } tx; 1173 1174 struct { 1175 ol_txrx_rx_fp rx; 1176 #ifdef QCA_SUPPORT_EAPOL_OVER_CONTROL_PORT 1177 ol_txrx_rx_fp rx_eapol; 1178 #endif 1179 ol_txrx_rx_fp rx_stack; 1180 ol_txrx_rx_flush_fp rx_flush; 1181 ol_txrx_rx_gro_flush_ind_fp rx_gro_flush; 1182 ol_txrx_rx_check_wai_fp wai_check; 1183 ol_txrx_rx_mon_fp mon; 1184 ol_txrx_stats_rx_fp stats_rx; 1185 ol_txrx_rsim_rx_decap_fp rsim_rx_decap; 1186 ol_txrx_fisa_rx_fp osif_fisa_rx; 1187 ol_txrx_fisa_flush_fp osif_fisa_flush; 1188 } rx; 1189 /* proxy arp function pointer - specified by OS shim, stored by txrx */ 1190 ol_txrx_proxy_arp_fp proxy_arp; 1191 ol_txrx_mcast_me_fp me_convert; 1192 1193 ol_txrx_get_key_fp get_key; 1194 ol_txrx_get_tsf_time get_tsf_time; 1195 }; 1196 1197 /** 1198 * struct ol_txrx_hardtart_ctxt - handlers for dp tx path 1199 * @tx: normal tx function 1200 * @tx_fast: fast tx function 1201 * @tx_exception: exception tx function 1202 */ 1203 struct ol_txrx_hardtart_ctxt { 1204 ol_txrx_tx_fp tx; 1205 ol_txrx_tx_fast_fp tx_fast; 1206 ol_txrx_tx_exc_fp tx_exception; 1207 }; 1208 1209 /** 1210 * struct ol_txrx_stats_req - specifications of the requested 1211 * statistics 1212 * @stats_type_upload_mask: which stats to upload 1213 * @stats_type_reset_mask: which stats to reset 1214 * @print: control to print uploaded stats. stats will be printed if 1215 * either print element is set 1216 * @print.verbose: verbose stats printout 1217 * @print.concise: concise stats printout (takes precedence) 1218 * @callback: callback context 1219 * @callback.fp: function pointer to call. stats notify callback will 1220 * be invoked if fp is non-NULL 1221 * @callback.ctxt: opaque context to pass to callback function 1222 * @copy: copy context 1223 * @copy.buf: stats will be copied into the specified buffer if buf is 1224 * non-NULL 1225 * @byte_limit: don't copy more than this 1226 * @wait: wait context 1227 * @wait.blocking: If true, the caller will take the specified 1228 * semaphore to wait for the stats to be uploaded, and 1229 * the driver will release the semaphore when the 1230 * stats are done being uploaded. 1231 * @wait.sem_ptr: Semaphore to use for blocking 1232 */ 1233 struct ol_txrx_stats_req { 1234 uint32_t stats_type_upload_mask; 1235 uint32_t stats_type_reset_mask; 1236 1237 struct { 1238 int verbose; 1239 int concise; 1240 } print; 1241 1242 struct { 1243 ol_txrx_stats_callback fp; 1244 void *ctxt; 1245 } callback; 1246 1247 struct { 1248 uint8_t *buf; 1249 int byte_limit; 1250 } copy; 1251 1252 struct { 1253 int blocking; 1254 qdf_semaphore_t *sem_ptr; 1255 } wait; 1256 }; 1257 1258 1259 /* DP soc struct definition */ 1260 struct cdp_soc_t { 1261 struct cdp_ops *ops; 1262 struct ol_if_ops *ol_ops; 1263 }; 1264 1265 /** 1266 * enum cdp_peer_param_type - different types of parameters 1267 * to set values in peer 1268 * @CDP_CONFIG_NAWDS: Enable nawds mode 1269 * @CDP_CONFIG_NAC: Enable nac 1270 * @CDP_CONFIG_ISOLATION: Enable isolation 1271 * @CDP_CONFIG_IN_TWT: In TWT session or not 1272 */ 1273 enum cdp_peer_param_type { 1274 CDP_CONFIG_NAWDS, 1275 CDP_CONFIG_NAC, 1276 CDP_CONFIG_ISOLATION, 1277 CDP_CONFIG_IN_TWT, 1278 }; 1279 1280 /** 1281 * enum cdp_pdev_param_type - different types of parameters 1282 * to set values in pdev 1283 * @CDP_CONFIG_DEBUG_SNIFFER: Enable debug sniffer feature 1284 * @CDP_CONFIG_BPR_ENABLE: Enable bcast probe feature 1285 * @CDP_CONFIG_PRIMARY_RADIO: Configure radio as primary 1286 * @CDP_CONFIG_ENABLE_PERPKT_TXSTATS: Enable per packet statistics 1287 * @CDP_CONFIG_IGMPMLD_OVERRIDE: Override IGMP/MLD 1288 * @CDP_CONFIG_IGMPMLD_TID: Configurable TID value when igmmld_override is set 1289 * @CDP_CONFIG_ARP_DBG_CONF: Enable ARP debug 1290 * @CDP_CONFIG_CAPTURE_LATENCY: Capture time latency 1291 * @CDP_INGRESS_STATS: Accumulate ingress statistics 1292 * @CDP_OSIF_DROP: Accumulate drops in OSIF layer 1293 * @CDP_CONFIG_ENH_RX_CAPTURE: Enable enhanced RX capture 1294 * @CDP_CONFIG_ENH_TX_CAPTURE: Enable enhanced TX capture 1295 * @CDP_CONFIG_HMMC_TID_OVERRIDE: Enable hmmc tid override 1296 * @CDP_CONFIG_HMMC_TID_VALUE: set hmmc tid value 1297 * @CDP_CONFIG_TX_CAPTURE: set tx capture 1298 * @CDP_CHAN_NOISE_FLOOR: set channel noise floor 1299 * @CDP_CONFIG_VOW: set/get vow config 1300 * @CDP_TIDQ_OVERRIDE: set/get tid queue override 1301 * @CDP_TIDMAP_PRTY: set/get tid map prty 1302 * @CDP_TX_PENDING: get tx pending 1303 * @CDP_FILTER_NEIGH_PEERS: filter neighbour peers 1304 * @CDP_FILTER_UCAST_DATA: filter unicast data 1305 * @CDP_FILTER_MCAST_DATA: filter multicast data 1306 * @CDP_FILTER_NO_DATA: filter no data 1307 * @CDP_MONITOR_CHANNEL: monitor channel 1308 * @CDP_MONITOR_FREQUENCY: monitor frequency 1309 * @CDP_CONFIG_BSS_COLOR: configure bss color 1310 * @CDP_SET_ATF_STATS_ENABLE: set ATF stats flag 1311 * @CDP_CONFIG_SPECIAL_VAP: Configure Special vap 1312 * @CDP_RESET_SCAN_SPCL_VAP_STATS_ENABLE: Enable scan spcl vap stats reset 1313 * @CDP_CONFIG_ENHANCED_STATS_ENABLE: 1314 * @CDP_ISOLATION: set isolation flag 1315 * @CDP_CONFIG_UNDECODED_METADATA_CAPTURE_ENABLE: Undecoded metadata capture 1316 */ 1317 enum cdp_pdev_param_type { 1318 CDP_CONFIG_DEBUG_SNIFFER, 1319 CDP_CONFIG_BPR_ENABLE, 1320 CDP_CONFIG_PRIMARY_RADIO, 1321 CDP_CONFIG_ENABLE_PERPKT_TXSTATS, 1322 CDP_CONFIG_IGMPMLD_OVERRIDE, 1323 CDP_CONFIG_IGMPMLD_TID, 1324 CDP_CONFIG_ARP_DBG_CONF, 1325 CDP_CONFIG_CAPTURE_LATENCY, 1326 CDP_INGRESS_STATS, 1327 CDP_OSIF_DROP, 1328 CDP_CONFIG_ENH_RX_CAPTURE, 1329 CDP_CONFIG_ENH_TX_CAPTURE, 1330 CDP_CONFIG_HMMC_TID_OVERRIDE, 1331 CDP_CONFIG_HMMC_TID_VALUE, 1332 CDP_CONFIG_TX_CAPTURE, 1333 CDP_CHAN_NOISE_FLOOR, 1334 CDP_CONFIG_VOW, 1335 CDP_TIDQ_OVERRIDE, 1336 CDP_TIDMAP_PRTY, 1337 CDP_TX_PENDING, 1338 CDP_FILTER_NEIGH_PEERS, 1339 CDP_FILTER_UCAST_DATA, 1340 CDP_FILTER_MCAST_DATA, 1341 CDP_FILTER_NO_DATA, 1342 CDP_MONITOR_CHANNEL, 1343 CDP_MONITOR_FREQUENCY, 1344 CDP_CONFIG_BSS_COLOR, 1345 CDP_SET_ATF_STATS_ENABLE, 1346 CDP_CONFIG_SPECIAL_VAP, 1347 CDP_RESET_SCAN_SPCL_VAP_STATS_ENABLE, 1348 CDP_CONFIG_ENHANCED_STATS_ENABLE, 1349 CDP_ISOLATION, 1350 CDP_CONFIG_UNDECODED_METADATA_CAPTURE_ENABLE, 1351 }; 1352 1353 /** 1354 * typedef cdp_config_param_type - union of different types of parameters 1355 * to set values into dp handles. 1356 * 1357 * @cdp_peer_param_nawds: Enable nawds mode 1358 * @cdp_peer_param_isolation: Enable isolation 1359 * @cdp_peer_param_in_twt: in TWT session or not 1360 * @cdp_peer_param_nac: Enable nac 1361 * 1362 * @cdp_vdev_param_nawds: set nawds enable/disable 1363 * @cdp_vdev_param_mcast_en: enable/disable multicast enhancement 1364 * @cdp_vdev_param_wds: wds sta 1365 * @cdp_vdev_param_mec: MEC enable flags 1366 * @cdp_vdev_param_proxysta: proxy sta 1367 * @cdp_vdev_param_tdls_flags: tdls link flags 1368 * @cdp_vdev_param_ap_brdg_en: set ap_bridging enable/disable 1369 * @cdp_vdev_param_cipher_en: set cipher type based on security 1370 * @cdp_vdev_param_qwrap_isolation: qwrap isolation mode 1371 * @cdp_vdev_param_tx_encap: tx encap type 1372 * @cdp_vdev_param_rx_decap: rx decap type 1373 * @cdp_vdev_param_mesh_rx_filter: set mesh rx filter 1374 * @cdp_vdev_param_tidmap_prty: set tid vdev prty 1375 * @cdp_vdev_param_tidmap_tbl_id: set tidmap table id 1376 * @cdp_vdev_param_mesh_mode: set mesh mode 1377 * @cdp_vdev_param_safe_mode: set safe mode 1378 * @cdp_vdev_param_drop_unenc: set drop unencrypted flag 1379 * @cdp_vdev_param_hlos_tid_override: set hlos tid override 1380 * @cdp_vdev_param_peer_authorize: set peer authorize 1381 * @cdp_vdev_param_peer_tid_latency_enable: set peer tid latency enable flag 1382 * @cdp_vdev_param_mesh_tid: config tatency tid on vdev 1383 * @cdp_vdev_param_dscp_tid_map_id: set dscp to tid map id 1384 * @cdp_vdev_param_mcast_vdev: set mcast vdev params 1385 * @cdp_vdev_param_wrap: qwrap ap vap 1386 * 1387 * @cdp_pdev_param_dbg_snf: Enable debug sniffer feature 1388 * @cdp_pdev_param_bpr_enable: Enable bcast probe feature 1389 * @cdp_pdev_param_primary_radio: Configure radio as primary 1390 * @cdp_pdev_param_en_perpkt_txstats: Enable per packet statistics 1391 * @cdp_pdev_param_igmpmld_override: Override IGMP/MLD 1392 * @cdp_pdev_param_igmpmld_tid: TID value when igmmld_override is set 1393 * @cdp_pdev_param_arp_dbg_conf: Enable ARP debug 1394 * @cdp_pdev_param_cptr_latcy: Capture time latency 1395 * @cdp_pdev_param_ingrs_stats: Accumulate ingress statistics 1396 * @cdp_pdev_param_osif_drop: Accumulate drops in OSIF layer 1397 * @cdp_pdev_param_en_rx_cap: Enable enhanced RX capture 1398 * @cdp_pdev_param_en_tx_cap: Enable enhanced TX capture 1399 * @cdp_pdev_param_hmmc_tid_ovrd: Enable hmmc tid override 1400 * @cdp_pdev_param_hmmc_tid: set hmmc tid value 1401 * @cdp_pdev_param_tx_capture: set tx capture 1402 * @cdp_pdev_param_chn_noise_flr: set channel noise floor 1403 * @cdp_pdev_param_cfg_vow: set/get vow config 1404 * @cdp_pdev_param_tidq_override: set/get tid queue override 1405 * @cdp_pdev_param_mon_freq: set monitor frequency 1406 * @cdp_pdev_param_bss_color: configure bss color 1407 * @cdp_pdev_param_tidmap_prty: set/get tid map prty 1408 * @cdp_pdev_param_tx_pending: get tx pending 1409 * @cdp_pdev_param_fltr_neigh_peers: filter neighbour peers 1410 * @cdp_pdev_param_fltr_ucast: filter unicast data 1411 * @cdp_pdev_param_fltr_mcast: filter multicast data 1412 * @cdp_pdev_param_fltr_none: filter no data 1413 * @cdp_pdev_param_monitor_chan: monitor channel 1414 * @cdp_pdev_param_atf_stats_enable: ATF stats enable 1415 * @cdp_pdev_param_config_special_vap: Configure Special vap 1416 * @cdp_pdev_param_isolation : set isolation mode 1417 * 1418 * @cdp_psoc_param_en_rate_stats: set rate stats enable/disable 1419 * @cdp_psoc_param_en_nss_cfg: set nss cfg 1420 * @cdp_psoc_param_ppeds_enabled: PPE-DS feature enable 1421 * @cdp_ipa_enabled : set ipa mode 1422 * @cdp_psoc_param_vdev_stats_hw_offload: Configure HW vdev stats offload 1423 * @cdp_pdev_param_undecoded_metadata_enable: Undecoded metadata capture enable 1424 * @cdp_sawf_enabled: SAWF enable/disable 1425 * @cdp_sawf_stats: SAWF stats config 1426 * @cdp_vdev_param_traffic_end_ind: Traffic end indication enable/disable 1427 * @cdp_skel_enable : Enable/Disable skeleton code for Umac reset debug 1428 * @cdp_drop_tx_mcast: Enable/Disable tx mcast drop 1429 * @cdp_vdev_tx_to_fw: Set to_fw bit for all tx packets for the vdev 1430 */ 1431 typedef union cdp_config_param_t { 1432 /* peer params */ 1433 bool cdp_peer_param_nawds; 1434 bool cdp_peer_param_isolation; 1435 uint8_t cdp_peer_param_nac; 1436 bool cdp_peer_param_in_twt; 1437 1438 /* vdev params */ 1439 bool cdp_vdev_param_wds; 1440 bool cdp_vdev_param_mec; 1441 bool cdp_vdev_param_nawds; 1442 bool cdp_vdev_param_proxysta; 1443 bool cdp_vdev_param_tdls_flags; 1444 bool cdp_vdev_param_ap_brdg_en; 1445 bool cdp_vdev_param_qwrap_isolation; 1446 bool cdp_vdev_param_update_multipass; 1447 uint8_t cdp_vdev_param_da_war; 1448 uint8_t cdp_vdev_param_mcast_en; 1449 uint8_t cdp_vdev_param_igmp_mcast_en; 1450 uint8_t cdp_vdev_param_tidmap_prty; 1451 uint8_t cdp_vdev_param_tidmap_tbl_id; 1452 uint32_t cdp_vdev_param_aging_tmr; 1453 uint32_t cdp_vdev_param_cipher_en; 1454 uint32_t cdp_vdev_param_tx_encap; 1455 uint32_t cdp_vdev_param_rx_decap; 1456 uint32_t cdp_vdev_param_mesh_rx_filter; 1457 uint32_t cdp_vdev_param_mesh_mode; 1458 uint32_t cdp_vdev_param_safe_mode; 1459 uint32_t cdp_vdev_param_drop_unenc; 1460 uint8_t cdp_vdev_param_hlos_tid_override; 1461 bool cdp_vdev_param_wds_ext; 1462 uint8_t cdp_vdev_param_peer_authorize; 1463 uint8_t cdp_vdev_param_peer_tid_latency_enable; 1464 uint8_t cdp_vdev_param_mesh_tid; 1465 uint8_t cdp_vdev_param_dscp_tid_map_id; 1466 bool cdp_vdev_param_mcast_vdev; 1467 bool cdp_vdev_param_wrap; 1468 1469 /* pdev params */ 1470 bool cdp_pdev_param_cptr_latcy; 1471 bool cdp_pdev_param_hmmc_tid_ovrd; 1472 bool cdp_pdev_param_fltr_neigh_peers; 1473 bool cdp_pdev_param_cfg_vow; 1474 bool cdp_pdev_param_fltr_mcast; 1475 bool cdp_pdev_param_fltr_none; 1476 bool cdp_pdev_param_fltr_ucast; 1477 uint8_t cdp_pdev_param_primary_radio; 1478 uint8_t cdp_pdev_param_en_rx_cap; 1479 uint8_t cdp_pdev_param_en_tx_cap; 1480 uint8_t cdp_pdev_param_tx_capture; 1481 uint8_t cdp_pdev_param_hmmc_tid; 1482 uint8_t cdp_pdev_param_tidmap_prty; 1483 uint8_t cdp_pdev_param_igmpmld_override; 1484 uint8_t cdp_pdev_param_igmpmld_tid; 1485 uint8_t cdp_pdev_param_arp_dbg_conf; 1486 uint8_t cdp_pdev_param_tidq_override; 1487 uint8_t cdp_pdev_param_bss_color; 1488 uint16_t cdp_pdev_param_chn_noise_flr; 1489 qdf_freq_t cdp_pdev_param_mon_freq; 1490 int cdp_pdev_param_dbg_snf; 1491 int cdp_pdev_param_bpr_enable; 1492 int cdp_pdev_param_monitor_chan; 1493 uint32_t cdp_pdev_param_ingrs_stats; 1494 uint32_t cdp_pdev_param_osif_drop; 1495 uint32_t cdp_pdev_param_en_perpkt_txstats; 1496 uint32_t cdp_pdev_param_tx_pending; 1497 bool cdp_pdev_param_atf_stats_enable; 1498 bool cdp_pdev_param_config_special_vap; 1499 bool cdp_pdev_param_reset_scan_spcl_vap_stats_enable; 1500 bool cdp_pdev_param_enhanced_stats_enable; 1501 bool cdp_pdev_param_isolation; 1502 1503 /* psoc params */ 1504 bool cdp_psoc_param_en_rate_stats; 1505 int cdp_psoc_param_en_nss_cfg; 1506 int cdp_psoc_param_preferred_hw_mode; 1507 bool cdp_psoc_param_pext_stats; 1508 bool cdp_psoc_param_ppeds_enabled; 1509 1510 bool cdp_skip_bar_update; 1511 bool cdp_ipa_enabled; 1512 bool cdp_psoc_param_vdev_stats_hw_offload; 1513 bool cdp_pdev_param_undecoded_metadata_enable; 1514 bool cdp_sawf_enabled; 1515 uint8_t cdp_sawf_stats; 1516 bool cdp_drop_3addr_mcast; 1517 bool cdp_vdev_param_traffic_end_ind; 1518 bool cdp_umac_rst_skel; 1519 bool cdp_drop_tx_mcast; 1520 bool cdp_vdev_tx_to_fw; 1521 } cdp_config_param_type; 1522 1523 /** 1524 * enum cdp_rx_enh_capture_mode - Rx enhanced capture modes 1525 * @CDP_RX_ENH_CAPTURE_DISABLED: Disable Rx enhance capture 1526 * @CDP_RX_ENH_CAPTURE_MPDU: Enable capture of 128 bytes of each MPDU 1527 * @CDP_RX_ENH_CAPTURE_MPDU_MSDU: Enable capture of 128 bytes of each MSDU 1528 */ 1529 enum cdp_rx_enh_capture_mode { 1530 CDP_RX_ENH_CAPTURE_DISABLED = 0, 1531 CDP_RX_ENH_CAPTURE_MPDU, 1532 CDP_RX_ENH_CAPTURE_MPDU_MSDU, 1533 }; 1534 1535 /** 1536 * enum cdp_rx_enh_capture_peer - Rx enhanced capture peer filtering 1537 * @CDP_RX_ENH_CAPTURE_PEER_DISABLED: Disable Rx ENH capture peer filtering 1538 * @CDP_RX_ENH_CAPTURE_PEER_ENABLED: Enable Rx ENH capture peer filtering 1539 */ 1540 enum cdp_rx_enh_capture_peer { 1541 CDP_RX_ENH_CAPTURE_PEER_DISABLED = 0, 1542 CDP_RX_ENH_CAPTURE_PEER_ENABLED, 1543 }; 1544 1545 /** 1546 * enum cdp_tx_enh_capture_mode - Tx enhanced capture modes 1547 * @CDP_TX_ENH_CAPTURE_DISABLED: Disable Tx enhance capture for all peers 1548 * @CDP_TX_ENH_CAPTURE_ENABLE_ALL_PEERS: Enable tx capture for all peers 1549 * @CDP_TX_ENH_CAPTURE_ENDIS_PER_PEER: Enable/disable per peer as necessary 1550 * @CDP_TX_ENH_CAPTURE_MAX: Max value 1551 */ 1552 enum cdp_tx_enh_capture_mode { 1553 CDP_TX_ENH_CAPTURE_DISABLED = 0, 1554 CDP_TX_ENH_CAPTURE_ENABLE_ALL_PEERS, 1555 CDP_TX_ENH_CAPTURE_ENDIS_PER_PEER, 1556 CDP_TX_ENH_CAPTURE_MAX, 1557 }; 1558 1559 /** 1560 * enum cdp_pdev_bpr_param - different types of parameters 1561 * to set value in pdev 1562 * @CDP_BPR_DISABLE: Set bpr to disable state 1563 * @CDP_BPR_ENABLE: set bpr to enable state 1564 * 1565 * Enum indicating bpr state to enable/disable. 1566 */ 1567 enum cdp_pdev_bpr_param { 1568 CDP_BPR_DISABLE, 1569 CDP_BPR_ENABLE, 1570 }; 1571 1572 /** 1573 * enum cdp_vdev_param_type - different types of parameters 1574 * to set values in vdev 1575 * @CDP_ENABLE_NAWDS: set nawds enable/disable 1576 * @CDP_ENABLE_MCAST_EN: enable/disable multicast enhancement 1577 * @CDP_ENABLE_WDS: wds sta 1578 * @CDP_ENABLE_MEC: MEC enable flags 1579 * @CDP_ENABLE_DA_WAR: 1580 * @CDP_ENABLE_PROXYSTA: proxy sta 1581 * @CDP_UPDATE_TDLS_FLAGS: tdls link flags 1582 * @CDP_CFG_WDS_AGING_TIMER: modify/stop wds aging timer 1583 * @CDP_ENABLE_AP_BRIDGE: set ap_bridging enable/disable 1584 * @CDP_ENABLE_CIPHER: set cipher type based on security 1585 * @CDP_ENABLE_QWRAP_ISOLATION: qwrap isolation mode 1586 * @CDP_UPDATE_MULTIPASS: enable/disable multipass 1587 * @CDP_TX_ENCAP_TYPE: tx encap type 1588 * @CDP_RX_DECAP_TYPE: rx decap type 1589 * @CDP_MESH_RX_FILTER: set mesh rx filter 1590 * @CDP_TID_VDEV_PRTY: set tid vdev prty 1591 * @CDP_TIDMAP_TBL_ID: set tidmap table id 1592 * @CDP_MESH_MODE: set mesh mode 1593 * @CDP_SAFEMODE: set safe mode 1594 * @CDP_DROP_UNENC: set drop unencrypted flag 1595 * @CDP_ENABLE_IGMP_MCAST_EN: enable/disable igmp multicast enhancement 1596 * @CDP_ENABLE_HLOS_TID_OVERRIDE: set hlos tid override flag 1597 * @CDP_CFG_WDS_EXT: enable/disable wds ext feature 1598 * @CDP_DROP_TX_MCAST: enable/disable tx mcast drop 1599 * @CDP_ENABLE_PEER_AUTHORIZE: enable peer authorize flag 1600 * @CDP_ENABLE_PEER_TID_LATENCY: set peer tid latency enable flag 1601 * @CDP_SET_VAP_MESH_TID: Set latency tid in vap 1602 * @CDP_SKIP_BAR_UPDATE_AP: enable/disable bar 1603 * @CDP_UPDATE_DSCP_TO_TID_MAP: Set DSCP to TID map id 1604 * @CDP_SET_MCAST_VDEV: Set primary mcast vdev 1605 * @CDP_RESET_MLO_MCAST_VDEV: Reset mlo mcast vdev settings 1606 * @CDP_SET_MCAST_VDEV_HW_UPDATE: Not in use 1607 * @CDP_DROP_3ADDR_MCAST: enable/disable drop 3addr multicast flag 1608 * @CDP_ENABLE_WRAP: qwrap ap 1609 * @CDP_ENABLE_TRAFFIC_END_INDICATION: enable/disable traffic end indication 1610 * @CDP_VDEV_TX_TO_FW: Set to_fw bit for tx packets for the vdev 1611 */ 1612 enum cdp_vdev_param_type { 1613 CDP_ENABLE_NAWDS, 1614 CDP_ENABLE_MCAST_EN, 1615 CDP_ENABLE_WDS, 1616 CDP_ENABLE_MEC, 1617 CDP_ENABLE_DA_WAR, 1618 CDP_ENABLE_PROXYSTA, 1619 CDP_UPDATE_TDLS_FLAGS, 1620 CDP_CFG_WDS_AGING_TIMER, 1621 CDP_ENABLE_AP_BRIDGE, 1622 CDP_ENABLE_CIPHER, 1623 CDP_ENABLE_QWRAP_ISOLATION, 1624 CDP_UPDATE_MULTIPASS, 1625 CDP_TX_ENCAP_TYPE, 1626 CDP_RX_DECAP_TYPE, 1627 CDP_MESH_RX_FILTER, 1628 CDP_TID_VDEV_PRTY, 1629 CDP_TIDMAP_TBL_ID, 1630 #ifdef MESH_MODE_SUPPORT 1631 CDP_MESH_MODE, 1632 #endif 1633 CDP_SAFEMODE, 1634 CDP_DROP_UNENC, 1635 CDP_ENABLE_IGMP_MCAST_EN, 1636 CDP_ENABLE_HLOS_TID_OVERRIDE, 1637 #ifdef QCA_SUPPORT_WDS_EXTENDED 1638 CDP_CFG_WDS_EXT, 1639 CDP_DROP_TX_MCAST, 1640 #endif /* QCA_SUPPORT_WDS_EXTENDED */ 1641 CDP_ENABLE_PEER_AUTHORIZE, 1642 #ifdef WLAN_SUPPORT_MESH_LATENCY 1643 CDP_ENABLE_PEER_TID_LATENCY, 1644 CDP_SET_VAP_MESH_TID, 1645 #endif 1646 #ifdef WLAN_VENDOR_SPECIFIC_BAR_UPDATE 1647 CDP_SKIP_BAR_UPDATE_AP, 1648 #endif 1649 CDP_UPDATE_DSCP_TO_TID_MAP, 1650 CDP_SET_MCAST_VDEV, 1651 CDP_RESET_MLO_MCAST_VDEV, 1652 CDP_SET_MCAST_VDEV_HW_UPDATE, 1653 CDP_DROP_3ADDR_MCAST, 1654 CDP_ENABLE_WRAP, 1655 #ifdef DP_TRAFFIC_END_INDICATION 1656 CDP_ENABLE_TRAFFIC_END_INDICATION, 1657 #endif 1658 #ifdef FEATURE_DIRECT_LINK 1659 CDP_VDEV_TX_TO_FW, 1660 #endif 1661 }; 1662 1663 /** 1664 * enum cdp_psoc_param_type - different types of parameters 1665 * to set values in psoc 1666 * @CDP_ENABLE_RATE_STATS: set rate stats enable/disable 1667 * @CDP_SET_NSS_CFG: set nss cfg 1668 * @CDP_SET_PREFERRED_HW_MODE: set preferred hw mode 1669 * @CDP_CFG_PEER_EXT_STATS: Peer extended stats mode. 1670 * @CDP_IPA_ENABLE : set IPA enable mode. 1671 * @CDP_CFG_VDEV_STATS_HW_OFFLOAD: HW Vdev stats config 1672 * @CDP_SAWF_ENABLE: 1673 * @CDP_UMAC_RST_SKEL_ENABLE: Enable Umac reset skeleton code for debug 1674 * @CDP_PPEDS_ENABLE: PPEDS is enabled or not 1675 * @CDP_SAWF_STATS: set SAWF stats config 1676 */ 1677 enum cdp_psoc_param_type { 1678 CDP_ENABLE_RATE_STATS, 1679 CDP_SET_NSS_CFG, 1680 CDP_SET_PREFERRED_HW_MODE, 1681 CDP_CFG_PEER_EXT_STATS, 1682 CDP_IPA_ENABLE, 1683 CDP_CFG_VDEV_STATS_HW_OFFLOAD, 1684 CDP_SAWF_ENABLE, 1685 CDP_UMAC_RST_SKEL_ENABLE, 1686 CDP_PPEDS_ENABLE, 1687 CDP_SAWF_STATS, 1688 }; 1689 1690 #define TXRX_FW_STATS_TXSTATS 1 1691 #define TXRX_FW_STATS_RXSTATS 2 1692 #define TXRX_FW_STATS_RX_RATE_INFO 3 1693 #define TXRX_FW_STATS_PHYSTATS 4 1694 #define TXRX_FW_STATS_PHYSTATS_CONCISE 5 1695 #define TXRX_FW_STATS_TX_RATE_INFO 6 1696 #define TXRX_FW_STATS_TID_STATE 7 1697 #define TXRX_FW_STATS_HOST_STATS 8 1698 #define TXRX_FW_STATS_CLEAR_HOST_STATS 9 1699 #define TXRX_FW_STATS_CE_STATS 10 1700 #define TXRX_FW_STATS_VOW_UMAC_COUNTER 11 1701 #define TXRX_FW_STATS_ME_STATS 12 1702 #define TXRX_FW_STATS_TXBF_INFO 13 1703 #define TXRX_FW_STATS_SND_INFO 14 1704 #define TXRX_FW_STATS_ERROR_INFO 15 1705 #define TXRX_FW_STATS_TX_SELFGEN_INFO 16 1706 #define TXRX_FW_STATS_TX_MU_INFO 17 1707 #define TXRX_FW_SIFS_RESP_INFO 18 1708 #define TXRX_FW_RESET_STATS 19 1709 #define TXRX_FW_MAC_WDOG_STATS 20 1710 #define TXRX_FW_MAC_DESC_STATS 21 1711 #define TXRX_FW_MAC_FETCH_MGR_STATS 22 1712 #define TXRX_FW_MAC_PREFETCH_MGR_STATS 23 1713 #define TXRX_FW_STATS_DURATION_INFO 24 1714 #define TXRX_FW_STATS_DURATION_INFO_RESET 25 1715 #define TXRX_FW_HALPHY_STATS 26 1716 #define TXRX_FW_COEX_STATS 27 1717 1718 #define PER_RADIO_FW_STATS_REQUEST 0 1719 #define PER_VDEV_FW_STATS_REQUEST 1 1720 /** 1721 * enum data_stall_log_event_indicator - Module triggering data stall 1722 * @DATA_STALL_LOG_INDICATOR_UNUSED: Unused 1723 * @DATA_STALL_LOG_INDICATOR_HOST_DRIVER: Host driver indicates data stall 1724 * @DATA_STALL_LOG_INDICATOR_FIRMWARE: FW indicates data stall 1725 * @DATA_STALL_LOG_INDICATOR_FRAMEWORK: Framework indicates data stall 1726 * 1727 * Enum indicating the module that indicates data stall event 1728 */ 1729 enum data_stall_log_event_indicator { 1730 DATA_STALL_LOG_INDICATOR_UNUSED, 1731 DATA_STALL_LOG_INDICATOR_HOST_DRIVER, 1732 DATA_STALL_LOG_INDICATOR_FIRMWARE, 1733 DATA_STALL_LOG_INDICATOR_FRAMEWORK, 1734 }; 1735 1736 /** 1737 * enum data_stall_log_event_type - data stall event type 1738 * @DATA_STALL_LOG_NONE: 1739 * @DATA_STALL_LOG_FW_VDEV_PAUSE: 1740 * @DATA_STALL_LOG_HWSCHED_CMD_FILTER: 1741 * @DATA_STALL_LOG_HWSCHED_CMD_FLUSH: 1742 * @DATA_STALL_LOG_FW_RX_REFILL_FAILED: 1743 * @DATA_STALL_LOG_FW_RX_FCS_LEN_ERROR: 1744 * @DATA_STALL_LOG_FW_WDOG_ERRORS: 1745 * @DATA_STALL_LOG_BB_WDOG_ERROR: 1746 * @DATA_STALL_LOG_POST_TIM_NO_TXRX_ERROR: 1747 * @DATA_STALL_LOG_HOST_STA_TX_TIMEOUT: 1748 * @DATA_STALL_LOG_HOST_SOFTAP_TX_TIMEOUT: 1749 * @DATA_STALL_LOG_NUD_FAILURE: 1750 * 1751 * Enum indicating data stall event type 1752 */ 1753 enum data_stall_log_event_type { 1754 DATA_STALL_LOG_NONE, 1755 DATA_STALL_LOG_FW_VDEV_PAUSE, 1756 DATA_STALL_LOG_HWSCHED_CMD_FILTER, 1757 DATA_STALL_LOG_HWSCHED_CMD_FLUSH, 1758 DATA_STALL_LOG_FW_RX_REFILL_FAILED, 1759 DATA_STALL_LOG_FW_RX_FCS_LEN_ERROR, 1760 DATA_STALL_LOG_FW_WDOG_ERRORS, 1761 DATA_STALL_LOG_BB_WDOG_ERROR, 1762 DATA_STALL_LOG_POST_TIM_NO_TXRX_ERROR, 1763 /* Stall events triggered by host/framework start from 0x100 onwards. */ 1764 DATA_STALL_LOG_HOST_STA_TX_TIMEOUT = 0x100, 1765 DATA_STALL_LOG_HOST_SOFTAP_TX_TIMEOUT, 1766 DATA_STALL_LOG_NUD_FAILURE, 1767 }; 1768 1769 /** 1770 * enum data_stall_log_recovery_type - data stall recovery type 1771 * @DATA_STALL_LOG_RECOVERY_NONE: 1772 * @DATA_STALL_LOG_RECOVERY_CONNECT_DISCONNECT: 1773 * @DATA_STALL_LOG_RECOVERY_TRIGGER_PDR: 1774 * 1775 * Enum indicating data stall recovery type 1776 */ 1777 enum data_stall_log_recovery_type { 1778 DATA_STALL_LOG_RECOVERY_NONE = 0, 1779 DATA_STALL_LOG_RECOVERY_CONNECT_DISCONNECT, 1780 DATA_STALL_LOG_RECOVERY_TRIGGER_PDR, 1781 }; 1782 1783 /** 1784 * struct data_stall_event_info - data stall info 1785 * @indicator: Module triggering data stall 1786 * @data_stall_type: data stall event type 1787 * @vdev_id_bitmap: vdev_id_bitmap 1788 * @pdev_id: pdev id 1789 * @recovery_type: data stall recovery type 1790 */ 1791 struct data_stall_event_info { 1792 uint32_t indicator; 1793 uint32_t data_stall_type; 1794 uint32_t vdev_id_bitmap; 1795 uint32_t pdev_id; 1796 uint32_t recovery_type; 1797 }; 1798 1799 typedef void (*data_stall_detect_cb)(struct data_stall_event_info *); 1800 1801 /** 1802 * enum cdp_stats - options for host and firmware statistics 1803 * @CDP_TXRX_STATS_0: 1804 * @CDP_TXRX_STATS_1: HTT Pdev tx stats 1805 * @CDP_TXRX_STATS_2: HTT Pdev rx stats 1806 * @CDP_TXRX_STATS_3: HTT Pdev Tx HW Queue stats 1807 * @CDP_TXRX_STATS_4: HTT Pdev Tx HW Sched stats 1808 * @CDP_TXRX_STATS_5: HTT Pdev error stats 1809 * @CDP_TXRX_STATS_6: HTT TQM stats 1810 * @CDP_TXRX_STATS_7: HTT TQM CMDQ stats 1811 * @CDP_TXRX_STATS_8: HTT Tx_de_cmn thread stats 1812 * @CDP_TXRX_STATS_9: HTT Pdev Tx rate stats 1813 * @CDP_TXRX_STATS_10: HTT Pdev Rx rate stats 1814 * @CDP_TXRX_STATS_11: HTT Peer stats 1815 * @CDP_TXRX_STATS_12: HTT Tx Self Gen Info 1816 * @CDP_TXRX_STATS_13: HTT Tx MU HWQ stats 1817 * @CDP_TXRX_STATS_14: HTT Ring interface info stats 1818 * @CDP_TXRX_STATS_15: HTT SRNG info stats 1819 * @CDP_TXRX_STATS_16: HTT SFM info stats 1820 * @CDP_TXRX_STATS_17: HTT Pdev tx mu mimo sched info 1821 * @CDP_TXRX_STATS_18: HTT Peer list details 1822 * @CDP_TXRX_STATS_19: Reserved 1823 * @CDP_TXRX_STATS_20: Reset Host stats 1824 * @CDP_TXRX_STATS_21: Host Rx rate stats 1825 * @CDP_TXRX_STATS_22: Host Tx rate stats 1826 * @CDP_TXRX_STATS_23: Host Tx stats 1827 * @CDP_TXRX_STATS_24: Host Rx stats 1828 * @CDP_TXRX_STATS_25: Host Ast stats 1829 * @CDP_TXRX_STATS_26: Host Head/Tail Pointer stats 1830 * @CDP_TXRX_STATS_27: Host Monitor mode stats 1831 * @CDP_TXRX_STATS_28: Host Peer entry stats 1832 * @CDP_TXRX_STATS_29: Host Soc config params info 1833 * @CDP_TXRX_STATS_30: Host Pdev config params info 1834 * @CDP_TXRX_STATS_31: Host DP Interrupt Stats 1835 * @CDP_TXRX_STATS_HTT_MAX: 1836 * @CDP_TXRX_MAX_STATS: 1837 */ 1838 enum cdp_stats { 1839 CDP_TXRX_STATS_0 = 0, 1840 CDP_TXRX_STATS_1, 1841 CDP_TXRX_STATS_2, 1842 CDP_TXRX_STATS_3, 1843 CDP_TXRX_STATS_4, 1844 CDP_TXRX_STATS_5, 1845 CDP_TXRX_STATS_6, 1846 CDP_TXRX_STATS_7, 1847 CDP_TXRX_STATS_8, 1848 CDP_TXRX_STATS_9, 1849 CDP_TXRX_STATS_10, 1850 CDP_TXRX_STATS_11, 1851 CDP_TXRX_STATS_12, 1852 CDP_TXRX_STATS_13, 1853 CDP_TXRX_STATS_14, 1854 CDP_TXRX_STATS_15, 1855 CDP_TXRX_STATS_16, 1856 CDP_TXRX_STATS_17, 1857 CDP_TXRX_STATS_18, 1858 CDP_TXRX_STATS_19, 1859 CDP_TXRX_STATS_20, 1860 CDP_TXRX_STATS_21, 1861 CDP_TXRX_STATS_22, 1862 CDP_TXRX_STATS_23, 1863 CDP_TXRX_STATS_24, 1864 CDP_TXRX_STATS_25, 1865 CDP_TXRX_STATS_26, 1866 CDP_TXRX_STATS_27, 1867 CDP_TXRX_STATS_28, 1868 CDP_TXRX_STATS_29, 1869 CDP_TXRX_STATS_30, 1870 CDP_TXRX_STATS_31, 1871 CDP_TXRX_STATS_HTT_MAX = 256, 1872 CDP_TXRX_MAX_STATS = 265, 1873 }; 1874 1875 /** 1876 * enum cdp_stat_update_type - Different Stat update types sent to 1877 * OL_IF 1878 * @UPDATE_PEER_STATS: update peer stats 1879 * @UPDATE_VDEV_STATS: update vdev stats 1880 * @UPDATE_PDEV_STATS: Update pdev stats 1881 */ 1882 enum cdp_stat_update_type { 1883 UPDATE_PEER_STATS = 0, 1884 UPDATE_VDEV_STATS = 1, 1885 UPDATE_PDEV_STATS = 2, 1886 }; 1887 1888 /** 1889 * struct cdp_tx_sojourn_stats - Tx sojourn stats 1890 * @ppdu_seq_id: ppdu_seq_id from tx completion 1891 * @avg_sojourn_msdu: average sojourn msdu time 1892 * @sum_sojourn_msdu: sum sojourn msdu time 1893 * @num_msdus: number of msdus per ppdu 1894 * @cookie: cookie to be used by upper layer 1895 */ 1896 struct cdp_tx_sojourn_stats { 1897 uint32_t ppdu_seq_id; 1898 qdf_ewma_tx_lag avg_sojourn_msdu[CDP_DATA_TID_MAX]; 1899 uint32_t sum_sojourn_msdu[CDP_DATA_TID_MAX]; 1900 uint32_t num_msdus[CDP_DATA_TID_MAX]; 1901 struct cdp_stats_cookie *cookie; 1902 }; 1903 1904 /** 1905 * struct cdp_delayed_tx_completion_ppdu_user - Delayed Tx PPDU completion 1906 * per-user information 1907 * @frame_ctrl: frame control field in 802.11 header 1908 * @qos_ctrl: QoS control field in 802.11 header 1909 * @mpdu_tried_ucast: number of unicast mpdus tried 1910 * @mpdu_tried_mcast: number of multicastmpdus tried 1911 * @ltf_size: ltf_size 1912 * @stbc: stbc 1913 * @he_re: he_re (range extension) 1914 * @txbf: txbf 1915 * @bw: Transmission bandwidth 1916 * <enum 2 transmit_bw_20_MHz> 1917 * <enum 3 transmit_bw_40_MHz> 1918 * <enum 4 transmit_bw_80_MHz> 1919 * <enum 5 transmit_bw_160_MHz> 1920 * @nss: NSS 1,2, ...8 1921 * @mcs: MCS index 1922 * @preamble: preamble 1923 * @gi: guard interval 800/400/1600/3200 ns 1924 * @dcm: dcm 1925 * @ldpc: ldpc 1926 * @delayed_ba: 1927 * @ru_start: RU start index 1928 * @ru_tones: RU tones length 1929 * @is_mcast: MCAST or UCAST 1930 * @user_pos: user position 1931 * @mu_group_id: mu group id 1932 * @ppdu_start_timestamp: 64 bits ppdu start timestamp 1933 * @ppdu_end_timestamp: 64 bits ppdu end timestamp 1934 */ 1935 struct cdp_delayed_tx_completion_ppdu_user { 1936 uint32_t frame_ctrl:16, 1937 qos_ctrl:16; 1938 uint32_t mpdu_tried_ucast:16, 1939 mpdu_tried_mcast:16; 1940 uint32_t ltf_size:2, 1941 stbc:1, 1942 he_re:1, 1943 txbf:4, 1944 bw:4, 1945 nss:4, 1946 mcs:4, 1947 preamble:4, 1948 gi:4, 1949 dcm:1, 1950 ldpc:1, 1951 delayed_ba:1; 1952 uint16_t ru_start; 1953 uint16_t ru_tones; 1954 bool is_mcast; 1955 uint32_t user_pos; 1956 uint32_t mu_group_id; 1957 uint64_t ppdu_start_timestamp; 1958 uint64_t ppdu_end_timestamp; 1959 }; 1960 1961 /** 1962 * struct cdp_tx_completion_ppdu_user - Tx PPDU completion per-user information 1963 * @completion_status: completion status - OK/Filter/Abort/Timeout 1964 * @tid: TID number 1965 * @peer_id: Peer ID 1966 * @mac_addr: 1967 * @ba_size: Block-Ack size 1968 * @frame_ctrl: frame control field in 802.11 header 1969 * @qos_ctrl: QoS control field in 802.11 header 1970 * @mpdu_tried_ucast: number of unicast mpdus tried 1971 * @mpdu_tried_mcast: number of multicast mpdus tried 1972 * @mpdu_success: number of mpdus successfully transmitted 1973 * @mpdu_failed: 1974 * @long_retries: long retries 1975 * @short_retries: short retries 1976 * @tx_ratecode: 1977 * @is_ampdu: mpdu aggregate or non-aggregate? 1978 * @ppdu_type: 1979 * @pream_punct: 1980 * @is_seq_num_valid: 1981 * @success_bytes: bytes successfully transmitted 1982 * @retry_bytes: bytes retried 1983 * @failed_bytes: 1984 * @success_msdus: MSDUs successfully transmitted 1985 * @retry_msdus: MSDUs retried 1986 * @retry_mpdus: MPDUs retried 1987 * @failed_msdus: MSDUs failed transmission 1988 * @duration: user duration in ppdu 1989 * @ltf_size: ltf_size 1990 * @stbc: stbc 1991 * @he_re: he_re (range extension) 1992 * @txbf: txbf 1993 * @bw: Transmission bandwidth 1994 * <enum 2 transmit_bw_20_MHz> 1995 * <enum 3 transmit_bw_40_MHz> 1996 * <enum 4 transmit_bw_80_MHz> 1997 * <enum 5 transmit_bw_160_MHz> 1998 * @nss: NSS 1,2, ...8 1999 * @mcs: MCS index 2000 * @preamble: preamble 2001 * @gi: guard interval 800/400/1600/3200 ns 2002 * @dcm: dcm 2003 * @ldpc: ldpc 2004 * @delayed_ba: delayed ba bit 2005 * @ack_ba_tlv: ack ba recv tlv bit 2006 * @ba_seq_no: Block Ack sequence number 2007 * @ba_bitmap: Block Ack bitmap 2008 * @start_seq: Sequence number of first MPDU 2009 * @enq_bitmap: Enqueue MPDU bitmap 2010 * @failed_bitmap: 2011 * @num_mpdu: 2012 * @num_msdu: 2013 * @tx_duration: 2014 * @ru_start: RU start index 2015 * @ru_tones: RU tones length 2016 * @is_mcast: MCAST or UCAST 2017 * @tx_rate: Transmission Rate 2018 * @tx_ratekbps: 2019 * @ack_rssi: ack rssi for separate chains 2020 * @ack_rssi_valid: 2021 * @usr_ack_rssi: 2022 * @user_pos: user position 2023 * @mu_group_id: mu group id 2024 * @rix: rate index 2025 * @is_ppdu_cookie_valid : Indicates that ppdu_cookie is valid 2026 * @ppdu_cookie: 16-bit ppdu_cookie 2027 * @sa_is_training: smart antenna training packets indication 2028 * @rssi_chain: rssi chain per bandwidth 2029 * @sa_tx_antenna: antenna in which packet is transmitted 2030 * @sa_max_rates: smart antenna tx feedback info max rates 2031 * @sa_goodput: smart antenna tx feedback info goodput 2032 * @current_rate_per: Moving average per 2033 * @last_enq_seq: last equeue sequence number 2034 * @is_bss_peer: is bss peer check 2035 * @mpdu_q: queue of mpdu in a ppdu 2036 * @mpdus: MPDU list based on enqueue sequence bitmap 2037 * @pending_retries: pending MPDUs (retries) 2038 * @tlv_bitmap: per user tlv bitmap 2039 * @skip: tx capture skip flag 2040 * @mon_procd: to indicate user processed in ppdu of the sched cmd 2041 * @debug_copied: flag to indicate bar frame copied 2042 * @peer_last_delayed_ba: flag to indicate peer last delayed ba 2043 * @phy_tx_time_us: Phy TX duration for the User 2044 * @mpdu_bytes: accumulated bytes per mpdu for mem limit feature 2045 * @punc_mode: puncutured mode to indicate punctured bw 2046 * @punc_pattern_bitmap: bitmap indicating punctured pattern 2047 * @mprot_type: medium protection type 2048 * @msduq_bitmap: msduq bitmap 2049 * @rts_success: rts success 2050 * @rts_failure: rts failure 2051 */ 2052 struct cdp_tx_completion_ppdu_user { 2053 uint32_t completion_status:8, 2054 tid:8, 2055 peer_id:16; 2056 uint8_t mac_addr[6]; 2057 uint16_t ba_size; 2058 uint32_t frame_ctrl:16, 2059 qos_ctrl:16; 2060 uint32_t mpdu_tried_ucast:16, 2061 mpdu_tried_mcast:16; 2062 uint16_t mpdu_success:16; 2063 uint16_t mpdu_failed:16; 2064 uint32_t long_retries:4, 2065 short_retries:4, 2066 tx_ratecode:16, 2067 is_ampdu:1, 2068 ppdu_type:5, 2069 pream_punct:1, 2070 is_seq_num_valid:1; 2071 uint32_t success_bytes; 2072 uint32_t retry_bytes; 2073 uint32_t failed_bytes; 2074 uint32_t success_msdus:16, 2075 retry_msdus:16; 2076 uint32_t retry_mpdus; 2077 uint32_t failed_msdus:16, 2078 duration:16; 2079 uint32_t ltf_size:2, 2080 stbc:1, 2081 he_re:1, 2082 txbf:4, 2083 bw:4, 2084 nss:4, 2085 mcs:4, 2086 preamble:4, 2087 gi:4, 2088 dcm:1, 2089 ldpc:1, 2090 delayed_ba:1, 2091 ack_ba_tlv:1; 2092 uint32_t ba_seq_no; 2093 uint32_t ba_bitmap[CDP_BA_256_BIT_MAP_SIZE_DWORDS]; 2094 uint32_t start_seq; 2095 uint32_t enq_bitmap[CDP_BA_256_BIT_MAP_SIZE_DWORDS]; 2096 uint32_t failed_bitmap[CDP_BA_256_BIT_MAP_SIZE_DWORDS]; 2097 uint32_t num_mpdu:9, 2098 num_msdu:16; 2099 uint32_t tx_duration; 2100 uint16_t ru_start; 2101 uint16_t ru_tones; 2102 bool is_mcast; 2103 uint32_t tx_rate; 2104 uint32_t tx_ratekbps; 2105 uint32_t ack_rssi[CDP_RSSI_CHAIN_LEN]; 2106 bool ack_rssi_valid; 2107 uint32_t usr_ack_rssi; 2108 uint32_t user_pos; 2109 uint32_t mu_group_id; 2110 uint32_t rix; 2111 uint8_t is_ppdu_cookie_valid; 2112 uint16_t ppdu_cookie; 2113 uint8_t sa_is_training; 2114 uint32_t rssi_chain[CDP_RSSI_CHAIN_LEN]; 2115 uint32_t sa_tx_antenna; 2116 /*Max rates for BW: 20MHZ, 40MHZ and 80MHZ and 160MHZ 2117 * |---------------------------------------| 2118 * | 16 bits | 16 bits | 16 bits | 16 bits | 2119 * | BW-1 | BW-2 | BW-3 | BW-4 | 2120 * | /\ \ | 2121 * | / \ \ | 2122 * | / \ \ | 2123 * | / \ \ | 2124 * | / \ \ | 2125 * | / \ \ | 2126 * |/ \ \ | 2127 * |[11|8] [5|8] \ | 2128 * | BW1 PADDED \ | 2129 * |---------------------------------------| 2130 */ 2131 uint16_t sa_max_rates[CDP_NUM_SA_BW]; 2132 uint32_t sa_goodput; 2133 /* below field is used to calculate goodput in non-training period 2134 * Note: As host is exposing goodput and hence current_rate_per is 2135 * of no use. It is just for Host computation. 2136 */ 2137 uint32_t current_rate_per; 2138 uint32_t last_enq_seq; 2139 2140 uint8_t is_bss_peer; 2141 2142 qdf_nbuf_queue_t mpdu_q; 2143 qdf_nbuf_t *mpdus; 2144 uint32_t pending_retries; 2145 uint32_t tlv_bitmap; 2146 bool skip; 2147 bool mon_procd; 2148 bool debug_copied; 2149 bool peer_last_delayed_ba; 2150 2151 uint16_t phy_tx_time_us; 2152 uint32_t mpdu_bytes; 2153 uint8_t punc_mode; 2154 uint16_t punc_pattern_bitmap; 2155 uint32_t msduq_bitmap; 2156 uint8_t mprot_type:3, 2157 rts_success:1, 2158 rts_failure:1; 2159 }; 2160 2161 /** 2162 * struct cdp_tx_indication_mpdu_info - Tx MPDU completion information 2163 * @ppdu_id: PPDU id 2164 * @tx_duration: user duration in ppdu 2165 * @frame_type: frame type MGMT/CTRL/DATA/BAR 2166 * @frame_ctrl: frame control field in 802.11 header 2167 * @qos_ctrl: QoS control field in 802.11 header 2168 * @tid: TID number 2169 * @num_msdu: number of msdu in MPDU 2170 * @seq_no: Sequence number of first MPDU 2171 * @ltf_size: ltf_size 2172 * @he_re: he_re (range extension) 2173 * @txbf: txbf 2174 * @bw: Transmission bandwidth 2175 * <enum 2 transmit_bw_20_MHz> 2176 * <enum 3 transmit_bw_40_MHz> 2177 * <enum 4 transmit_bw_80_MHz> 2178 * <enum 5 transmit_bw_160_MHz> 2179 * @nss: NSS 1,2, ...8 2180 * @mcs: MCS index 2181 * @preamble: preamble 2182 * @gi: guard interval 800/400/1600/3200 ns 2183 * @channel: frequency 2184 * @channel_num: channel number 2185 * @ack_rssi: ack rssi 2186 * @ldpc: ldpc 2187 * @tx_rate: Transmission Rate 2188 * @mac_address: peer mac address 2189 * @bss_mac_address: bss mac address 2190 * @ppdu_start_timestamp: TSF at PPDU start 2191 * @ppdu_end_timestamp: TSF at PPDU end 2192 * @ba_start_seq: Block Ack sequence number 2193 * @ba_bitmap: Block Ack bitmap 2194 * @ppdu_cookie: 16-bit ppdu_cookie 2195 * @long_retries: long retries 2196 * @short_retries: short retries 2197 * @completion_status: completion status - OK/Filter/Abort/Timeout 2198 * @resp_type: response type 2199 * @mprot_type: medium protection type 2200 * @rts_success: rts success 2201 * @rts_failure: rts failure 2202 * @usr_idx: user index 2203 */ 2204 struct cdp_tx_indication_mpdu_info { 2205 uint32_t ppdu_id; 2206 uint32_t tx_duration; 2207 uint16_t frame_type; 2208 uint16_t frame_ctrl; 2209 uint16_t qos_ctrl; 2210 uint8_t tid; 2211 uint32_t num_msdu; 2212 uint32_t seq_no; 2213 uint32_t ltf_size:2, 2214 he_re:1, 2215 txbf:4, 2216 bw:4, 2217 nss:4, 2218 mcs:4, 2219 preamble:4, 2220 gi:4; 2221 uint32_t channel; 2222 uint8_t channel_num; 2223 uint32_t ack_rssi; 2224 uint32_t ldpc; 2225 uint32_t tx_rate; 2226 uint8_t mac_address[QDF_MAC_ADDR_SIZE]; 2227 uint8_t bss_mac_address[QDF_MAC_ADDR_SIZE]; 2228 uint64_t ppdu_start_timestamp; 2229 uint64_t ppdu_end_timestamp; 2230 uint32_t ba_start_seq; 2231 uint32_t ba_bitmap[CDP_BA_256_BIT_MAP_SIZE_DWORDS]; 2232 uint16_t ppdu_cookie; 2233 uint16_t long_retries:4, 2234 short_retries:4, 2235 completion_status:8; 2236 uint16_t resp_type:4, 2237 mprot_type:3, 2238 rts_success:1, 2239 rts_failure:1; 2240 uint8_t usr_idx; 2241 }; 2242 2243 /** 2244 * struct cdp_tx_indication_info - Tx capture information 2245 * @radiotap_done: Flag to say radiotap already done or not 2246 * 0 - radiotap not updated 2247 * 1 - radiotap header updated 2248 * @mpdu_info: Tx MPDU completion information 2249 * @mpdu_nbuf: reconstructed mpdu packet 2250 * @ppdu_desc: tx completion ppdu 2251 * @osif_vdev: OS IF vdev handle 2252 */ 2253 struct cdp_tx_indication_info { 2254 bool radiotap_done; 2255 struct cdp_tx_indication_mpdu_info mpdu_info; 2256 qdf_nbuf_t mpdu_nbuf; 2257 struct cdp_tx_completion_ppdu *ppdu_desc; 2258 #ifdef QCA_SUPPORT_LITE_MONITOR 2259 ol_osif_vdev_handle osif_vdev; 2260 #endif 2261 }; 2262 2263 /** 2264 * struct cdp_tx_mgmt_comp_info - Tx mgmt comp info 2265 * @ppdu_id: ppdu_id 2266 * @is_sgen_pkt: payload received from wmi or htt path 2267 * @retries_count: retries count 2268 * @tx_tsf: 64 bit timestamp 2269 */ 2270 struct cdp_tx_mgmt_comp_info { 2271 uint32_t ppdu_id; 2272 bool is_sgen_pkt; 2273 uint16_t retries_count; 2274 uint64_t tx_tsf; 2275 }; 2276 2277 /** 2278 * struct cdp_tx_completion_ppdu - Tx PPDU completion information 2279 * @completion_status: completion status - OK/Filter/Abort/Timeout 2280 * @ppdu_id: PPDU Id 2281 * @ppdu_seq_id: ppdu sequence id for sojourn stats 2282 * @vdev_id: VAP Id 2283 * @bar_num_users: BA response user count, based on completion common TLV 2284 * @num_users: Number of users 2285 * @max_users: Number of users from USR_INFO TLV 2286 * @last_usr_index: 2287 * @drop_reason: drop reason from flush status 2288 * @is_flush: is_flush is set based on flush tlv 2289 * @flow_type: tx flow type from flush status 2290 * @queue_type: queue type from flush status 2291 * @num_mpdu: Number of MPDUs in PPDU 2292 * @num_msdu: Number of MSDUs in PPDU 2293 * @frame_type: frame SU or MU 2294 * @htt_frame_type: frame type from htt 2295 * @frame_ctrl: frame control of 80211 header 2296 * @channel: Channel informartion 2297 * @resp_type: response type 2298 * @mprot_type: medium protection type 2299 * @rts_success: rts success 2300 * @rts_failure: rts failure 2301 * @phy_mode: phy mode 2302 * @ack_rssi: RSSI value of last ack packet (units=dB above noise floor) 2303 * @tx_duration: PPDU airtime 2304 * @ppdu_start_timestamp: TSF at PPDU start 2305 * @ppdu_end_timestamp: TSF at PPDU end 2306 * @ack_timestamp: TSF at the reception of ACK 2307 * @delayed_ba: Delayed ba flag 2308 * @beam_change: beam change bit in ppdu for he-information 2309 * @bss_color: 6 bit value for full bss color 2310 * @doppler: value for doppler (will be 0 most of the times) 2311 * @spatial_reuse: value for spatial reuse used in radiotap HE header 2312 * @usr_nss_sum: Sum of user nss 2313 * @usr_ru_tones_sum: Sum of user ru_tones 2314 * @bar_ppdu_id: BAR ppdu_id 2315 * @bar_tx_duration: BAR tx duration 2316 * @bar_ppdu_start_timestamp: BAR start timestamp 2317 * @bar_ppdu_end_timestamp: BAR end timestamp 2318 * @tlv_bitmap: tlv_bitmap for the PPDU 2319 * @sched_cmdid: schedule command id 2320 * @phy_ppdu_tx_time_us: Phy per PPDU TX duration 2321 * @ppdu_bytes: accumulated bytes per ppdu for mem limit feature 2322 * @htt_seq_type: Seq type 2323 * @txmode_type: tx mode type UL/DL 2324 * @txmode: tx mode 2325 * @num_ul_users: Number of UL expected users 2326 * @ch_access_delay: Channel access delay 2327 * @backoff_ac_valid: Backoff AC valid 2328 * @backoff_ac: Backoff AC 2329 * @num_ul_user_resp_valid: Number of UL users response valid 2330 * @num_ul_user_resp: Number of UL users response 2331 * @user: per-User stats (array of per-user structures) 2332 */ 2333 struct cdp_tx_completion_ppdu { 2334 uint32_t ppdu_id; 2335 uint32_t ppdu_seq_id; 2336 uint16_t vdev_id; 2337 uint16_t bar_num_users; 2338 uint32_t num_users; 2339 uint8_t max_users; 2340 uint8_t last_usr_index; 2341 uint32_t drop_reason; 2342 uint32_t is_flush:1, 2343 flow_type:8, 2344 queue_type:8; 2345 uint32_t num_mpdu:9, 2346 num_msdu:16; 2347 uint16_t frame_type; 2348 uint16_t htt_frame_type; 2349 uint16_t frame_ctrl; 2350 uint16_t channel; 2351 uint16_t resp_type:4, 2352 mprot_type:3, 2353 rts_success:1, 2354 rts_failure:1; 2355 uint16_t phy_mode; 2356 uint32_t ack_rssi; 2357 uint32_t tx_duration; 2358 uint64_t ppdu_start_timestamp; 2359 uint64_t ppdu_end_timestamp; 2360 uint64_t ack_timestamp; 2361 bool delayed_ba; 2362 uint8_t beam_change; 2363 uint8_t bss_color; 2364 uint8_t doppler; 2365 uint8_t spatial_reuse; 2366 uint8_t usr_nss_sum; 2367 uint32_t usr_ru_tones_sum; 2368 uint32_t bar_ppdu_id; 2369 uint32_t bar_tx_duration; 2370 uint64_t bar_ppdu_start_timestamp; 2371 uint64_t bar_ppdu_end_timestamp; 2372 uint32_t tlv_bitmap; 2373 uint16_t sched_cmdid; 2374 uint16_t phy_ppdu_tx_time_us; 2375 uint32_t ppdu_bytes; 2376 uint8_t htt_seq_type; 2377 uint8_t txmode_type; 2378 uint8_t txmode; 2379 uint32_t num_ul_users; 2380 uint32_t ch_access_delay; 2381 uint32_t backoff_ac_valid; 2382 uint32_t backoff_ac; 2383 uint32_t num_ul_user_resp_valid; 2384 uint32_t num_ul_user_resp; 2385 struct cdp_tx_completion_ppdu_user user[]; 2386 }; 2387 2388 /** 2389 * struct cdp_dev_stats - Network device stats structure 2390 * @tx_packets: Tx total packets transmitted 2391 * @tx_errors : Tx error due to FW tx failure, Ring failure DMA etc 2392 * @tx_dropped: Tx dropped is same as tx errors as above 2393 * @rx_packets: Rx total packets transmitted 2394 * @rx_errors : Rx errors 2395 * @rx_dropped: Rx dropped stats 2396 * @tx_bytes : Tx total bytes transmitted 2397 * @rx_bytes : Rx total bytes transmitted 2398 */ 2399 struct cdp_dev_stats { 2400 uint32_t tx_packets; 2401 uint32_t tx_errors; 2402 uint32_t tx_dropped; 2403 uint32_t rx_packets; 2404 uint32_t rx_errors; 2405 uint32_t rx_dropped; 2406 uint64_t tx_bytes; 2407 uint64_t rx_bytes; 2408 }; 2409 2410 /** 2411 * struct cdp_rate_stats - Tx/Rx Rate statistics 2412 * @rate_stats_info_valid: set if the stats are valid 2413 * @bw: Indicates the BW of the upcoming transmission - 2414 * <enum 2 transmit_bw_20_MHz> 2415 * <enum 3 transmit_bw_40_MHz> 2416 * <enum 4 transmit_bw_80_MHz> 2417 * <enum 5 transmit_bw_160_MHz> 2418 * @pkt_type: Transmit Packet Type 2419 * @stbc: When set, STBC transmission rate was used 2420 * @ldpc: When set, use LDPC transmission rates 2421 * @sgi: <enum 0 0_8_us_sgi > Legacy normal GI 2422 * <enum 1 0_4_us_sgi > Legacy short GI 2423 * <enum 2 1_6_us_sgi > HE related GI 2424 * <enum 3 3_2_us_sgi > HE 2425 * @mcs: Transmit MCS Rate 2426 * @ofdma: Set when the transmission was an OFDMA transmission 2427 * @tones_in_ru: The number of tones in the RU used. 2428 * @resvd0: reserved bits 2429 * @tsf: Lower 32 bits of the TSF (timestamp when ppdu transmission finished) 2430 * @peer_id: Peer ID of the flow or MPDU queue 2431 * @tid: TID of the flow or MPDU queue 2432 */ 2433 struct cdp_rate_stats { 2434 uint32_t rate_stats_info_valid:1, 2435 bw:2, 2436 pkt_type:4, 2437 stbc:1, 2438 ldpc:1, 2439 sgi:2, 2440 mcs:4, 2441 ofdma:1, 2442 tones_in_ru:12, 2443 resvd0:4; 2444 uint32_t tsf; 2445 uint16_t peer_id; 2446 uint8_t tid; 2447 }; 2448 2449 /** 2450 * struct cdp_tx_completion_msdu - Tx MSDU completion descriptor 2451 * @ppdu_id: PPDU to which this MSDU belongs 2452 * @transmit_cnt: Number of times this frame has been transmitted 2453 * @ack_frame_rssi: RSSI of the received ACK or BA frame 2454 * @resvd0: reserved bit 2455 * @first_msdu: Indicates this MSDU is the first MSDU in AMSDU 2456 * @last_msdu: Indicates this MSDU is the last MSDU in AMSDU 2457 * @msdu_part_of_amsdu : Indicates this MSDU was part of an A-MSDU in MPDU 2458 * @extd: Extended structure containing rate statistics 2459 * @resvd1: reserved bits 2460 */ 2461 struct cdp_tx_completion_msdu { 2462 uint32_t ppdu_id; 2463 uint8_t transmit_cnt; 2464 uint32_t ack_frame_rssi:8, 2465 resvd0:1, 2466 first_msdu:1, 2467 last_msdu:1, 2468 msdu_part_of_amsdu:1, 2469 resvd1:20; 2470 struct cdp_rate_stats extd; 2471 }; 2472 2473 /** 2474 * struct cdp_rx_stats_ppdu_user -- per user RX stats 2475 * @peer_id: Peer ID 2476 * @vdev_id: VAP ID 2477 * @is_ampdu: mpdu aggregate or non-aggregate? 2478 * @mu_ul_info_valid: MU UL info valid 2479 * @ofdma_ru_start_index: RU index number(0-73) 2480 * @ofdma_ru_width: size of RU in units of 1(26tone)RU 2481 * @nss: NSS 1,2, ...8 2482 * @mcs: MCS index 2483 * @user_index: user ID in multi-user case 2484 * @is_bss_peer: is bss peer check 2485 * @ast_index: ast index in multi-user case 2486 * @tid: TID number 2487 * @num_msdu: Number of MSDUs in PPDU 2488 * @tcp_msdu_count: Number of TCP MSDUs in PPDU 2489 * @udp_msdu_count: Number of UDP MSDUs in PPDU 2490 * @other_msdu_count: Number of MSDUs other than UDP and TCP MSDUs in PPDU 2491 * @frame_control: frame control field 2492 * @frame_control_info_valid: frame_control valid 2493 * @qos_control: qos control field 2494 * @qos_control_info_valid: qos_control valid 2495 * @data_sequence_control_info_valid: data_sequence_control_info valid 2496 * @first_data_seq_ctrl: Sequence control field of first data frame 2497 * @preamble_type: preamble 2498 * @ht_flags: HT flags 2499 * @vht_flags: VHT flags 2500 * @he_flags: HE flags 2501 * @mac_addr: Peer MAC Address 2502 * @mpdu_cnt_fcs_ok: Number of MPDUs in PPDU with fcs ok 2503 * @mpdu_cnt_fcs_err: Number of MPDUs in PPDU with fcs err 2504 * @mpdu_fcs_ok_bitmap: MPDU with fcs ok bitmap 2505 * @mpdu_ok_byte_count: 2506 * @mpdu_err_byte_count: 2507 * @retries: number of retries 2508 * @rx_ratekbps: rx rate in kbps 2509 * @rix: rate index 2510 * @mpdu_retries: retries of mpdu in rx 2511 * @rx_time_us: Rx duration 2512 */ 2513 struct cdp_rx_stats_ppdu_user { 2514 uint16_t peer_id; 2515 uint8_t vdev_id; 2516 bool is_ampdu; 2517 uint32_t mu_ul_info_valid:1, 2518 ofdma_ru_start_index:7, 2519 ofdma_ru_width:7, 2520 nss:4, 2521 mcs:4; 2522 /* user id */ 2523 uint8_t user_index; 2524 uint8_t is_bss_peer; 2525 uint32_t ast_index; 2526 uint32_t tid; 2527 uint32_t num_msdu; 2528 uint16_t tcp_msdu_count; 2529 uint16_t udp_msdu_count; 2530 uint16_t other_msdu_count; 2531 uint16_t frame_control; 2532 uint8_t frame_control_info_valid; 2533 uint16_t qos_control; 2534 uint8_t qos_control_info_valid; 2535 uint8_t data_sequence_control_info_valid; 2536 uint16_t first_data_seq_ctrl; 2537 uint32_t preamble_type; 2538 uint16_t ht_flags; 2539 uint16_t vht_flags; 2540 uint16_t he_flags; 2541 uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; 2542 uint32_t mpdu_cnt_fcs_ok; 2543 uint32_t mpdu_cnt_fcs_err; 2544 uint32_t mpdu_fcs_ok_bitmap[QDF_MON_STATUS_MPDU_FCS_BMAP_NWORDS]; 2545 uint32_t mpdu_ok_byte_count; 2546 uint32_t mpdu_err_byte_count; 2547 uint32_t retries; 2548 uint32_t rx_ratekbps; 2549 uint32_t rix; 2550 uint32_t mpdu_retries; 2551 uint16_t rx_time_us; 2552 }; 2553 2554 /** 2555 * struct cdp_rx_indication_ppdu - Rx PPDU indication structure 2556 * @ppdu_id: PPDU Id 2557 * @is_ampdu: mpdu aggregate or non-aggregate? 2558 * @num_mpdu: Number of MPDUs in PPDU 2559 * @reserved: Reserved bits for future use 2560 * @num_msdu: Number of MSDUs in PPDU 2561 * @num_bytes: Number of bytes 2562 * @udp_msdu_count: Number of UDP MSDUs in PPDU 2563 * @tcp_msdu_count: Number of TCP MSDUs in PPDU 2564 * @other_msdu_count: Number of MSDUs other than UDP and TCP MSDUs in PPDU 2565 * @duration: PPDU duration 2566 * @tid: TID number 2567 * @peer_id: Peer ID 2568 * @vdev_id: VAP ID 2569 * @mac_addr: Peer MAC Address 2570 * @first_data_seq_ctrl: Sequence control field of first data frame 2571 * @u: union of rate information representations 2572 * @rate_info: consolidated rate fields 2573 * @ltf_size: ltf_size 2574 * @stbc: When set, STBC rate was used 2575 * @he_re: he_re (range extension) 2576 * @bw: Bandwidth 2577 * <enum 0 bw_20_MHz> 2578 * <enum 1 bw_40_MHz> 2579 * <enum 2 bw_80_MHz> 2580 * <enum 3 bw_160_MHz> 2581 * @nss: NSS 1,2, ...8 2582 * @mcs: MCS index 2583 * @preamble: preamble 2584 * @gi: <enum 0 0_8_us_sgi > Legacy normal GI 2585 * <enum 1 0_4_us_sgi > Legacy short GI 2586 * <enum 2 1_6_us_sgi > HE related GI 2587 * <enum 3 3_2_us_sgi > HE 2588 * @dcm: dcm 2589 * @ldpc: ldpc 2590 * @ppdu_type: SU/MU_MIMO/MU_OFDMA/MU_MIMO_OFDMA/UL_TRIG/BURST_BCN/UL_BSR_RESP/ 2591 * UL_BSR_TRIG/UNKNOWN 2592 * @rix: rate index 2593 * @lsig_a: L-SIG in 802.11 PHY header 2594 * @rssi: RSSI value (units = dB above noise floor) 2595 * @timestamp: TSF at the reception of PPDU 2596 * @length: PPDU length 2597 * @channel: Channel information 2598 * @beamformed: 2599 * @rx_ratekbps: 2600 * @ppdu_rx_rate: 2601 * @retries: 2602 * @rx_byte_count: 2603 * @rx_ratecode: 2604 * @fcs_error_mpdus: 2605 * @frame_ctrl: frame control field 2606 * @rssi_chain: rssi chain per nss per bw 2607 * @evm_info: 2608 * @rx_antenna: 2609 * @num_users: 2610 * @nf: noise floor 2611 * @per_chain_rssi: rssi per antenna 2612 * @is_mcast_bcast: 2613 * @cfr_info: 2614 * @punc_bw: punctured bw 2615 * @phyrx_abort: rx aborted undecoded frame indication 2616 * @phyrx_abort_reason: abort reason defined in phyrx_abort_request_info 2617 * @l_sig_length: L SIG A length 2618 * @l_sig_a_parity: L SIG A parity 2619 * @l_sig_a_pkt_type: L SIG A info pkt type 2620 * @l_sig_a_implicit_sounding: L SIG A info captured implicit sounding 2621 * @vht_crc: Indicate vht crc 2622 * @group_id: 2623 * @ht_length: num of bytes in PSDU 2624 * @ht_smoothing: Indicate ht_smoothing 2625 * @ht_not_sounding: Indicate ht not sounding 2626 * @ht_aggregation: Indicate ht aggregation 2627 * @ht_stbc: Indicate ht stbc 2628 * @ht_crc: Indicate ht crc 2629 * @vht_no_txop_ps: Indicate TXOP power save mode 2630 * @bss_color_id: Indicate BSS color ID 2631 * @beam_change: Indicates whether spatial mapping is changed 2632 * @dl_ul_flag: Differentiates between DL and UL transmission 2633 * @transmit_mcs: Indicates the data MCS 2634 * @ldpc_extra_sym: LDPC extra symbol 2635 * @special_reuse: Spatial reuse 2636 * @ltf_sym: Indictaes HE NSTS 2637 * @txbf: Indicates whether beamforming is applied 2638 * @pe_disambiguity: packet extension disambiguity 2639 * @pre_fec_pad: packet extension a factor 2640 * @dopplar: Doppler support 2641 * @txop_duration: Indicates the remaining time in the current TXOP 2642 * @sig_b_mcs: MCS of HE-SIG-B 2643 * @sig_b_dcm: DCM of HE-SIG-B 2644 * @sig_b_sym: Number of symbols of HE-SIG-B 2645 * @sig_b_comp: Compression mode of HE-SIG-B 2646 * @he_crc: CRC for HE-SIG contents 2647 * @usr_nss_sum: Sum of user nss 2648 * @usr_ru_tones_sum: Sum of user ru_tones 2649 * @user: per user stats in MU-user case 2650 */ 2651 struct cdp_rx_indication_ppdu { 2652 uint32_t ppdu_id; 2653 uint16_t is_ampdu:1, 2654 num_mpdu:9, 2655 reserved:6; 2656 uint32_t num_msdu; 2657 uint32_t num_bytes; 2658 uint16_t udp_msdu_count; 2659 uint16_t tcp_msdu_count; 2660 uint16_t other_msdu_count; 2661 uint16_t duration; 2662 uint32_t tid:8, 2663 peer_id:16; 2664 uint8_t vdev_id; 2665 uint8_t mac_addr[6]; 2666 uint16_t first_data_seq_ctrl; 2667 union { 2668 uint32_t rate_info; 2669 struct { 2670 uint32_t ltf_size:2, 2671 stbc:1, 2672 he_re:1, 2673 bw:4, 2674 nss:4, 2675 mcs:4, 2676 preamble:4, 2677 gi:4, 2678 dcm:1, 2679 ldpc:1, 2680 ppdu_type:5; 2681 }; 2682 } u; 2683 uint32_t rix; 2684 uint32_t lsig_a; 2685 uint32_t rssi; 2686 uint64_t timestamp; 2687 uint32_t length; 2688 uint8_t channel; 2689 uint8_t beamformed; 2690 2691 uint32_t rx_ratekbps; 2692 uint32_t ppdu_rx_rate; 2693 2694 uint32_t retries; 2695 uint32_t rx_byte_count; 2696 uint16_t rx_ratecode; 2697 uint8_t fcs_error_mpdus; 2698 uint16_t frame_ctrl; 2699 int8_t rssi_chain[SS_COUNT][MAX_BW]; 2700 struct cdp_rx_su_evm_info evm_info; 2701 uint32_t rx_antenna; 2702 uint8_t num_users; 2703 uint32_t nf; 2704 uint8_t per_chain_rssi[MAX_CHAIN]; 2705 uint8_t is_mcast_bcast; 2706 #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE) 2707 struct cdp_rx_ppdu_cfr_info cfr_info; 2708 #endif 2709 uint8_t punc_bw; 2710 #ifdef QCA_UNDECODED_METADATA_SUPPORT 2711 bool phyrx_abort; 2712 uint8_t phyrx_abort_reason; 2713 uint32_t l_sig_length:12, 2714 l_sig_a_parity:1, 2715 l_sig_a_pkt_type:4, 2716 l_sig_a_implicit_sounding:1, 2717 vht_crc:8, 2718 group_id:6; 2719 uint32_t ht_length:16, 2720 ht_smoothing:1, 2721 ht_not_sounding:1, 2722 ht_aggregation:1, 2723 ht_stbc:2, 2724 ht_crc:8, 2725 vht_no_txop_ps:1; 2726 uint32_t bss_color_id:6, 2727 beam_change:1, 2728 dl_ul_flag:1, 2729 transmit_mcs:4, 2730 ldpc_extra_sym:1, 2731 special_reuse:4, 2732 ltf_sym:3, 2733 txbf:1, 2734 pe_disambiguity:1, 2735 pre_fec_pad:4, 2736 dopplar:1; 2737 uint32_t txop_duration:7, 2738 sig_b_mcs:3, 2739 sig_b_dcm:1, 2740 sig_b_sym:4, 2741 sig_b_comp:1, 2742 he_crc:4; 2743 #endif 2744 uint8_t usr_nss_sum; 2745 uint32_t usr_ru_tones_sum; 2746 struct cdp_rx_stats_ppdu_user user[]; 2747 }; 2748 2749 /** 2750 * struct cdp_rx_indication_msdu - Rx MSDU info 2751 * @ppdu_id: PPDU to which the MSDU belongs 2752 * @msdu_len: Length of MSDU in bytes 2753 * @ack_frame_rssi: RSSI of the received ACK or BA frame 2754 * @resvd0: reserved bit 2755 * @first_msdu: Indicates this MSDU is the first MSDU in AMSDU 2756 * @last_msdu: Indicates this MSDU is the last MSDU in AMSDU 2757 * @msdu_part_of_amsdu: Indicates this MSDU was part of an A-MSDU in MPDU 2758 * @msdu_part_of_ampdu: 2759 * @resvd1: reserved bit 2760 * @extd: Extended structure containing rate statistics 2761 */ 2762 struct cdp_rx_indication_msdu { 2763 uint32_t ppdu_id; 2764 uint16_t msdu_len; 2765 uint32_t ack_frame_rssi:8, 2766 resvd0:1, 2767 first_msdu:1, 2768 last_msdu:1, 2769 msdu_part_of_amsdu:1, 2770 msdu_part_of_ampdu:1, 2771 resvd1:19; 2772 struct cdp_rate_stats extd; 2773 }; 2774 2775 /** 2776 * struct cdp_config_params - Propagate configuration parameters to datapath 2777 * @tso_enable: Enable/Disable TSO 2778 * @lro_enable: Enable/Disable LRO 2779 * @gro_enable: Enable/Disable GRO 2780 * @flow_steering_enable: Enable/Disable Rx Hash based flow steering 2781 * @p2p_tcp_udp_checksumoffload: Enable/Disable TCP/UDP Checksum Offload for P2P 2782 * @nan_tcp_udp_checksumoffload: Enable/Disable TCP/UDP Checksum Offload for NAN 2783 * @tcp_udp_checksumoffload: Enable/Disable TCP/UDP Checksum Offload 2784 * @legacy_mode_checksumoffload_disable: Disable TCP/UDP Checksum Offload for 2785 * legacy modes. 2786 * @napi_enable: Enable/Disable Napi 2787 * @ipa_enable: Flag indicating if IPA is enabled or not 2788 * @tx_flow_stop_queue_threshold: Value to Pause tx queues 2789 * @tx_flow_start_queue_offset: Available Tx descriptors to unpause 2790 * tx queue 2791 * @tx_comp_loop_pkt_limit: Max # of packets to be processed in 1 tx comp loop 2792 * @rx_reap_loop_pkt_limit: Max # of packets to be processed in 1 rx reap loop 2793 * @rx_hp_oos_update_limit: Max # of HP OOS (out of sync) updates 2794 */ 2795 struct cdp_config_params { 2796 unsigned int tso_enable:1; 2797 unsigned int lro_enable:1; 2798 unsigned int gro_enable:1; 2799 unsigned int flow_steering_enable:1; 2800 unsigned int p2p_tcp_udp_checksumoffload:1; 2801 unsigned int nan_tcp_udp_checksumoffload:1; 2802 unsigned int tcp_udp_checksumoffload:1; 2803 unsigned int legacy_mode_checksumoffload_disable:1; 2804 unsigned int napi_enable:1; 2805 unsigned int ipa_enable:1; 2806 /* Set when QCA_LL_TX_FLOW_CONTROL_V2 is enabled */ 2807 uint8_t tx_flow_stop_queue_threshold; 2808 uint8_t tx_flow_start_queue_offset; 2809 uint32_t tx_comp_loop_pkt_limit; 2810 uint32_t rx_reap_loop_pkt_limit; 2811 uint32_t rx_hp_oos_update_limit; 2812 2813 }; 2814 2815 /** 2816 * struct cdp_txrx_stats_req - stats request wrapper 2817 * used to pass request information to cdp layer 2818 * @stats: type of stats requested 2819 * @param0: opaque argument 0 to be passed to htt 2820 * @param1: opaque argument 1 to be passed to htt 2821 * @param2: opaque argument 2 to be passed to htt 2822 * @param3: opaque argument 3 to be passed to htt 2823 * @cookie_val: cookie 2824 * @mac_id: mac id 2825 * @peer_addr: peer address 2826 */ 2827 struct cdp_txrx_stats_req { 2828 enum cdp_stats stats; 2829 uint32_t param0; 2830 uint32_t param1; 2831 uint32_t param2; 2832 uint32_t param3; 2833 uint32_t cookie_val; 2834 uint8_t mac_id; 2835 char *peer_addr; 2836 }; 2837 2838 /** 2839 * struct cdp_monitor_filter - monitor filter info 2840 * @mode: set filter mode 2841 * @fp_mgmt: set Filter Pass MGMT Configuration 2842 * @fp_ctrl: set Filter Pass CTRL Configuration 2843 * @fp_data: set Filter Pass DATA Configuration 2844 * @mo_mgmt: set Monitor Other MGMT Configuration 2845 * @mo_ctrl: set Monitor Other CTRL Configuration 2846 * @mo_data: set Monitor other DATA Configuration 2847 * 2848 */ 2849 struct cdp_monitor_filter { 2850 uint16_t mode; 2851 uint16_t fp_mgmt; 2852 uint16_t fp_ctrl; 2853 uint16_t fp_data; 2854 uint16_t mo_mgmt; 2855 uint16_t mo_ctrl; 2856 uint16_t mo_data; 2857 }; 2858 2859 /** 2860 * enum cdp_dp_cfg - CDP ENUMs to get to DP configation 2861 * @cfg_dp_enable_data_stall: context passed to be used by consumer 2862 * @cfg_dp_enable_p2p_ip_tcp_udp_checksum_offload: get P2P checksum config 2863 * @cfg_dp_enable_nan_ip_tcp_udp_checksum_offload: get NAN TX checksum config 2864 * @cfg_dp_enable_ip_tcp_udp_checksum_offload: get TX checksum config for others 2865 * @cfg_dp_disable_legacy_mode_csum_offload: Disable checksum offload for 2866 * legacy modes 2867 * @cfg_dp_tso_enable: get TSO enable config 2868 * @cfg_dp_lro_enable: get LRO enable config 2869 * @cfg_dp_gro_enable: get GRO enable config 2870 * @cfg_dp_tc_based_dyn_gro_enable: get TC based dynamic gro enable config 2871 * @cfg_dp_tc_ingress_prio: priority value to be checked for tc filters 2872 * @cfg_dp_sg_enable: 2873 * @cfg_dp_tx_flow_start_queue_offset: get DP TX flow start queue offset 2874 * @cfg_dp_tx_flow_stop_queue_threshold: get DP TX flow stop queue threshold 2875 * @cfg_dp_ipa_uc_tx_buf_size: get IPA TX buf size config 2876 * @cfg_dp_ipa_uc_tx_partition_base: get IPA UC TX partition base config 2877 * @cfg_dp_ipa_uc_rx_ind_ring_count: get IPA rx indication ring count config 2878 * @cfg_dp_enable_flow_steering: get flow steerint enable config 2879 * @cfg_dp_reorder_offload_supported: get reorder offload support config 2880 * @cfg_dp_ce_classify_enable: get CE classify enable config 2881 * @cfg_dp_disable_intra_bss_fwd: get intra bss fwd config 2882 * @cfg_dp_pktlog_buffer_size: get packet log buffer size config 2883 * @cfg_dp_wow_check_rx_pending: get wow rx pending frame check config 2884 */ 2885 enum cdp_dp_cfg { 2886 cfg_dp_enable_data_stall, 2887 cfg_dp_enable_p2p_ip_tcp_udp_checksum_offload, 2888 cfg_dp_enable_nan_ip_tcp_udp_checksum_offload, 2889 cfg_dp_enable_ip_tcp_udp_checksum_offload, 2890 cfg_dp_disable_legacy_mode_csum_offload, 2891 cfg_dp_tso_enable, 2892 cfg_dp_lro_enable, 2893 cfg_dp_gro_enable, 2894 cfg_dp_tc_based_dyn_gro_enable, 2895 cfg_dp_tc_ingress_prio, 2896 cfg_dp_sg_enable, 2897 cfg_dp_tx_flow_start_queue_offset, 2898 cfg_dp_tx_flow_stop_queue_threshold, 2899 cfg_dp_ipa_uc_tx_buf_size, 2900 cfg_dp_ipa_uc_tx_partition_base, 2901 cfg_dp_ipa_uc_rx_ind_ring_count, 2902 cfg_dp_enable_flow_steering, 2903 cfg_dp_reorder_offload_supported, 2904 cfg_dp_ce_classify_enable, 2905 cfg_dp_disable_intra_bss_fwd, 2906 cfg_dp_pktlog_buffer_size, 2907 cfg_dp_wow_check_rx_pending, 2908 }; 2909 2910 /** 2911 * struct cdp_peer_cookie - cookie used when creating peer 2912 * @ctx: context passed to be used by consumer 2913 * @mac_addr: MAC address of peer 2914 * @peer_id: peer id 2915 * @pdev_id: pdev_id 2916 * @cookie: cookie to be used by consumer 2917 */ 2918 struct cdp_peer_cookie { 2919 struct cdp_stats_cookie *ctx; 2920 uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; 2921 uint8_t peer_id; 2922 uint8_t pdev_id; 2923 uint8_t cookie; 2924 }; 2925 2926 #ifdef WLAN_SUPPORT_RX_FISA 2927 struct cdp_flow_stats { 2928 uint32_t aggr_count; 2929 uint32_t curr_aggr_count; 2930 uint32_t flush_count; 2931 uint32_t bytes_aggregated; 2932 }; 2933 #else 2934 /** 2935 * struct cdp_flow_stats - Per-Flow (5-tuple) statistics 2936 * @msdu_count: number of rx msdus matching this flow 2937 * @mon_msdu_count: number of msdus matching this flow in mon path 2938 * 2939 * HW also includes msdu_byte_count and timestamp, which 2940 * are not currently tracked in SW. 2941 */ 2942 struct cdp_flow_stats { 2943 uint32_t msdu_count; 2944 uint32_t mon_msdu_count; 2945 }; 2946 #endif 2947 2948 /** 2949 * enum cdp_flow_fst_operation - RX FST operations allowed 2950 * @CDP_FLOW_FST_ENTRY_ADD: Add entry 2951 * @CDP_FLOW_FST_ENTRY_DEL: Delete entry 2952 * @CDP_FLOW_FST_RX_BYPASS_ENABLE: RX bypass enable 2953 * @CDP_FLOW_FST_RX_BYPASS_DISABLE: RX bypass disable 2954 */ 2955 enum cdp_flow_fst_operation { 2956 CDP_FLOW_FST_ENTRY_ADD, 2957 CDP_FLOW_FST_ENTRY_DEL, 2958 CDP_FLOW_FST_RX_BYPASS_ENABLE, 2959 CDP_FLOW_FST_RX_BYPASS_DISABLE 2960 }; 2961 2962 /** 2963 * enum cdp_flow_protocol_type - RX FST supported protocol types, 2964 * mapped to HW spec 2965 * @CDP_FLOW_PROTOCOL_TYPE_TCP: TCP 2966 * @CDP_FLOW_PROTOCOL_TYPE_UDP: UDP 2967 */ 2968 enum cdp_flow_protocol_type { 2969 CDP_FLOW_PROTOCOL_TYPE_TCP = 6, 2970 CDP_FLOW_PROTOCOL_TYPE_UDP = 17, 2971 }; 2972 2973 /** 2974 * struct cdp_rx_flow_tuple_info - RX flow tuple info used for addition/deletion 2975 * @tuple_populated: 2976 * @is_exception: Flows which are added to flow table but not aggregated. 2977 * @bypass_fisa: Flow which are not added to flow table. 2978 * @dest_ip_127_96: destination IP address bit fields 96-127 2979 * @dest_ip_95_64: destination IP address bit fields 64-95 2980 * @dest_ip_63_32: destination IP address bit fields 32-63 2981 * @dest_ip_31_0: destination IP address bit fields 0-31 2982 * @src_ip_127_96: source IP address bit fields 96-127 2983 * @src_ip_95_64: source IP address bit fields 64-95 2984 * @src_ip_63_32: source IP address bit fields 32-63 2985 * @src_ip_31_0: source IP address bit fields 0-31 2986 * @dest_port: destination port of flow 2987 * @src_port: source port of flow 2988 * @l4_protocol: protocol type in flow (TCP/UDP) 2989 */ 2990 struct cdp_rx_flow_tuple_info { 2991 #ifdef WLAN_SUPPORT_RX_FISA 2992 uint8_t tuple_populated; 2993 uint8_t is_exception; 2994 bool bypass_fisa; 2995 #endif 2996 uint32_t dest_ip_127_96; 2997 uint32_t dest_ip_95_64; 2998 uint32_t dest_ip_63_32; 2999 uint32_t dest_ip_31_0; 3000 uint32_t src_ip_127_96; 3001 uint32_t src_ip_95_64; 3002 uint32_t src_ip_63_32; 3003 uint32_t src_ip_31_0; 3004 uint16_t dest_port; 3005 uint16_t src_port; 3006 uint16_t l4_protocol; 3007 }; 3008 3009 /** 3010 * struct cdp_rx_flow_info - RX flow info used for addition/deletion 3011 * @is_addr_ipv4: indicates whether given IP address is IPv4/IPv6 3012 * @op_code: add/delete/enable/disable operation requested 3013 * @flow_tuple_info: structure containing tuple info 3014 * @fse_metadata: metadata to be set in RX flow 3015 * @use_ppe_ds: use DS mode 3016 * @priority_vld: is priority valid 3017 * @service_code: service code for DS 3018 */ 3019 struct cdp_rx_flow_info { 3020 bool is_addr_ipv4; 3021 enum cdp_flow_fst_operation op_code; 3022 struct cdp_rx_flow_tuple_info flow_tuple_info; 3023 uint16_t fse_metadata; 3024 uint8_t use_ppe_ds; 3025 uint8_t priority_vld; 3026 uint16_t service_code; 3027 }; 3028 3029 #ifdef QCA_SUPPORT_SCAN_SPCL_VAP_STATS 3030 /** 3031 * struct cdp_scan_spcl_vap_stats - Special vap statistics info 3032 * @rx_ok_pkts: rx fcs ok pkts count 3033 * @rx_ok_bytes: rx fcs ok bytes count 3034 * @rx_err_pkts: rx fcs err pkts count 3035 * @rx_err_bytes: rx fcs err bytes count 3036 * @rx_mgmt_pkts: rx mgmt pkts count 3037 * @rx_ctrl_pkts: rx ctrl pkts count 3038 * @rx_data_pkts: rx data pkts count 3039 */ 3040 struct cdp_scan_spcl_vap_stats { 3041 uint64_t rx_ok_pkts; 3042 uint64_t rx_ok_bytes; 3043 uint64_t rx_err_pkts; 3044 uint64_t rx_err_bytes; 3045 uint64_t rx_mgmt_pkts; 3046 uint64_t rx_ctrl_pkts; 3047 uint64_t rx_data_pkts; 3048 }; 3049 #endif 3050 3051 /** 3052 * struct cdp_soc_attach_params 3053 * 3054 * @hif_handle: Opaque HIF handle 3055 * @htc_handle: Opaque HTC handle 3056 * @qdf_osdev: QDF device 3057 * @ol_ops: Offload Operations 3058 * @device_id: Device ID 3059 * @ml_context: DP ML object context 3060 * @mlo_chip_id: MLO chip id, for legacy SOCs chip_id need to 0 3061 * @mlo_enabled: MLO enable bit 3062 */ 3063 struct cdp_soc_attach_params { 3064 struct hif_opaque_softc *hif_handle; 3065 HTC_HANDLE htc_handle; 3066 qdf_device_t qdf_osdev; 3067 struct ol_if_ops *ol_ops; 3068 uint16_t device_id; 3069 struct cdp_mlo_ctxt *ml_context; 3070 uint8_t mlo_chip_id; 3071 uint8_t mlo_enabled; 3072 }; 3073 3074 /** 3075 * struct cdp_pdev_attach_params - params for pdev attach 3076 * 3077 * @htc_handle: HTC handle for host-target interface 3078 * @qdf_osdev: QDF OS device 3079 * @pdev_id: PDEV ID 3080 * @mlo_link_id: ML link id 3081 */ 3082 struct cdp_pdev_attach_params { 3083 HTC_HANDLE htc_handle; 3084 qdf_device_t qdf_osdev; 3085 uint8_t pdev_id; 3086 uint32_t mlo_link_id; 3087 }; 3088 3089 /* 3090 * cdp_txrx_peer_params_update 3091 * 3092 * @osif_vdev: Handle for OS shim virtual device 3093 * @peer_mac: Peer mac address 3094 * @chip_id: CHIP ID 3095 * @pdev_id: PDEV ID 3096 */ 3097 struct cdp_txrx_peer_params_update { 3098 void *osif_vdev; 3099 uint8_t *peer_mac; 3100 uint8_t chip_id; 3101 uint8_t pdev_id; 3102 }; 3103 3104 #endif 3105