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