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