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 uint64_t (*get_fst_cmem_base)(struct cdp_soc_t *soc_hdl, uint64_t size); 731 }; 732 733 struct cdp_ctrl_ops { 734 735 int 736 (*txrx_mempools_attach)(ol_txrx_soc_handle dp_soc); 737 738 /* Is this similar to ol_txrx_peer_state_update() in MCL */ 739 /** 740 * @brief Update the authorize peer object at association time 741 * @details 742 * For the host-based implementation of rate-control, it 743 * updates the peer/node-related parameters within rate-control 744 * context of the peer at association. 745 * 746 * @param soc_hdl - pointer to the soc object 747 * @param vdev_id - id of the virtual object 748 * @param peer_mac - mac address of the node's object 749 * @authorize - either to authorize or unauthorize peer 750 * 751 * @return QDF_STATUS 752 */ 753 QDF_STATUS 754 (*txrx_peer_authorize)(struct cdp_soc_t *soc_hdl, 755 uint8_t vdev_id, 756 uint8_t *peer_mac, 757 u_int32_t authorize); 758 bool 759 (*txrx_peer_get_authorize)(struct cdp_soc_t *soc_hdl, 760 uint8_t vdev_id, 761 uint8_t *peer_mac); 762 763 void (*tx_flush_buffers)(struct cdp_soc_t *soc, uint8_t vdev_id); 764 765 int (*txrx_is_target_ar900b)(struct cdp_soc_t *soc_hdl); 766 767 QDF_STATUS 768 (*txrx_set_vdev_param)(struct cdp_soc_t *soc, uint8_t vdev_id, 769 enum cdp_vdev_param_type param, 770 cdp_config_param_type val); 771 772 /** 773 * @brief Set the reo dest ring num of the radio 774 * @details 775 * Set the reo destination ring no on which we will receive 776 * pkts for this radio. 777 * 778 * @txrx_soc - soc handle 779 * @param pdev_id - id of physical device 780 * @return the reo destination ring number 781 * @param reo_dest_ring_num - value ranges between 1 - 4 782 */ 783 QDF_STATUS (*txrx_set_pdev_reo_dest)( 784 struct cdp_soc_t *txrx_soc, 785 uint8_t pdev_id, 786 enum cdp_host_reo_dest_ring reo_dest_ring_num); 787 788 /** 789 * @brief Get the reo dest ring num of the radio 790 * @details 791 * Get the reo destination ring no on which we will receive 792 * pkts for this radio. 793 * 794 * @txrx_soc - soc handle 795 * @param pdev_id - id of physical device 796 * @return the reo destination ring number 797 */ 798 enum cdp_host_reo_dest_ring (*txrx_get_pdev_reo_dest)( 799 struct cdp_soc_t *txrx_soc, 800 uint8_t pdev_id); 801 802 int (*txrx_wdi_event_sub)(struct cdp_soc_t *soc, uint8_t pdev_id, 803 wdi_event_subscribe *event_cb_sub, 804 uint32_t event); 805 806 int (*txrx_wdi_event_unsub)(struct cdp_soc_t *soc, uint8_t pdev_id, 807 wdi_event_subscribe *event_cb_sub, 808 uint32_t event); 809 810 int (*txrx_get_sec_type)(ol_txrx_soc_handle soc, uint8_t vdev_id, 811 uint8_t *peer_mac, uint8_t sec_idx); 812 813 QDF_STATUS 814 (*txrx_update_mgmt_txpow_vdev)(struct cdp_soc_t *soc, 815 uint8_t vdev_id, 816 uint8_t subtype, uint8_t tx_power); 817 818 /** 819 * txrx_set_pdev_param() - callback to set pdev parameter 820 * @soc: opaque soc handle 821 * @pdev_id:id of data path pdev handle 822 * @val: value of pdev_tx_capture 823 * 824 * Return: status: 0 - Success, non-zero: Failure 825 */ 826 QDF_STATUS (*txrx_set_pdev_param)(struct cdp_soc_t *soc, 827 uint8_t pdev_id, 828 enum cdp_pdev_param_type type, 829 cdp_config_param_type val); 830 831 QDF_STATUS (*txrx_get_pdev_param)(struct cdp_soc_t *soc, 832 uint8_t pdev_id, 833 enum cdp_pdev_param_type type, 834 cdp_config_param_type *val); 835 836 QDF_STATUS (*txrx_set_peer_param)(struct cdp_soc_t *soc, 837 uint8_t vdev_id, uint8_t *peer_mac, 838 enum cdp_peer_param_type param, 839 cdp_config_param_type val); 840 841 QDF_STATUS (*txrx_get_peer_param)(struct cdp_soc_t *soc, 842 uint8_t vdev_id, uint8_t *peer_mac, 843 enum cdp_peer_param_type param, 844 cdp_config_param_type *val); 845 846 void * (*txrx_get_pldev)(struct cdp_soc_t *soc, uint8_t pdev_id); 847 void (*txrx_peer_flush_frags)(struct cdp_soc_t *soc, uint8_t vdev_id, 848 uint8_t *peer_mac); 849 850 #ifdef VDEV_PEER_PROTOCOL_COUNT 851 void (*txrx_peer_protocol_cnt)(struct cdp_soc_t *soc, 852 int8_t vdev_id, 853 qdf_nbuf_t nbuf, 854 bool is_egress, 855 bool is_rx); 856 #endif 857 858 #ifdef WLAN_SUPPORT_MSCS 859 QDF_STATUS 860 (*txrx_record_mscs_params) ( 861 struct cdp_soc_t *soc, uint8_t *macaddr, 862 uint8_t vdev_id, 863 struct cdp_mscs_params *mscs_params, 864 bool active); 865 #endif 866 867 QDF_STATUS 868 (*set_key)(struct cdp_soc_t *soc, uint8_t vdev_id, uint8_t *mac, 869 bool is_unicast, uint32_t *key); 870 871 QDF_STATUS (*txrx_get_vdev_param)(struct cdp_soc_t *soc, 872 uint8_t vdev_id, 873 enum cdp_vdev_param_type param, 874 cdp_config_param_type *val); 875 int (*enable_peer_based_pktlog)(struct cdp_soc_t *cdp_soc, 876 uint8_t pdev_id, 877 uint8_t *macaddr, uint8_t enb_dsb); 878 879 QDF_STATUS 880 (*calculate_delay_stats)(struct cdp_soc_t *cdp_soc, 881 uint8_t vdev_id, qdf_nbuf_t nbuf); 882 #ifdef WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG 883 QDF_STATUS (*txrx_update_pdev_rx_protocol_tag)( 884 struct cdp_soc_t *soc, uint8_t pdev_id, 885 uint32_t protocol_mask, uint16_t protocol_type, 886 uint16_t tag); 887 #ifdef WLAN_SUPPORT_RX_TAG_STATISTICS 888 void (*txrx_dump_pdev_rx_protocol_tag_stats)( 889 struct cdp_soc_t *soc, uint8_t pdev_id, 890 uint16_t protocol_type); 891 #endif /* WLAN_SUPPORT_RX_TAG_STATISTICS */ 892 #endif /* WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG */ 893 #ifdef WLAN_SUPPORT_RX_FLOW_TAG 894 QDF_STATUS (*txrx_set_rx_flow_tag)( 895 struct cdp_soc_t *cdp_soc, uint8_t pdev_id, 896 struct cdp_rx_flow_info *flow_info); 897 QDF_STATUS (*txrx_dump_rx_flow_tag_stats)( 898 struct cdp_soc_t *cdp_soc, uint8_t pdev_id, 899 struct cdp_rx_flow_info *flow_info); 900 #endif /* WLAN_SUPPORT_RX_FLOW_TAG */ 901 #ifdef QCA_MULTIPASS_SUPPORT 902 void (*txrx_peer_set_vlan_id)(struct cdp_soc_t *cdp_soc, 903 uint8_t vdev_id, uint8_t *peer_mac, 904 uint16_t vlan_id); 905 #endif 906 #if defined(WLAN_TX_PKT_CAPTURE_ENH) || defined(WLAN_RX_PKT_CAPTURE_ENH) 907 QDF_STATUS (*txrx_update_peer_pkt_capture_params)( 908 ol_txrx_soc_handle soc, uint8_t pdev_id, 909 bool is_rx_pkt_cap_enable, uint8_t is_tx_pkt_cap_enable, 910 uint8_t *peer_mac); 911 #endif /* WLAN_TX_PKT_CAPTURE_ENH || WLAN_RX_PKT_CAPTURE_ENH */ 912 QDF_STATUS 913 (*txrx_set_psoc_param)(struct cdp_soc_t *soc, 914 enum cdp_psoc_param_type param, 915 cdp_config_param_type val); 916 917 QDF_STATUS (*txrx_get_psoc_param)(ol_txrx_soc_handle soc, 918 enum cdp_psoc_param_type type, 919 cdp_config_param_type *val); 920 #ifdef VDEV_PEER_PROTOCOL_COUNT 921 /* 922 * Enable per-peer protocol counters 923 */ 924 void (*txrx_enable_peer_protocol_count)(struct cdp_soc_t *soc, 925 int8_t vdev_id, bool enable); 926 void (*txrx_set_peer_protocol_drop_mask)(struct cdp_soc_t *soc, 927 int8_t vdev_id, int mask); 928 int (*txrx_is_peer_protocol_count_enabled)(struct cdp_soc_t *soc, 929 int8_t vdev_id); 930 int (*txrx_get_peer_protocol_drop_mask)(struct cdp_soc_t *soc, 931 int8_t vdev_id); 932 933 #endif 934 935 #if defined(WLAN_FEATURE_TSF_UPLINK_DELAY) || defined(WLAN_CONFIG_TX_DELAY) 936 void (*txrx_set_delta_tsf)(struct cdp_soc_t *soc, uint8_t vdev_id, 937 uint32_t delta_tsf); 938 #endif 939 #ifdef WLAN_FEATURE_TSF_UPLINK_DELAY 940 QDF_STATUS (*txrx_set_tsf_ul_delay_report)(struct cdp_soc_t *soc, 941 uint8_t vdev_id, 942 bool enable); 943 QDF_STATUS (*txrx_get_uplink_delay)(struct cdp_soc_t *soc, 944 uint8_t vdev_id, 945 uint32_t *val); 946 #endif 947 #ifdef QCA_UNDECODED_METADATA_SUPPORT 948 QDF_STATUS (*txrx_set_pdev_phyrx_error_mask)(struct cdp_soc_t *soc, 949 uint8_t pdev_id, 950 uint32_t mask, 951 uint32_t mask_cont); 952 QDF_STATUS (*txrx_get_pdev_phyrx_error_mask)(struct cdp_soc_t *soc, 953 uint8_t pdev_id, 954 uint32_t *mask, 955 uint32_t *mask_cont); 956 #endif 957 bool (*umac_reset_is_inprogress)(struct cdp_soc_t *psoc); 958 #ifdef WLAN_SUPPORT_RX_FISA 959 QDF_STATUS (*txrx_fisa_config)(struct cdp_soc_t *soc, uint8_t pdev_id, 960 enum cdp_fisa_config_id config_id, 961 union cdp_fisa_config *cfg); 962 #endif 963 }; 964 965 struct cdp_me_ops { 966 967 void (*tx_me_alloc_descriptor)(struct cdp_soc_t *soc, 968 uint8_t pdev_id); 969 970 void (*tx_me_free_descriptor)(struct cdp_soc_t *soc, uint8_t pdev_id); 971 972 uint16_t (*tx_me_convert_ucast)(struct cdp_soc_t *soc, uint8_t vdev_id, 973 qdf_nbuf_t wbuf, u_int8_t newmac[][6], 974 uint8_t newmaccnt, uint8_t tid, 975 bool is_igmp, bool is_dms_pkt); 976 }; 977 978 /** 979 * struct cdp_mon_ops - host mon ops 980 * @txrx_reset_monitor_mode: Handler to reset monitor mode 981 * @txrx_deliver_tx_mgmt: deliver mgmt tx frame 982 * @txrx_set_advance_monitor_filter: set advanced monitor mode 983 * @config_full_mon_mode: configure full monitor mode 984 * @soc_config_full_mon_mode: pdev configure full monitor mode 985 * @get_mon_pdev_rx_stats: Get monitor mode pdev stats 986 * @txrx_enable_mon_reap_timer: Enable/Disable reap timer of monitor status ring 987 * @txrx_update_filter_neighbour_peers: config nac peer 988 * @txrx_vdev_config_for_nac_rssi: config nac rssi peer 989 * @txrx_vdev_get_neighbour_rssi: get nac peer rssi 990 * @txrx_set_lite_mon_config: set lite monitor config 991 * @txrx_get_lite_mon_config: get lite monitor config 992 * @txrx_set_lite_mon_peer_config: set lite monitor peer config 993 * @txrx_get_lite_mon_peer_config: get lite monitor peer list 994 * @txrx_is_lite_mon_enabled: get lite monitor enable/disable status 995 * @txrx_enable_enhanced_stats: Enable enhanced stats 996 * @txrx_disable_enhanced_stats: Disable enhanced stats 997 * @txrx_get_lite_mon_legacy_feature_enabled: returns the legacy filter enabled 998 * @txrx_set_mon_pdev_params_rssi_dbm_conv: To set RSSI dbm conversion params 999 * in monitor pdev 1000 * @txrx_update_pdev_mon_telemetry_airtime_stats: update telemetry airtime 1001 * stats in monitor pdev 1002 * @txrx_cfr_filter: Handler to configure host rx monitor status ring 1003 * @txrx_update_mon_mac_filter: Handler to configure mon mac filter 1004 * @start_local_pkt_capture: start local packet capture 1005 * @stop_local_pkt_capture: stop local packet capture 1006 * @is_local_pkt_capture_running: is local packet capture running 1007 */ 1008 struct cdp_mon_ops { 1009 1010 QDF_STATUS (*txrx_reset_monitor_mode) 1011 (ol_txrx_soc_handle soc, uint8_t pdev_id, u_int8_t smart_monitor); 1012 1013 QDF_STATUS (*txrx_deliver_tx_mgmt) 1014 (struct cdp_soc_t *cdp_soc, uint8_t pdev_id, qdf_nbuf_t nbuf); 1015 1016 QDF_STATUS (*txrx_set_advance_monitor_filter) 1017 (struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 1018 struct cdp_monitor_filter *filter_val); 1019 1020 QDF_STATUS 1021 (*config_full_mon_mode)(struct cdp_soc_t *soc, uint8_t val); 1022 QDF_STATUS (*soc_config_full_mon_mode)(struct cdp_pdev *cdp_pdev, 1023 uint8_t val); 1024 1025 QDF_STATUS 1026 (*get_mon_pdev_rx_stats)(struct cdp_soc_t *soc, uint8_t pdev_id, 1027 struct cdp_pdev_mon_stats *stats); 1028 1029 bool (*txrx_enable_mon_reap_timer)(struct cdp_soc_t *soc_hdl, 1030 enum cdp_mon_reap_source source, 1031 bool enable); 1032 1033 QDF_STATUS (*txrx_enable_enhanced_stats)(struct cdp_soc_t *soc, 1034 uint8_t pdev_id); 1035 1036 QDF_STATUS (*txrx_disable_enhanced_stats)(struct cdp_soc_t *soc, 1037 uint8_t pdev_id); 1038 1039 int 1040 (*txrx_update_filter_neighbour_peers)( 1041 struct cdp_soc_t *soc, uint8_t vdev_id, 1042 uint32_t cmd, uint8_t *macaddr); 1043 1044 #ifdef ATH_SUPPORT_NAC_RSSI 1045 QDF_STATUS (*txrx_vdev_config_for_nac_rssi)(struct cdp_soc_t *cdp_soc, 1046 uint8_t vdev_id, 1047 enum cdp_nac_param_cmd cmd, 1048 char *bssid, 1049 char *client_macaddr, 1050 uint8_t chan_num); 1051 1052 QDF_STATUS (*txrx_vdev_get_neighbour_rssi)(struct cdp_soc_t *cdp_soc, 1053 uint8_t vdev_id, 1054 char *macaddr, 1055 uint8_t *rssi); 1056 #endif 1057 1058 #ifdef QCA_SUPPORT_LITE_MONITOR 1059 QDF_STATUS 1060 (*txrx_set_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_get_lite_mon_config)( 1067 struct cdp_soc_t *soc, 1068 struct cdp_lite_mon_filter_config *mon_config, 1069 uint8_t pdev_id); 1070 1071 QDF_STATUS 1072 (*txrx_set_lite_mon_peer_config)( 1073 struct cdp_soc_t *soc, 1074 struct cdp_lite_mon_peer_config *peer_config, 1075 uint8_t pdev_id); 1076 1077 QDF_STATUS 1078 (*txrx_get_lite_mon_peer_config)( 1079 struct cdp_soc_t *soc, 1080 struct cdp_lite_mon_peer_info *info, 1081 uint8_t pdev_id); 1082 1083 int 1084 (*txrx_is_lite_mon_enabled)(struct cdp_soc_t *soc, 1085 uint8_t pdev_id, 1086 uint8_t direction); 1087 1088 /* get the legacy feature enabled */ 1089 int 1090 (*txrx_get_lite_mon_legacy_feature_enabled)(struct cdp_soc_t *soc, 1091 uint8_t pdev_id, 1092 uint8_t direction); 1093 #endif 1094 QDF_STATUS (*txrx_set_mon_pdev_params_rssi_dbm_conv) 1095 (struct cdp_soc_t *soc, 1096 struct cdp_rssi_db2dbm_param_dp *params); 1097 1098 #ifdef WLAN_CONFIG_TELEMETRY_AGENT 1099 QDF_STATUS (*txrx_update_pdev_mon_telemetry_airtime_stats) 1100 (struct cdp_soc_t *soc, 1101 uint8_t pdev_id); 1102 #endif 1103 1104 #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE) 1105 void (*txrx_cfr_filter)(struct cdp_soc_t *soc_hdl, 1106 uint8_t pdev_id, 1107 bool enable, 1108 struct cdp_monitor_filter *filter_val, 1109 bool cfr_enable_monitor_mode); 1110 #endif 1111 1112 QDF_STATUS (*txrx_update_mon_mac_filter)(struct cdp_soc_t *soc, 1113 uint8_t vdev_id, 1114 uint32_t cmd); 1115 #ifdef WLAN_FEATURE_LOCAL_PKT_CAPTURE 1116 QDF_STATUS (*start_local_pkt_capture) 1117 (struct cdp_soc_t *soc, uint8_t pdev_id, 1118 struct cdp_monitor_filter *filter); 1119 1120 QDF_STATUS (*stop_local_pkt_capture)(struct cdp_soc_t *soc, 1121 uint8_t pdev_id); 1122 bool (*is_local_pkt_capture_running)(struct cdp_soc_t *soc, 1123 uint8_t pdev_id); 1124 #endif 1125 }; 1126 1127 /** 1128 * struct cdp_host_stats_ops - statistic operations 1129 * @txrx_host_stats_get: 1130 * @txrx_host_stats_clr: 1131 * @txrx_host_ce_stats: 1132 * @txrx_stats_publish: 1133 * @tx_print_tso_stats: 1134 * @tx_rst_tso_stats: 1135 * @tx_print_sg_stats: 1136 * @tx_rst_sg_stats: 1137 * @print_rx_cksum_stats: 1138 * @rst_rx_cksum_stats: 1139 * @txrx_host_me_stats: 1140 * @txrx_per_peer_stats: 1141 * @txrx_host_msdu_ttl_stats: 1142 * @ol_txrx_update_peer_stats: 1143 * @get_fw_peer_stats: 1144 * @get_htt_stats: 1145 * @txrx_update_pdev_stats: 1146 * @txrx_get_peer_stats_param: 1147 * @txrx_get_peer_stats: 1148 * @txrx_get_per_link_stats: 1149 * @txrx_get_soc_stats: 1150 * @txrx_reset_peer_ald_stats: 1151 * @txrx_reset_peer_stats: 1152 * @txrx_get_vdev_stats: 1153 * @txrx_process_wmi_host_vdev_stats: 1154 * @txrx_get_vdev_extd_stats: 1155 * @txrx_update_vdev_stats: 1156 * @txrx_get_radio_stats: 1157 * @txrx_get_pdev_stats: 1158 * @txrx_get_ratekbps: 1159 * @txrx_update_peer_stats: 1160 * @txrx_get_scan_spcl_vap_stats: 1161 * @txrx_get_peer_delay_stats: 1162 * @txrx_get_peer_jitter_stats: 1163 * @txrx_alloc_vdev_stats_id: 1164 * @txrx_reset_vdev_stats_id: 1165 * @get_peer_tx_capture_stats: 1166 * @get_pdev_tx_capture_stats: 1167 * @enable_disable_vdev_tx_delay_stats: 1168 * @is_tx_delay_stats_enabled: 1169 * @txrx_get_pdev_tid_stats: 1170 * @txrx_pdev_telemetry_stats: 1171 * @txrx_peer_telemetry_stats: 1172 * @txrx_pdev_deter_stats: 1173 * @txrx_peer_deter_stats: 1174 * @txrx_update_pdev_chan_util_stats: 1175 * @txrx_get_peer_extd_rate_link_stats: 1176 * @get_pdev_obss_stats: 1177 * @clear_pdev_obss_pd_stats: 1178 * @txrx_get_interface_stats: 1179 */ 1180 struct cdp_host_stats_ops { 1181 int (*txrx_host_stats_get)(struct cdp_soc_t *soc, uint8_t vdev_id, 1182 struct ol_txrx_stats_req *req); 1183 1184 QDF_STATUS (*txrx_host_stats_clr)(struct cdp_soc_t *soc, 1185 uint8_t vdev_id); 1186 1187 QDF_STATUS 1188 (*txrx_host_ce_stats)(struct cdp_soc_t *soc, uint8_t vdev_id); 1189 1190 int (*txrx_stats_publish)(struct cdp_soc_t *soc, uint8_t pdev_id, 1191 struct cdp_stats_extd *buf); 1192 1193 QDF_STATUS 1194 (*tx_print_tso_stats)(struct cdp_soc_t *soc, uint8_t vdev_id); 1195 1196 QDF_STATUS 1197 (*tx_rst_tso_stats)(struct cdp_soc_t *soc, uint8_t vdev_id); 1198 1199 QDF_STATUS 1200 (*tx_print_sg_stats)(struct cdp_soc_t *soc, uint8_t vdev_id); 1201 1202 QDF_STATUS 1203 (*tx_rst_sg_stats)(struct cdp_soc_t *soc, uint8_t vdev_id); 1204 1205 QDF_STATUS 1206 (*print_rx_cksum_stats)(struct cdp_soc_t *soc, uint8_t vdev_id); 1207 1208 QDF_STATUS 1209 (*rst_rx_cksum_stats)(struct cdp_soc_t *soc, uint8_t vdev_id); 1210 1211 QDF_STATUS 1212 (*txrx_host_me_stats)(struct cdp_soc_t *soc, uint8_t vdev_id); 1213 1214 QDF_STATUS 1215 (*txrx_per_peer_stats)(struct cdp_soc_t *soc, uint8_t *addr); 1216 1217 int (*txrx_host_msdu_ttl_stats)(struct cdp_soc_t *soc, uint8_t vdev_id, 1218 struct ol_txrx_stats_req *req); 1219 1220 int (*ol_txrx_update_peer_stats)(struct cdp_soc_t *soc, 1221 uint8_t pdev_id, 1222 uint8_t *addr, void *stats, 1223 uint32_t last_tx_rate_mcs, 1224 uint32_t stats_id); 1225 1226 QDF_STATUS 1227 (*get_fw_peer_stats)(struct cdp_soc_t *soc, uint8_t pdev_id, 1228 uint8_t *addr, 1229 uint32_t cap, uint32_t copy_stats); 1230 1231 QDF_STATUS 1232 (*get_htt_stats)(struct cdp_soc_t *soc, uint8_t pdev_id, 1233 void *data, 1234 uint32_t data_len); 1235 QDF_STATUS 1236 (*txrx_update_pdev_stats)(struct cdp_soc_t *soc, 1237 uint8_t pdev_id, void *data, 1238 uint16_t stats_id); 1239 QDF_STATUS 1240 (*txrx_get_peer_stats_param)(struct cdp_soc_t *soc, 1241 uint8_t vdev_id, 1242 uint8_t *peer_mac, 1243 enum cdp_peer_stats_type type, 1244 cdp_peer_stats_param_t *buf); 1245 QDF_STATUS 1246 (*txrx_get_peer_stats)(struct cdp_soc_t *soc, uint8_t vdev_id, 1247 uint8_t *peer_mac, 1248 struct cdp_peer_stats *peer_stats); 1249 QDF_STATUS 1250 (*txrx_get_per_link_stats)(struct cdp_soc_t *soc, 1251 uint8_t vdev_id, uint8_t *peer_mac, 1252 struct cdp_peer_stats *stats, 1253 enum cdp_peer_type peer_type, 1254 uint8_t num_link); 1255 QDF_STATUS 1256 (*txrx_get_soc_stats)(struct cdp_soc_t *soc, 1257 struct cdp_soc_stats *soc_stats); 1258 QDF_STATUS 1259 (*txrx_reset_peer_ald_stats)(struct cdp_soc_t *soc, 1260 uint8_t vdev_id, 1261 uint8_t *peer_mac); 1262 QDF_STATUS 1263 (*txrx_reset_peer_stats)(struct cdp_soc_t *soc, 1264 uint8_t vdev_id, uint8_t *peer_mac); 1265 QDF_STATUS 1266 (*txrx_get_vdev_stats)(struct cdp_soc_t *soc, uint8_t vdev_id, 1267 void *buf, bool is_aggregate); 1268 int 1269 (*txrx_process_wmi_host_vdev_stats)(ol_txrx_soc_handle soc, 1270 void *data, uint32_t len, 1271 uint32_t stats_id); 1272 int 1273 (*txrx_get_vdev_extd_stats)(struct cdp_soc_t *soc, 1274 uint8_t vdev_id, 1275 wmi_host_vdev_extd_stats *buffer); 1276 QDF_STATUS 1277 (*txrx_update_vdev_stats)(struct cdp_soc_t *soc, 1278 uint8_t vdev_id, void *buf, 1279 uint16_t stats_id); 1280 int 1281 (*txrx_get_radio_stats)(struct cdp_soc_t *soc, uint8_t pdev_id, 1282 void *buf); 1283 QDF_STATUS 1284 (*txrx_get_pdev_stats)(struct cdp_soc_t *soc, uint8_t pdev_id, 1285 struct cdp_pdev_stats *buf); 1286 int 1287 (*txrx_get_ratekbps)(int preamb, int mcs, 1288 int htflag, int gintval); 1289 1290 QDF_STATUS 1291 (*txrx_update_peer_stats)(struct cdp_soc_t *soc, uint8_t vdev_id, 1292 uint8_t *peer_mac, void *stats, 1293 uint32_t last_tx_rate_mcs, 1294 uint32_t stats_id); 1295 1296 #ifdef QCA_SUPPORT_SCAN_SPCL_VAP_STATS 1297 QDF_STATUS 1298 (*txrx_get_scan_spcl_vap_stats)(struct cdp_soc_t *soc, uint8_t vdev_id, 1299 struct cdp_scan_spcl_vap_stats *stats); 1300 #endif 1301 1302 QDF_STATUS 1303 (*txrx_get_peer_delay_stats)(struct cdp_soc_t *soc, uint8_t vdev_id, 1304 uint8_t *peer_mac, 1305 struct cdp_delay_tid_stats *delay_stats); 1306 1307 QDF_STATUS 1308 (*txrx_get_peer_jitter_stats)(struct cdp_soc_t *soc, uint8_t pdev_id, 1309 uint8_t vdev_id, uint8_t *peer_mac, 1310 struct cdp_peer_tid_stats *tid_stats); 1311 1312 QDF_STATUS 1313 (*txrx_alloc_vdev_stats_id)(struct cdp_soc_t *soc, 1314 uint8_t *vdev_stats_id); 1315 1316 void (*txrx_reset_vdev_stats_id)(struct cdp_soc_t *soc, 1317 uint8_t vdev_stats_id); 1318 1319 #ifdef WLAN_TX_PKT_CAPTURE_ENH 1320 QDF_STATUS 1321 (*get_peer_tx_capture_stats)(struct cdp_soc_t *soc, uint8_t vdev_id, 1322 uint8_t *peer_mac, 1323 struct cdp_peer_tx_capture_stats *stats); 1324 1325 QDF_STATUS 1326 (*get_pdev_tx_capture_stats)(struct cdp_soc_t *soc, uint8_t pdev_id, 1327 struct cdp_pdev_tx_capture_stats *stats); 1328 #endif /* WLAN_TX_PKT_CAPTURE_ENH */ 1329 #ifdef HW_TX_DELAY_STATS_ENABLE 1330 void 1331 (*enable_disable_vdev_tx_delay_stats)(struct cdp_soc_t *soc, 1332 uint8_t vdev_id, 1333 uint8_t value); 1334 uint8_t (*is_tx_delay_stats_enabled)(struct cdp_soc_t *soc_hdl, 1335 uint8_t vdev_id); 1336 #endif 1337 QDF_STATUS 1338 (*txrx_get_pdev_tid_stats)(struct cdp_soc_t *soc, uint8_t pdev_id, 1339 struct cdp_tid_stats_intf *tid_stats); 1340 #ifdef WLAN_CONFIG_TELEMETRY_AGENT 1341 QDF_STATUS 1342 (*txrx_pdev_telemetry_stats)( 1343 struct cdp_soc_t *soc, 1344 uint8_t pdev_id, 1345 struct cdp_pdev_telemetry_stats *stats); 1346 QDF_STATUS 1347 (*txrx_peer_telemetry_stats)( 1348 struct cdp_soc_t *soc, 1349 uint8_t *addr, 1350 struct cdp_peer_telemetry_stats *stats); 1351 QDF_STATUS 1352 (*txrx_pdev_deter_stats)( 1353 struct cdp_soc_t *soc, 1354 uint8_t pdev_id, 1355 struct cdp_pdev_deter_stats *stats); 1356 QDF_STATUS 1357 (*txrx_peer_deter_stats)( 1358 struct cdp_soc_t *soc, 1359 uint8_t vdev_id, 1360 uint8_t *addr, 1361 struct cdp_peer_deter_stats *stats); 1362 QDF_STATUS 1363 (*txrx_update_pdev_chan_util_stats)( 1364 struct cdp_soc_t *soc, 1365 uint8_t pdev_id, 1366 struct cdp_pdev_chan_util_stats *ch_util); 1367 #endif 1368 QDF_STATUS 1369 (*txrx_get_peer_extd_rate_link_stats) 1370 (struct cdp_soc_t *soc, uint8_t *mac_addr); 1371 QDF_STATUS 1372 (*get_pdev_obss_stats)(struct cdp_soc_t *soc, uint8_t pdev_id, 1373 struct cdp_pdev_obss_pd_stats_tlv *buf, 1374 struct cdp_txrx_stats_req *req); 1375 QDF_STATUS (*clear_pdev_obss_pd_stats)(struct cdp_soc_t *soc, 1376 uint8_t pdev_id, 1377 struct cdp_txrx_stats_req *req); 1378 QDF_STATUS (*txrx_get_interface_stats)(struct cdp_soc_t *soc, 1379 uint8_t vdev_id, 1380 void *buf, 1381 bool is_aggregate); 1382 }; 1383 1384 /** 1385 * struct cdp_wds_ops - WDS operations 1386 * @txrx_set_wds_rx_policy: 1387 * @txrx_wds_peer_tx_policy_update: 1388 * @vdev_set_wds: 1389 */ 1390 struct cdp_wds_ops { 1391 QDF_STATUS 1392 (*txrx_set_wds_rx_policy)(struct cdp_soc_t *soc, uint8_t vdev_id, 1393 u_int32_t val); 1394 QDF_STATUS 1395 (*txrx_wds_peer_tx_policy_update)(struct cdp_soc_t *soc, 1396 uint8_t vdev_id, uint8_t *peer_mac, 1397 int wds_tx_ucast, int wds_tx_mcast); 1398 int (*vdev_set_wds)(struct cdp_soc_t *soc, uint8_t vdev_id, 1399 uint32_t val); 1400 }; 1401 1402 /** 1403 * struct cdp_raw_ops - raw packet operations 1404 * @rsim_get_astentry: 1405 */ 1406 struct cdp_raw_ops { 1407 QDF_STATUS 1408 (*rsim_get_astentry)(struct cdp_soc_t *soc, uint8_t vdev_id, 1409 qdf_nbuf_t *pnbuf, struct cdp_raw_ast *raw_ast); 1410 }; 1411 1412 #ifdef PEER_FLOW_CONTROL 1413 /** 1414 * struct cdp_pflow_ops - peer flow control operations 1415 * @pflow_update_pdev_params: 1416 */ 1417 struct cdp_pflow_ops { 1418 uint32_t (*pflow_update_pdev_params)(struct cdp_soc_t *soc, 1419 uint8_t pdev_id, 1420 enum _dp_param_t, 1421 uint32_t, void *); 1422 }; 1423 #endif /* PEER_FLOW_CONTROL */ 1424 1425 #define LRO_IPV4_SEED_ARR_SZ 5 1426 #define LRO_IPV6_SEED_ARR_SZ 11 1427 1428 /** 1429 * struct cdp_lro_hash_config - set rx_offld(LRO/GRO) init parameters 1430 * @lro_enable: indicates whether rx_offld is enabled 1431 * @tcp_flag: If the TCP flags from the packet do not match 1432 * the values in this field after masking with TCP flags mask 1433 * below, packet is not rx_offld eligible 1434 * @tcp_flag_mask: field for comparing the TCP values provided 1435 * above with the TCP flags field in the received packet 1436 * @toeplitz_hash_ipv4: contains seed needed to compute the flow id 1437 * 5-tuple toeplitz hash for ipv4 packets 1438 * @toeplitz_hash_ipv6: contains seed needed to compute the flow id 1439 * 5-tuple toeplitz hash for ipv6 packets 1440 */ 1441 struct cdp_lro_hash_config { 1442 uint32_t lro_enable; 1443 uint32_t tcp_flag:9, 1444 tcp_flag_mask:9; 1445 uint32_t toeplitz_hash_ipv4[LRO_IPV4_SEED_ARR_SZ]; 1446 uint32_t toeplitz_hash_ipv6[LRO_IPV6_SEED_ARR_SZ]; 1447 }; 1448 1449 struct ol_if_ops { 1450 void 1451 (*peer_set_default_routing)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc, 1452 uint8_t pdev_id, uint8_t *peer_macaddr, 1453 uint8_t vdev_id, 1454 bool hash_based, uint8_t ring_num, 1455 uint8_t lmac_peer_id_msb); 1456 QDF_STATUS 1457 (*peer_rx_reorder_queue_setup)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc, 1458 uint8_t pdev_id, 1459 uint8_t vdev_id, uint8_t *peer_mac, 1460 qdf_dma_addr_t hw_qdesc, int tid, 1461 uint16_t queue_num, 1462 uint8_t ba_window_size_valid, 1463 uint16_t ba_window_size); 1464 QDF_STATUS 1465 (*peer_rx_reorder_queue_remove)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc, 1466 uint8_t pdev_id, 1467 uint8_t vdev_id, uint8_t *peer_macaddr, 1468 uint32_t tid_mask); 1469 int (*peer_unref_delete)(struct cdp_ctrl_objmgr_psoc *psoc, 1470 uint8_t pdev_id, 1471 uint8_t *peer_mac, 1472 uint8_t *vdev_mac, enum wlan_op_mode opmode); 1473 bool (*is_hw_dbs_capable)(struct wlan_objmgr_psoc *psoc); 1474 int (*peer_add_wds_entry)(struct cdp_ctrl_objmgr_psoc *soc, 1475 uint8_t vdev_id, 1476 uint8_t *peer_macaddr, 1477 uint16_t peer_id, 1478 const uint8_t *dest_macaddr, 1479 uint8_t *next_node_mac, 1480 uint32_t flags, 1481 uint8_t type); 1482 int (*peer_update_wds_entry)(struct cdp_ctrl_objmgr_psoc *soc, 1483 uint8_t vdev_id, 1484 uint8_t *dest_macaddr, 1485 uint8_t *peer_macaddr, 1486 uint32_t flags); 1487 void (*peer_del_wds_entry)(struct cdp_ctrl_objmgr_psoc *soc, 1488 uint8_t vdev_id, 1489 uint8_t *wds_macaddr, 1490 uint8_t type, 1491 uint8_t delete_in_fw); 1492 #ifdef WLAN_FEATURE_MULTI_AST_DEL 1493 void (*peer_del_multi_wds_entry)( 1494 struct cdp_ctrl_objmgr_psoc *soc, 1495 uint8_t vdev_id, 1496 struct peer_del_multi_wds_entries *wds_list); 1497 #endif 1498 QDF_STATUS 1499 (*lro_hash_config)(struct cdp_ctrl_objmgr_psoc *psoc, uint8_t pdev_id, 1500 struct cdp_lro_hash_config *rx_offld_hash); 1501 1502 void (*update_dp_stats)(void *soc, void *stats, uint16_t id, 1503 uint8_t type); 1504 #ifdef RX_PEER_INVALID_ENH 1505 uint8_t (*rx_invalid_peer)(struct cdp_ctrl_objmgr_psoc *soc, 1506 uint8_t pdev_id, void *msg); 1507 #else 1508 uint8_t (*rx_invalid_peer)(uint8_t vdev_id, void *wh); 1509 #endif 1510 1511 int (*peer_map_event)(struct cdp_ctrl_objmgr_psoc *psoc, 1512 uint16_t peer_id, uint16_t hw_peer_id, 1513 uint8_t vdev_id, uint8_t *peer_mac_addr, 1514 enum cdp_txrx_ast_entry_type peer_type, 1515 uint32_t tx_ast_hashidx); 1516 1517 int (*peer_unmap_event)(struct cdp_ctrl_objmgr_psoc *psoc, 1518 uint16_t peer_id, 1519 uint8_t vdev_id, uint8_t *mac_addr); 1520 1521 int (*get_dp_cfg_param)(struct cdp_ctrl_objmgr_psoc *psoc, 1522 enum cdp_cfg_param_type param_num); 1523 1524 void (*rx_mic_error)(struct cdp_ctrl_objmgr_psoc *psoc, 1525 uint8_t pdev_id, 1526 struct cdp_rx_mic_err_info *info); 1527 1528 bool (*rx_frag_tkip_demic)(struct cdp_ctrl_objmgr_psoc *psoc, 1529 uint8_t vdev_id, uint8_t *peer_mac_addr, 1530 qdf_nbuf_t nbuf, 1531 uint16_t hdr_space); 1532 1533 #ifdef QCA_SUPPORT_PRIMARY_LINK_MIGRATE 1534 void (*update_primary_link)(struct cdp_ctrl_objmgr_psoc *psoc, 1535 uint8_t *mac_addr); 1536 #endif 1537 1538 uint8_t (*freq_to_channel)(struct cdp_ctrl_objmgr_psoc *psoc, 1539 uint8_t pdev_id, uint16_t freq); 1540 1541 uint8_t (*freq_to_band)(struct cdp_ctrl_objmgr_psoc *psoc, 1542 uint8_t pdev_id, uint16_t freq); 1543 1544 QDF_STATUS(*set_mec_timer)(struct cdp_ctrl_objmgr_psoc *psoc, 1545 uint8_t vdev_id, uint16_t mec_timer_val); 1546 1547 #ifdef INTRA_BSS_FWD_OFFLOAD 1548 void (*vdev_set_intra_bss)(struct cdp_ctrl_objmgr_psoc *psoc, 1549 uint16_t vdev_id, bool enable); 1550 #endif 1551 #ifdef ATH_SUPPORT_NAC_RSSI 1552 int (*config_fw_for_nac_rssi)(struct cdp_ctrl_objmgr_psoc *psoc, 1553 uint8_t pdev_id, 1554 u_int8_t vdev_id, 1555 enum cdp_nac_param_cmd cmd, char *bssid, 1556 char *client_macaddr, uint8_t chan_num); 1557 1558 int 1559 (*config_bssid_in_fw_for_nac_rssi)(struct cdp_ctrl_objmgr_psoc *psoc, 1560 uint8_t pdev_id, u_int8_t vdev_id, 1561 enum cdp_nac_param_cmd cmd, 1562 char *bssid, char *client_mac); 1563 #endif 1564 int (*peer_sta_kickout)(struct cdp_ctrl_objmgr_psoc *psoc, 1565 uint16_t pdev_id, uint8_t *peer_macaddr); 1566 1567 /** 1568 * send_delba() - Send delba to peer 1569 * @psoc: Objmgr soc handle 1570 * @vdev_id: dp vdev id 1571 * @peer_macaddr: Peer mac addr 1572 * @tid: Tid number 1573 * @reason_code: Reason code 1574 * @cdp_rcode: CDP reason code for sending DELBA 1575 * 1576 * Return: 0 for success, non-zero for failure 1577 */ 1578 int (*send_delba)(struct cdp_ctrl_objmgr_psoc *psoc, uint8_t vdev_id, 1579 uint8_t *peer_macaddr, uint8_t tid, 1580 uint8_t reason_code, uint8_t cdp_rcode); 1581 1582 int 1583 (*peer_delete_multiple_wds_entries)(struct cdp_ctrl_objmgr_psoc *psoc, 1584 uint8_t vdev_id, 1585 uint8_t *dest_macaddr, 1586 uint8_t *peer_macaddr, 1587 uint32_t flags); 1588 int 1589 (*pdev_update_lmac_n_target_pdev_id)(struct cdp_ctrl_objmgr_psoc *psoc, 1590 uint8_t *pdev_id, 1591 uint8_t *lmac_id, 1592 uint8_t *target_pdev_id); 1593 bool (*is_roam_inprogress)(uint32_t vdev_id); 1594 enum QDF_GLOBAL_MODE (*get_con_mode)(void); 1595 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP) 1596 uint8_t (*peer_get_num_mlo_links)(struct cdp_ctrl_objmgr_psoc *psoc, 1597 uint8_t vdev_id, 1598 uint8_t *peer_macaddr, 1599 bool is_mld_peer); 1600 #endif 1601 #ifdef QCA_PEER_MULTIQ_SUPPORT 1602 int (*peer_ast_flowid_map)(struct cdp_ctrl_objmgr_psoc *ol_soc_handle, 1603 uint16_t peer_id, uint8_t vdev_id, 1604 uint8_t *peer_mac_addr); 1605 #endif 1606 #ifdef DP_MEM_PRE_ALLOC 1607 void *(*dp_prealloc_get_context)(uint32_t ctxt_type, size_t ctxt_size); 1608 1609 QDF_STATUS(*dp_prealloc_put_context)(uint32_t ctxt_type, void *vaddr); 1610 void *(*dp_prealloc_get_consistent)(uint32_t *size, 1611 void **base_vaddr_unaligned, 1612 qdf_dma_addr_t *paddr_unaligned, 1613 qdf_dma_addr_t *paddr_aligned, 1614 uint32_t align, 1615 uint32_t ring_type); 1616 void (*dp_prealloc_put_consistent)(qdf_size_t size, 1617 void *vaddr_unligned, 1618 qdf_dma_addr_t paddr); 1619 void (*dp_get_multi_pages)(uint32_t desc_type, 1620 size_t element_size, 1621 uint16_t element_num, 1622 struct qdf_mem_multi_page_t *pages, 1623 bool cacheable); 1624 void (*dp_put_multi_pages)(uint32_t desc_type, 1625 struct qdf_mem_multi_page_t *pages); 1626 #endif 1627 int (*get_soc_nss_cfg)(struct cdp_ctrl_objmgr_psoc *ol_soc_handle); 1628 1629 char *(*get_device_name)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc, 1630 uint8_t pdev_id); 1631 QDF_STATUS(*nss_stats_clr)(struct cdp_ctrl_objmgr_psoc *psoc, 1632 uint8_t vdev_id); 1633 int (*dp_rx_get_pending)(ol_txrx_soc_handle soc); 1634 void (*dp_rx_sched_refill_thread)(ol_txrx_soc_handle soc); 1635 /* TODO: Add any other control path calls required to OL_IF/WMA layer */ 1636 #ifdef QCA_SUPPORT_WDS_EXTENDED 1637 void (*rx_wds_ext_peer_learn)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc, 1638 uint16_t peer_id, uint8_t vdev_id, 1639 uint8_t *peer_macaddr); 1640 #endif /* QCA_SUPPORT_WDS_EXTENDED */ 1641 #ifdef WLAN_SUPPORT_MESH_LATENCY 1642 QDF_STATUS(*peer_update_mesh_latency_params)( 1643 struct cdp_ctrl_objmgr_psoc *psoc, 1644 uint8_t vdev_id, uint8_t *peer_mac, uint8_t tid, 1645 uint32_t service_interval_dl, uint32_t burst_size_dl, 1646 uint32_t service_interval_ul, uint32_t burst_size_ul, 1647 uint8_t add_or_sub, uint8_t ac); 1648 #endif 1649 #ifdef CONFIG_SAWF 1650 QDF_STATUS 1651 (*peer_update_sawf_ul_params)(struct cdp_ctrl_objmgr_psoc *soc, 1652 uint8_t vdev_id, uint8_t *peer_mac, 1653 uint8_t tid, uint8_t ac, 1654 uint32_t service_interval, 1655 uint32_t burst_size, uint32_t min_tput, 1656 uint32_t max_latency, uint8_t add_sub); 1657 #endif 1658 uint32_t (*dp_get_tx_inqueue)(ol_txrx_soc_handle soc); 1659 QDF_STATUS(*dp_send_unit_test_cmd)(uint32_t vdev_id, 1660 uint32_t module_id, 1661 uint32_t arg_count, uint32_t *arg); 1662 1663 #ifdef QCA_SUPPORT_LITE_MONITOR 1664 int (*config_lite_mon_peer)(struct cdp_ctrl_objmgr_psoc *psoc, 1665 uint8_t pdev_id, 1666 uint8_t vdev_id, 1667 enum cdp_nac_param_cmd cmd, 1668 uint8_t *peer_mac); 1669 int (*config_lite_mon_tx_peer)(struct cdp_ctrl_objmgr_psoc *psoc, 1670 uint8_t pdev_id, uint8_t vdev_id, 1671 enum cdp_tx_filter_action cmd, 1672 uint8_t *peer_mac); 1673 #endif 1674 #ifdef WLAN_SUPPORT_SCS 1675 bool (*peer_scs_rule_match)(struct cdp_ctrl_objmgr_psoc *psoc, 1676 uint8_t vdev_id, uint32_t rule_id, 1677 uint8_t *peer_mac); 1678 #endif 1679 #ifdef DP_UMAC_HW_RESET_SUPPORT 1680 void (*dp_update_tx_hardstart)(struct cdp_ctrl_objmgr_psoc *psoc, 1681 uint8_t vdev_id, 1682 struct ol_txrx_hardtart_ctxt *ctxt); 1683 #endif 1684 #if defined(IPA_WDS_EASYMESH_FEATURE) && defined(FEATURE_AST) 1685 void (*peer_send_wds_disconnect)(struct cdp_ctrl_objmgr_psoc *psoc, 1686 uint8_t *mac_addr, uint8_t vdev_id); 1687 #endif 1688 #ifdef WLAN_SUPPORT_PPEDS 1689 QDF_STATUS 1690 (*peer_set_ppeds_default_routing)(struct cdp_ctrl_objmgr_psoc *psoc, 1691 uint8_t *peer_macaddr, 1692 uint16_t service_code, 1693 uint8_t priority_valid, 1694 uint16_t src_info, 1695 uint8_t vdev_id, uint8_t use_ppe, 1696 uint8_t routing_enabled); 1697 1698 QDF_STATUS 1699 (*get_ppeds_profile_info_for_vap)(struct cdp_ctrl_objmgr_psoc *psoc, 1700 uint8_t vdev_id, 1701 struct cdp_ds_vp_params *vp_params); 1702 1703 #endif /* WLAN_SUPPORT_PPEDS */ 1704 1705 #ifdef CONFIG_SAWF_DEF_QUEUES 1706 int (*disable_sawf_svc)(uint8_t svc_id); 1707 #endif 1708 void (*dp_print_fisa_stats)(enum cdp_fisa_stats_id stats_id); 1709 }; 1710 1711 #ifdef DP_PEER_EXTENDED_API 1712 /** 1713 * struct cdp_misc_ops - mcl ops not classified 1714 * @set_ibss_vdev_heart_beat_timer: Update ibss vdev heart beat timer 1715 * @set_wmm_param: set wmm parameters 1716 * @bad_peer_txctl_set_setting: configure bad peer tx limit setting 1717 * @bad_peer_txctl_update_threshold: configure bad peer tx threshold limit 1718 * @hl_tdls_flag_reset: reset tdls flag for vdev 1719 * @tx_non_std: Allow the control-path SW to send data frames 1720 * @get_vdev_id: get vdev id 1721 * @get_tx_ack_stats: 1722 * @set_wisa_mode: set wisa mode for a vdev 1723 * @txrx_data_stall_cb_register: register data stall callback 1724 * @txrx_data_stall_cb_deregister: deregister data stall callback 1725 * @txrx_post_data_stall_event: post data stall event 1726 * @runtime_suspend: ensure TXRX is ready to runtime suspend 1727 * @runtime_resume: ensure TXRX is ready to runtime resume 1728 * @get_opmode: get operation mode of vdev 1729 * @mark_first_wakeup_packet: set flag to indicate that fw is compatible for 1730 * marking first packet after wow wakeup 1731 * @update_mac_id: update mac_id for vdev 1732 * @flush_rx_frames: flush rx frames on the queue 1733 * @get_intra_bss_fwd_pkts_count: to get the total tx and rx packets that 1734 * has been forwarded from txrx layer 1735 * without going to upper layers 1736 * @pkt_log_init: handler to initialize packet log 1737 * @pkt_log_con_service: handler to connect packet log service 1738 * @pkt_log_exit: 1739 * @get_num_rx_contexts: handler to get number of RX contexts 1740 * @register_pktdump_cb: register callback for different pktlog 1741 * @unregister_pktdump_cb: unregister callback for different pktlog 1742 * @pdev_reset_driver_del_ack: reset driver delayed ack enabled flag 1743 * @vdev_set_driver_del_ack_enable: set driver delayed ack enabled flag 1744 * 1745 * @vdev_set_bundle_require_flag: 1746 * @pdev_reset_bundle_require_flag: 1747 * @txrx_ext_stats_request: 1748 * @request_rx_hw_stats: 1749 * @reset_rx_hw_ext_stats: 1750 * @vdev_inform_ll_conn: inform DP to add/delete a latency critical connection 1751 * for this particular vdev. 1752 * @set_swlm_enable: Enable or Disable Software Latency Manager. 1753 * @is_swlm_enabled: Check if Software latency manager is enabled or not. 1754 * @display_txrx_hw_info: Dump the DP rings info 1755 * @get_tx_rings_grp_bitmap: 1756 * @set_peer_txq_flush_config: Configures the ac/tid to be flushed and policy 1757 * to flush. 1758 * @set_bus_vote_lvl_high: The bus lvl is set to high or low based on tput 1759 * @get_bus_vote_lvl_high: Get bus lvl to determine whether or not get 1760 * rx rate stats 1761 * @evaluate_update_tx_ilp_cfg: Evaluate and update DP TX ILP configuration 1762 * 1763 * Function pointers for miscellaneous soc/pdev/vdev related operations. 1764 */ 1765 struct cdp_misc_ops { 1766 uint16_t (*set_ibss_vdev_heart_beat_timer)(struct cdp_soc_t *soc_hdl, 1767 uint8_t vdev_id, 1768 uint16_t timer_value_sec); 1769 void (*set_wmm_param)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 1770 struct ol_tx_wmm_param_t wmm_param); 1771 void (*bad_peer_txctl_set_setting)(struct cdp_soc_t *soc_hdl, 1772 uint8_t pdev_id, int enable, 1773 int period, int txq_limit); 1774 void (*bad_peer_txctl_update_threshold)(struct cdp_soc_t *soc_hdl, 1775 uint8_t pdev_id, 1776 int level, int tput_thresh, 1777 int tx_limit); 1778 void (*hl_tdls_flag_reset)(struct cdp_soc_t *soc_hdl, 1779 uint8_t vdev_id, bool flag); 1780 qdf_nbuf_t (*tx_non_std)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id, 1781 enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list); 1782 uint16_t (*get_vdev_id)(struct cdp_vdev *vdev); 1783 uint32_t (*get_tx_ack_stats)(struct cdp_soc_t *soc_hdl, 1784 uint8_t vdev_id); 1785 QDF_STATUS (*set_wisa_mode)(struct cdp_soc_t *soc_hdl, 1786 uint8_t vdev_id, bool enable); 1787 QDF_STATUS (*txrx_data_stall_cb_register)(struct cdp_soc_t *soc_hdl, 1788 uint8_t pdev_id, 1789 data_stall_detect_cb cb); 1790 QDF_STATUS (*txrx_data_stall_cb_deregister)(struct cdp_soc_t *soc_hdl, 1791 uint8_t pdev_id, 1792 data_stall_detect_cb cb); 1793 void (*txrx_post_data_stall_event)( 1794 struct cdp_soc_t *soc_hdl, 1795 enum data_stall_log_event_indicator indicator, 1796 enum data_stall_log_event_type data_stall_type, 1797 uint32_t pdev_id, uint32_t vdev_id_bitmap, 1798 enum data_stall_log_recovery_type recovery_type); 1799 QDF_STATUS (*runtime_suspend)(struct cdp_soc_t *soc_hdl, 1800 uint8_t pdev_id); 1801 QDF_STATUS (*runtime_resume)(struct cdp_soc_t *soc_hdl, 1802 uint8_t pdev_id); 1803 int (*get_opmode)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id); 1804 void (*mark_first_wakeup_packet)(struct cdp_soc_t *soc_hdl, 1805 uint8_t pdev_id, uint8_t value); 1806 void (*update_mac_id)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id, 1807 uint8_t mac_id); 1808 void (*flush_rx_frames)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 1809 void *peer, bool drop); 1810 A_STATUS(*get_intra_bss_fwd_pkts_count)(struct cdp_soc_t *soc_hdl, 1811 uint8_t vdev_id, 1812 uint64_t *fwd_tx_packets, 1813 uint64_t *fwd_rx_packets); 1814 void (*pkt_log_init)(struct cdp_soc_t *soc_hdl, uint8_t pdev, 1815 void *scn); 1816 void (*pkt_log_con_service)(struct cdp_soc_t *soc_hdl, 1817 uint8_t pdev_id, void *scn); 1818 void (*pkt_log_exit)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id); 1819 int (*get_num_rx_contexts)(struct cdp_soc_t *soc_hdl); 1820 void (*register_pktdump_cb)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 1821 ol_txrx_pktdump_cb tx_cb, 1822 ol_txrx_pktdump_cb rx_cb); 1823 void (*unregister_pktdump_cb)(struct cdp_soc_t *soc_hdl, 1824 uint8_t pdev_id); 1825 void (*pdev_reset_driver_del_ack)(struct cdp_soc_t *soc_hdl, 1826 uint8_t pdev_id); 1827 void (*vdev_set_driver_del_ack_enable)(struct cdp_soc_t *soc_hdl, 1828 uint8_t vdev_id, 1829 unsigned long rx_packets, 1830 uint32_t time_in_ms, 1831 uint32_t high_th, 1832 uint32_t low_th); 1833 void (*vdev_set_bundle_require_flag)(uint8_t vdev_id, 1834 unsigned long tx_bytes, 1835 uint32_t time_in_ms, 1836 uint32_t high_th, 1837 uint32_t low_th); 1838 void (*pdev_reset_bundle_require_flag)(struct cdp_soc_t *soc_hdl, 1839 uint8_t pdev_id); 1840 QDF_STATUS (*txrx_ext_stats_request)(struct cdp_soc_t *soc_hdl, 1841 uint8_t pdev_id, 1842 struct cdp_txrx_ext_stats *req); 1843 QDF_STATUS (*request_rx_hw_stats)(struct cdp_soc_t *soc_hdl, 1844 uint8_t vdev_id); 1845 void (*reset_rx_hw_ext_stats)(struct cdp_soc_t *soc_hdl); 1846 QDF_STATUS (*vdev_inform_ll_conn)(struct cdp_soc_t *soc_hdl, 1847 uint8_t vdev_id, 1848 enum vdev_ll_conn_actions action); 1849 QDF_STATUS (*set_swlm_enable)(struct cdp_soc_t *soc_hdl, 1850 uint8_t val); 1851 uint8_t (*is_swlm_enabled)(struct cdp_soc_t *soc_hdl); 1852 void (*display_txrx_hw_info)(struct cdp_soc_t *soc_hdl); 1853 uint32_t (*get_tx_rings_grp_bitmap)(struct cdp_soc_t *soc_hdl); 1854 #ifdef WLAN_FEATURE_PEER_TXQ_FLUSH_CONF 1855 int (*set_peer_txq_flush_config)(struct cdp_soc_t *soc_hdl, 1856 uint8_t vdev_id, uint8_t *addr, 1857 uint8_t ac, uint32_t tid, 1858 enum cdp_peer_txq_flush_policy policy); 1859 #endif 1860 #ifdef FEATURE_RX_LINKSPEED_ROAM_TRIGGER 1861 void (*set_bus_vote_lvl_high)(struct cdp_soc_t *soc_hdl, bool high); 1862 bool (*get_bus_vote_lvl_high)(struct cdp_soc_t *soc_hdl); 1863 #endif 1864 #ifdef DP_TX_PACKET_INSPECT_FOR_ILP 1865 bool (*evaluate_update_tx_ilp_cfg)(struct cdp_soc_t *soc_hdl, 1866 uint8_t num_msdu_idx_map, 1867 uint8_t *msdu_idx_map_arr); 1868 #endif 1869 }; 1870 1871 /** 1872 * struct cdp_ocb_ops - mcl ocb ops 1873 * @set_ocb_chan_info: set OCB channel info 1874 * @get_ocb_chan_info: get OCB channel info 1875 * 1876 * Function pointers for operations related to OCB. 1877 */ 1878 struct cdp_ocb_ops { 1879 void (*set_ocb_chan_info)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id, 1880 struct ol_txrx_ocb_set_chan ocb_set_chan); 1881 struct ol_txrx_ocb_chan_info *(*get_ocb_chan_info)( 1882 struct cdp_soc_t *soc_hdl, uint8_t vdev_id); 1883 }; 1884 1885 /** 1886 * struct cdp_peer_ops - mcl peer related ops 1887 * @register_peer: 1888 * @clear_peer: 1889 * @find_peer_exist: 1890 * @find_peer_exist_on_vdev: 1891 * @find_peer_exist_on_other_vdev: 1892 * @peer_state_update: 1893 * @get_vdevid: 1894 * @get_vdev_by_peer_addr: 1895 * @register_ocb_peer: 1896 * @peer_get_peer_mac_addr: 1897 * @get_peer_state: 1898 * @get_vdev_for_peer: 1899 * @update_ibss_add_peer_num_of_vdev: 1900 * @remove_peers_for_vdev: 1901 * @remove_peers_for_vdev_no_lock: 1902 * @copy_mac_addr_raw: 1903 * @add_last_real_peer: 1904 * @is_vdev_restore_last_peer: 1905 * @update_last_real_peer: 1906 * @peer_detach_force_delete: 1907 * @set_tdls_offchan_enabled: 1908 * @set_peer_as_tdls_peer: 1909 * @peer_flush_frags: 1910 */ 1911 struct cdp_peer_ops { 1912 QDF_STATUS (*register_peer)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 1913 struct ol_txrx_desc_type *sta_desc); 1914 QDF_STATUS (*clear_peer)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 1915 struct qdf_mac_addr peer_addr); 1916 bool (*find_peer_exist)(struct cdp_soc_t *soc, uint8_t pdev_id, 1917 uint8_t *peer_addr); 1918 bool (*find_peer_exist_on_vdev)(struct cdp_soc_t *soc, uint8_t vdev_id, 1919 uint8_t *peer_addr); 1920 bool (*find_peer_exist_on_other_vdev)(struct cdp_soc_t *soc, 1921 uint8_t vdev_id, 1922 uint8_t *peer_addr, 1923 uint16_t max_bssid); 1924 QDF_STATUS (*peer_state_update)(struct cdp_soc_t *soc, 1925 uint8_t *peer_addr, 1926 enum ol_txrx_peer_state state); 1927 QDF_STATUS (*get_vdevid)(struct cdp_soc_t *soc_hdl, uint8_t *peer_mac, 1928 uint8_t *vdev_id); 1929 struct cdp_vdev * (*get_vdev_by_peer_addr)(struct cdp_pdev *pdev, 1930 struct qdf_mac_addr peer_addr); 1931 QDF_STATUS (*register_ocb_peer)(uint8_t *mac_addr); 1932 uint8_t * (*peer_get_peer_mac_addr)(void *peer); 1933 int (*get_peer_state)(struct cdp_soc_t *soc, uint8_t vdev_id, 1934 uint8_t *peer_mac); 1935 struct cdp_vdev * (*get_vdev_for_peer)(void *peer); 1936 int16_t (*update_ibss_add_peer_num_of_vdev)(struct cdp_soc_t *soc, 1937 uint8_t vdev_id, 1938 int16_t peer_num_delta); 1939 void (*remove_peers_for_vdev)(struct cdp_vdev *vdev, 1940 ol_txrx_vdev_peer_remove_cb callback, 1941 void *callback_context, bool remove_last_peer); 1942 void (*remove_peers_for_vdev_no_lock)(struct cdp_vdev *vdev, 1943 ol_txrx_vdev_peer_remove_cb callback, 1944 void *callback_context); 1945 void (*copy_mac_addr_raw)(struct cdp_soc_t *soc, uint8_t vdev_id, 1946 uint8_t *bss_addr); 1947 void (*add_last_real_peer)(struct cdp_soc_t *soc, uint8_t pdev_id, 1948 uint8_t vdev_id); 1949 bool (*is_vdev_restore_last_peer)(struct cdp_soc_t *soc, 1950 uint8_t vdev_id, 1951 uint8_t *peer_mac); 1952 void (*update_last_real_peer)(struct cdp_soc_t *soc, uint8_t pdev_id, 1953 uint8_t vdev_id, bool restore_last_peer); 1954 void (*peer_detach_force_delete)(struct cdp_soc_t *soc_hdl, 1955 uint8_t vdev_id, uint8_t *peer_addr); 1956 void (*set_tdls_offchan_enabled)(struct cdp_soc_t *soc, uint8_t vdev_id, 1957 uint8_t *peer_mac, bool val); 1958 void (*set_peer_as_tdls_peer)(struct cdp_soc_t *soc, uint8_t vdev_id, 1959 uint8_t *peer_mac, bool val); 1960 void (*peer_flush_frags)(struct cdp_soc_t *soc_hdl, 1961 uint8_t vdev_id, uint8_t *peer_mac); 1962 }; 1963 1964 /** 1965 * struct cdp_mob_stats_ops - mcl mob stats ops 1966 * @clear_stats: handler to clear ol txrx stats 1967 * @stats: handler to update ol txrx stats 1968 */ 1969 struct cdp_mob_stats_ops { 1970 QDF_STATUS(*clear_stats)(struct cdp_soc_t *soc_hdl, 1971 uint8_t pdev_id, uint8_t bitmap); 1972 int (*stats)(uint8_t vdev_id, char *buffer, unsigned buf_len); 1973 }; 1974 1975 /** 1976 * struct cdp_pmf_ops - mcl protected management frame ops 1977 * @get_pn_info: handler to get pn info from peer 1978 * 1979 * Function pointers for pmf related operations. 1980 */ 1981 struct cdp_pmf_ops { 1982 void (*get_pn_info)(struct cdp_soc_t *soc, uint8_t *peer_mac, 1983 uint8_t vdev_id, uint8_t **last_pn_valid, 1984 uint64_t **last_pn, uint32_t **rmf_pn_replays); 1985 }; 1986 #endif 1987 1988 1989 #ifdef DP_FLOW_CTL 1990 /** 1991 * struct cdp_cfg_ops - mcl configuration ops 1992 * @set_cfg_rx_fwd_disabled: set rx_fwd_disabled flag 1993 * @set_cfg_packet_log_enabled: set is_packet_log_enabled flag 1994 * @cfg_attach: hardcode the configuration parameters 1995 * @vdev_rx_set_intrabss_fwd: set disable_intrabss_fwd flag 1996 * @is_rx_fwd_disabled: get the rx_fwd_disabled flag, 1997 * 1 enabled, 0 disabled. 1998 * @tx_set_is_mgmt_over_wmi_enabled: set is_mgmt_over_wmi_enabled flag to 1999 * indicate that mgmt over wmi is enabled 2000 * or not, 2001 * 1 for enabled, 0 for disable 2002 * @is_high_latency: get device is high or low latency device, 2003 * 1 high latency bus, 0 low latency bus 2004 * @set_flow_control_parameters: set flow control parameters 2005 * @set_flow_steering: set flow_steering_enabled flag 2006 * @set_ptp_rx_opt_enabled: set is_ptp_rx_opt_enabled flag 2007 * @set_new_htt_msg_format: set new_htt_msg_format flag 2008 * @set_peer_unmap_conf_support: set enable_peer_unmap_conf_support flag 2009 * @get_peer_unmap_conf_support: get enable_peer_unmap_conf_support flag 2010 * @set_tx_compl_tsf64: set enable_tx_compl_tsf64 flag, 2011 * 1 enabled, 0 disabled. 2012 * @get_tx_compl_tsf64: get enable_tx_compl_tsf64 flag, 2013 * 1 enabled, 0 disabled. 2014 */ 2015 struct cdp_cfg_ops { 2016 void (*set_cfg_rx_fwd_disabled)(struct cdp_cfg *cfg_pdev, 2017 uint8_t disable_rx_fwd); 2018 void (*set_cfg_packet_log_enabled)(struct cdp_cfg *cfg_pdev, 2019 uint8_t val); 2020 struct cdp_cfg * (*cfg_attach)(qdf_device_t osdev, void *cfg_param); 2021 void (*vdev_rx_set_intrabss_fwd)(struct cdp_soc_t *soc_hdl, 2022 uint8_t vdev_id, bool val); 2023 uint8_t (*is_rx_fwd_disabled)(struct cdp_vdev *vdev); 2024 void (*tx_set_is_mgmt_over_wmi_enabled)(uint8_t value); 2025 int (*is_high_latency)(struct cdp_cfg *cfg_pdev); 2026 void (*set_flow_control_parameters)(struct cdp_cfg *cfg_pdev, 2027 void *param); 2028 void (*set_flow_steering)(struct cdp_cfg *cfg_pdev, uint8_t val); 2029 void (*set_ptp_rx_opt_enabled)(struct cdp_cfg *cfg_pdev, uint8_t val); 2030 void (*set_new_htt_msg_format)(uint8_t val); 2031 void (*set_peer_unmap_conf_support)(bool val); 2032 bool (*get_peer_unmap_conf_support)(void); 2033 void (*set_tx_compl_tsf64)(bool val); 2034 bool (*get_tx_compl_tsf64)(void); 2035 }; 2036 2037 /** 2038 * struct cdp_flowctl_ops - mcl flow control 2039 * @flow_pool_map_handler: handler to map flow_id and pool descriptors 2040 * @flow_pool_unmap_handler: handler to unmap flow_id and pool descriptors 2041 * @register_pause_cb: handler to register tx pause callback 2042 * @set_desc_global_pool_size: handler to set global pool size 2043 * @dump_flow_pool_info: handler to dump global and flow pool info 2044 * @tx_desc_thresh_reached: handler to set tx desc threshold 2045 * 2046 * Function pointers for operations related to flow control 2047 */ 2048 struct cdp_flowctl_ops { 2049 QDF_STATUS (*flow_pool_map_handler)(struct cdp_soc_t *soc, 2050 uint8_t pdev_id, 2051 uint8_t vdev_id); 2052 void (*flow_pool_unmap_handler)(struct cdp_soc_t *soc, 2053 uint8_t pdev_id, 2054 uint8_t vdev_id); 2055 QDF_STATUS (*register_pause_cb)(struct cdp_soc_t *soc, 2056 tx_pause_callback); 2057 void (*set_desc_global_pool_size)(uint32_t num_msdu_desc); 2058 2059 void (*dump_flow_pool_info)(struct cdp_soc_t *soc_hdl); 2060 2061 bool (*tx_desc_thresh_reached)(struct cdp_soc_t *soc_hdl, 2062 uint8_t vdev_id); 2063 }; 2064 2065 /** 2066 * struct cdp_lflowctl_ops - mcl legacy flow control ops 2067 * @register_tx_flow_control: Register tx flow control callback 2068 * @set_vdev_tx_desc_limit: Set tx descriptor limit for a vdev 2069 * @set_vdev_os_queue_status: Set vdev queue status 2070 * @deregister_tx_flow_control_cb: Deregister tx flow control callback 2071 * @flow_control_cb: Call osif flow control callback 2072 * @get_tx_resource: Get tx resources and compare with watermark 2073 * @ll_set_tx_pause_q_depth: set pause queue depth 2074 * @vdev_flush: Flush all packets on a particular vdev 2075 * @vdev_pause: Pause a particular vdev 2076 * @vdev_unpause: Unpause a particular vdev 2077 * 2078 * Function pointers for operations related to flow control 2079 */ 2080 struct cdp_lflowctl_ops { 2081 #ifdef QCA_HL_NETDEV_FLOW_CONTROL 2082 int (*register_tx_flow_control)(struct cdp_soc_t *soc_hdl, 2083 uint8_t pdev_id, 2084 tx_pause_callback flowcontrol); 2085 int (*set_vdev_tx_desc_limit)(struct cdp_soc_t *soc_hdl, 2086 uint8_t vdev_id, uint32_t chan_freq); 2087 int (*set_vdev_os_queue_status)(struct cdp_soc_t *soc_hdl, 2088 uint8_t vdev_id, 2089 enum netif_action_type action); 2090 #else 2091 int (*register_tx_flow_control)( 2092 struct cdp_soc_t *soc_hdl, 2093 uint8_t vdev_id, 2094 ol_txrx_tx_flow_control_fp flowControl, void *osif_fc_ctx, 2095 ol_txrx_tx_flow_control_is_pause_fp flow_control_is_pause); 2096 #endif /* QCA_HL_NETDEV_FLOW_CONTROL */ 2097 int (*deregister_tx_flow_control_cb)(struct cdp_soc_t *soc_hdl, 2098 uint8_t vdev_id); 2099 void (*flow_control_cb)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id, 2100 bool tx_resume); 2101 bool (*get_tx_resource)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 2102 struct qdf_mac_addr peer_addr, 2103 unsigned int low_watermark, 2104 unsigned int high_watermark_offset); 2105 int (*ll_set_tx_pause_q_depth)(struct cdp_soc_t *soc, uint8_t vdev_id, 2106 int pause_q_depth); 2107 void (*vdev_flush)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id); 2108 void (*vdev_pause)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id, 2109 uint32_t reason, uint32_t pause_type); 2110 void (*vdev_unpause)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id, 2111 uint32_t reason, uint32_t pause_type); 2112 }; 2113 2114 /** 2115 * struct cdp_throttle_ops - mcl throttle ops 2116 * @throttle_init_period: handler to initialize tx throttle time 2117 * @throttle_set_level: handler to set tx throttle level 2118 */ 2119 struct cdp_throttle_ops { 2120 void (*throttle_init_period)(struct cdp_soc_t *soc_hdl, 2121 uint8_t pdev_id, int period, 2122 uint8_t *dutycycle_level); 2123 void (*throttle_set_level)(struct cdp_soc_t *soc_hdl, 2124 uint8_t pdev_id, int level); 2125 }; 2126 #endif 2127 2128 #ifdef IPA_OFFLOAD 2129 /** 2130 * struct cdp_ipa_ops - mcl ipa data path ops 2131 * @ipa_get_resource: 2132 * @ipa_set_doorbell_paddr: 2133 * @ipa_iounmap_doorbell_vaddr: I/O unmap ipa doorbell vaddr 2134 * @ipa_set_active: 2135 * @ipa_op_response: 2136 * @ipa_register_op_cb: 2137 * @ipa_deregister_op_cb: 2138 * @ipa_get_stat: 2139 * @ipa_tx_data_frame: 2140 * @ipa_set_uc_tx_partition_base: 2141 * @ipa_update_peer_rx_stats: 2142 * @ipa_uc_get_share_stats: 2143 * @ipa_uc_set_quota: 2144 * @ipa_pcie_link_up: Hold PCIe link in L0 2145 * @ipa_pcie_link_down: Release PCIe link L0 hold 2146 * @ipa_enable_autonomy: 2147 * @ipa_disable_autonomy: 2148 * @ipa_setup: 2149 * @ipa_cleanup: 2150 * @ipa_setup_iface: 2151 * @ipa_cleanup_iface: 2152 * @ipa_enable_pipes: 2153 * @ipa_disable_pipes: 2154 * @ipa_set_perf_level: 2155 * @ipa_rx_intrabss_fwd: 2156 * @ipa_tx_buf_smmu_mapping: Create SMMU mappings for Tx 2157 * @ipa_tx_buf_smmu_unmapping: Release SMMU mappings for Tx 2158 * buffers to IPA 2159 * @ipa_rx_buf_smmu_pool_mapping: Create SMMU mapping for Rx 2160 * @ipa_set_smmu_mapped: Set IPA SMMU mapped value 2161 * @ipa_get_smmu_mapped: Get IPA SMMU mapped value 2162 * @ipa_rx_super_rule_setup: Setup cce super rules based on filter tuple 2163 * @ipa_ast_create: Create/Update ast entry 2164 * @ipa_get_wdi_version: Get WDI version 2165 */ 2166 struct cdp_ipa_ops { 2167 QDF_STATUS (*ipa_get_resource)(struct cdp_soc_t *soc_hdl, 2168 uint8_t pdev_id); 2169 QDF_STATUS (*ipa_set_doorbell_paddr)(struct cdp_soc_t *soc_hdl, 2170 uint8_t pdev_id); 2171 QDF_STATUS (*ipa_iounmap_doorbell_vaddr)(struct cdp_soc_t *soc_hdl, 2172 uint8_t pdev_id); 2173 QDF_STATUS (*ipa_set_active)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 2174 bool uc_active, bool is_tx); 2175 QDF_STATUS (*ipa_op_response)(struct cdp_soc_t *soc_hdl, 2176 uint8_t pdev_id, uint8_t *op_msg); 2177 QDF_STATUS (*ipa_register_op_cb)(struct cdp_soc_t *soc_hdl, 2178 uint8_t pdev_id, 2179 void (*ipa_uc_op_cb_type) 2180 (uint8_t *op_msg, void *osif_ctxt), 2181 void *usr_ctxt); 2182 void (*ipa_deregister_op_cb)(struct cdp_soc_t *soc_hdl, 2183 uint8_t pdev_id); 2184 QDF_STATUS (*ipa_get_stat)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id); 2185 qdf_nbuf_t (*ipa_tx_data_frame)(struct cdp_soc_t *soc_hdl, 2186 uint8_t vdev_id, qdf_nbuf_t skb); 2187 void (*ipa_set_uc_tx_partition_base)(struct cdp_cfg *pdev, 2188 uint32_t value); 2189 QDF_STATUS (*ipa_update_peer_rx_stats)(struct cdp_soc_t *soc_hdl, 2190 uint8_t vdev_id, 2191 uint8_t *peer_mac, 2192 qdf_nbuf_t nbuf); 2193 #ifdef FEATURE_METERING 2194 QDF_STATUS (*ipa_uc_get_share_stats)(struct cdp_soc_t *soc_hdl, 2195 uint8_t pdev_id, 2196 uint8_t reset_stats); 2197 QDF_STATUS (*ipa_uc_set_quota)(struct cdp_soc_t *soc_hdl, 2198 uint8_t pdev_id, uint64_t quota_bytes); 2199 #endif 2200 #ifdef IPA_OPT_WIFI_DP 2201 int (*ipa_pcie_link_up)(struct cdp_soc_t *soc_hdl); 2202 void (*ipa_pcie_link_down)(struct cdp_soc_t *soc_hdl); 2203 #endif 2204 QDF_STATUS (*ipa_enable_autonomy)(struct cdp_soc_t *soc_hdl, 2205 uint8_t pdev_id); 2206 QDF_STATUS (*ipa_disable_autonomy)(struct cdp_soc_t *soc_hdl, 2207 uint8_t pdev_id); 2208 2209 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || \ 2210 defined(CONFIG_IPA_WDI_UNIFIED_API) 2211 QDF_STATUS (*ipa_setup)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 2212 void *ipa_i2w_cb, void *ipa_w2i_cb, 2213 void *ipa_wdi_meter_notifier_cb, 2214 uint32_t ipa_desc_size, void *ipa_priv, 2215 bool is_rm_enabled, uint32_t *tx_pipe_handle, 2216 uint32_t *rx_pipe_handle, bool is_smmu_enabled, 2217 qdf_ipa_sys_connect_params_t *sys_in, 2218 bool over_gsi, qdf_ipa_wdi_hdl_t hdl, 2219 qdf_ipa_wdi_hdl_t id, 2220 void *ipa_ast_notify_cb); 2221 #else /* CONFIG_IPA_WDI_UNIFIED_API */ 2222 QDF_STATUS (*ipa_setup)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 2223 void *ipa_i2w_cb, void *ipa_w2i_cb, 2224 void *ipa_wdi_meter_notifier_cb, 2225 uint32_t ipa_desc_size, void *ipa_priv, 2226 bool is_rm_enabled, uint32_t *tx_pipe_handle, 2227 uint32_t *rx_pipe_handle); 2228 #endif /* CONFIG_IPA_WDI_UNIFIED_API */ 2229 QDF_STATUS (*ipa_cleanup)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 2230 uint32_t tx_pipe_handle, 2231 uint32_t rx_pipe_handle, 2232 qdf_ipa_wdi_hdl_t hdl); 2233 QDF_STATUS (*ipa_setup_iface)(char *ifname, uint8_t *mac_addr, 2234 qdf_ipa_client_type_t prod_client, 2235 qdf_ipa_client_type_t cons_client, 2236 uint8_t session_id, bool is_ipv6_enabled, 2237 qdf_ipa_wdi_hdl_t hdl); 2238 QDF_STATUS (*ipa_cleanup_iface)(char *ifname, bool is_ipv6_enabled, 2239 qdf_ipa_wdi_hdl_t hdl); 2240 QDF_STATUS (*ipa_enable_pipes)(struct cdp_soc_t *soc_hdl, 2241 uint8_t pdev_id, qdf_ipa_wdi_hdl_t hdl); 2242 QDF_STATUS (*ipa_disable_pipes)(struct cdp_soc_t *soc_hdl, 2243 uint8_t pdev_id, qdf_ipa_wdi_hdl_t hdl); 2244 QDF_STATUS (*ipa_set_perf_level)(int client, 2245 uint32_t max_supported_bw_mbps, 2246 qdf_ipa_wdi_hdl_t hdl); 2247 bool (*ipa_rx_intrabss_fwd)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id, 2248 qdf_nbuf_t nbuf, bool *fwd_success); 2249 QDF_STATUS (*ipa_tx_buf_smmu_mapping)(struct cdp_soc_t *soc_hdl, 2250 uint8_t pdev_id, 2251 const char *func, 2252 uint32_t line); 2253 QDF_STATUS (*ipa_tx_buf_smmu_unmapping)(struct cdp_soc_t *soc_hdl, 2254 uint8_t pdev_id, 2255 const char *func, 2256 uint32_t line); 2257 QDF_STATUS (*ipa_rx_buf_smmu_pool_mapping)( 2258 struct cdp_soc_t *soc_hdl, 2259 uint8_t pdev_id, 2260 bool create, 2261 const char *func, 2262 uint32_t line); 2263 QDF_STATUS (*ipa_set_smmu_mapped)(struct cdp_soc_t *soc_hdl, int val); 2264 int (*ipa_get_smmu_mapped)(struct cdp_soc_t *soc_hdl); 2265 2266 #ifdef IPA_OPT_WIFI_DP 2267 QDF_STATUS (*ipa_rx_super_rule_setup)(struct cdp_soc_t *soc_hdl, 2268 void *flt_params); 2269 #endif 2270 #ifdef IPA_WDS_EASYMESH_FEATURE 2271 QDF_STATUS (*ipa_ast_create)(struct cdp_soc_t *soc_hdl, 2272 qdf_ipa_ast_info_type_t *data); 2273 #endif 2274 void (*ipa_get_wdi_version)(struct cdp_soc_t *soc_hdl, 2275 uint8_t *wdi_ver); 2276 }; 2277 #endif 2278 2279 #ifdef DP_POWER_SAVE 2280 /** 2281 * struct cdp_tx_delay_ops - mcl tx delay ops 2282 * @tx_delay: handler to get tx packet delay 2283 * @tx_delay_hist: handler to get tx packet delay histogram 2284 * @tx_packet_count: handler to get tx packet count 2285 * @tx_set_compute_interval: update compute interval period for TSM stats 2286 * 2287 * Function pointer for operations related to tx delay. 2288 */ 2289 struct cdp_tx_delay_ops { 2290 void (*tx_delay)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 2291 uint32_t *queue_delay_microsec, 2292 uint32_t *tx_delay_microsec, int category); 2293 void (*tx_delay_hist)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 2294 uint16_t *bin_values, int category); 2295 void (*tx_packet_count)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, 2296 uint16_t *out_packet_count, 2297 uint16_t *out_packet_loss_count, int category); 2298 void (*tx_set_compute_interval)(struct cdp_soc_t *soc_hdl, 2299 uint8_t pdev_id, uint32_t interval); 2300 }; 2301 2302 /** 2303 * struct cdp_bus_ops - mcl bus suspend/resume ops 2304 * @bus_suspend: handler for bus suspend 2305 * @bus_resume: handler for bus resume 2306 * @process_wow_ack_rsp: handler for wow ack response 2307 * @process_target_suspend_req: handler for target suspend request 2308 */ 2309 struct cdp_bus_ops { 2310 QDF_STATUS (*bus_suspend)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id); 2311 QDF_STATUS (*bus_resume)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id); 2312 void (*process_wow_ack_rsp)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id); 2313 void (*process_target_suspend_req)(struct cdp_soc_t *soc_hdl, 2314 uint8_t pdev_id); 2315 }; 2316 #endif 2317 2318 #ifdef RECEIVE_OFFLOAD 2319 /** 2320 * struct cdp_rx_offld_ops - mcl host receive offload ops 2321 * @register_rx_offld_flush_cb: 2322 * @deregister_rx_offld_flush_cb: 2323 */ 2324 struct cdp_rx_offld_ops { 2325 void (*register_rx_offld_flush_cb)(void (rx_offld_flush_cb)(void *)); 2326 void (*deregister_rx_offld_flush_cb)(void); 2327 }; 2328 #endif 2329 2330 #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE) 2331 /** 2332 * struct cdp_cfr_ops - host cfr ops 2333 * @txrx_get_cfr_rcc: Handler to get CFR mode 2334 * @txrx_set_cfr_rcc: Handler to enable/disable CFR mode 2335 * @txrx_get_cfr_dbg_stats: Handler to get debug statistics for CFR mode 2336 * @txrx_clear_cfr_dbg_stats: Handler to clear debug statistics for CFR mode 2337 */ 2338 struct cdp_cfr_ops { 2339 bool (*txrx_get_cfr_rcc)(struct cdp_soc_t *soc_hdl, 2340 uint8_t pdev_id); 2341 void (*txrx_set_cfr_rcc)(struct cdp_soc_t *soc_hdl, 2342 uint8_t pdev_id, 2343 bool enable); 2344 void (*txrx_get_cfr_dbg_stats)(struct cdp_soc_t *soc_hdl, 2345 uint8_t pdev_id, 2346 struct cdp_cfr_rcc_stats *buf); 2347 void (*txrx_clear_cfr_dbg_stats)(struct cdp_soc_t *soc_hdl, 2348 uint8_t pdev_id); 2349 }; 2350 #endif 2351 2352 #ifdef WLAN_SUPPORT_MSCS 2353 /** 2354 * struct cdp_mscs_ops - data path ops for MSCS 2355 * @mscs_peer_lookup_n_get_priority: 2356 */ 2357 struct cdp_mscs_ops { 2358 int (*mscs_peer_lookup_n_get_priority)(struct cdp_soc_t *soc, 2359 uint8_t *src_mac, 2360 uint8_t *dst_mac, 2361 qdf_nbuf_t nbuf); 2362 }; 2363 #endif 2364 2365 #ifdef WLAN_SUPPORT_MESH_LATENCY 2366 /** 2367 * struct cdp_mesh_latency_ops - data path ops for Mesh latency 2368 * @mesh_latency_update_peer_parameter: 2369 */ 2370 struct cdp_mesh_latency_ops { 2371 QDF_STATUS (*mesh_latency_update_peer_parameter)( 2372 struct cdp_soc_t *soc, 2373 uint8_t *dest_mac, uint32_t service_interval_dl, 2374 uint32_t burst_size_dl, uint32_t service_interval_ul, 2375 uint32_t burst_size_ul, uint16_t priority, 2376 uint8_t add_or_sub); 2377 }; 2378 #endif 2379 2380 #ifdef WLAN_SUPPORT_SCS 2381 /** 2382 * struct cdp_scs_ops - data path ops for SCS 2383 * @scs_peer_lookup_n_rule_match : Handler for peer lookup and scs rule match 2384 */ 2385 struct cdp_scs_ops { 2386 bool (*scs_peer_lookup_n_rule_match)(struct cdp_soc_t *soc, 2387 uint32_t rule_id, 2388 uint8_t *dst_mac_addr); 2389 }; 2390 #endif 2391 2392 #ifdef CONFIG_SAWF_DEF_QUEUES 2393 struct cdp_sawf_ops { 2394 QDF_STATUS 2395 (*sawf_def_queues_map_req)(struct cdp_soc_t *soc, uint8_t *mac_addr, 2396 uint8_t svc_class_id); 2397 QDF_STATUS 2398 (*sawf_def_queues_unmap_req)(struct cdp_soc_t *soc, uint8_t *mac_addr, 2399 uint8_t svc_class_id); 2400 QDF_STATUS 2401 (*sawf_def_queues_get_map_report)(struct cdp_soc_t *soc, 2402 uint8_t *mac_addr); 2403 #ifdef CONFIG_SAWF 2404 QDF_STATUS 2405 (*sawf_get_peer_msduq_info)(struct cdp_soc_t *soc, uint8_t *mac_addr); 2406 QDF_STATUS 2407 (*txrx_get_peer_sawf_delay_stats)(struct cdp_soc_t *soc, 2408 uint32_t svc_id, uint8_t *mac, 2409 void *data); 2410 QDF_STATUS 2411 (*txrx_get_peer_sawf_tx_stats)(struct cdp_soc_t *soc, 2412 uint32_t svc_id, uint8_t *mac, 2413 void *data); 2414 QDF_STATUS 2415 (*sawf_mpdu_stats_req)(struct cdp_soc_t *soc, uint8_t enable); 2416 QDF_STATUS 2417 (*sawf_mpdu_details_stats_req)(struct cdp_soc_t *soc, uint8_t enable); 2418 QDF_STATUS 2419 (*txrx_sawf_set_mov_avg_params)(uint32_t num_pkt, uint32_t num_win); 2420 QDF_STATUS 2421 (*txrx_sawf_set_sla_params)(uint32_t num_pkt, uint32_t time_secs); 2422 QDF_STATUS 2423 (*txrx_sawf_init_telemtery_params)(void); 2424 QDF_STATUS 2425 (*telemetry_get_throughput_stats)(void *arg, uint64_t *in_bytes, 2426 uint64_t *in_cnt, uint64_t *tx_bytes, 2427 uint64_t *tx_cnt, uint8_t tid, 2428 uint8_t msduq); 2429 QDF_STATUS 2430 (*telemetry_get_mpdu_stats)(void *arg, uint64_t *svc_int_pass, 2431 uint64_t *svc_int_fail, 2432 uint64_t *burst_pass, uint64_t *burst_fail, 2433 uint8_t tid, uint8_t msduq); 2434 QDF_STATUS 2435 (*telemetry_get_drop_stats)(void *arg, uint64_t *pass, uint64_t *drop, 2436 uint64_t *drop_ttl, uint8_t tid, 2437 uint8_t msduq); 2438 QDF_STATUS 2439 (*peer_config_ul)(struct cdp_soc_t *hdl, uint8_t *mac_addr, uint8_t tid, 2440 uint32_t service_interval, uint32_t burst_size, 2441 uint32_t min_tput, uint32_t max_latency, 2442 uint8_t add_or_sub); 2443 QDF_STATUS 2444 (*swaf_peer_sla_configuration)(struct cdp_soc_t *soc, 2445 uint8_t *mac_addr, uint16_t *sla_mask); 2446 2447 QDF_STATUS 2448 (*sawf_peer_flow_count)(struct cdp_soc_t *hdl, uint8_t *mac_addr, 2449 uint8_t svc_id, uint8_t direction, 2450 uint8_t start_or_stop, uint8_t *peer_mac); 2451 #endif 2452 }; 2453 #endif 2454 2455 #ifdef WLAN_SUPPORT_PPEDS 2456 struct cdp_ppeds_txrx_ops { 2457 QDF_STATUS 2458 (*ppeds_vp_setup_recovery)(struct cdp_soc_t *soc, 2459 uint8_t vdev_id, uint16_t profile_idx); 2460 QDF_STATUS 2461 (*ppeds_entry_attach)(struct cdp_soc_t *soc, 2462 uint8_t vdev_id, void *vpai, 2463 int32_t *ppe_vp_num, 2464 struct cdp_ds_vp_params *vp_params); 2465 QDF_STATUS 2466 (*ppeds_enable_pri2tid)(struct cdp_soc_t *soc, 2467 uint8_t vdev_id, bool val); 2468 void (*ppeds_entry_detach)(struct cdp_soc_t *soc, 2469 uint8_t vdev_id, 2470 struct cdp_ds_vp_params *vp_params); 2471 void (*ppeds_set_int_pri2tid)(struct cdp_soc_t *soc, 2472 uint8_t *pri2tid); 2473 void (*ppeds_update_int_pri2tid)(struct cdp_soc_t *soc, 2474 uint8_t pri, uint8_t tid); 2475 void (*ppeds_entry_dump)(struct cdp_soc_t *soc); 2476 void 2477 (*ppeds_stats_sync)(struct cdp_soc_t *soc, 2478 uint16_t vdev_id, 2479 struct cdp_ds_vp_params *vp_params, 2480 void *stats); 2481 }; 2482 #endif /* WLAN_SUPPORT_PPEDS */ 2483 2484 #ifdef WLAN_SUPPORT_RX_FLOW_TAG 2485 struct cdp_fse_ops { 2486 QDF_STATUS 2487 (*fse_rule_add)(struct cdp_soc_t *soc, 2488 uint32_t *src_ip, uint32_t src_port, 2489 uint32_t *dest_ip, uint32_t dest_port, 2490 uint8_t protocol, uint8_t version); 2491 QDF_STATUS 2492 (*fse_rule_delete)(struct cdp_soc_t *soc, 2493 uint32_t *src_ip, uint32_t src_port, 2494 uint32_t *dest_ip, uint32_t dest_port, 2495 uint8_t protocol, uint8_t version); 2496 }; 2497 #endif /* WLAN_SUPPORT_RX_FLOW_TAG */ 2498 2499 struct cdp_ops { 2500 struct cdp_cmn_ops *cmn_drv_ops; 2501 struct cdp_ctrl_ops *ctrl_ops; 2502 struct cdp_me_ops *me_ops; 2503 struct cdp_mon_ops *mon_ops; 2504 struct cdp_host_stats_ops *host_stats_ops; 2505 struct cdp_wds_ops *wds_ops; 2506 struct cdp_raw_ops *raw_ops; 2507 struct cdp_pflow_ops *pflow_ops; 2508 #ifdef DP_PEER_EXTENDED_API 2509 struct cdp_misc_ops *misc_ops; 2510 struct cdp_peer_ops *peer_ops; 2511 struct cdp_ocb_ops *ocb_ops; 2512 struct cdp_mob_stats_ops *mob_stats_ops; 2513 struct cdp_pmf_ops *pmf_ops; 2514 #endif 2515 #ifdef DP_FLOW_CTL 2516 struct cdp_cfg_ops *cfg_ops; 2517 struct cdp_flowctl_ops *flowctl_ops; 2518 struct cdp_lflowctl_ops *l_flowctl_ops; 2519 struct cdp_throttle_ops *throttle_ops; 2520 #endif 2521 #ifdef DP_POWER_SAVE 2522 struct cdp_bus_ops *bus_ops; 2523 struct cdp_tx_delay_ops *delay_ops; 2524 #endif 2525 #ifdef IPA_OFFLOAD 2526 struct cdp_ipa_ops *ipa_ops; 2527 #endif 2528 #ifdef RECEIVE_OFFLOAD 2529 struct cdp_rx_offld_ops *rx_offld_ops; 2530 #endif 2531 #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE) 2532 struct cdp_cfr_ops *cfr_ops; 2533 #endif 2534 #ifdef WLAN_SUPPORT_MSCS 2535 struct cdp_mscs_ops *mscs_ops; 2536 #endif 2537 #ifdef WLAN_SUPPORT_MESH_LATENCY 2538 struct cdp_mesh_latency_ops *mesh_latency_ops; 2539 #endif 2540 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP) 2541 struct cdp_mlo_ops *mlo_ops; 2542 #endif 2543 #ifdef CONFIG_SAWF_DEF_QUEUES 2544 struct cdp_sawf_ops *sawf_ops; 2545 #endif 2546 #ifdef WLAN_SUPPORT_SCS 2547 struct cdp_scs_ops *scs_ops; 2548 #endif 2549 #ifdef WLAN_SUPPORT_PPEDS 2550 struct cdp_ppeds_txrx_ops *ppeds_ops; 2551 #endif 2552 #ifdef WLAN_SUPPORT_RX_FLOW_TAG 2553 struct cdp_fse_ops *fse_ops; 2554 #endif 2555 }; 2556 #endif 2557