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