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