1 /* 2 * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 /** 20 * @file cdp_txrx_ops.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_OPS_H_ 25 #define _CDP_TXRX_CMN_OPS_H_ 26 27 #include <cdp_txrx_cmn_struct.h> 28 #include <cdp_txrx_stats_struct.h> 29 #include "cdp_txrx_handle.h" 30 #include <cdp_txrx_mon_struct.h> 31 #include "wlan_objmgr_psoc_obj.h" 32 #include <wmi_unified_api.h> 33 #include <wdi_event_api.h> 34 35 #ifdef IPA_OFFLOAD 36 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)) || \ 37 defined(CONFIG_IPA_WDI_UNIFIED_API) 38 #include <qdf_ipa_wdi3.h> 39 #else 40 #include <qdf_ipa.h> 41 #endif 42 #endif 43 44 /** 45 * bitmap values to indicate special handling of peer_delete 46 */ 47 #define CDP_PEER_DELETE_NO_SPECIAL 0 48 #define CDP_PEER_DO_NOT_START_UNMAP_TIMER 1 49 50 struct hif_opaque_softc; 51 52 /* same as ieee80211_nac_param */ 53 enum cdp_nac_param_cmd { 54 /* IEEE80211_NAC_PARAM_ADD */ 55 CDP_NAC_PARAM_ADD = 1, 56 /* IEEE80211_NAC_PARAM_DEL */ 57 CDP_NAC_PARAM_DEL, 58 /* IEEE80211_NAC_PARAM_LIST */ 59 CDP_NAC_PARAM_LIST, 60 }; 61 62 #define CDP_DELBA_INTERVAL_MS 3000 63 /** 64 * enum cdp_delba_rcode - CDP reason code for sending DELBA 65 * @CDP_DELBA_REASON_NONE: None 66 * @CDP_DELBA_2K_JUMP: Sending DELBA from 2k_jump_handle 67 */ 68 enum cdp_delba_rcode { 69 CDP_DELBA_REASON_NONE = 0, 70 CDP_DELBA_2K_JUMP, 71 }; 72 73 /** 74 * enum vdev_peer_protocol_enter_exit - whether ingress or egress 75 * @CDP_VDEV_PEER_PROTOCOL_IS_INGRESS: ingress 76 * @CDP_VDEV_PEER_PROTOCOL_IS_EGRESS: egress 77 * 78 * whether ingress or egress 79 */ 80 enum vdev_peer_protocol_enter_exit { 81 CDP_VDEV_PEER_PROTOCOL_IS_INGRESS, 82 CDP_VDEV_PEER_PROTOCOL_IS_EGRESS 83 }; 84 85 /** 86 * enum vdev_peer_protocol_tx_rx - whether tx or rx 87 * @CDP_VDEV_PEER_PROTOCOL_IS_TX: tx 88 * @CDP_VDEV_PEER_PROTOCOL_IS_RX: rx 89 * 90 * whether tx or rx 91 */ 92 enum vdev_peer_protocol_tx_rx { 93 CDP_VDEV_PEER_PROTOCOL_IS_TX, 94 CDP_VDEV_PEER_PROTOCOL_IS_RX 95 }; 96 97 /** 98 * enum vdev_ll_conn_actions - Actions to informvdev about 99 * low latency connection. 100 * @CDP_VDEV_LL_CONN_ADD: Add Low latency connection 101 * @CDP_VDEV_LL_CONN_DEL: Delete Low latency connection 102 */ 103 enum vdev_ll_conn_actions { 104 CDP_VDEV_LL_CONN_ADD, 105 CDP_VDEV_LL_CONN_DEL 106 }; 107 108 /** 109 * struct cdp_mlo_ops - MLO ops for multichip 110 * @mlo_soc_setup: setup DP mlo for SOC 111 * @mlo_soc_teardown: teardown DP mlo for SOC 112 * @mlo_setup_complete: indication to DP that all SOCs mlo is setup 113 */ 114 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP) 115 struct cdp_mlo_ops { 116 void (*mlo_soc_setup)(struct cdp_soc_t *cdp_soc, 117 struct cdp_mlo_ctxt *mlo_ctxt); 118 void (*mlo_soc_teardown)(struct cdp_soc_t *cdp_soc, 119 struct cdp_mlo_ctxt *mlo_ctxt); 120 QDF_STATUS (*update_mlo_ptnr_list)(struct cdp_soc_t *soc_hdl, 121 int8_t *vdev_ids, uint8_t num_vdevs, 122 uint8_t vdev_id); 123 void (*mlo_setup_complete)(struct cdp_mlo_ctxt *mlo_ctxt); 124 }; 125 #endif 126 127 /****************************************************************************** 128 * 129 * Control Interface (A Interface) 130 * 131 *****************************************************************************/ 132 133 struct cdp_cmn_ops { 134 135 QDF_STATUS (*txrx_soc_attach_target)(ol_txrx_soc_handle soc); 136 137 int (*txrx_pdev_attach_target)(ol_txrx_soc_handle soc, uint8_t pdev_id); 138 139 QDF_STATUS (*txrx_vdev_attach) 140 (struct cdp_soc_t *soc, uint8_t pdev_id, 141 struct cdp_vdev_info *vdev_info); 142 143 QDF_STATUS 144 (*txrx_vdev_detach)(struct cdp_soc_t *cdp_soc, uint8_t vdev_id, 145 ol_txrx_vdev_delete_cb callback, 146 void *cb_context); 147 148 QDF_STATUS (*txrx_pdev_attach) 149 (ol_txrx_soc_handle soc, 150 struct cdp_pdev_attach_params *params); 151 152 int (*txrx_pdev_post_attach)(struct cdp_soc_t *soc, uint8_t pdev_id); 153 154 void 155 (*txrx_pdev_pre_detach)(struct cdp_soc_t *soc, uint8_t pdev_id, 156 int force); 157 158 QDF_STATUS 159 (*txrx_pdev_detach)(struct cdp_soc_t *psoc, uint8_t pdev_id, 160 int force); 161 162 /** 163 * txrx_pdev_deinit() - Deinitialize pdev and dp ring memory 164 * @soc: soc dp handle 165 * @pdev_id: id of Dp pdev handle 166 * @force: Force deinit or not 167 * 168 * Return: QDF_STATUS 169 */ 170 QDF_STATUS 171 (*txrx_pdev_deinit)(struct cdp_soc_t *soc, uint8_t pdev_id, 172 int force); 173 174 QDF_STATUS 175 (*txrx_peer_create) 176 (ol_txrx_soc_handle soc, uint8_t vdev_id, 177 uint8_t *peer_mac_addr, enum cdp_peer_type peer_type); 178 179 QDF_STATUS 180 (*txrx_peer_setup)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id, 181 uint8_t *peer_mac, 182 struct cdp_peer_setup_info *setup_info); 183 184 QDF_STATUS 185 (*txrx_cp_peer_del_response) 186 (ol_txrx_soc_handle soc, uint8_t vdev_id, 187 uint8_t *peer_mac_addr); 188 189 QDF_STATUS 190 (*txrx_peer_teardown) 191 (struct cdp_soc_t *soc, uint8_t vdev_id, uint8_t *peer_mac); 192 193 int (*txrx_peer_add_ast) 194 (ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t *peer_mac, 195 uint8_t *mac_addr, enum cdp_txrx_ast_entry_type type, 196 uint32_t flags); 197 198 int (*txrx_peer_update_ast) 199 (ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t *peer_mac, 200 uint8_t *mac_addr, uint32_t flags); 201 202 bool (*txrx_peer_get_ast_info_by_soc) 203 (ol_txrx_soc_handle soc, uint8_t *ast_mac_addr, 204 struct cdp_ast_entry_info *ast_entry_info); 205 206 bool (*txrx_peer_get_ast_info_by_pdev) 207 (ol_txrx_soc_handle soc, uint8_t *ast_mac_addr, 208 uint8_t pdev_id, 209 struct cdp_ast_entry_info *ast_entry_info); 210 211 QDF_STATUS (*txrx_peer_ast_delete_by_soc) 212 (ol_txrx_soc_handle soc, uint8_t *ast_mac_addr, 213 txrx_ast_free_cb callback, 214 void *cookie); 215 216 QDF_STATUS (*txrx_peer_ast_delete_by_pdev) 217 (ol_txrx_soc_handle soc, uint8_t *ast_mac_addr, 218 uint8_t pdev_id, 219 txrx_ast_free_cb callback, 220 void *cookie); 221 222 QDF_STATUS 223 (*txrx_peer_delete)(struct cdp_soc_t *soc, uint8_t vdev_id, 224 uint8_t *peer_mac, uint32_t bitmap); 225 226 QDF_STATUS (*txrx_set_monitor_mode)(struct cdp_soc_t *soc, 227 uint8_t vdev_id, 228 uint8_t smart_monitor); 229 void (*txrx_peer_delete_sync)(struct cdp_soc_t *soc, uint8_t vdev_id, 230 uint8_t *peer_mac, 231 QDF_STATUS(*delete_cb)( 232 uint8_t vdev_id, 233 uint32_t peerid_cnt, 234 uint16_t *peerid_list), 235 uint32_t bitmap); 236 237 void (*txrx_peer_unmap_sync_cb_set)(struct cdp_soc_t *soc_hdl, 238 uint8_t pdev_id, 239 ol_txrx_peer_unmap_sync_cb 240 peer_unmap_sync); 241 242 QDF_STATUS 243 (*txrx_get_peer_mac_from_peer_id) 244 (struct cdp_soc_t *cdp_soc, 245 uint32_t peer_id, uint8_t *peer_mac); 246 247 void 248 (*txrx_vdev_tx_lock)(struct cdp_soc_t *soc, uint8_t vdev_id); 249 250 void 251 (*txrx_vdev_tx_unlock)(struct cdp_soc_t *soc, uint8_t vdev_id); 252 253 QDF_STATUS 254 (*txrx_ath_getstats)(struct cdp_soc_t *soc, uint8_t id, 255 struct cdp_dev_stats *stats, uint8_t type); 256 257 QDF_STATUS 258 (*txrx_set_gid_flag)(struct cdp_soc_t *soc, uint8_t pdev_id, 259 u_int8_t *mem_status, 260 u_int8_t *user_position); 261 262 uint32_t (*txrx_fw_supported_enh_stats_version)(struct cdp_soc_t *soc, 263 uint8_t pdev_id); 264 265 QDF_STATUS 266 (*txrx_if_mgmt_drain)(struct cdp_soc_t *soc, uint8_t pdev_id, 267 int force); 268 269 QDF_STATUS 270 (*txrx_set_curchan)(struct cdp_soc_t *soc, uint8_t pdev_id, 271 uint32_t chan_mhz); 272 273 QDF_STATUS 274 (*txrx_set_privacy_filters) 275 (struct cdp_soc_t *soc, uint8_t vdev_id, void *filter, 276 uint32_t num); 277 278 uint32_t (*txrx_get_cfg)(struct cdp_soc_t *soc, enum cdp_dp_cfg cfg); 279 280 /******************************************************************** 281 * Data Interface (B Interface) 282 ********************************************************************/ 283 284 QDF_STATUS 285 (*txrx_vdev_register)(struct cdp_soc_t *soc, uint8_t vdev_id, 286 ol_osif_vdev_handle osif_vdev, 287 struct ol_txrx_ops *txrx_ops); 288 289 int (*txrx_mgmt_send)(struct cdp_soc_t *soc, uint8_t vdev_id, 290 qdf_nbuf_t tx_mgmt_frm, uint8_t type); 291 292 int (*txrx_mgmt_send_ext)(struct cdp_soc_t *soc, uint8_t vdev_id, 293 qdf_nbuf_t tx_mgmt_frm, uint8_t type, 294 uint8_t use_6mbps, uint16_t chanfreq); 295 296 /** 297 * ol_txrx_mgmt_tx_cb - tx management delivery notification 298 * callback function 299 */ 300 301 QDF_STATUS 302 (*txrx_mgmt_tx_cb_set)(struct cdp_soc_t *soc, uint8_t pdev_id, 303 uint8_t type, 304 ol_txrx_mgmt_tx_cb download_cb, 305 ol_txrx_mgmt_tx_cb ota_ack_cb, 306 void *ctxt); 307 308 /** 309 * ol_txrx_data_tx_cb - Function registered with the data path 310 * that is called when tx frames marked as "no free" are 311 * done being transmitted 312 */ 313 314 void (*txrx_data_tx_cb_set)(struct cdp_soc_t *soc, uint8_t vdev_id, 315 ol_txrx_data_tx_cb callback, void *ctxt); 316 317 qdf_nbuf_t (*tx_send_exc) 318 (ol_txrx_soc_handle soc, uint8_t vdev_id, qdf_nbuf_t msdu_list, 319 struct cdp_tx_exception_metadata *tx_exc_metadata); 320 321 /******************************************************************* 322 * Statistics and Debugging Interface (C Interface) 323 ********************************************************************/ 324 325 int (*txrx_aggr_cfg)(struct cdp_soc_t *soc, uint8_t vdev_id, 326 int max_subfrms_ampdu, 327 int max_subfrms_amsdu); 328 329 A_STATUS 330 (*txrx_fw_stats_get)(struct cdp_soc_t *soc, uint8_t vdev_id, 331 struct ol_txrx_stats_req *req, 332 bool per_vdev, bool response_expected); 333 334 int (*txrx_debug)(struct cdp_soc_t *soc, uint8_t vdev_id, 335 int debug_specs); 336 337 QDF_STATUS 338 (*txrx_fw_stats_cfg)(struct cdp_soc_t *soc, uint8_t vdev_id, 339 uint8_t cfg_stats_type, uint32_t cfg_val); 340 341 void (*txrx_print_level_set)(unsigned level); 342 343 /** 344 * ol_txrx_get_vdev_mac_addr() - Return mac addr of vdev 345 * @soc: datapath soc handle 346 * @vdev_id: vdev id 347 * 348 * Return: vdev mac address 349 */ 350 uint8_t * (*txrx_get_vdev_mac_addr)(struct cdp_soc_t *soc, 351 uint8_t vdev_id); 352 353 /** 354 * ol_txrx_get_ctrl_pdev_from_vdev() - Return control pdev of vdev 355 * @soc: datapath soc handle 356 * @vdev_id: vdev id 357 * 358 * Return: Handle to control pdev 359 */ 360 struct cdp_cfg *(*txrx_get_ctrl_pdev_from_vdev)(struct cdp_soc_t *soc, 361 uint8_t vdev_id); 362 363 /** 364 * txrx_get_mon_vdev_from_pdev() - Return monitor mode vdev 365 * @soc: datapath soc handle 366 * @pdev: pdev id 367 * 368 * Return: vdev_id 369 */ 370 uint8_t (*txrx_get_mon_vdev_from_pdev)(struct cdp_soc_t *soc, 371 uint8_t pdev_id); 372 373 void (*txrx_soc_detach)(struct cdp_soc_t *soc); 374 375 /** 376 * txrx_soc_deinit() - Deinitialize dp soc and dp ring memory 377 * @soc: Opaque Dp handle 378 * 379 * Return None 380 */ 381 void (*txrx_soc_deinit)(struct cdp_soc_t *soc); 382 383 /** 384 * txrx_soc_init() - Initialize dp soc and dp ring memory 385 * @soc: Opaque Dp handle 386 * @ctrl_psoc: Opaque Cp handle 387 * @htchdl: Opaque htc handle 388 * @hifhdl: Opaque hif handle 389 * 390 * Return: None 391 */ 392 void *(*txrx_soc_init)(struct cdp_soc_t *soc, 393 struct cdp_ctrl_objmgr_psoc *ctrl_psoc, 394 struct hif_opaque_softc *hif_handle, 395 HTC_HANDLE htc_handle, qdf_device_t qdf_osdev, 396 struct ol_if_ops *ol_ops, uint16_t device_id); 397 398 QDF_STATUS (*txrx_pdev_init)(ol_txrx_soc_handle soc, 399 HTC_HANDLE htc_handle, 400 qdf_device_t qdf_osdev, 401 uint8_t pdev_id); 402 403 /** 404 * txrx_tso_soc_attach() - TSO attach handler triggered during 405 * dynamic tso activation 406 * @soc: Opaque Dp handle 407 * 408 * Return: QDF status 409 */ 410 QDF_STATUS (*txrx_tso_soc_attach)(struct cdp_soc_t *soc); 411 412 /** 413 * txrx_tso_soc_detach() - TSO detach handler triggered during 414 * dynamic tso de-activation 415 * @soc: Opaque Dp handle 416 * 417 * Return: QDF status 418 */ 419 QDF_STATUS (*txrx_tso_soc_detach)(struct cdp_soc_t *soc); 420 int (*addba_resp_tx_completion)(struct cdp_soc_t *cdp_soc, 421 uint8_t *peer_mac, 422 uint16_t vdev_id, uint8_t tid, 423 int status); 424 425 int (*addba_requestprocess)(struct cdp_soc_t *cdp_soc, 426 uint8_t *peer_mac, 427 uint16_t vdev_id, 428 uint8_t dialogtoken, 429 uint16_t tid, uint16_t batimeout, 430 uint16_t buffersize, 431 uint16_t startseqnum); 432 433 QDF_STATUS 434 (*addba_responsesetup)(struct cdp_soc_t *cdp_soc, 435 uint8_t *peer_mac, 436 uint16_t vdev_id, uint8_t tid, 437 uint8_t *dialogtoken, uint16_t *statuscode, 438 uint16_t *buffersize, uint16_t *batimeout); 439 440 int (*delba_process)(struct cdp_soc_t *cdp_soc, uint8_t *peer_mac, 441 uint16_t vdev_id, int tid, uint16_t reasoncode); 442 443 /** 444 * delba_tx_completion() - Indicate delba tx status 445 * @cdp_soc: soc handle 446 * @peer_mac: Peer mac address 447 * @vdev_id: vdev id 448 * @tid: Tid number 449 * @status: Tx completion status 450 * 451 * Return: 0 on Success, 1 on failure 452 */ 453 int (*delba_tx_completion)(struct cdp_soc_t *cdp_soc, uint8_t *peer_mac, 454 uint16_t vdev_id, 455 uint8_t tid, int status); 456 457 QDF_STATUS 458 (*set_addba_response)(struct cdp_soc_t *cdp_soc, uint8_t *peer_mac, 459 uint16_t vdev_id, uint8_t tid, 460 uint16_t statuscode); 461 462 QDF_STATUS 463 (*set_vdev_dscp_tid_map)(struct cdp_soc_t *soc_handle, 464 uint8_t vdev_id, uint8_t map_id); 465 int (*txrx_get_total_per)(struct cdp_soc_t *soc, uint8_t pdev_id); 466 467 void (*flush_cache_rx_queue)(void); 468 469 QDF_STATUS (*set_pdev_dscp_tid_map)(struct cdp_soc_t *soc_handle, 470 uint8_t pdev_id, 471 uint8_t map_id, 472 uint8_t tos, uint8_t tid); 473 474 QDF_STATUS (*txrx_stats_request)(struct cdp_soc_t *soc_handle, 475 uint8_t vdev_id, 476 struct cdp_txrx_stats_req *req); 477 478 QDF_STATUS (*display_stats)(struct cdp_soc_t *psoc, uint16_t value, 479 enum qdf_stats_verbosity_level level); 480 481 QDF_STATUS (*txrx_intr_attach)(struct cdp_soc_t *soc_handle); 482 void (*txrx_intr_detach)(struct cdp_soc_t *soc_handle); 483 QDF_STATUS (*set_pn_check)(struct cdp_soc_t *soc_handle, 484 uint8_t vdev_id, uint8_t *peermac, 485 enum cdp_sec_type sec_type, 486 uint32_t *rx_pn); 487 488 QDF_STATUS(*set_key_sec_type)(struct cdp_soc_t *soc_handle, 489 uint8_t vdev_id, uint8_t *peermac, 490 enum cdp_sec_type sec_type, 491 bool is_unicast); 492 493 QDF_STATUS (*update_config_parameters)(struct cdp_soc *psoc, 494 struct cdp_config_params *params); 495 496 void *(*get_dp_txrx_handle)(ol_txrx_soc_handle soc, uint8_t pdev_id); 497 void (*set_dp_txrx_handle)(ol_txrx_soc_handle soc, uint8_t pdev_id, 498 void *dp_hdl); 499 500 void *(*get_vdev_dp_ext_txrx_handle)(struct cdp_soc_t *soc, 501 uint8_t vdev_id); 502 QDF_STATUS (*set_vdev_dp_ext_txrx_handle)(struct cdp_soc_t *soc, 503 uint8_t vdev_id, 504 uint16_t size); 505 506 void *(*get_soc_dp_txrx_handle)(struct cdp_soc *soc_handle); 507 void (*set_soc_dp_txrx_handle)(struct cdp_soc *soc_handle, 508 void *dp_txrx_handle); 509 510 QDF_STATUS (*map_pdev_to_lmac)(ol_txrx_soc_handle soc, uint8_t pdev_id, 511 uint32_t lmac_id); 512 513 QDF_STATUS (*handle_mode_change)(ol_txrx_soc_handle soc, 514 uint8_t pdev_id, uint32_t lmac_id); 515 516 QDF_STATUS (*set_pdev_status_down)(struct cdp_soc_t *soc_handle, 517 uint8_t pdev_id, bool is_pdev_down); 518 519 QDF_STATUS (*txrx_peer_reset_ast) 520 (ol_txrx_soc_handle soc, uint8_t *ast_macaddr, 521 uint8_t *peer_macaddr, uint8_t vdev_id); 522 523 QDF_STATUS (*txrx_peer_reset_ast_table)(ol_txrx_soc_handle soc, 524 uint8_t vdev_id); 525 526 void (*txrx_peer_flush_ast_table)(ol_txrx_soc_handle soc); 527 void (*txrx_set_ba_aging_timeout)(struct cdp_soc_t *soc_handle, 528 uint8_t ac, uint32_t value); 529 void (*txrx_get_ba_aging_timeout)(struct cdp_soc_t *soc_handle, 530 uint8_t ac, uint32_t *value); 531 532 QDF_STATUS (*txrx_peer_map_attach)(ol_txrx_soc_handle soc, 533 uint32_t num_peers, 534 uint32_t max_ast_index, 535 uint8_t peer_map_unmap_v); 536 537 QDF_STATUS (*set_soc_param)(ol_txrx_soc_handle soc, 538 enum cdp_soc_param_t param, 539 uint32_t value); 540 541 ol_txrx_tx_fp tx_send; 542 /** 543 * txrx_get_os_rx_handles_from_vdev() - Return function, osif vdev 544 * to deliver pkt to stack. 545 * @soc: datapath soc handle 546 * @vdev: vdev id 547 * @stack_fn: pointer to - function pointer to deliver RX pkt to stack 548 * @osif_vdev: pointer to - osif vdev to deliver RX packet to. 549 */ 550 void (*txrx_get_os_rx_handles_from_vdev) 551 (ol_txrx_soc_handle soc, 552 uint8_t vdev_id, 553 ol_txrx_rx_fp *stack_fn, 554 ol_osif_vdev_handle *osif_vdev); 555 556 void (*set_rate_stats_ctx)(struct cdp_soc_t *soc, 557 void *ctx); 558 559 int (*txrx_classify_update) 560 (struct cdp_soc_t *soc, uint8_t vdev_id, qdf_nbuf_t skb, 561 enum txrx_direction, struct ol_txrx_nbuf_classify *nbuf_class); 562 563 bool (*get_dp_capabilities)(struct cdp_soc_t *soc, 564 enum cdp_capabilities dp_caps); 565 void* (*get_rate_stats_ctx)(struct cdp_soc_t *soc); 566 QDF_STATUS (*txrx_peer_flush_rate_stats)(struct cdp_soc_t *soc, 567 uint8_t pdev_id, 568 void *buf); 569 void* (*txrx_peer_get_rdkstats_ctx)(struct cdp_soc_t *soc, 570 uint8_t vdev_id, 571 uint8_t *mac_addr); 572 573 QDF_STATUS (*txrx_flush_rate_stats_request)(struct cdp_soc_t *soc, 574 uint8_t pdev_id); 575 QDF_STATUS (*set_pdev_pcp_tid_map)(struct cdp_soc_t *soc, 576 uint8_t pdev_id, 577 uint8_t pcp, uint8_t tid); 578 QDF_STATUS (*set_vdev_pcp_tid_map)(struct cdp_soc_t *soc, 579 uint8_t vdev_id, 580 uint8_t pcp, uint8_t tid); 581 #ifdef QCA_MULTIPASS_SUPPORT 582 QDF_STATUS (*set_vlan_groupkey)(struct cdp_soc_t *soc, uint8_t vdev_id, 583 uint16_t vlan_id, uint16_t group_key); 584 #endif 585 586 uint16_t (*get_peer_mac_list) 587 (ol_txrx_soc_handle soc, uint8_t vdev_id, 588 u_int8_t newmac[][QDF_MAC_ADDR_SIZE], uint16_t mac_cnt, 589 bool limit); 590 #ifdef QCA_SUPPORT_WDS_EXTENDED 591 uint16_t (*get_wds_ext_peer_id)(ol_txrx_soc_handle soc, 592 uint8_t vdev_id, 593 uint8_t *mac); 594 QDF_STATUS (*set_wds_ext_peer_rx)(ol_txrx_soc_handle soc, 595 uint8_t vdev_id, 596 uint8_t *mac, 597 ol_txrx_rx_fp rx, 598 ol_osif_peer_handle osif_peer); 599 #endif /* QCA_SUPPORT_WDS_EXTENDED */ 600 void (*txrx_drain)(ol_txrx_soc_handle soc); 601 int (*get_free_desc_poolsize)(struct cdp_soc_t *soc); 602 #ifdef WLAN_SYSFS_DP_STATS 603 QDF_STATUS (*txrx_sysfs_fill_stats)(ol_txrx_soc_handle soc, 604 char *buf, uint32_t buf_size); 605 QDF_STATUS (*txrx_sysfs_set_stat_type)(ol_txrx_soc_handle soc, 606 uint32_t stat_type, 607 uint32_t mac_id); 608 #endif /* WLAN_SYSFS_DP_STATS */ 609 #ifdef WLAN_FEATURE_PKT_CAPTURE_V2 610 void (*set_pkt_capture_mode)(struct cdp_soc_t *soc, bool val); 611 #endif 612 613 #ifdef FEATURE_RUNTIME_PM 614 void (*set_rtpm_tput_policy)(struct cdp_soc_t *soc, bool val); 615 #endif 616 }; 617 618 struct cdp_ctrl_ops { 619 620 int 621 (*txrx_mempools_attach)(ol_txrx_soc_handle dp_soc); 622 int 623 (*txrx_update_filter_neighbour_peers)( 624 struct cdp_soc_t *soc, uint8_t vdev_id, 625 uint32_t cmd, uint8_t *macaddr); 626 627 /* Is this similar to ol_txrx_peer_state_update() in MCL */ 628 /** 629 * @brief Update the authorize peer object at association time 630 * @details 631 * For the host-based implementation of rate-control, it 632 * updates the peer/node-related parameters within rate-control 633 * context of the peer at association. 634 * 635 * @param soc_hdl - pointer to the soc object 636 * @param vdev_id - id of the virtual object 637 * @param peer_mac - mac address of the node's object 638 * @authorize - either to authorize or unauthorize peer 639 * 640 * @return QDF_STATUS 641 */ 642 QDF_STATUS 643 (*txrx_peer_authorize)(struct cdp_soc_t *soc_hdl, 644 uint8_t vdev_id, 645 uint8_t *peer_mac, 646 u_int32_t authorize); 647 bool 648 (*txrx_peer_get_authorize)(struct cdp_soc_t *soc_hdl, 649 uint8_t vdev_id, 650 uint8_t *peer_mac); 651 652 void (*tx_flush_buffers)(struct cdp_soc_t *soc, uint8_t vdev_id); 653 654 int (*txrx_is_target_ar900b)(struct cdp_soc_t *soc_hdl); 655 656 QDF_STATUS 657 (*txrx_set_vdev_param)(struct cdp_soc_t *soc, uint8_t vdev_id, 658 enum cdp_vdev_param_type param, 659 cdp_config_param_type val); 660 661 /** 662 * @brief Set the reo dest ring num of the radio 663 * @details 664 * Set the reo destination ring no on which we will receive 665 * pkts for this radio. 666 * 667 * @txrx_soc - soc handle 668 * @param pdev_id - id of physical device 669 * @return the reo destination ring number 670 * @param reo_dest_ring_num - value ranges between 1 - 4 671 */ 672 QDF_STATUS (*txrx_set_pdev_reo_dest)( 673 struct cdp_soc_t *txrx_soc, 674 uint8_t pdev_id, 675 enum cdp_host_reo_dest_ring reo_dest_ring_num); 676 677 /** 678 * @brief Get the reo dest ring num of the radio 679 * @details 680 * Get the reo destination ring no on which we will receive 681 * pkts for this radio. 682 * 683 * @txrx_soc - soc handle 684 * @param pdev_id - id of physical device 685 * @return the reo destination ring number 686 */ 687 enum cdp_host_reo_dest_ring (*txrx_get_pdev_reo_dest)( 688 struct cdp_soc_t *txrx_soc, 689 uint8_t pdev_id); 690 691 int (*txrx_wdi_event_sub)(struct cdp_soc_t *soc, uint8_t pdev_id, 692 wdi_event_subscribe *event_cb_sub, 693 uint32_t event); 694 695 int (*txrx_wdi_event_unsub)(struct cdp_soc_t *soc, uint8_t pdev_id, 696 wdi_event_subscribe *event_cb_sub, 697 uint32_t event); 698 699 int (*txrx_get_sec_type)(ol_txrx_soc_handle soc, uint8_t vdev_id, 700 uint8_t *peer_mac, uint8_t sec_idx); 701 702 QDF_STATUS 703 (*txrx_update_mgmt_txpow_vdev)(struct cdp_soc_t *soc, 704 uint8_t vdev_id, 705 uint8_t subtype, uint8_t tx_power); 706 707 /** 708 * txrx_set_pdev_param() - callback to set pdev parameter 709 * @soc: opaque soc handle 710 * @pdev_id:id of data path pdev handle 711 * @val: value of pdev_tx_capture 712 * 713 * Return: status: 0 - Success, non-zero: Failure 714 */ 715 QDF_STATUS (*txrx_set_pdev_param)(struct cdp_soc_t *soc, 716 uint8_t pdev_id, 717 enum cdp_pdev_param_type type, 718 cdp_config_param_type val); 719 720 QDF_STATUS (*txrx_get_pdev_param)(struct cdp_soc_t *soc, 721 uint8_t pdev_id, 722 enum cdp_pdev_param_type type, 723 cdp_config_param_type *val); 724 725 QDF_STATUS (*txrx_set_peer_param)(struct cdp_soc_t *soc, 726 uint8_t vdev_id, uint8_t *peer_mac, 727 enum cdp_peer_param_type param, 728 cdp_config_param_type val); 729 730 QDF_STATUS (*txrx_get_peer_param)(struct cdp_soc_t *soc, 731 uint8_t vdev_id, uint8_t *peer_mac, 732 enum cdp_peer_param_type param, 733 cdp_config_param_type *val); 734 735 void * (*txrx_get_pldev)(struct cdp_soc_t *soc, uint8_t pdev_id); 736 void (*txrx_peer_flush_frags)(struct cdp_soc_t *soc, uint8_t vdev_id, 737 uint8_t *peer_mac); 738 739 #ifdef VDEV_PEER_PROTOCOL_COUNT 740 void (*txrx_peer_protocol_cnt)(struct cdp_soc_t *soc, 741 int8_t vdev_id, 742 qdf_nbuf_t nbuf, 743 bool is_egress, 744 bool is_rx); 745 #endif 746 #ifdef ATH_SUPPORT_NAC_RSSI 747 QDF_STATUS (*txrx_vdev_config_for_nac_rssi)(struct cdp_soc_t *cdp_soc, 748 uint8_t vdev_id, 749 enum cdp_nac_param_cmd cmd, 750 char *bssid, 751 char *client_macaddr, 752 uint8_t chan_num); 753 754 QDF_STATUS (*txrx_vdev_get_neighbour_rssi)(struct cdp_soc_t *cdp_soc, 755 uint8_t vdev_id, 756 char *macaddr, 757 uint8_t *rssi); 758 #endif 759 760 #ifdef WLAN_SUPPORT_SCS 761 QDF_STATUS 762 (*txrx_enable_scs_params) ( 763 struct cdp_soc_t *soc, struct qdf_mac_addr 764 *macaddr, 765 uint8_t vdev_id, 766 bool is_active); 767 768 QDF_STATUS 769 (*txrx_record_scs_params) ( 770 struct cdp_soc_t *soc, struct qdf_mac_addr 771 *macaddr, 772 uint8_t vdev_id, 773 struct cdp_scs_params *scs_params, 774 uint8_t entry_ctr, 775 uint8_t scs_sessions); 776 #endif 777 778 #ifdef WLAN_SUPPORT_MSCS 779 QDF_STATUS 780 (*txrx_record_mscs_params) ( 781 struct cdp_soc_t *soc, uint8_t *macaddr, 782 uint8_t vdev_id, 783 struct cdp_mscs_params *mscs_params, 784 bool active); 785 #endif 786 787 QDF_STATUS 788 (*set_key)(struct cdp_soc_t *soc, uint8_t vdev_id, uint8_t *mac, 789 bool is_unicast, uint32_t *key); 790 791 QDF_STATUS (*txrx_get_vdev_param)(struct cdp_soc_t *soc, 792 uint8_t vdev_id, 793 enum cdp_vdev_param_type param, 794 cdp_config_param_type *val); 795 int (*enable_peer_based_pktlog)(struct cdp_soc_t *cdp_soc, 796 uint8_t pdev_id, 797 uint8_t *macaddr, uint8_t enb_dsb); 798 799 QDF_STATUS 800 (*calculate_delay_stats)(struct cdp_soc_t *cdp_soc, 801 uint8_t vdev_id, qdf_nbuf_t nbuf); 802 #ifdef WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG 803 QDF_STATUS (*txrx_update_pdev_rx_protocol_tag)( 804 struct cdp_soc_t *soc, uint8_t pdev_id, 805 uint32_t protocol_mask, uint16_t protocol_type, 806 uint16_t tag); 807 #ifdef WLAN_SUPPORT_RX_TAG_STATISTICS 808 void (*txrx_dump_pdev_rx_protocol_tag_stats)( 809 struct cdp_soc_t *soc, uint8_t pdev_id, 810 uint16_t protocol_type); 811 #endif /* WLAN_SUPPORT_RX_TAG_STATISTICS */ 812 #endif /* WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG */ 813 #ifdef WLAN_SUPPORT_RX_FLOW_TAG 814 QDF_STATUS (*txrx_set_rx_flow_tag)( 815 struct cdp_soc_t *cdp_soc, uint8_t pdev_id, 816 struct cdp_rx_flow_info *flow_info); 817 QDF_STATUS (*txrx_dump_rx_flow_tag_stats)( 818 struct cdp_soc_t *cdp_soc, uint8_t pdev_id, 819 struct cdp_rx_flow_info *flow_info); 820 #endif /* WLAN_SUPPORT_RX_FLOW_TAG */ 821 #ifdef QCA_MULTIPASS_SUPPORT 822 void (*txrx_peer_set_vlan_id)(struct cdp_soc_t *cdp_soc, 823 uint8_t vdev_id, uint8_t *peer_mac, 824 uint16_t vlan_id); 825 #endif 826 #if defined(WLAN_TX_PKT_CAPTURE_ENH) || defined(WLAN_RX_PKT_CAPTURE_ENH) 827 QDF_STATUS (*txrx_update_peer_pkt_capture_params)( 828 ol_txrx_soc_handle soc, uint8_t pdev_id, 829 bool is_rx_pkt_cap_enable, uint8_t is_tx_pkt_cap_enable, 830 uint8_t *peer_mac); 831 #endif /* WLAN_TX_PKT_CAPTURE_ENH || WLAN_RX_PKT_CAPTURE_ENH */ 832 QDF_STATUS 833 (*txrx_set_psoc_param)(struct cdp_soc_t *soc, 834 enum cdp_psoc_param_type param, 835 cdp_config_param_type val); 836 837 QDF_STATUS (*txrx_get_psoc_param)(ol_txrx_soc_handle soc, 838 enum cdp_psoc_param_type type, 839 cdp_config_param_type *val); 840 #ifdef VDEV_PEER_PROTOCOL_COUNT 841 /* 842 * Enable per-peer protocol counters 843 */ 844 void (*txrx_enable_peer_protocol_count)(struct cdp_soc_t *soc, 845 int8_t vdev_id, bool enable); 846 void (*txrx_set_peer_protocol_drop_mask)(struct cdp_soc_t *soc, 847 int8_t vdev_id, int mask); 848 int (*txrx_is_peer_protocol_count_enabled)(struct cdp_soc_t *soc, 849 int8_t vdev_id); 850 int (*txrx_get_peer_protocol_drop_mask)(struct cdp_soc_t *soc, 851 int8_t vdev_id); 852 853 #endif 854 855 #if defined(WLAN_FEATURE_TSF_UPLINK_DELAY) || defined(CONFIG_SAWF) 856 void (*txrx_set_delta_tsf)(struct cdp_soc_t *soc, uint8_t vdev_id, 857 uint32_t delta_tsf); 858 #endif 859 #ifdef WLAN_FEATURE_TSF_UPLINK_DELAY 860 QDF_STATUS (*txrx_set_tsf_ul_delay_report)(struct cdp_soc_t *soc, 861 uint8_t vdev_id, 862 bool enable); 863 QDF_STATUS (*txrx_get_uplink_delay)(struct cdp_soc_t *soc, 864 uint8_t vdev_id, 865 uint32_t *val); 866 #endif 867 #ifdef QCA_UNDECODED_METADATA_SUPPORT 868 QDF_STATUS (*txrx_set_pdev_phyrx_error_mask)(struct cdp_soc_t *soc, 869 uint8_t pdev_id, 870 uint32_t mask, 871 uint32_t mask_cont); 872 QDF_STATUS (*txrx_get_pdev_phyrx_error_mask)(struct cdp_soc_t *soc, 873 uint8_t pdev_id, 874 uint32_t *mask, 875 uint32_t *mask_cont); 876 #endif 877 }; 878 879 struct cdp_me_ops { 880 881 void (*tx_me_alloc_descriptor)(struct cdp_soc_t *soc, 882 uint8_t pdev_id); 883 884 void (*tx_me_free_descriptor)(struct cdp_soc_t *soc, uint8_t pdev_id); 885 886 uint16_t (*tx_me_convert_ucast)(struct cdp_soc_t *soc, uint8_t vdev_id, 887 qdf_nbuf_t wbuf, u_int8_t newmac[][6], 888 uint8_t newmaccnt, uint8_t tid, 889 bool is_igmp, bool is_dms_pkt); 890 }; 891 892 /** 893 * struct cdp_mon_ops - host mon ops 894 * @txrx_reset_monitor_mode: Handler to reset monitor mode 895 * @txrx_deliver_tx_mgmt: deliver mgmt tx frame 896 * @txrx_set_advance_monitor_filter: set advanced monitor mode 897 * @config_full_mon_mode: configure full monitor mode 898 * @txrx_enable_mon_reap_timer: Enable/Disable reap timer of monitor status ring 899 */ 900 struct cdp_mon_ops { 901 902 QDF_STATUS (*txrx_reset_monitor_mode) 903 (ol_txrx_soc_handle soc, uint8_t pdev_id, u_int8_t smart_monitor); 904 905 QDF_STATUS (*txrx_deliver_tx_mgmt) 906 (struct cdp_soc_t *cdp_soc, uint8_t pdev_id, qdf_nbuf_t nbuf); 907 908 /* HK advance monitor filter support */ 909 QDF_STATUS (*txrx_set_advance_monitor_filter) 910 (struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 911 struct cdp_monitor_filter *filter_val); 912 913 /* Configure full monitor mode */ 914 QDF_STATUS 915 (*config_full_mon_mode)(struct cdp_soc_t *soc, uint8_t val); 916 QDF_STATUS (*soc_config_full_mon_mode)(struct cdp_pdev *cdp_pdev, 917 uint8_t val); 918 919 /* Get monitor mode pdev stats */ 920 QDF_STATUS 921 (*get_mon_pdev_rx_stats)(struct cdp_soc_t *soc, uint8_t pdev_id, 922 struct cdp_pdev_mon_stats *stats); 923 924 /* Configure monitor status srng reap timer */ 925 void (*txrx_enable_mon_reap_timer)(struct cdp_soc_t *soc_hdl, 926 uint8_t pdev_id, 927 bool enable); 928 }; 929 930 struct cdp_host_stats_ops { 931 int (*txrx_host_stats_get)(struct cdp_soc_t *soc, uint8_t vdev_id, 932 struct ol_txrx_stats_req *req); 933 934 QDF_STATUS (*txrx_host_stats_clr)(struct cdp_soc_t *soc, 935 uint8_t vdev_id); 936 937 QDF_STATUS 938 (*txrx_host_ce_stats)(struct cdp_soc_t *soc, uint8_t vdev_id); 939 940 int (*txrx_stats_publish)(struct cdp_soc_t *soc, uint8_t pdev_id, 941 struct cdp_stats_extd *buf); 942 /** 943 * @brief Enable enhanced stats functionality. 944 * 945 * @param soc - the soc handle 946 * @param pdev_id - pdev_id of pdev 947 * @return - QDF_STATUS 948 */ 949 QDF_STATUS (*txrx_enable_enhanced_stats)(struct cdp_soc_t *soc, 950 uint8_t pdev_id); 951 952 /** 953 * @brief Disable enhanced stats functionality. 954 * 955 * @param soc - the soc handle 956 * @param pdev_id - pdev_id of pdev 957 * @return - QDF_STATUS 958 */ 959 QDF_STATUS (*txrx_disable_enhanced_stats)(struct cdp_soc_t *soc, 960 uint8_t pdev_id); 961 962 QDF_STATUS 963 (*tx_print_tso_stats)(struct cdp_soc_t *soc, uint8_t vdev_id); 964 965 QDF_STATUS 966 (*tx_rst_tso_stats)(struct cdp_soc_t *soc, uint8_t vdev_id); 967 968 QDF_STATUS 969 (*tx_print_sg_stats)(struct cdp_soc_t *soc, uint8_t vdev_id); 970 971 QDF_STATUS 972 (*tx_rst_sg_stats)(struct cdp_soc_t *soc, uint8_t vdev_id); 973 974 QDF_STATUS 975 (*print_rx_cksum_stats)(struct cdp_soc_t *soc, uint8_t vdev_id); 976 977 QDF_STATUS 978 (*rst_rx_cksum_stats)(struct cdp_soc_t *soc, uint8_t vdev_id); 979 980 QDF_STATUS 981 (*txrx_host_me_stats)(struct cdp_soc_t *soc, uint8_t vdev_id); 982 983 QDF_STATUS 984 (*txrx_per_peer_stats)(struct cdp_soc_t *soc, uint8_t *addr); 985 986 int (*txrx_host_msdu_ttl_stats)(struct cdp_soc_t *soc, uint8_t vdev_id, 987 struct ol_txrx_stats_req *req); 988 989 int (*ol_txrx_update_peer_stats)(struct cdp_soc_t *soc, 990 uint8_t pdev_id, 991 uint8_t *addr, void *stats, 992 uint32_t last_tx_rate_mcs, 993 uint32_t stats_id); 994 995 QDF_STATUS 996 (*get_fw_peer_stats)(struct cdp_soc_t *soc, uint8_t pdev_id, 997 uint8_t *addr, 998 uint32_t cap, uint32_t copy_stats); 999 1000 QDF_STATUS 1001 (*get_htt_stats)(struct cdp_soc_t *soc, uint8_t pdev_id, 1002 void *data, 1003 uint32_t data_len); 1004 QDF_STATUS 1005 (*txrx_update_pdev_stats)(struct cdp_soc_t *soc, 1006 uint8_t pdev_id, void *data, 1007 uint16_t stats_id); 1008 QDF_STATUS 1009 (*txrx_get_peer_stats_param)(struct cdp_soc_t *soc, 1010 uint8_t vdev_id, 1011 uint8_t *peer_mac, 1012 enum cdp_peer_stats_type type, 1013 cdp_peer_stats_param_t *buf); 1014 QDF_STATUS 1015 (*txrx_get_peer_stats)(struct cdp_soc_t *soc, uint8_t vdev_id, 1016 uint8_t *peer_mac, 1017 struct cdp_peer_stats *peer_stats); 1018 QDF_STATUS 1019 (*txrx_get_soc_stats)(struct cdp_soc_t *soc, 1020 struct cdp_soc_stats *soc_stats); 1021 QDF_STATUS 1022 (*txrx_reset_peer_ald_stats)(struct cdp_soc_t *soc, 1023 uint8_t vdev_id, 1024 uint8_t *peer_mac); 1025 QDF_STATUS 1026 (*txrx_reset_peer_stats)(struct cdp_soc_t *soc, 1027 uint8_t vdev_id, uint8_t *peer_mac); 1028 int 1029 (*txrx_get_vdev_stats)(struct cdp_soc_t *soc, uint8_t vdev_id, 1030 void *buf, bool is_aggregate); 1031 int 1032 (*txrx_process_wmi_host_vdev_stats)(ol_txrx_soc_handle soc, 1033 void *data, uint32_t len, 1034 uint32_t stats_id); 1035 int 1036 (*txrx_get_vdev_extd_stats)(struct cdp_soc_t *soc, 1037 uint8_t vdev_id, 1038 wmi_host_vdev_extd_stats *buffer); 1039 QDF_STATUS 1040 (*txrx_update_vdev_stats)(struct cdp_soc_t *soc, 1041 uint8_t vdev_id, void *buf, 1042 uint16_t stats_id); 1043 int 1044 (*txrx_get_radio_stats)(struct cdp_soc_t *soc, uint8_t pdev_id, 1045 void *buf); 1046 QDF_STATUS 1047 (*txrx_get_pdev_stats)(struct cdp_soc_t *soc, uint8_t pdev_id, 1048 struct cdp_pdev_stats *buf); 1049 int 1050 (*txrx_get_ratekbps)(int preamb, int mcs, 1051 int htflag, int gintval); 1052 1053 QDF_STATUS 1054 (*txrx_update_peer_stats)(struct cdp_soc_t *soc, uint8_t vdev_id, 1055 uint8_t *peer_mac, void *stats, 1056 uint32_t last_tx_rate_mcs, 1057 uint32_t stats_id); 1058 1059 #ifdef QCA_SUPPORT_SCAN_SPCL_VAP_STATS 1060 QDF_STATUS 1061 (*txrx_get_scan_spcl_vap_stats)(struct cdp_soc_t *soc, uint8_t vdev_id, 1062 struct cdp_scan_spcl_vap_stats *stats); 1063 #endif 1064 1065 QDF_STATUS 1066 (*txrx_get_peer_delay_stats)(struct cdp_soc_t *soc, uint8_t vdev_id, 1067 uint8_t *peer_mac, 1068 struct cdp_delay_tid_stats *delay_stats); 1069 1070 QDF_STATUS 1071 (*txrx_get_peer_jitter_stats)(struct cdp_soc_t *soc, uint8_t pdev_id, 1072 uint8_t vdev_id, uint8_t *peer_mac, 1073 struct cdp_peer_tid_stats *tid_stats); 1074 1075 QDF_STATUS 1076 (*txrx_alloc_vdev_stats_id)(struct cdp_soc_t *soc, 1077 uint8_t *vdev_stats_id); 1078 1079 void (*txrx_reset_vdev_stats_id)(struct cdp_soc_t *soc, 1080 uint8_t vdev_stats_id); 1081 1082 #ifdef WLAN_TX_PKT_CAPTURE_ENH 1083 QDF_STATUS 1084 (*get_peer_tx_capture_stats)(struct cdp_soc_t *soc, uint8_t vdev_id, 1085 uint8_t *peer_mac, 1086 struct cdp_peer_tx_capture_stats *stats); 1087 1088 QDF_STATUS 1089 (*get_pdev_tx_capture_stats)(struct cdp_soc_t *soc, uint8_t pdev_id, 1090 struct cdp_pdev_tx_capture_stats *stats); 1091 #endif /* WLAN_TX_PKT_CAPTURE_ENH */ 1092 #ifdef HW_TX_DELAY_STATS_ENABLE 1093 void 1094 (*enable_disable_vdev_tx_delay_stats)(struct cdp_soc_t *soc, 1095 uint8_t vdev_id, 1096 uint8_t value); 1097 uint8_t (*is_tx_delay_stats_enabled)(struct cdp_soc_t *soc_hdl, 1098 uint8_t vdev_id); 1099 #endif 1100 }; 1101 1102 struct cdp_wds_ops { 1103 QDF_STATUS 1104 (*txrx_set_wds_rx_policy)(struct cdp_soc_t *soc, uint8_t vdev_id, 1105 u_int32_t val); 1106 QDF_STATUS 1107 (*txrx_wds_peer_tx_policy_update)(struct cdp_soc_t *soc, 1108 uint8_t vdev_id, uint8_t *peer_mac, 1109 int wds_tx_ucast, int wds_tx_mcast); 1110 int (*vdev_set_wds)(struct cdp_soc_t *soc, uint8_t vdev_id, 1111 uint32_t val); 1112 }; 1113 1114 struct cdp_raw_ops { 1115 QDF_STATUS 1116 (*rsim_get_astentry)(struct cdp_soc_t *soc, uint8_t vdev_id, 1117 qdf_nbuf_t *pnbuf, struct cdp_raw_ast *raw_ast); 1118 }; 1119 1120 #ifdef PEER_FLOW_CONTROL 1121 struct cdp_pflow_ops { 1122 uint32_t (*pflow_update_pdev_params)(struct cdp_soc_t *soc, 1123 uint8_t pdev_id, 1124 enum _dp_param_t, 1125 uint32_t, void *); 1126 }; 1127 #endif /* PEER_FLOW_CONTROL */ 1128 1129 #define LRO_IPV4_SEED_ARR_SZ 5 1130 #define LRO_IPV6_SEED_ARR_SZ 11 1131 1132 /** 1133 * struct cdp_lro_hash_config - set rx_offld(LRO/GRO) init parameters 1134 * @lro_enable: indicates whether rx_offld is enabled 1135 * @tcp_flag: If the TCP flags from the packet do not match 1136 * the values in this field after masking with TCP flags mask 1137 * below, packet is not rx_offld eligible 1138 * @tcp_flag_mask: field for comparing the TCP values provided 1139 * above with the TCP flags field in the received packet 1140 * @toeplitz_hash_ipv4: contains seed needed to compute the flow id 1141 * 5-tuple toeplitz hash for ipv4 packets 1142 * @toeplitz_hash_ipv6: contains seed needed to compute the flow id 1143 * 5-tuple toeplitz hash for ipv6 packets 1144 */ 1145 struct cdp_lro_hash_config { 1146 uint32_t lro_enable; 1147 uint32_t tcp_flag:9, 1148 tcp_flag_mask:9; 1149 uint32_t toeplitz_hash_ipv4[LRO_IPV4_SEED_ARR_SZ]; 1150 uint32_t toeplitz_hash_ipv6[LRO_IPV6_SEED_ARR_SZ]; 1151 }; 1152 1153 struct ol_if_ops { 1154 void 1155 (*peer_set_default_routing)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc, 1156 uint8_t pdev_id, uint8_t *peer_macaddr, 1157 uint8_t vdev_id, 1158 bool hash_based, uint8_t ring_num, 1159 uint8_t lmac_peer_id_msb); 1160 QDF_STATUS 1161 (*peer_rx_reorder_queue_setup)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc, 1162 uint8_t pdev_id, 1163 uint8_t vdev_id, uint8_t *peer_mac, 1164 qdf_dma_addr_t hw_qdesc, int tid, 1165 uint16_t queue_num, 1166 uint8_t ba_window_size_valid, 1167 uint16_t ba_window_size); 1168 QDF_STATUS 1169 (*peer_rx_reorder_queue_remove)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc, 1170 uint8_t pdev_id, 1171 uint8_t vdev_id, uint8_t *peer_macaddr, 1172 uint32_t tid_mask); 1173 int (*peer_unref_delete)(struct cdp_ctrl_objmgr_psoc *psoc, 1174 uint8_t pdev_id, 1175 uint8_t *peer_mac, 1176 uint8_t *vdev_mac, enum wlan_op_mode opmode); 1177 bool (*is_hw_dbs_capable)(struct wlan_objmgr_psoc *psoc); 1178 int (*peer_add_wds_entry)(struct cdp_ctrl_objmgr_psoc *soc, 1179 uint8_t vdev_id, 1180 uint8_t *peer_macaddr, 1181 uint16_t peer_id, 1182 const uint8_t *dest_macaddr, 1183 uint8_t *next_node_mac, 1184 uint32_t flags, 1185 uint8_t type); 1186 int (*peer_update_wds_entry)(struct cdp_ctrl_objmgr_psoc *soc, 1187 uint8_t vdev_id, 1188 uint8_t *dest_macaddr, 1189 uint8_t *peer_macaddr, 1190 uint32_t flags); 1191 void (*peer_del_wds_entry)(struct cdp_ctrl_objmgr_psoc *soc, 1192 uint8_t vdev_id, 1193 uint8_t *wds_macaddr, 1194 uint8_t type, 1195 uint8_t delete_in_fw); 1196 #ifdef WLAN_FEATURE_MULTI_AST_DEL 1197 void (*peer_del_multi_wds_entry)( 1198 struct cdp_ctrl_objmgr_psoc *soc, 1199 uint8_t vdev_id, 1200 struct peer_del_multi_wds_entries *wds_list); 1201 #endif 1202 QDF_STATUS 1203 (*lro_hash_config)(struct cdp_ctrl_objmgr_psoc *psoc, uint8_t pdev_id, 1204 struct cdp_lro_hash_config *rx_offld_hash); 1205 1206 void (*update_dp_stats)(void *soc, void *stats, uint16_t id, 1207 uint8_t type); 1208 #ifdef FEATURE_NAC_RSSI 1209 uint8_t (*rx_invalid_peer)(struct cdp_ctrl_objmgr_psoc *soc, 1210 uint8_t pdev_id, void *msg); 1211 #else 1212 uint8_t (*rx_invalid_peer)(uint8_t vdev_id, void *wh); 1213 #endif 1214 1215 int (*peer_map_event)(struct cdp_ctrl_objmgr_psoc *psoc, 1216 uint16_t peer_id, uint16_t hw_peer_id, 1217 uint8_t vdev_id, uint8_t *peer_mac_addr, 1218 enum cdp_txrx_ast_entry_type peer_type, 1219 uint32_t tx_ast_hashidx); 1220 int (*peer_unmap_event)(struct cdp_ctrl_objmgr_psoc *psoc, 1221 uint16_t peer_id, 1222 uint8_t vdev_id); 1223 1224 int (*get_dp_cfg_param)(struct cdp_ctrl_objmgr_psoc *psoc, 1225 enum cdp_cfg_param_type param_num); 1226 1227 void (*rx_mic_error)(struct cdp_ctrl_objmgr_psoc *psoc, 1228 uint8_t pdev_id, 1229 struct cdp_rx_mic_err_info *info); 1230 1231 bool (*rx_frag_tkip_demic)(struct cdp_ctrl_objmgr_psoc *psoc, 1232 uint8_t vdev_id, uint8_t *peer_mac_addr, 1233 qdf_nbuf_t nbuf, 1234 uint16_t hdr_space); 1235 1236 uint8_t (*freq_to_channel)(struct cdp_ctrl_objmgr_psoc *psoc, 1237 uint8_t pdev_id, uint16_t freq); 1238 1239 uint8_t (*freq_to_band)(struct cdp_ctrl_objmgr_psoc *psoc, 1240 uint8_t pdev_id, uint16_t freq); 1241 1242 QDF_STATUS(*set_mec_timer)(struct cdp_ctrl_objmgr_psoc *psoc, 1243 uint8_t vdev_id, uint16_t mec_timer_val); 1244 1245 #ifdef ATH_SUPPORT_NAC_RSSI 1246 int (*config_fw_for_nac_rssi)(struct cdp_ctrl_objmgr_psoc *psoc, 1247 uint8_t pdev_id, 1248 u_int8_t vdev_id, 1249 enum cdp_nac_param_cmd cmd, char *bssid, 1250 char *client_macaddr, uint8_t chan_num); 1251 1252 int 1253 (*config_bssid_in_fw_for_nac_rssi)(struct cdp_ctrl_objmgr_psoc *psoc, 1254 uint8_t pdev_id, u_int8_t vdev_id, 1255 enum cdp_nac_param_cmd cmd, 1256 char *bssid, char *client_mac); 1257 #endif 1258 int (*peer_sta_kickout)(struct cdp_ctrl_objmgr_psoc *psoc, 1259 uint16_t pdev_id, uint8_t *peer_macaddr); 1260 1261 /** 1262 * send_delba() - Send delba to peer 1263 * @psoc: Objmgr soc handle 1264 * @vdev_id: dp vdev id 1265 * @peer_macaddr: Peer mac addr 1266 * @tid: Tid number 1267 * @reason_code: Reason code 1268 * @cdp_rcode: CDP reason code for sending DELBA 1269 * 1270 * Return: 0 for success, non-zero for failure 1271 */ 1272 int (*send_delba)(struct cdp_ctrl_objmgr_psoc *psoc, uint8_t vdev_id, 1273 uint8_t *peer_macaddr, uint8_t tid, 1274 uint8_t reason_code, uint8_t cdp_rcode); 1275 1276 int 1277 (*peer_delete_multiple_wds_entries)(struct cdp_ctrl_objmgr_psoc *psoc, 1278 uint8_t vdev_id, 1279 uint8_t *dest_macaddr, 1280 uint8_t *peer_macaddr, 1281 uint32_t flags); 1282 int 1283 (*pdev_update_lmac_n_target_pdev_id)(struct cdp_ctrl_objmgr_psoc *psoc, 1284 uint8_t *pdev_id, 1285 uint8_t *lmac_id, 1286 uint8_t *target_pdev_id); 1287 bool (*is_roam_inprogress)(uint32_t vdev_id); 1288 enum QDF_GLOBAL_MODE (*get_con_mode)(void); 1289 #ifdef QCA_PEER_MULTIQ_SUPPORT 1290 int (*peer_ast_flowid_map)(struct cdp_ctrl_objmgr_psoc *ol_soc_handle, 1291 uint16_t peer_id, uint8_t vdev_id, 1292 uint8_t *peer_mac_addr); 1293 #endif 1294 #ifdef DP_MEM_PRE_ALLOC 1295 void *(*dp_prealloc_get_context)(uint32_t ctxt_type); 1296 1297 QDF_STATUS(*dp_prealloc_put_context)(uint32_t ctxt_type, void *vaddr); 1298 void *(*dp_prealloc_get_consistent)(uint32_t *size, 1299 void **base_vaddr_unaligned, 1300 qdf_dma_addr_t *paddr_unaligned, 1301 qdf_dma_addr_t *paddr_aligned, 1302 uint32_t align, 1303 uint32_t ring_type); 1304 void (*dp_prealloc_put_consistent)(qdf_size_t size, 1305 void *vaddr_unligned, 1306 qdf_dma_addr_t paddr); 1307 void (*dp_get_multi_pages)(uint32_t desc_type, 1308 size_t element_size, 1309 uint16_t element_num, 1310 struct qdf_mem_multi_page_t *pages, 1311 bool cacheable); 1312 void (*dp_put_multi_pages)(uint32_t desc_type, 1313 struct qdf_mem_multi_page_t *pages); 1314 #endif 1315 int (*get_soc_nss_cfg)(struct cdp_ctrl_objmgr_psoc *ol_soc_handle); 1316 1317 char *(*get_device_name)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc, 1318 uint8_t pdev_id); 1319 QDF_STATUS(*nss_stats_clr)(struct cdp_ctrl_objmgr_psoc *psoc, 1320 uint8_t vdev_id); 1321 int (*dp_rx_get_pending)(ol_txrx_soc_handle soc); 1322 void (*dp_rx_sched_refill_thread)(ol_txrx_soc_handle soc); 1323 /* TODO: Add any other control path calls required to OL_IF/WMA layer */ 1324 #ifdef QCA_SUPPORT_WDS_EXTENDED 1325 void (*rx_wds_ext_peer_learn)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc, 1326 uint16_t peer_id, uint8_t vdev_id, 1327 uint8_t *peer_macaddr); 1328 #endif /* QCA_SUPPORT_WDS_EXTENDED */ 1329 #ifdef WLAN_SUPPORT_MESH_LATENCY 1330 QDF_STATUS(*peer_update_mesh_latency_params)( 1331 struct cdp_ctrl_objmgr_psoc *psoc, 1332 uint8_t vdev_id, uint8_t *peer_mac, uint8_t tid, 1333 uint32_t service_interval_dl, uint32_t burst_size_dl, 1334 uint32_t service_interval_ul, uint32_t burst_size_ul, 1335 uint8_t add_or_sub, uint8_t ac); 1336 #endif 1337 uint32_t (*dp_get_tx_inqueue)(ol_txrx_soc_handle soc); 1338 QDF_STATUS(*dp_send_unit_test_cmd)(uint32_t vdev_id, 1339 uint32_t module_id, 1340 uint32_t arg_count, uint32_t *arg); 1341 1342 }; 1343 1344 #ifdef DP_PEER_EXTENDED_API 1345 /** 1346 * struct cdp_misc_ops - mcl ops not classified 1347 * @set_ibss_vdev_heart_beat_timer: Update ibss vdev heart beat timer 1348 * @set_wmm_param: set wmm parameters 1349 * @bad_peer_txctl_set_setting: configure bad peer tx limit setting 1350 * @bad_peer_txctl_update_threshold: configure bad peer tx threshold limit 1351 * @hl_tdls_flag_reset: reset tdls flag for vdev 1352 * @tx_non_std: Allow the control-path SW to send data frames 1353 * @get_vdev_id: get vdev id 1354 * @set_wisa_mode: set wisa mode for a vdev 1355 * @txrx_data_stall_cb_register: register data stall callback 1356 * @txrx_data_stall_cb_deregister: deregister data stall callback 1357 * @txrx_post_data_stall_event: post data stall event 1358 * @runtime_suspend: ensure TXRX is ready to runtime suspend 1359 * @runtime_resume: ensure TXRX is ready to runtime resume 1360 * @get_opmode: get operation mode of vdev 1361 * @mark_first_wakeup_packet: set flag to indicate that fw is compatible for 1362 marking first packet after wow wakeup 1363 * @update_mac_id: update mac_id for vdev 1364 * @flush_rx_frames: flush rx frames on the queue 1365 * @get_intra_bss_fwd_pkts_count: to get the total tx and rx packets that 1366 has been forwarded from txrx layer 1367 without going to upper layers 1368 * @pkt_log_init: handler to initialize packet log 1369 * @pkt_log_con_service: handler to connect packet log service 1370 * @get_num_rx_contexts: handler to get number of RX contexts 1371 * @register_packetdump_cb: register callback for different pktlog 1372 * @unregister_packetdump_cb: unregister callback for different pktlog 1373 * @pdev_reset_driver_del_ack: reset driver delayed ack enabled flag 1374 * @vdev_set_driver_del_ack_enable: set driver delayed ack enabled flag 1375 * 1376 * @vdev_inform_ll_conn: inform DP to add/delete a latency critical connection 1377 * for this particular vdev. 1378 * @set_swlm_enable: Enable or Disable Software Latency Manager. 1379 * @is_swlm_enabled: Check if Software latency manager is enabled or not. 1380 * @display_txrx_hw_info: Dump the DP rings info 1381 * 1382 * Function pointers for miscellaneous soc/pdev/vdev related operations. 1383 */ 1384 struct cdp_misc_ops { 1385 uint16_t (*set_ibss_vdev_heart_beat_timer)(struct cdp_soc_t *soc_hdl, 1386 uint8_t vdev_id, 1387 uint16_t timer_value_sec); 1388 void (*set_wmm_param)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 1389 struct ol_tx_wmm_param_t wmm_param); 1390 void (*bad_peer_txctl_set_setting)(struct cdp_soc_t *soc_hdl, 1391 uint8_t pdev_id, int enable, 1392 int period, int txq_limit); 1393 void (*bad_peer_txctl_update_threshold)(struct cdp_soc_t *soc_hdl, 1394 uint8_t pdev_id, 1395 int level, int tput_thresh, 1396 int tx_limit); 1397 void (*hl_tdls_flag_reset)(struct cdp_soc_t *soc_hdl, 1398 uint8_t vdev_id, bool flag); 1399 qdf_nbuf_t (*tx_non_std)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id, 1400 enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list); 1401 uint16_t (*get_vdev_id)(struct cdp_vdev *vdev); 1402 uint32_t (*get_tx_ack_stats)(struct cdp_soc_t *soc_hdl, 1403 uint8_t vdev_id); 1404 QDF_STATUS (*set_wisa_mode)(struct cdp_soc_t *soc_hdl, 1405 uint8_t vdev_id, bool enable); 1406 QDF_STATUS (*txrx_data_stall_cb_register)(struct cdp_soc_t *soc_hdl, 1407 uint8_t pdev_id, 1408 data_stall_detect_cb cb); 1409 QDF_STATUS (*txrx_data_stall_cb_deregister)(struct cdp_soc_t *soc_hdl, 1410 uint8_t pdev_id, 1411 data_stall_detect_cb cb); 1412 void (*txrx_post_data_stall_event)( 1413 struct cdp_soc_t *soc_hdl, 1414 enum data_stall_log_event_indicator indicator, 1415 enum data_stall_log_event_type data_stall_type, 1416 uint32_t pdev_id, uint32_t vdev_id_bitmap, 1417 enum data_stall_log_recovery_type recovery_type); 1418 QDF_STATUS (*runtime_suspend)(struct cdp_soc_t *soc_hdl, 1419 uint8_t pdev_id); 1420 QDF_STATUS (*runtime_resume)(struct cdp_soc_t *soc_hdl, 1421 uint8_t pdev_id); 1422 int (*get_opmode)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id); 1423 void (*mark_first_wakeup_packet)(struct cdp_soc_t *soc_hdl, 1424 uint8_t pdev_id, uint8_t value); 1425 void (*update_mac_id)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id, 1426 uint8_t mac_id); 1427 void (*flush_rx_frames)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 1428 void *peer, bool drop); 1429 A_STATUS(*get_intra_bss_fwd_pkts_count)(struct cdp_soc_t *soc_hdl, 1430 uint8_t vdev_id, 1431 uint64_t *fwd_tx_packets, 1432 uint64_t *fwd_rx_packets); 1433 void (*pkt_log_init)(struct cdp_soc_t *soc_hdl, uint8_t pdev, 1434 void *scn); 1435 void (*pkt_log_con_service)(struct cdp_soc_t *soc_hdl, 1436 uint8_t pdev_id, void *scn); 1437 void (*pkt_log_exit)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id); 1438 int (*get_num_rx_contexts)(struct cdp_soc_t *soc_hdl); 1439 void (*register_pktdump_cb)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 1440 ol_txrx_pktdump_cb tx_cb, 1441 ol_txrx_pktdump_cb rx_cb); 1442 void (*unregister_pktdump_cb)(struct cdp_soc_t *soc_hdl, 1443 uint8_t pdev_id); 1444 void (*pdev_reset_driver_del_ack)(struct cdp_soc_t *soc_hdl, 1445 uint8_t pdev_id); 1446 void (*vdev_set_driver_del_ack_enable)(struct cdp_soc_t *soc_hdl, 1447 uint8_t vdev_id, 1448 unsigned long rx_packets, 1449 uint32_t time_in_ms, 1450 uint32_t high_th, 1451 uint32_t low_th); 1452 void (*vdev_set_bundle_require_flag)(uint8_t vdev_id, 1453 unsigned long tx_bytes, 1454 uint32_t time_in_ms, 1455 uint32_t high_th, 1456 uint32_t low_th); 1457 void (*pdev_reset_bundle_require_flag)(struct cdp_soc_t *soc_hdl, 1458 uint8_t pdev_id); 1459 QDF_STATUS (*txrx_ext_stats_request)(struct cdp_soc_t *soc_hdl, 1460 uint8_t pdev_id, 1461 struct cdp_txrx_ext_stats *req); 1462 QDF_STATUS (*request_rx_hw_stats)(struct cdp_soc_t *soc_hdl, 1463 uint8_t vdev_id); 1464 void (*reset_rx_hw_ext_stats)(struct cdp_soc_t *soc_hdl); 1465 QDF_STATUS (*vdev_inform_ll_conn)(struct cdp_soc_t *soc_hdl, 1466 uint8_t vdev_id, 1467 enum vdev_ll_conn_actions action); 1468 QDF_STATUS (*set_swlm_enable)(struct cdp_soc_t *soc_hdl, 1469 uint8_t val); 1470 uint8_t (*is_swlm_enabled)(struct cdp_soc_t *soc_hdl); 1471 void (*display_txrx_hw_info)(struct cdp_soc_t *soc_hdl); 1472 uint32_t (*get_tx_rings_grp_bitmap)(struct cdp_soc_t *soc_hdl); 1473 }; 1474 1475 /** 1476 * struct cdp_ocb_ops - mcl ocb ops 1477 * @set_ocb_chan_info: set OCB channel info 1478 * @get_ocb_chan_info: get OCB channel info 1479 * 1480 * Function pointers for operations related to OCB. 1481 */ 1482 struct cdp_ocb_ops { 1483 void (*set_ocb_chan_info)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id, 1484 struct ol_txrx_ocb_set_chan ocb_set_chan); 1485 struct ol_txrx_ocb_chan_info *(*get_ocb_chan_info)( 1486 struct cdp_soc_t *soc_hdl, uint8_t vdev_id); 1487 }; 1488 1489 /** 1490 * struct cdp_peer_ops - mcl peer related ops 1491 * @register_peer: 1492 * @clear_peer: 1493 * @find_peer_exist 1494 * @find_peer_exist_on_vdev 1495 * @find_peer_exist_on_other_vdev 1496 * @peer_state_update: 1497 * @get_vdevid: 1498 * @register_ocb_peer: 1499 * @peer_get_peer_mac_addr: 1500 * @get_peer_state: 1501 * @update_ibss_add_peer_num_of_vdev: 1502 * @copy_mac_addr_raw: 1503 * @add_last_real_peer: 1504 * @is_vdev_restore_last_peer: 1505 * @update_last_real_peer: 1506 */ 1507 struct cdp_peer_ops { 1508 QDF_STATUS (*register_peer)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 1509 struct ol_txrx_desc_type *sta_desc); 1510 QDF_STATUS (*clear_peer)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 1511 struct qdf_mac_addr peer_addr); 1512 bool (*find_peer_exist)(struct cdp_soc_t *soc, uint8_t pdev_id, 1513 uint8_t *peer_addr); 1514 bool (*find_peer_exist_on_vdev)(struct cdp_soc_t *soc, uint8_t vdev_id, 1515 uint8_t *peer_addr); 1516 bool (*find_peer_exist_on_other_vdev)(struct cdp_soc_t *soc, 1517 uint8_t vdev_id, 1518 uint8_t *peer_addr, 1519 uint16_t max_bssid); 1520 QDF_STATUS (*peer_state_update)(struct cdp_soc_t *soc, 1521 uint8_t *peer_addr, 1522 enum ol_txrx_peer_state state); 1523 QDF_STATUS (*get_vdevid)(struct cdp_soc_t *soc_hdl, uint8_t *peer_mac, 1524 uint8_t *vdev_id); 1525 struct cdp_vdev * (*get_vdev_by_peer_addr)(struct cdp_pdev *pdev, 1526 struct qdf_mac_addr peer_addr); 1527 QDF_STATUS (*register_ocb_peer)(uint8_t *mac_addr); 1528 uint8_t * (*peer_get_peer_mac_addr)(void *peer); 1529 int (*get_peer_state)(struct cdp_soc_t *soc, uint8_t vdev_id, 1530 uint8_t *peer_mac); 1531 struct cdp_vdev * (*get_vdev_for_peer)(void *peer); 1532 int16_t (*update_ibss_add_peer_num_of_vdev)(struct cdp_soc_t *soc, 1533 uint8_t vdev_id, 1534 int16_t peer_num_delta); 1535 void (*remove_peers_for_vdev)(struct cdp_vdev *vdev, 1536 ol_txrx_vdev_peer_remove_cb callback, 1537 void *callback_context, bool remove_last_peer); 1538 void (*remove_peers_for_vdev_no_lock)(struct cdp_vdev *vdev, 1539 ol_txrx_vdev_peer_remove_cb callback, 1540 void *callback_context); 1541 void (*copy_mac_addr_raw)(struct cdp_soc_t *soc, uint8_t vdev_id, 1542 uint8_t *bss_addr); 1543 void (*add_last_real_peer)(struct cdp_soc_t *soc, uint8_t pdev_id, 1544 uint8_t vdev_id); 1545 bool (*is_vdev_restore_last_peer)(struct cdp_soc_t *soc, 1546 uint8_t vdev_id, 1547 uint8_t *peer_mac); 1548 void (*update_last_real_peer)(struct cdp_soc_t *soc, uint8_t pdev_id, 1549 uint8_t vdev_id, bool restore_last_peer); 1550 void (*peer_detach_force_delete)(struct cdp_soc_t *soc_hdl, 1551 uint8_t vdev_id, uint8_t *peer_addr); 1552 void (*set_tdls_offchan_enabled)(struct cdp_soc_t *soc, uint8_t vdev_id, 1553 uint8_t *peer_mac, bool val); 1554 void (*set_peer_as_tdls_peer)(struct cdp_soc_t *soc, uint8_t vdev_id, 1555 uint8_t *peer_mac, bool val); 1556 void (*peer_flush_frags)(struct cdp_soc_t *soc_hdl, 1557 uint8_t vdev_id, uint8_t *peer_mac); 1558 }; 1559 1560 /** 1561 * struct cdp_mob_stats_ops - mcl mob stats ops 1562 * @clear_stats: handler to clear ol txrx stats 1563 * @stats: handler to update ol txrx stats 1564 */ 1565 struct cdp_mob_stats_ops { 1566 QDF_STATUS(*clear_stats)(struct cdp_soc_t *soc_hdl, 1567 uint8_t pdev_id, uint8_t bitmap); 1568 int (*stats)(uint8_t vdev_id, char *buffer, unsigned buf_len); 1569 }; 1570 1571 /** 1572 * struct cdp_pmf_ops - mcl protected management frame ops 1573 * @get_pn_info: handler to get pn info from peer 1574 * 1575 * Function pointers for pmf related operations. 1576 */ 1577 struct cdp_pmf_ops { 1578 void (*get_pn_info)(struct cdp_soc_t *soc, uint8_t *peer_mac, 1579 uint8_t vdev_id, uint8_t **last_pn_valid, 1580 uint64_t **last_pn, uint32_t **rmf_pn_replays); 1581 }; 1582 #endif 1583 1584 1585 #ifdef DP_FLOW_CTL 1586 /** 1587 * struct cdp_cfg_ops - mcl configuration ops 1588 * @set_cfg_rx_fwd_disabled: set rx_fwd_disabled flag 1589 * @set_cfg_packet_log_enabled: set is_packet_log_enabled flag 1590 * @cfg_attach: hardcode the configuration parameters 1591 * @vdev_rx_set_intrabss_fwd: set disable_intrabss_fwd flag 1592 * @is_rx_fwd_disabled: get the rx_fwd_disabled flag, 1593 * 1 enabled, 0 disabled. 1594 * @tx_set_is_mgmt_over_wmi_enabled: set is_mgmt_over_wmi_enabled flag to 1595 * indicate that mgmt over wmi is enabled 1596 * or not, 1597 * 1 for enabled, 0 for disable 1598 * @is_high_latency: get device is high or low latency device, 1599 * 1 high latency bus, 0 low latency bus 1600 * @set_flow_control_parameters: set flow control parameters 1601 * @set_flow_steering: set flow_steering_enabled flag 1602 * @set_ptp_rx_opt_enabled: set is_ptp_rx_opt_enabled flag 1603 * @set_new_htt_msg_format: set new_htt_msg_format flag 1604 * @set_peer_unmap_conf_support: set enable_peer_unmap_conf_support flag 1605 * @get_peer_unmap_conf_support: get enable_peer_unmap_conf_support flag 1606 * @set_tx_compl_tsf64: set enable_tx_compl_tsf64 flag, 1607 * 1 enabled, 0 disabled. 1608 * @get_tx_compl_tsf64: get enable_tx_compl_tsf64 flag, 1609 * 1 enabled, 0 disabled. 1610 */ 1611 struct cdp_cfg_ops { 1612 void (*set_cfg_rx_fwd_disabled)(struct cdp_cfg *cfg_pdev, 1613 uint8_t disable_rx_fwd); 1614 void (*set_cfg_packet_log_enabled)(struct cdp_cfg *cfg_pdev, 1615 uint8_t val); 1616 struct cdp_cfg * (*cfg_attach)(qdf_device_t osdev, void *cfg_param); 1617 void (*vdev_rx_set_intrabss_fwd)(struct cdp_soc_t *soc_hdl, 1618 uint8_t vdev_id, bool val); 1619 uint8_t (*is_rx_fwd_disabled)(struct cdp_vdev *vdev); 1620 void (*tx_set_is_mgmt_over_wmi_enabled)(uint8_t value); 1621 int (*is_high_latency)(struct cdp_cfg *cfg_pdev); 1622 void (*set_flow_control_parameters)(struct cdp_cfg *cfg_pdev, 1623 void *param); 1624 void (*set_flow_steering)(struct cdp_cfg *cfg_pdev, uint8_t val); 1625 void (*set_ptp_rx_opt_enabled)(struct cdp_cfg *cfg_pdev, uint8_t val); 1626 void (*set_new_htt_msg_format)(uint8_t val); 1627 void (*set_peer_unmap_conf_support)(bool val); 1628 bool (*get_peer_unmap_conf_support)(void); 1629 void (*set_tx_compl_tsf64)(bool val); 1630 bool (*get_tx_compl_tsf64)(void); 1631 }; 1632 1633 /** 1634 * struct cdp_flowctl_ops - mcl flow control 1635 * @flow_pool_map_handler: handler to map flow_id and pool descriptors 1636 * @flow_pool_unmap_handler: handler to unmap flow_id and pool descriptors 1637 * @register_pause_cb: handler to register tx pause callback 1638 * @set_desc_global_pool_size: handler to set global pool size 1639 * @dump_flow_pool_info: handler to dump global and flow pool info 1640 * @tx_desc_thresh_reached: handler to set tx desc threshold 1641 * 1642 * Function pointers for operations related to flow control 1643 */ 1644 struct cdp_flowctl_ops { 1645 QDF_STATUS (*flow_pool_map_handler)(struct cdp_soc_t *soc, 1646 uint8_t pdev_id, 1647 uint8_t vdev_id); 1648 void (*flow_pool_unmap_handler)(struct cdp_soc_t *soc, 1649 uint8_t pdev_id, 1650 uint8_t vdev_id); 1651 QDF_STATUS (*register_pause_cb)(struct cdp_soc_t *soc, 1652 tx_pause_callback); 1653 void (*set_desc_global_pool_size)(uint32_t num_msdu_desc); 1654 1655 void (*dump_flow_pool_info)(struct cdp_soc_t *soc_hdl); 1656 1657 bool (*tx_desc_thresh_reached)(struct cdp_soc_t *soc_hdl, 1658 uint8_t vdev_id); 1659 }; 1660 1661 /** 1662 * struct cdp_lflowctl_ops - mcl legacy flow control ops 1663 * @register_tx_flow_control: Register tx flow control callback 1664 * @set_vdev_tx_desc_limit: Set tx descriptor limit for a vdev 1665 * @set_vdev_os_queue_status: Set vdev queue status 1666 * @deregister_tx_flow_control_cb: Deregister tx flow control callback 1667 * @flow_control_cb: Call osif flow control callback 1668 * @get_tx_resource: Get tx resources and comapre with watermark 1669 * @ll_set_tx_pause_q_depth: set pause queue depth 1670 * @vdev_flush: Flush all packets on a particular vdev 1671 * @vdev_pause: Pause a particular vdev 1672 * @vdev_unpause: Unpause a particular vdev 1673 * 1674 * Function pointers for operations related to flow control 1675 */ 1676 struct cdp_lflowctl_ops { 1677 #ifdef QCA_HL_NETDEV_FLOW_CONTROL 1678 int (*register_tx_flow_control)(struct cdp_soc_t *soc_hdl, 1679 uint8_t pdev_id, 1680 tx_pause_callback flowcontrol); 1681 int (*set_vdev_tx_desc_limit)(struct cdp_soc_t *soc_hdl, 1682 uint8_t vdev_id, uint32_t chan_freq); 1683 int (*set_vdev_os_queue_status)(struct cdp_soc_t *soc_hdl, 1684 uint8_t vdev_id, 1685 enum netif_action_type action); 1686 #else 1687 int (*register_tx_flow_control)( 1688 struct cdp_soc_t *soc_hdl, 1689 uint8_t vdev_id, 1690 ol_txrx_tx_flow_control_fp flowControl, void *osif_fc_ctx, 1691 ol_txrx_tx_flow_control_is_pause_fp flow_control_is_pause); 1692 #endif /* QCA_HL_NETDEV_FLOW_CONTROL */ 1693 int (*deregister_tx_flow_control_cb)(struct cdp_soc_t *soc_hdl, 1694 uint8_t vdev_id); 1695 void (*flow_control_cb)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id, 1696 bool tx_resume); 1697 bool (*get_tx_resource)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 1698 struct qdf_mac_addr peer_addr, 1699 unsigned int low_watermark, 1700 unsigned int high_watermark_offset); 1701 int (*ll_set_tx_pause_q_depth)(struct cdp_soc_t *soc, uint8_t vdev_id, 1702 int pause_q_depth); 1703 void (*vdev_flush)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id); 1704 void (*vdev_pause)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id, 1705 uint32_t reason, uint32_t pause_type); 1706 void (*vdev_unpause)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id, 1707 uint32_t reason, uint32_t pause_type); 1708 }; 1709 1710 /** 1711 * struct cdp_throttle_ops - mcl throttle ops 1712 * @throttle_init_period: handler to initialize tx throttle time 1713 * @throttle_set_level: handler to set tx throttle level 1714 */ 1715 struct cdp_throttle_ops { 1716 void (*throttle_init_period)(struct cdp_soc_t *soc_hdl, 1717 uint8_t pdev_id, int period, 1718 uint8_t *dutycycle_level); 1719 void (*throttle_set_level)(struct cdp_soc_t *soc_hdl, 1720 uint8_t pdev_id, int level); 1721 }; 1722 #endif 1723 1724 #ifdef IPA_OFFLOAD 1725 /** 1726 * struct cdp_ipa_ops - mcl ipa data path ops 1727 * @ipa_get_resource: 1728 * @ipa_set_doorbell_paddr: 1729 * @ipa_iounmap_doorbell_vaddr: I/O unmap ipa doorbell vaddr 1730 * @ipa_set_active: 1731 * @ipa_op_response: 1732 * @ipa_register_op_cb: 1733 * @ipa_get_stat: 1734 * @ipa_tx_data_frame: 1735 * @ipa_tx_buf_smmu_mapping: Create SMMU mappings for Tx 1736 * @ipa_tx_buf_smmu_unmapping: Release SMMU mappings for Tx 1737 * buffers to IPA 1738 */ 1739 struct cdp_ipa_ops { 1740 QDF_STATUS (*ipa_get_resource)(struct cdp_soc_t *soc_hdl, 1741 uint8_t pdev_id); 1742 QDF_STATUS (*ipa_set_doorbell_paddr)(struct cdp_soc_t *soc_hdl, 1743 uint8_t pdev_id); 1744 QDF_STATUS (*ipa_iounmap_doorbell_vaddr)(struct cdp_soc_t *soc_hdl, 1745 uint8_t pdev_id); 1746 QDF_STATUS (*ipa_set_active)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 1747 bool uc_active, bool is_tx); 1748 QDF_STATUS (*ipa_op_response)(struct cdp_soc_t *soc_hdl, 1749 uint8_t pdev_id, uint8_t *op_msg); 1750 QDF_STATUS (*ipa_register_op_cb)(struct cdp_soc_t *soc_hdl, 1751 uint8_t pdev_id, 1752 void (*ipa_uc_op_cb_type) 1753 (uint8_t *op_msg, void *osif_ctxt), 1754 void *usr_ctxt); 1755 void (*ipa_deregister_op_cb)(struct cdp_soc_t *soc_hdl, 1756 uint8_t pdev_id); 1757 QDF_STATUS (*ipa_get_stat)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id); 1758 qdf_nbuf_t (*ipa_tx_data_frame)(struct cdp_soc_t *soc_hdl, 1759 uint8_t vdev_id, qdf_nbuf_t skb); 1760 void (*ipa_set_uc_tx_partition_base)(struct cdp_cfg *pdev, 1761 uint32_t value); 1762 #ifdef FEATURE_METERING 1763 QDF_STATUS (*ipa_uc_get_share_stats)(struct cdp_soc_t *soc_hdl, 1764 uint8_t pdev_id, 1765 uint8_t reset_stats); 1766 QDF_STATUS (*ipa_uc_set_quota)(struct cdp_soc_t *soc_hdl, 1767 uint8_t pdev_id, uint64_t quota_bytes); 1768 #endif 1769 QDF_STATUS (*ipa_enable_autonomy)(struct cdp_soc_t *soc_hdl, 1770 uint8_t pdev_id); 1771 QDF_STATUS (*ipa_disable_autonomy)(struct cdp_soc_t *soc_hdl, 1772 uint8_t pdev_id); 1773 1774 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)) || \ 1775 defined(CONFIG_IPA_WDI_UNIFIED_API) 1776 QDF_STATUS (*ipa_setup)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 1777 void *ipa_i2w_cb, void *ipa_w2i_cb, 1778 void *ipa_wdi_meter_notifier_cb, 1779 uint32_t ipa_desc_size, void *ipa_priv, 1780 bool is_rm_enabled, uint32_t *tx_pipe_handle, 1781 uint32_t *rx_pipe_handle, bool is_smmu_enabled, 1782 qdf_ipa_sys_connect_params_t *sys_in, 1783 bool over_gsi, qdf_ipa_wdi_hdl_t hdl); 1784 #else /* CONFIG_IPA_WDI_UNIFIED_API */ 1785 QDF_STATUS (*ipa_setup)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 1786 void *ipa_i2w_cb, void *ipa_w2i_cb, 1787 void *ipa_wdi_meter_notifier_cb, 1788 uint32_t ipa_desc_size, void *ipa_priv, 1789 bool is_rm_enabled, uint32_t *tx_pipe_handle, 1790 uint32_t *rx_pipe_handle); 1791 #endif /* CONFIG_IPA_WDI_UNIFIED_API */ 1792 QDF_STATUS (*ipa_cleanup)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 1793 uint32_t tx_pipe_handle, 1794 uint32_t rx_pipe_handle, 1795 qdf_ipa_wdi_hdl_t hdl); 1796 QDF_STATUS (*ipa_setup_iface)(char *ifname, uint8_t *mac_addr, 1797 qdf_ipa_client_type_t prod_client, 1798 qdf_ipa_client_type_t cons_client, 1799 uint8_t session_id, bool is_ipv6_enabled, 1800 qdf_ipa_wdi_hdl_t hdl); 1801 QDF_STATUS (*ipa_cleanup_iface)(char *ifname, bool is_ipv6_enabled, 1802 qdf_ipa_wdi_hdl_t hdl); 1803 QDF_STATUS (*ipa_enable_pipes)(struct cdp_soc_t *soc_hdl, 1804 uint8_t pdev_id, qdf_ipa_wdi_hdl_t hdl); 1805 QDF_STATUS (*ipa_disable_pipes)(struct cdp_soc_t *soc_hdl, 1806 uint8_t pdev_id, qdf_ipa_wdi_hdl_t hdl); 1807 QDF_STATUS (*ipa_set_perf_level)(int client, 1808 uint32_t max_supported_bw_mbps, 1809 qdf_ipa_wdi_hdl_t hdl); 1810 bool (*ipa_rx_intrabss_fwd)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id, 1811 qdf_nbuf_t nbuf, bool *fwd_success); 1812 QDF_STATUS (*ipa_tx_buf_smmu_mapping)(struct cdp_soc_t *soc_hdl, 1813 uint8_t pdev_id); 1814 QDF_STATUS (*ipa_tx_buf_smmu_unmapping)(struct cdp_soc_t *soc_hdl, 1815 uint8_t pdev_id); 1816 }; 1817 #endif 1818 1819 #ifdef DP_POWER_SAVE 1820 /** 1821 * struct cdp_tx_delay_ops - mcl tx delay ops 1822 * @tx_delay: handler to get tx packet delay 1823 * @tx_delay_hist: handler to get tx packet delay histogram 1824 * @tx_packet_count: handler to get tx packet count 1825 * @tx_set_compute_interval: update compute interval period for TSM stats 1826 * 1827 * Function pointer for operations related to tx delay. 1828 */ 1829 struct cdp_tx_delay_ops { 1830 void (*tx_delay)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 1831 uint32_t *queue_delay_microsec, 1832 uint32_t *tx_delay_microsec, int category); 1833 void (*tx_delay_hist)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 1834 uint16_t *bin_values, int category); 1835 void (*tx_packet_count)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 1836 uint16_t *out_packet_count, 1837 uint16_t *out_packet_loss_count, int category); 1838 void (*tx_set_compute_interval)(struct cdp_soc_t *soc_hdl, 1839 uint8_t pdev_id, uint32_t interval); 1840 }; 1841 1842 /** 1843 * struct cdp_bus_ops - mcl bus suspend/resume ops 1844 * @bus_suspend: handler for bus suspend 1845 * @bus_resume: handler for bus resume 1846 * @process_wow_ack_rsp: handler for wow ack response 1847 * @process_target_suspend_req: handler for target suspend request 1848 */ 1849 struct cdp_bus_ops { 1850 QDF_STATUS (*bus_suspend)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id); 1851 QDF_STATUS (*bus_resume)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id); 1852 void (*process_wow_ack_rsp)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id); 1853 void (*process_target_suspend_req)(struct cdp_soc_t *soc_hdl, 1854 uint8_t pdev_id); 1855 }; 1856 #endif 1857 1858 #ifdef RECEIVE_OFFLOAD 1859 /** 1860 * struct cdp_rx_offld_ops - mcl host receive offload ops 1861 * @register_rx_offld_flush_cb: 1862 * @deregister_rx_offld_flush_cb: 1863 */ 1864 struct cdp_rx_offld_ops { 1865 void (*register_rx_offld_flush_cb)(void (rx_offld_flush_cb)(void *)); 1866 void (*deregister_rx_offld_flush_cb)(void); 1867 }; 1868 #endif 1869 1870 #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE) 1871 /** 1872 * struct cdp_cfr_ops - host cfr ops 1873 * @txrx_cfr_filter: Handler to configure host rx monitor status ring 1874 * @txrx_get_cfr_rcc: Handler to get CFR mode 1875 * @txrx_set_cfr_rcc: Handler to enable/disable CFR mode 1876 * @txrx_get_cfr_dbg_stats: Handler to get debug statistics for CFR mode 1877 * @txrx_clear_cfr_dbg_stats: Handler to clear debug statistics for CFR mode 1878 */ 1879 struct cdp_cfr_ops { 1880 void (*txrx_cfr_filter)(struct cdp_soc_t *soc_hdl, 1881 uint8_t pdev_id, 1882 bool enable, 1883 struct cdp_monitor_filter *filter_val); 1884 bool (*txrx_get_cfr_rcc)(struct cdp_soc_t *soc_hdl, 1885 uint8_t pdev_id); 1886 void (*txrx_set_cfr_rcc)(struct cdp_soc_t *soc_hdl, 1887 uint8_t pdev_id, 1888 bool enable); 1889 void (*txrx_get_cfr_dbg_stats)(struct cdp_soc_t *soc_hdl, 1890 uint8_t pdev_id, 1891 struct cdp_cfr_rcc_stats *buf); 1892 void (*txrx_clear_cfr_dbg_stats)(struct cdp_soc_t *soc_hdl, 1893 uint8_t pdev_id); 1894 }; 1895 #endif 1896 1897 #ifdef WLAN_SUPPORT_MSCS 1898 /** 1899 * struct cdp_mscs_ops - data path ops for MSCS 1900 * @mscs_peer_lookup_n_get_priority: 1901 */ 1902 struct cdp_mscs_ops { 1903 int (*mscs_peer_lookup_n_get_priority)(struct cdp_soc_t *soc, 1904 uint8_t *src_mac, 1905 uint8_t *dst_mac, 1906 qdf_nbuf_t nbuf); 1907 }; 1908 #endif 1909 1910 #ifdef WLAN_SUPPORT_MESH_LATENCY 1911 /** 1912 * struct cdp_mesh_latency_ops - data path ops for Mesh latency 1913 * @mesh_latency_update_peer_parameter: 1914 */ 1915 struct cdp_mesh_latency_ops { 1916 QDF_STATUS (*mesh_latency_update_peer_parameter)( 1917 struct cdp_soc_t *soc, 1918 uint8_t *dest_mac, uint32_t service_interval_dl, 1919 uint32_t burst_size_dl, uint32_t service_interval_ul, 1920 uint32_t burst_size_ul, uint16_t priority, 1921 uint8_t add_or_sub); 1922 }; 1923 #endif 1924 1925 #ifdef CONFIG_SAWF_DEF_QUEUES 1926 struct cdp_sawf_ops { 1927 QDF_STATUS 1928 (*sawf_def_queues_map_req)(struct cdp_soc_t *soc, uint8_t *mac_addr, 1929 uint8_t svc_class_id); 1930 QDF_STATUS 1931 (*sawf_def_queues_unmap_req)(struct cdp_soc_t *soc, uint8_t *mac_addr, 1932 uint8_t svc_class_id); 1933 QDF_STATUS 1934 (*sawf_def_queues_get_map_report)(struct cdp_soc_t *soc, 1935 uint8_t *mac_addr); 1936 #ifdef CONFIG_SAWF 1937 QDF_STATUS 1938 (*txrx_get_peer_sawf_delay_stats)(struct cdp_soc_t *soc, 1939 uint32_t svc_id, uint8_t *mac, 1940 void *data); 1941 QDF_STATUS 1942 (*txrx_get_peer_sawf_tx_stats)(struct cdp_soc_t *soc, 1943 uint32_t svc_id, uint8_t *mac, 1944 void *data); 1945 #endif 1946 }; 1947 #endif 1948 1949 struct cdp_ops { 1950 struct cdp_cmn_ops *cmn_drv_ops; 1951 struct cdp_ctrl_ops *ctrl_ops; 1952 struct cdp_me_ops *me_ops; 1953 struct cdp_mon_ops *mon_ops; 1954 struct cdp_host_stats_ops *host_stats_ops; 1955 struct cdp_wds_ops *wds_ops; 1956 struct cdp_raw_ops *raw_ops; 1957 struct cdp_pflow_ops *pflow_ops; 1958 #ifdef DP_PEER_EXTENDED_API 1959 struct cdp_misc_ops *misc_ops; 1960 struct cdp_peer_ops *peer_ops; 1961 struct cdp_ocb_ops *ocb_ops; 1962 struct cdp_mob_stats_ops *mob_stats_ops; 1963 struct cdp_pmf_ops *pmf_ops; 1964 #endif 1965 #ifdef DP_FLOW_CTL 1966 struct cdp_cfg_ops *cfg_ops; 1967 struct cdp_flowctl_ops *flowctl_ops; 1968 struct cdp_lflowctl_ops *l_flowctl_ops; 1969 struct cdp_throttle_ops *throttle_ops; 1970 #endif 1971 #ifdef DP_POWER_SAVE 1972 struct cdp_bus_ops *bus_ops; 1973 struct cdp_tx_delay_ops *delay_ops; 1974 #endif 1975 #ifdef IPA_OFFLOAD 1976 struct cdp_ipa_ops *ipa_ops; 1977 #endif 1978 #ifdef RECEIVE_OFFLOAD 1979 struct cdp_rx_offld_ops *rx_offld_ops; 1980 #endif 1981 #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE) 1982 struct cdp_cfr_ops *cfr_ops; 1983 #endif 1984 #ifdef WLAN_SUPPORT_MSCS 1985 struct cdp_mscs_ops *mscs_ops; 1986 #endif 1987 #ifdef WLAN_SUPPORT_MESH_LATENCY 1988 struct cdp_mesh_latency_ops *mesh_latency_ops; 1989 #endif 1990 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP) 1991 struct cdp_mlo_ops *mlo_ops; 1992 #endif 1993 #ifdef CONFIG_SAWF_DEF_QUEUES 1994 struct cdp_sawf_ops *sawf_ops; 1995 #endif 1996 }; 1997 #endif 1998