1 /* 2 * Copyright (c) 2011-2018 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 #ifndef CONFIG_WIN 38 #include <cdp_txrx_mob_def.h> 39 #endif /* CONFIG_WIN */ 40 #include <cdp_txrx_handle.h> 41 42 #ifndef OL_TXRX_NUM_LOCAL_PEER_IDS 43 #define OL_TXRX_NUM_LOCAL_PEER_IDS 33 /* default */ 44 #endif 45 46 #define CDP_BA_256_BIT_MAP_SIZE_DWORDS 8 47 #define CDP_BA_64_BIT_MAP_SIZE_DWORDS 2 48 49 #define OL_TXRX_INVALID_LOCAL_PEER_ID 0xffff 50 #define CDP_INVALID_VDEV_ID 0xff 51 /* Options for Dump Statistics */ 52 #define CDP_HDD_STATS 0 53 #define CDP_TXRX_PATH_STATS 1 54 #define CDP_TXRX_HIST_STATS 2 55 #define CDP_TXRX_TSO_STATS 3 56 #define CDP_HDD_NETIF_OPER_HISTORY 4 57 #define CDP_DUMP_TX_FLOW_POOL_INFO 5 58 #define CDP_TXRX_DESC_STATS 6 59 #define CDP_HIF_STATS 7 60 #define CDP_LRO_STATS 8 61 #define CDP_NAPI_STATS 9 62 #define CDP_WLAN_RX_BUF_DEBUG_STATS 10 63 #define CDP_RX_RING_STATS 11 64 #define CDP_DP_NAPI_STATS 12 65 #define CDP_SCHEDULER_STATS 21 66 #define CDP_TX_QUEUE_STATS 22 67 #define CDP_BUNDLE_STATS 23 68 #define CDP_CREDIT_STATS 24 69 #define CDP_DISCONNECT_STATS 25 70 71 #define WME_AC_TO_TID(_ac) ( \ 72 ((_ac) == WME_AC_VO) ? 6 : \ 73 ((_ac) == WME_AC_VI) ? 5 : \ 74 ((_ac) == WME_AC_BK) ? 1 : \ 75 0) 76 77 #define TID_TO_WME_AC(_tid) ( \ 78 (((_tid) == 0) || ((_tid) == 3)) ? WME_AC_BE : \ 79 (((_tid) == 1) || ((_tid) == 2)) ? WME_AC_BK : \ 80 (((_tid) == 4) || ((_tid) == 5)) ? WME_AC_VI : \ 81 WME_AC_VO) 82 83 #define CDP_MU_MAX_USERS 8 84 #define CDP_MU_MAX_USER_INDEX (CDP_MU_MAX_USERS - 1) 85 #define CDP_INVALID_PEER 0xffff 86 #define CDP_INVALID_TID 31 87 88 #define CDP_DATA_TID_MAX 8 89 /* 90 * advance rx monitor filter 91 * */ 92 #define MON_FILTER_PASS 0x0001 93 #define MON_FILTER_OTHER 0x0002 94 #define MON_FILTER_ALL 0x0003 95 96 #define FILTER_MGMT_ALL 0xFFFF 97 #define FILTER_MGMT_ASSOC_REQ 0x0001 98 #define FILTER_MGMT_ASSOC_RES 0x0002 99 #define FILTER_MGMT_REASSOC_REQ 0x0004 100 #define FILTER_MGMT_REASSOC_RES 0x0008 101 #define FILTER_MGMT_PROBE_REQ 0x0010 102 #define FILTER_MGMT_PROBE_RES 0x0020 103 #define FILTER_MGMT_TIM_ADVT 0x0040 104 #define FILTER_MGMT_RESERVED_7 0x0080 105 #define FILTER_MGMT_BEACON 0x0100 106 #define FILTER_MGMT_ATIM 0x0200 107 #define FILTER_MGMT_DISASSOC 0x0400 108 #define FILTER_MGMT_AUTH 0x0800 109 #define FILTER_MGMT_DEAUTH 0x1000 110 #define FILTER_MGMT_ACTION 0x2000 111 #define FILTER_MGMT_ACT_NO_ACK 0x4000 112 #define FILTER_MGMT_RESERVED_15 0x8000 113 114 #define FILTER_CTRL_ALL 0xFFFF 115 #define FILTER_CTRL_RESERVED_1 0x0001 116 #define FILTER_CTRL_RESERVED_2 0x0002 117 #define FILTER_CTRL_TRIGGER 0x0004 118 #define FILTER_CTRL_RESERVED_4 0x0008 119 #define FILTER_CTRL_BF_REP_POLL 0x0010 120 #define FILTER_CTRL_VHT_NDP 0x0020 121 #define FILTER_CTRL_FRAME_EXT 0x0040 122 #define FILTER_CTRL_CTRLWRAP 0x0080 123 #define FILTER_CTRL_BA_REQ 0x0100 124 #define FILTER_CTRL_BA 0x0200 125 #define FILTER_CTRL_PSPOLL 0x0400 126 #define FILTER_CTRL_RTS 0x0800 127 #define FILTER_CTRL_CTS 0x1000 128 #define FILTER_CTRL_ACK 0x2000 129 #define FILTER_CTRL_CFEND 0x4000 130 #define FILTER_CTRL_CFEND_CFACK 0x8000 131 132 #define FILTER_DATA_ALL 0xFFFF 133 #define FILTER_DATA_MCAST 0x4000 134 #define FILTER_DATA_UCAST 0x8000 135 #define FILTER_DATA_DATA 0x0001 136 #define FILTER_DATA_NULL 0x0008 137 138 /* 139 * DP configuration parameters 140 */ 141 enum cdp_cfg_param_type { 142 CDP_CFG_MAX_PEER_ID, 143 CDP_CFG_CCE_DISABLE, 144 CDP_CFG_NUM_PARAMS 145 }; 146 147 /* 148 * htt_dbg_stats_type - 149 * bit positions for each stats type within a stats type bitmask 150 * The bitmask contains 24 bits. 151 */ 152 enum htt_cmn_dbg_stats_type { 153 HTT_DBG_CMN_STATS_WAL_PDEV_TXRX = 0, /* bit 0 -> 0x1 */ 154 HTT_DBG_CMN_STATS_RX_REORDER = 1, /* bit 1 -> 0x2 */ 155 HTT_DBG_CMN_STATS_RX_RATE_INFO = 2, /* bit 2 -> 0x4 */ 156 HTT_DBG_CMN_STATS_TX_PPDU_LOG = 3, /* bit 3 -> 0x8 */ 157 HTT_DBG_CMN_STATS_TX_RATE_INFO = 4, /* bit 4 -> 0x10 */ 158 HTT_DBG_CMN_STATS_TIDQ = 5, /* bit 5 -> 0x20 */ 159 HTT_DBG_CMN_STATS_TXBF_INFO = 6, /* bit 6 -> 0x40 */ 160 HTT_DBG_CMN_STATS_SND_INFO = 7, /* bit 7 -> 0x80 */ 161 HTT_DBG_CMN_STATS_ERROR_INFO = 8, /* bit 8 -> 0x100 */ 162 HTT_DBG_CMN_STATS_TX_SELFGEN_INFO = 9, /* bit 9 -> 0x200 */ 163 HTT_DBG_CMN_STATS_TX_MU_INFO = 10, /* bit 10 -> 0x400 */ 164 HTT_DBG_CMN_STATS_SIFS_RESP_INFO = 11, /* bit 11 -> 0x800 */ 165 HTT_DBG_CMN_STATS_RESET_INFO = 12, /* bit 12 -> 0x1000 */ 166 HTT_DBG_CMN_STATS_MAC_WDOG_INFO = 13, /* bit 13 -> 0x2000 */ 167 HTT_DBG_CMN_STATS_TX_DESC_INFO = 14, /* bit 14 -> 0x4000 */ 168 HTT_DBG_CMN_STATS_TX_FETCH_MGR_INFO = 15, /* bit 15 -> 0x8000 */ 169 HTT_DBG_CMN_STATS_TX_PFSCHED_INFO = 16, /* bit 16 -> 0x10000 */ 170 HTT_DBG_CMN_STATS_TX_PATH_STATS_INFO = 17, /* bit 17 -> 0x20000 */ 171 /* bits 18-23 currently reserved */ 172 173 /* keep this last */ 174 HTT_DBG_CMN_NUM_STATS 175 }; 176 177 /* 178 * cdp_host_txrx_stats: Different types of host stats 179 * @TXRX_HOST_STATS_INVALID: Invalid option 180 * @TXRX_RX_RATE_STATS: Rx rate info 181 * @TXRX_TX_RATE_STATS: Tx rate info 182 * @TXRX_TX_HOST_STATS: Print Tx stats 183 * @TXRX_RX_HOST_STATS: Print host Rx stats 184 * @TXRX_CLEAR_STATS: clear all host stats 185 * @TXRX_SRNG_PTR_STATS: Print SRNG pointer stats 186 */ 187 enum cdp_host_txrx_stats { 188 TXRX_HOST_STATS_INVALID = -1, 189 TXRX_CLEAR_STATS = 0, 190 TXRX_RX_RATE_STATS = 1, 191 TXRX_TX_RATE_STATS = 2, 192 TXRX_TX_HOST_STATS = 3, 193 TXRX_RX_HOST_STATS = 4, 194 TXRX_AST_STATS = 5, 195 TXRX_SRNG_PTR_STATS = 6, 196 TXRX_HOST_STATS_MAX, 197 }; 198 199 /* 200 * cdp_ppdu_ftype: PPDU Frame Type 201 * @CDP_PPDU_FTYPE_DATA: SU or MU Data Frame 202 * @CDP_PPDU_FTYPE_CTRL: Control/Management Frames 203 */ 204 enum cdp_ppdu_ftype { 205 CDP_PPDU_FTYPE_CTRL, 206 CDP_PPDU_FTYPE_DATA, 207 CDP_PPDU_FTYPE_MAX 208 }; 209 210 211 /** 212 * @brief General specification of the tx frame contents 213 * 214 * @details 215 * for efficiency, the HTT packet type values correspond 216 * to the bit positions of the WAL packet type values, so the 217 * translation is a simple shift operation. 218 */ 219 enum htt_cmn_pkt_type { 220 htt_cmn_pkt_type_raw = 0, 221 htt_cmn_pkt_type_native_wifi = 1, 222 htt_cmn_pkt_type_ethernet = 2, 223 htt_cmn_pkt_type_mgmt = 3, 224 htt_cmn_pkt_type_eth2 = 4, 225 226 /* keep this last */ 227 htt_cmn_pkt_num_types 228 }; 229 230 /** 231 * @General description of HTT received packets status 232 * It is similar to htt_rx_status enum 233 * but is added as a cdp enum can be freely used in OL_IF layer 234 */ 235 enum htt_cmn_rx_status { 236 htt_cmn_rx_status_unknown = 0x0, 237 htt_cmn_rx_status_ok, 238 htt_cmn_rx_status_err_fcs, 239 htt_cmn_rx_status_err_dup, 240 htt_cmn_rx_status_err_replay, 241 htt_cmn_rx_status_inv_peer, 242 htt_cmn_rx_status_ctrl_mgmt_null = 0x08, 243 htt_cmn_rx_status_tkip_mic_err = 0x09, 244 htt_cmn_rx_status_decrypt_err = 0x0A, 245 htt_cmn_rx_status_mpdu_length_err = 0x0B, 246 htt_cmn_rx_status_err_misc = 0xFF 247 }; 248 249 250 enum cdp_host_reo_dest_ring { 251 cdp_host_reo_dest_ring_unknown = 0, 252 cdp_host_reo_dest_ring_1 = 1, 253 cdp_host_reo_dest_ring_2 = 2, 254 cdp_host_reo_dest_ring_3 = 3, 255 cdp_host_reo_dest_ring_4 = 4, 256 }; 257 258 enum htt_cmn_t2h_en_stats_type { 259 /* keep this alwyas first */ 260 HTT_CMN_T2H_EN_STATS_TYPE_START = 0, 261 262 /** ppdu_common_stats is the payload */ 263 HTT_CMN_T2H_EN_STATS_TYPE_COMMON = 1, 264 /** ppdu_sant_stats is the payload */ 265 HTT_CMN_T2H_EN_STATS_TYPE_SANT = 2, 266 /** ppdu_common_stats_v2 is the payload */ 267 HTT_CMN_T2H_EN_STATS_TYPE_COMMON_V2 = 3, 268 269 /* Keep this last */ 270 HTT_CMN_T2H_EN_STATS_TYPE_END = 0x1f, 271 }; 272 273 enum htt_cmn_t2h_en_stats_status { 274 /* Keep this first always */ 275 HTT_CMN_T2H_EN_STATS_STATUS_PARTIAL = 0, 276 HTT_CMN_T2H_EN_STATS_STATUS_PRESENT = 1, 277 HTT_CMN_T2H_EN_STATS_STATUS_ERROR = 2, 278 HTT_CMN_T2H_EN_STATS_STATUS_INVALID = 3, 279 280 281 /* keep this always last */ 282 HTT_CMN_T2H_EN_STATS_STATUS_SERIES_DONE = 7, 283 }; 284 285 /** 286 * struct ol_txrx_peer_state - Peer state information 287 */ 288 enum ol_txrx_peer_state { 289 OL_TXRX_PEER_STATE_INVALID, 290 OL_TXRX_PEER_STATE_DISC, /* initial state */ 291 OL_TXRX_PEER_STATE_CONN, /* authentication in progress */ 292 OL_TXRX_PEER_STATE_AUTH, /* authentication successful */ 293 }; 294 295 /** 296 * struct ol_txrx_ast_type - AST entry type information 297 */ 298 enum cdp_txrx_ast_entry_type { 299 CDP_TXRX_AST_TYPE_NONE, /* static ast entry for connected peer */ 300 CDP_TXRX_AST_TYPE_STATIC, /* static ast entry for connected peer */ 301 CDP_TXRX_AST_TYPE_WDS, /* WDS peer ast entry type*/ 302 CDP_TXRX_AST_TYPE_MEC, /* Multicast echo ast entry type */ 303 CDP_TXRX_AST_TYPE_WDS_HM, /* HM WDS entry */ 304 CDP_TXRX_AST_TYPE_MAX 305 }; 306 307 /** 308 * struct cdp_sec_type - security type information 309 */ 310 enum cdp_sec_type { 311 cdp_sec_type_none, 312 cdp_sec_type_wep128, 313 cdp_sec_type_wep104, 314 cdp_sec_type_wep40, 315 cdp_sec_type_tkip, 316 cdp_sec_type_tkip_nomic, 317 cdp_sec_type_aes_ccmp, 318 cdp_sec_type_wapi, 319 cdp_sec_type_aes_ccmp_256, 320 cdp_sec_type_aes_gcmp, 321 cdp_sec_type_aes_gcmp_256, 322 323 /* keep this last! */ 324 cdp_num_sec_types 325 }; 326 327 /** 328 * struct cdp_tx_exception_metadata - Exception path parameters 329 * @peer_id: Peer id of the peer 330 * @tid: Transmit Identifier 331 * @tx_encap_type: Transmit encap type (i.e. Raw, Native Wi-Fi, Ethernet) 332 * @sec_type: sec_type to be passed to HAL 333 * 334 * This structure holds the parameters needed in the exception path of tx 335 * 336 */ 337 struct cdp_tx_exception_metadata { 338 uint16_t peer_id; 339 uint8_t tid; 340 uint16_t tx_encap_type; 341 enum cdp_sec_type sec_type; 342 }; 343 344 typedef struct cdp_soc_t *ol_txrx_soc_handle; 345 346 /** 347 * ol_txrx_vdev_delete_cb - callback registered during vdev 348 * detach 349 */ 350 typedef void (*ol_txrx_vdev_delete_cb)(void *context); 351 352 /** 353 * ol_osif_vdev_handle - paque handle for OS shim virtual device 354 * object 355 */ 356 struct ol_osif_vdev_t; 357 typedef struct ol_osif_vdev_t *ol_osif_vdev_handle; 358 359 /** 360 * wlan_op_mode - Virtual device operation mode 361 * @wlan_op_mode_unknown: Unknown mode 362 * @wlan_op_mode_ap: AP mode 363 * @wlan_op_mode_ibss: IBSS mode 364 * @wlan_op_mode_sta: STA (client) mode 365 * @wlan_op_mode_monitor: Monitor mode 366 * @wlan_op_mode_ocb: OCB mode 367 */ 368 enum wlan_op_mode { 369 wlan_op_mode_unknown, 370 wlan_op_mode_ap, 371 wlan_op_mode_ibss, 372 wlan_op_mode_sta, 373 wlan_op_mode_monitor, 374 wlan_op_mode_ocb, 375 wlan_op_mode_ndi, 376 }; 377 378 /** 379 * cdp_mgmt_tx_cb - tx management delivery notification 380 * callback function 381 */ 382 typedef void 383 (*ol_txrx_mgmt_tx_cb)(void *ctxt, qdf_nbuf_t tx_mgmt_frm, int had_error); 384 385 /** 386 * ol_txrx_data_tx_cb - Function registered with the data path 387 * that is called when tx frames marked as "no free" are 388 * done being transmitted 389 */ 390 typedef void 391 (*ol_txrx_data_tx_cb)(void *ctxt, qdf_nbuf_t tx_frm, int had_error); 392 393 /** 394 * ol_txrx_tx_fp - top-level transmit function 395 * @data_vdev - handle to the virtual device object 396 * @msdu_list - list of network buffers 397 */ 398 typedef qdf_nbuf_t (*ol_txrx_tx_fp)(void *data_vdev, 399 qdf_nbuf_t msdu_list); 400 401 /** 402 * ol_txrx_tx_exc_fp - top-level transmit function on exception path 403 * @data_vdev - handle to the virtual device object 404 * @msdu_list - list of network buffers 405 * @tx_exc_metadata - structure that holds parameters to exception path 406 */ 407 typedef qdf_nbuf_t (*ol_txrx_tx_exc_fp)(void *data_vdev, 408 qdf_nbuf_t msdu_list, 409 struct cdp_tx_exception_metadata 410 *tx_exc_metadata); 411 412 /** 413 * ol_txrx_tx_flow_control_fp - tx flow control notification 414 * function from txrx to OS shim 415 * @osif_dev - the virtual device's OS shim object 416 * @tx_resume - tx os q should be resumed or not 417 */ 418 typedef void (*ol_txrx_tx_flow_control_fp)(void *osif_dev, 419 bool tx_resume); 420 421 /** 422 * ol_txrx_tx_flow_control_is_pause_fp - is tx paused by flow control 423 * function from txrx to OS shim 424 * @osif_dev - the virtual device's OS shim object 425 * 426 * Return: true if tx is paused by flow control 427 */ 428 typedef bool (*ol_txrx_tx_flow_control_is_pause_fp)(void *osif_dev); 429 430 /** 431 * ol_txrx_rx_fp - receive function to hand batches of data 432 * frames from txrx to OS shim 433 * @data_vdev - handle to the OSIF virtual device object 434 * @msdu_list - list of network buffers 435 */ 436 typedef QDF_STATUS(*ol_txrx_rx_fp)(void *osif_dev, qdf_nbuf_t msdu_list); 437 438 /** 439 * ol_txrx_get_key_fp - function to gey key based on keyix and peer 440 * mac address 441 * @osif_dev - the virtual device's OS shim object 442 * @key_buf - pointer to store key 443 * @mac_addr - pointer to mac address 444 * @keyix - key id 445 */ 446 typedef QDF_STATUS(*ol_txrx_get_key_fp)(void *osif_dev, uint8_t *key_buf, uint8_t *mac_addr, uint8_t keyix); 447 448 /** 449 * ol_txrx_rsim_rx_decap_fp - raw mode simulation function to decap the 450 * packets in receive path. 451 * @osif_dev - the virtual device's OS shim object 452 * @list_head - poniter to head of receive packet queue to decap 453 * @list_tail - poniter to tail of receive packet queue to decap 454 * @peer - Peer handler 455 */ 456 typedef QDF_STATUS(*ol_txrx_rsim_rx_decap_fp)(void *osif_dev, 457 qdf_nbuf_t *list_head, 458 qdf_nbuf_t *list_tail, 459 struct cdp_peer *peer); 460 461 /* ol_txrx_rx_fp - external tx free function to read per packet stats and 462 * free tx buffer externally 463 * @netbuf - tx network buffer 464 */ 465 typedef void (*ol_txrx_tx_free_ext_fp)(qdf_nbuf_t netbuf); 466 467 /** 468 * ol_txrx_rx_check_wai_fp - OSIF WAPI receive function 469 */ 470 typedef bool (*ol_txrx_rx_check_wai_fp)(ol_osif_vdev_handle vdev, 471 qdf_nbuf_t mpdu_head, 472 qdf_nbuf_t mpdu_tail); 473 /** 474 * ol_txrx_rx_mon_fp - OSIF monitor mode receive function for single 475 * MPDU (802.11 format) 476 */ 477 typedef void (*ol_txrx_rx_mon_fp)(ol_osif_vdev_handle vdev, 478 qdf_nbuf_t mpdu, 479 void *rx_status); 480 481 /** 482 * ol_txrx_proxy_arp_fp - proxy arp function pointer 483 */ 484 typedef int (*ol_txrx_proxy_arp_fp)(ol_osif_vdev_handle vdev, 485 qdf_nbuf_t netbuf); 486 487 /* 488 * ol_txrx_mcast_me_fp - function pointer for multicast enhancement 489 */ 490 typedef int (*ol_txrx_mcast_me_fp)(ol_osif_vdev_handle vdev, 491 qdf_nbuf_t netbuf); 492 493 /** 494 * ol_txrx_stats_callback - statistics notify callback 495 */ 496 typedef void (*ol_txrx_stats_callback)(void *ctxt, 497 enum htt_cmn_dbg_stats_type type, 498 uint8_t *buf, int bytes); 499 500 /** 501 * ol_txrx_ops - (pointers to) the functions used for tx and rx 502 * data xfer 503 * 504 * There are two portions of these txrx operations. 505 * The rx portion is filled in by OSIF SW before calling 506 * ol_txrx_osif_vdev_register; inside the ol_txrx_osif_vdev_register 507 * the txrx SW stores a copy of these rx function pointers, to use 508 * as it delivers rx data frames to the OSIF SW. 509 * The tx portion is filled in by the txrx SW inside 510 * ol_txrx_osif_vdev_register; when the function call returns, 511 * the OSIF SW stores a copy of these tx functions to use as it 512 * delivers tx data frames to the txrx SW. 513 * 514 * @tx.std - the tx function pointer for standard data 515 * frames This function pointer is set by the txrx SW 516 * perform host-side transmit operations based on 517 * whether a HL or LL host/target interface is in use. 518 * @tx.flow_control_cb - the transmit flow control 519 * function that is registered by the 520 * OSIF which is called from txrx to 521 * indicate whether the transmit OS 522 * queues should be paused/resumed 523 * @rx.std - the OS shim rx function to deliver rx data 524 * frames to. This can have different values for 525 * different virtual devices, e.g. so one virtual 526 * device's OS shim directly hands rx frames to the OS, 527 * but another virtual device's OS shim filters out P2P 528 * messages before sending the rx frames to the OS. The 529 * netbufs delivered to the osif_rx function are in the 530 * format specified by the OS to use for tx and rx 531 * frames (either 802.3 or native WiFi) 532 * @rx.wai_check - the tx function pointer for WAPI frames 533 * @rx.mon - the OS shim rx monitor function to deliver 534 * monitor data to Though in practice, it is probable 535 * that the same function will be used for delivering 536 * rx monitor data for all virtual devices, in theory 537 * each different virtual device can have a different 538 * OS shim function for accepting rx monitor data. The 539 * netbufs delivered to the osif_rx_mon function are in 540 * 802.11 format. Each netbuf holds a 802.11 MPDU, not 541 * an 802.11 MSDU. Depending on compile-time 542 * configuration, each netbuf may also have a 543 * monitor-mode encapsulation header such as a radiotap 544 * header added before the MPDU contents. 545 * @rx.std - the OS shim rx function to deliver rx data 546 * @proxy_arp - proxy arp function pointer - specified by 547 * OS shim, stored by txrx 548 * @get_key - function pointer to get key of the peer with 549 * specific key index 550 */ 551 struct ol_txrx_ops { 552 /* tx function pointers - specified by txrx, stored by OS shim */ 553 struct { 554 ol_txrx_tx_fp tx; 555 ol_txrx_tx_exc_fp tx_exception; 556 ol_txrx_tx_free_ext_fp tx_free_ext; 557 } tx; 558 559 /* rx function pointers - specified by OS shim, stored by txrx */ 560 struct { 561 ol_txrx_rx_fp rx; 562 ol_txrx_rx_check_wai_fp wai_check; 563 ol_txrx_rx_mon_fp mon; 564 ol_txrx_rsim_rx_decap_fp rsim_rx_decap; 565 } rx; 566 567 /* proxy arp function pointer - specified by OS shim, stored by txrx */ 568 ol_txrx_proxy_arp_fp proxy_arp; 569 ol_txrx_mcast_me_fp me_convert; 570 571 ol_txrx_get_key_fp get_key; 572 }; 573 574 /** 575 * ol_txrx_stats_req - specifications of the requested 576 * statistics 577 */ 578 struct ol_txrx_stats_req { 579 uint32_t stats_type_upload_mask; /* which stats to upload */ 580 uint32_t stats_type_reset_mask; /* which stats to reset */ 581 582 /* stats will be printed if either print element is set */ 583 struct { 584 int verbose; /* verbose stats printout */ 585 int concise; /* concise stats printout (takes precedence) */ 586 } print; /* print uploaded stats */ 587 588 /* stats notify callback will be invoked if fp is non-NULL */ 589 struct { 590 ol_txrx_stats_callback fp; 591 void *ctxt; 592 } callback; 593 594 /* stats will be copied into the specified buffer if buf is non-NULL */ 595 struct { 596 uint8_t *buf; 597 int byte_limit; /* don't copy more than this */ 598 } copy; 599 600 /* 601 * If blocking is true, the caller will take the specified semaphore 602 * to wait for the stats to be uploaded, and the driver will release 603 * the semaphore when the stats are done being uploaded. 604 */ 605 struct { 606 int blocking; 607 /*Note: this needs to change to some qdf_* type */ 608 qdf_semaphore_t *sem_ptr; 609 } wait; 610 }; 611 612 613 /* DP soc struct definition */ 614 struct cdp_soc_t { 615 struct cdp_ops *ops; 616 struct ol_if_ops *ol_ops; 617 }; 618 619 /* 620 * cdp_pdev_param_type: different types of parameters 621 * to set values in pdev 622 * @CDP_CONFIG_DEBUG_SNIFFER: Enable debug sniffer feature 623 */ 624 enum cdp_pdev_param_type { 625 CDP_CONFIG_DEBUG_SNIFFER, 626 }; 627 628 /* 629 * cdp_vdev_param_type: different types of parameters 630 * to set values in vdev 631 * @CDP_ENABLE_NAWDS: set nawds enable/disable 632 * @CDP_ENABLE_MCAST_EN: enable/disable multicast enhancement 633 * @CDP_ENABLE_WDS: wds sta 634 * @CDP_ENABLE_PROXYSTA: proxy sta 635 * @CDP_UPDATE_TDLS_FLAGS: tdls link flags 636 * @CDP_ENABLE_AP_BRIDGE: set ap_bridging enable/disable 637 * @CDP_ENABLE_CIPHER : set cipher type based on security 638 * @CDP_ENABLE_QWRAP_ISOLATION: qwrap isolation mode 639 */ 640 enum cdp_vdev_param_type { 641 CDP_ENABLE_NAWDS, 642 CDP_ENABLE_MCAST_EN, 643 CDP_ENABLE_WDS, 644 CDP_ENABLE_PROXYSTA, 645 CDP_UPDATE_TDLS_FLAGS, 646 CDP_CFG_WDS_AGING_TIMER, 647 CDP_ENABLE_AP_BRIDGE, 648 CDP_ENABLE_CIPHER, 649 CDP_ENABLE_QWRAP_ISOLATION 650 }; 651 652 #define TXRX_FW_STATS_TXSTATS 1 653 #define TXRX_FW_STATS_RXSTATS 2 654 #define TXRX_FW_STATS_RX_RATE_INFO 3 655 #define TXRX_FW_STATS_PHYSTATS 4 656 #define TXRX_FW_STATS_PHYSTATS_CONCISE 5 657 #define TXRX_FW_STATS_TX_RATE_INFO 6 658 #define TXRX_FW_STATS_TID_STATE 7 659 #define TXRX_FW_STATS_HOST_STATS 8 660 #define TXRX_FW_STATS_CLEAR_HOST_STATS 9 661 #define TXRX_FW_STATS_CE_STATS 10 662 #define TXRX_FW_STATS_VOW_UMAC_COUNTER 11 663 #define TXRX_FW_STATS_ME_STATS 12 664 #define TXRX_FW_STATS_TXBF_INFO 13 665 #define TXRX_FW_STATS_SND_INFO 14 666 #define TXRX_FW_STATS_ERROR_INFO 15 667 #define TXRX_FW_STATS_TX_SELFGEN_INFO 16 668 #define TXRX_FW_STATS_TX_MU_INFO 17 669 #define TXRX_FW_SIFS_RESP_INFO 18 670 #define TXRX_FW_RESET_STATS 19 671 #define TXRX_FW_MAC_WDOG_STATS 20 672 #define TXRX_FW_MAC_DESC_STATS 21 673 #define TXRX_FW_MAC_FETCH_MGR_STATS 22 674 #define TXRX_FW_MAC_PREFETCH_MGR_STATS 23 675 #define TXRX_FW_STATS_DURATION_INFO 24 676 #define TXRX_FW_STATS_DURATION_INFO_RESET 25 677 #define TXRX_FW_HALPHY_STATS 26 678 #define TXRX_FW_COEX_STATS 27 679 680 #define PER_RADIO_FW_STATS_REQUEST 0 681 #define PER_VDEV_FW_STATS_REQUEST 1 682 683 /** 684 * enum data_stall_log_event_indicator - Module triggering data stall 685 * @DATA_STALL_LOG_INDICATOR_UNUSED: Unused 686 * @DATA_STALL_LOG_INDICATOR_HOST_DRIVER: Host driver indicates data stall 687 * @DATA_STALL_LOG_INDICATOR_FIRMWARE: FW indicates data stall 688 * @DATA_STALL_LOG_INDICATOR_FRAMEWORK: Framework indicates data stall 689 * 690 * Enum indicating the module that indicates data stall event 691 */ 692 enum data_stall_log_event_indicator { 693 DATA_STALL_LOG_INDICATOR_UNUSED, 694 DATA_STALL_LOG_INDICATOR_HOST_DRIVER, 695 DATA_STALL_LOG_INDICATOR_FIRMWARE, 696 DATA_STALL_LOG_INDICATOR_FRAMEWORK, 697 }; 698 699 /** 700 * enum data_stall_log_event_type - data stall event type 701 * @DATA_STALL_LOG_NONE 702 * @DATA_STALL_LOG_FW_VDEV_PAUSE 703 * @DATA_STALL_LOG_HWSCHED_CMD_FILTER 704 * @DATA_STALL_LOG_HWSCHED_CMD_FLUSH 705 * @DATA_STALL_LOG_FW_RX_REFILL_FAILED 706 * @DATA_STALL_LOG_FW_RX_FCS_LEN_ERROR 707 * @DATA_STALL_LOG_FW_WDOG_ERRORS 708 * @DATA_STALL_LOG_BB_WDOG_ERROR 709 * @DATA_STALL_LOG_POST_TIM_NO_TXRX_ERROR 710 * @DATA_STALL_LOG_HOST_STA_TX_TIMEOUT 711 * @DATA_STALL_LOG_HOST_SOFTAP_TX_TIMEOUT 712 * @DATA_STALL_LOG_NUD_FAILURE 713 * 714 * Enum indicating data stall event type 715 */ 716 enum data_stall_log_event_type { 717 DATA_STALL_LOG_NONE, 718 DATA_STALL_LOG_FW_VDEV_PAUSE, 719 DATA_STALL_LOG_HWSCHED_CMD_FILTER, 720 DATA_STALL_LOG_HWSCHED_CMD_FLUSH, 721 DATA_STALL_LOG_FW_RX_REFILL_FAILED, 722 DATA_STALL_LOG_FW_RX_FCS_LEN_ERROR, 723 DATA_STALL_LOG_FW_WDOG_ERRORS, 724 DATA_STALL_LOG_BB_WDOG_ERROR, 725 DATA_STALL_LOG_POST_TIM_NO_TXRX_ERROR, 726 /* Stall events triggered by host/framework start from 0x100 onwards. */ 727 DATA_STALL_LOG_HOST_STA_TX_TIMEOUT = 0x100, 728 DATA_STALL_LOG_HOST_SOFTAP_TX_TIMEOUT, 729 DATA_STALL_LOG_NUD_FAILURE, 730 }; 731 732 /** 733 * enum data_stall_log_recovery_type - data stall recovery type 734 * @DATA_STALL_LOG_RECOVERY_NONE, 735 * @DATA_STALL_LOG_RECOVERY_CONNECT_DISCONNECT, 736 * @DATA_STALL_LOG_RECOVERY_TRIGGER_PDR 737 * 738 * Enum indicating data stall recovery type 739 */ 740 enum data_stall_log_recovery_type { 741 DATA_STALL_LOG_RECOVERY_NONE = 0, 742 DATA_STALL_LOG_RECOVERY_CONNECT_DISCONNECT, 743 DATA_STALL_LOG_RECOVERY_TRIGGER_PDR, 744 }; 745 746 /** 747 * struct data_stall_event_info - data stall info 748 * @indicator: Module triggering data stall 749 * @data_stall_type: data stall event type 750 * @vdev_id_bitmap: vdev_id_bitmap 751 * @pdev_id: pdev id 752 * @recovery_type: data stall recovery type 753 */ 754 struct data_stall_event_info { 755 uint32_t indicator; 756 uint32_t data_stall_type; 757 uint32_t vdev_id_bitmap; 758 uint32_t pdev_id; 759 uint32_t recovery_type; 760 }; 761 762 typedef void (*data_stall_detect_cb)(struct data_stall_event_info *); 763 764 /* 765 * cdp_stats - options for host and firmware 766 * statistics 767 */ 768 enum cdp_stats { 769 CDP_TXRX_STATS_0 = 0, 770 CDP_TXRX_STATS_1, 771 CDP_TXRX_STATS_2, 772 CDP_TXRX_STATS_3, 773 CDP_TXRX_STATS_4, 774 CDP_TXRX_STATS_5, 775 CDP_TXRX_STATS_6, 776 CDP_TXRX_STATS_7, 777 CDP_TXRX_STATS_8, 778 CDP_TXRX_STATS_9, 779 CDP_TXRX_STATS_10, 780 CDP_TXRX_STATS_11, 781 CDP_TXRX_STATS_12, 782 CDP_TXRX_STATS_13, 783 CDP_TXRX_STATS_14, 784 CDP_TXRX_STATS_15, 785 CDP_TXRX_STATS_16, 786 CDP_TXRX_STATS_17, 787 CDP_TXRX_STATS_18, 788 CDP_TXRX_STATS_19, 789 CDP_TXRX_STATS_20, 790 CDP_TXRX_STATS_21, 791 CDP_TXRX_STATS_22, 792 CDP_TXRX_STATS_23, 793 CDP_TXRX_STATS_24, 794 CDP_TXRX_STATS_25, 795 CDP_TXRX_STATS_26, 796 CDP_TXRX_STATS_27, 797 CDP_TXRX_STATS_HTT_MAX = 256, 798 CDP_TXRX_MAX_STATS = 512, 799 }; 800 801 /* 802 * Different Stat update types sent to OL_IF 803 * @UPDATE_PEER_STATS: update peer stats 804 * @UPDATE_VDEV_STATS: update vdev stats 805 * @UPDATE_PDE_STATS: Update pdev stats 806 */ 807 enum cdp_stat_update_type { 808 UPDATE_PEER_STATS = 0, 809 UPDATE_VDEV_STATS = 1, 810 UPDATE_PDEV_STATS = 2, 811 }; 812 813 /** 814 * struct cdp_tx_completion_ppdu_user - Tx PPDU completion per-user information 815 * @completion_status: completion status - OK/Filter/Abort/Timeout 816 * @tid: TID number 817 * @peer_id: Peer ID 818 * @frame_ctrl: frame control field in 802.11 header 819 * @qos_ctrl: QoS control field in 802.11 header 820 * @mpdu_tried: number of mpdus tried 821 * @mpdu_success: number of mpdus successfully transmitted 822 * @long_retries: long retries 823 * @short_retries: short retries 824 * @is_ampdu: mpdu aggregate or non-aggregate? 825 * @success_bytes: bytes successfully transmitted 826 * @retry_bytes: bytes retried 827 * @failed_msdus: MSDUs failed transmission 828 * @duration: user duration in ppdu 829 * @ltf_size: ltf_size 830 * @stbc: stbc 831 * @he_re: he_re (range extension) 832 * @txbf: txbf 833 * @bw: Transmission bandwidth 834 * <enum 2 transmit_bw_20_MHz> 835 * <enum 3 transmit_bw_40_MHz> 836 * <enum 4 transmit_bw_80_MHz> 837 * <enum 5 transmit_bw_160_MHz> 838 * @nss: NSS 1,2, ...8 839 * @mcs: MCS index 840 * @preamble: preamble 841 * @gi: guard interval 800/400/1600/3200 ns 842 * @dcm: dcm 843 * @ldpc: ldpc 844 * @ppdu_type: SU/MU_MIMO/MU_OFDMA/MU_MIMO_OFDMA/UL_TRIG/BURST_BCN/UL_BSR_RESP/ 845 * UL_BSR_TRIG/UNKNOWN 846 * @ba_seq_no: Block Ack sequence number 847 * @ba_bitmap: Block Ack bitmap 848 * @start_seqa: Sequence number of first MPDU 849 * @enq_bitmap: Enqueue MPDU bitmap 850 * @is_mcast: MCAST or UCAST 851 * @tx_rate: Transmission Rate 852 */ 853 struct cdp_tx_completion_ppdu_user { 854 uint32_t completion_status:8, 855 tid:8, 856 peer_id:16; 857 uint8_t mac_addr[6]; 858 uint32_t frame_ctrl:16, 859 qos_ctrl:16; 860 uint32_t mpdu_tried_ucast:16, 861 mpdu_tried_mcast:16; 862 uint16_t mpdu_success:16; 863 uint32_t long_retries:4, 864 short_retries:4, 865 tx_ratecode:8, 866 is_ampdu:1, 867 ppdu_type:5; 868 uint32_t success_bytes; 869 uint32_t retry_bytes; 870 uint32_t failed_bytes; 871 uint32_t success_msdus:16, 872 retry_msdus:16; 873 uint32_t failed_msdus:16, 874 duration:16; 875 uint32_t ltf_size:2, 876 stbc:1, 877 he_re:1, 878 txbf:4, 879 bw:4, 880 nss:4, 881 mcs:4, 882 preamble:4, 883 gi:4, 884 dcm:1, 885 ldpc:1; 886 uint32_t ba_seq_no; 887 uint32_t ba_bitmap[CDP_BA_256_BIT_MAP_SIZE_DWORDS]; 888 uint32_t start_seq; 889 uint32_t enq_bitmap[CDP_BA_256_BIT_MAP_SIZE_DWORDS]; 890 uint32_t num_mpdu:9, 891 num_msdu:16; 892 uint32_t tx_duration; 893 uint16_t ru_tones; 894 bool is_mcast; 895 uint32_t tx_rate; 896 }; 897 898 /** 899 * struct cdp_tx_completion_ppdu - Tx PPDU completion information 900 * @completion_status: completion status - OK/Filter/Abort/Timeout 901 * @ppdu_id: PPDU Id 902 * @vdev_id: VAP Id 903 * @num_users: Number of users 904 * @num_mpdu: Number of MPDUs in PPDU 905 * @num_msdu: Number of MSDUs in PPDU 906 * @frame_type: frame SU or MU 907 * @frame_ctrl: frame control of 80211 header 908 * @channel: Channel informartion 909 * @ack_rssi: RSSI value of last ack packet (units=dB above noise floor) 910 * @tx_duration: PPDU airtime 911 * @ppdu_start_timestamp: TSF at PPDU start 912 * @ppdu_end_timestamp: TSF at PPDU end 913 * @ack_timestamp: TSF at the reception of ACK 914 * @user: per-User stats (array of per-user structures) 915 */ 916 struct cdp_tx_completion_ppdu { 917 uint32_t ppdu_id; 918 uint16_t vdev_id; 919 uint32_t num_users; 920 uint32_t num_mpdu:9, 921 num_msdu:16; 922 uint16_t frame_type; 923 uint16_t frame_ctrl; 924 uint16_t channel; 925 uint16_t phy_mode; 926 uint32_t ack_rssi; 927 uint32_t tx_duration; 928 uint32_t ppdu_start_timestamp; 929 uint32_t ppdu_end_timestamp; 930 uint32_t ack_timestamp; 931 struct cdp_tx_completion_ppdu_user user[CDP_MU_MAX_USERS]; 932 }; 933 934 /** 935 * struct cdp_rate_stats - Tx/Rx Rate statistics 936 * @bw: Indicates the BW of the upcoming transmission - 937 * <enum 2 transmit_bw_20_MHz> 938 * <enum 3 transmit_bw_40_MHz> 939 * <enum 4 transmit_bw_80_MHz> 940 * <enum 5 transmit_bw_160_MHz> 941 * @pkt_type: Transmit Packet Type 942 * @stbc: When set, STBC transmission rate was used 943 * @ldpc: When set, use LDPC transmission rates 944 * @sgi: <enum 0 0_8_us_sgi > Legacy normal GI 945 * <enum 1 0_4_us_sgi > Legacy short GI 946 * <enum 2 1_6_us_sgi > HE related GI 947 * <enum 3 3_2_us_sgi > HE 948 * @mcs: Transmit MCS Rate 949 * @ofdma: Set when the transmission was an OFDMA transmission 950 * @tones_in_ru: The number of tones in the RU used. 951 * @tsf: Lower 32 bits of the TSF (timestamp when ppdu transmission finished) 952 * @peer_id: Peer ID of the flow or MPDU queue 953 * @tid: TID of the flow or MPDU queue 954 */ 955 struct cdp_rate_stats { 956 uint32_t rate_stats_info_valid:1, 957 bw:2, 958 pkt_type:4, 959 stbc:1, 960 ldpc:1, 961 sgi:2, 962 mcs:4, 963 ofdma:1, 964 tones_in_ru:12, 965 resvd0:4; 966 uint32_t tsf; 967 uint16_t peer_id; 968 uint8_t tid; 969 }; 970 971 /** 972 * struct cdp_tx_completion_msdu - Tx MSDU completion descriptor 973 * @ppdu_id: PPDU to which this MSDU belongs 974 * @transmit_cnt: Number of times this frame has been transmitted 975 * @ack_frame_rssi: RSSI of the received ACK or BA frame 976 * @first_msdu: Indicates this MSDU is the first MSDU in AMSDU 977 * @last_msdu: Indicates this MSDU is the last MSDU in AMSDU 978 * @msdu_part_of_amsdu : Indicates this MSDU was part of an A-MSDU in MPDU 979 * @extd: Extended structure containing rate statistics 980 */ 981 struct cdp_tx_completion_msdu { 982 uint32_t ppdu_id; 983 uint8_t transmit_cnt; 984 uint32_t ack_frame_rssi:8, 985 resvd0:1, 986 first_msdu:1, 987 last_msdu:1, 988 msdu_part_of_amsdu:1, 989 resvd1:20; 990 struct cdp_rate_stats extd; 991 }; 992 993 /** 994 * struct cdp_rx_indication_ppdu - Rx PPDU indication structure 995 * @ppdu_id: PPDU Id 996 * @is_ampdu: mpdu aggregate or non-aggregate? 997 * @num_mpdu: Number of MPDUs in PPDU 998 * @reserved: Reserved bits for future use 999 * @num_msdu: Number of MSDUs in PPDU 1000 * @udp_msdu_count: Number of UDP MSDUs in PPDU 1001 * @tcp_msdu_count: Number of TCP MSDUs in PPDU 1002 * @other_msdu_count: Number of MSDUs other than UDP and TCP MSDUs in PPDU 1003 * @duration: PPDU duration 1004 * @tid: TID number 1005 * @peer_id: Peer ID 1006 * @vdev_id: VAP ID 1007 * @mac_addr: Peer MAC Address 1008 * @first_data_seq_ctrl: Sequence control field of first data frame 1009 * @ltf_size: ltf_size 1010 * @stbc: When set, STBC rate was used 1011 * @he_re: he_re (range extension) 1012 * @bw: Bandwidth 1013 * <enum 0 bw_20_MHz> 1014 * <enum 1 bw_40_MHz> 1015 * <enum 2 bw_80_MHz> 1016 * <enum 3 bw_160_MHz> 1017 * @nss: NSS 1,2, ...8 1018 * @mcs: MCS index 1019 * @preamble: preamble 1020 * @gi: <enum 0 0_8_us_sgi > Legacy normal GI 1021 * <enum 1 0_4_us_sgi > Legacy short GI 1022 * <enum 2 1_6_us_sgi > HE related GI 1023 * <enum 3 3_2_us_sgi > HE 1024 * @dcm: dcm 1025 * @ldpc: ldpc 1026 * @ppdu_type: SU/MU_MIMO/MU_OFDMA/MU_MIMO_OFDMA/UL_TRIG/BURST_BCN/UL_BSR_RESP/ 1027 * UL_BSR_TRIG/UNKNOWN 1028 * @rssi: RSSI value (units = dB above noise floor) 1029 * @timestamp: TSF at the reception of PPDU 1030 * @length: PPDU length 1031 * @channel: Channel informartion 1032 * @lsig_A: L-SIG in 802.11 PHY header 1033 */ 1034 struct cdp_rx_indication_ppdu { 1035 uint32_t ppdu_id; 1036 uint16_t is_ampdu:1, 1037 num_mpdu:9, 1038 reserved:6; 1039 uint32_t num_msdu; 1040 uint16_t udp_msdu_count; 1041 uint16_t tcp_msdu_count; 1042 uint16_t other_msdu_count; 1043 uint16_t duration; 1044 uint32_t tid:8, 1045 peer_id:16; 1046 uint8_t vdev_id; 1047 uint8_t mac_addr[6]; 1048 uint16_t first_data_seq_ctrl; 1049 union { 1050 uint32_t rate_info; 1051 struct { 1052 uint32_t ltf_size:2, 1053 stbc:1, 1054 he_re:1, 1055 bw:4, 1056 nss:4, 1057 mcs:4, 1058 preamble:4, 1059 gi:4, 1060 dcm:1, 1061 ldpc:1, 1062 ppdu_type:2; 1063 }; 1064 } u; 1065 uint32_t lsig_a; 1066 uint32_t rssi; 1067 uint64_t timestamp; 1068 uint32_t length; 1069 uint8_t channel; 1070 }; 1071 1072 /** 1073 * struct cdp_rx_indication_msdu - Rx MSDU info 1074 * @ppdu_id: PPDU to which the MSDU belongs 1075 * @msdu_len: Length of MSDU in bytes 1076 * @ack_frame_rssi: RSSI of the received ACK or BA frame 1077 * @first_msdu: Indicates this MSDU is the first MSDU in AMSDU 1078 * @last_msdu: Indicates this MSDU is the last MSDU in AMSDU 1079 * @msdu_part_of_amsdu : Indicates this MSDU was part of an A-MSDU in MPDU 1080 * @extd: Extended structure containing rate statistics 1081 */ 1082 struct cdp_rx_indication_msdu { 1083 uint32_t ppdu_id; 1084 uint16_t msdu_len; 1085 uint32_t ack_frame_rssi:8, 1086 resvd0:1, 1087 first_msdu:1, 1088 last_msdu:1, 1089 msdu_part_of_amsdu:1, 1090 msdu_part_of_ampdu:1, 1091 resvd1:19; 1092 struct cdp_rate_stats extd; 1093 }; 1094 1095 /** 1096 * struct cdp_config_params - Propagate configuration parameters to datapath 1097 * @tso_enable: Enable/Disable TSO 1098 * @lro_enable: Enable/Disable LRO 1099 * @flow_steering_enable: Enable/Disable Rx Hash 1100 * @tcp_Udp_ChecksumOffload: Enable/Disable tcp-Udp checksum Offload 1101 * @napi_enable: Enable/Disable Napi 1102 * @tx_flow_stop_queue_threshold: Value to Pause tx queues 1103 * @tx_flow_start_queue_offset: Available Tx descriptors to unpause 1104 * tx queue 1105 */ 1106 struct cdp_config_params { 1107 unsigned int tso_enable:1; 1108 unsigned int lro_enable:1; 1109 unsigned int flow_steering_enable:1; 1110 unsigned int tcp_udp_checksumoffload:1; 1111 unsigned int napi_enable:1; 1112 /* Set when QCA_LL_TX_FLOW_CONTROL_V2 is enabled */ 1113 uint8_t tx_flow_stop_queue_threshold; 1114 uint8_t tx_flow_start_queue_offset; 1115 }; 1116 1117 /** 1118 * cdp_txrx_stats_req: stats request wrapper 1119 * used to pass request information to cdp layer 1120 * @stats: type of stats requested 1121 * @param0: opaque argument 0 to be passed to htt 1122 * @param1: opaque argument 1 to be passed to htt 1123 * @param2: opaque argument 2 to be passed to htt 1124 * @param3: opaque argument 3 to be passed to htt 1125 * @channel_param: Channel Information 1126 */ 1127 struct cdp_txrx_stats_req { 1128 enum cdp_stats stats; 1129 uint32_t param0; 1130 uint32_t param1; 1131 uint32_t param2; 1132 uint32_t param3; 1133 uint32_t cookie_val; 1134 uint8_t channel; 1135 }; 1136 1137 /** 1138 * struct cdp_monitor_filter - monitor filter info 1139 * @mode: set filter mode 1140 * @fp_mgmt: set Filter Pass MGMT Configuration 1141 * @fp_ctrl: set Filter Pass CTRL Configuration 1142 * @fp_data: set Filter Pass DATA Configuration 1143 * @mo_mgmt: set Monitor Other MGMT Configuration 1144 * @mo_ctrl: set Monitor Other CTRL Configuration 1145 * @mo_data: set Monitor other DATA Configuration 1146 * 1147 */ 1148 struct cdp_monitor_filter { 1149 uint16_t mode; 1150 uint16_t fp_mgmt; 1151 uint16_t fp_ctrl; 1152 uint16_t fp_data; 1153 uint16_t mo_mgmt; 1154 uint16_t mo_ctrl; 1155 uint16_t mo_data; 1156 }; 1157 #endif 1158