1 /* 2 * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. 3 * 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 * @file cdp_txrx_ops.h 22 * @brief 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 34 #ifdef IPA_OFFLOAD 35 #ifdef CONFIG_IPA_WDI_UNIFIED_API 36 #include <qdf_ipa_wdi3.h> 37 #else 38 #include <qdf_ipa.h> 39 #endif 40 #endif 41 42 /** 43 * bitmap values to indicate special handling of peer_delete 44 */ 45 #define CDP_PEER_DELETE_NO_SPECIAL 0 46 #define CDP_PEER_DO_NOT_START_UNMAP_TIMER 1 47 48 /* same as ieee80211_nac_param */ 49 enum cdp_nac_param_cmd { 50 /* IEEE80211_NAC_PARAM_ADD */ 51 CDP_NAC_PARAM_ADD = 1, 52 /* IEEE80211_NAC_PARAM_DEL */ 53 CDP_NAC_PARAM_DEL, 54 /* IEEE80211_NAC_PARAM_LIST */ 55 CDP_NAC_PARAM_LIST, 56 }; 57 /****************************************************************************** 58 * 59 * Control Interface (A Interface) 60 * 61 *****************************************************************************/ 62 63 struct cdp_cmn_ops { 64 65 int (*txrx_soc_attach_target)(ol_txrx_soc_handle soc); 66 67 int (*txrx_pdev_attach_target)(struct cdp_pdev *pdev); 68 69 struct cdp_vdev *(*txrx_vdev_attach) 70 (struct cdp_pdev *pdev, uint8_t *vdev_mac_addr, 71 uint8_t vdev_id, enum wlan_op_mode op_mode); 72 73 void (*txrx_vdev_detach) 74 (struct cdp_vdev *vdev, ol_txrx_vdev_delete_cb callback, 75 void *cb_context); 76 77 struct cdp_pdev *(*txrx_pdev_attach) 78 (ol_txrx_soc_handle soc, struct cdp_ctrl_objmgr_pdev *ctrl_pdev, 79 HTC_HANDLE htc_pdev, qdf_device_t osdev, uint8_t pdev_id); 80 81 int (*txrx_pdev_post_attach)(struct cdp_pdev *pdev); 82 83 void (*txrx_pdev_pre_detach)(struct cdp_pdev *pdev, int force); 84 85 void (*txrx_pdev_detach)(struct cdp_pdev *pdev, int force); 86 87 void *(*txrx_peer_create) 88 (struct cdp_vdev *vdev, uint8_t *peer_mac_addr, 89 struct cdp_ctrl_objmgr_peer *ctrl_peer); 90 91 void (*txrx_peer_setup) 92 (struct cdp_vdev *vdev_hdl, void *peer_hdl); 93 94 void (*txrx_peer_teardown) 95 (struct cdp_vdev *vdev_hdl, void *peer_hdl); 96 97 int (*txrx_peer_add_ast) 98 (ol_txrx_soc_handle soc, struct cdp_peer *peer_hdl, 99 uint8_t *mac_addr, enum cdp_txrx_ast_entry_type type, 100 uint32_t flags); 101 102 void (*txrx_peer_del_ast) 103 (ol_txrx_soc_handle soc, void *ast_hdl); 104 105 int (*txrx_peer_update_ast) 106 (ol_txrx_soc_handle soc, struct cdp_peer *peer_hdl, 107 uint8_t *mac_addr, uint32_t flags); 108 109 110 void *(*txrx_peer_ast_hash_find) 111 (ol_txrx_soc_handle soc, uint8_t *ast_mac_addr); 112 113 uint8_t (*txrx_peer_ast_get_pdev_id) 114 (ol_txrx_soc_handle soc, void *ast_hdl); 115 116 uint8_t (*txrx_peer_ast_get_next_hop) 117 (ol_txrx_soc_handle soc, void *ast_hdl); 118 119 void (*txrx_peer_ast_set_type) 120 (ol_txrx_soc_handle soc, void *ast_hdl, 121 enum cdp_txrx_ast_entry_type type); 122 123 void (*txrx_peer_delete)(void *peer, uint32_t bitmap); 124 125 int (*txrx_set_monitor_mode)(struct cdp_vdev *vdev, 126 uint8_t smart_monitor); 127 128 uint8_t (*txrx_get_pdev_id_frm_pdev)(struct cdp_pdev *pdev); 129 130 void (*txrx_set_nac)(struct cdp_peer *peer); 131 132 void (*txrx_set_pdev_tx_capture)(struct cdp_pdev *pdev, int val); 133 134 void (*txrx_get_peer_mac_from_peer_id) 135 (struct cdp_pdev *pdev_handle, 136 uint32_t peer_id, uint8_t *peer_mac); 137 138 void (*txrx_vdev_tx_lock)(struct cdp_vdev *vdev); 139 140 void (*txrx_vdev_tx_unlock)(struct cdp_vdev *vdev); 141 142 void (*txrx_ath_getstats)(void *pdev, 143 struct cdp_dev_stats *stats, uint8_t type); 144 145 void (*txrx_set_gid_flag)(struct cdp_pdev *pdev, u_int8_t *mem_status, 146 u_int8_t *user_position); 147 148 uint32_t (*txrx_fw_supported_enh_stats_version)(struct cdp_pdev *pdev); 149 150 void (*txrx_if_mgmt_drain)(void *ni, int force); 151 152 void (*txrx_set_curchan)(struct cdp_pdev *pdev, uint32_t chan_mhz); 153 154 void (*txrx_set_privacy_filters) 155 (struct cdp_vdev *vdev, void *filter, uint32_t num); 156 157 /******************************************************************** 158 * Data Interface (B Interface) 159 ********************************************************************/ 160 161 void (*txrx_vdev_register)(struct cdp_vdev *vdev, 162 void *osif_vdev, struct cdp_ctrl_objmgr_vdev *ctrl_vdev, 163 struct ol_txrx_ops *txrx_ops); 164 165 int (*txrx_mgmt_send)(struct cdp_vdev *vdev, 166 qdf_nbuf_t tx_mgmt_frm, uint8_t type); 167 168 int (*txrx_mgmt_send_ext)(struct cdp_vdev *vdev, 169 qdf_nbuf_t tx_mgmt_frm, uint8_t type, uint8_t use_6mbps, 170 uint16_t chanfreq); 171 172 /** 173 * ol_txrx_mgmt_tx_cb - tx management delivery notification 174 * callback function 175 */ 176 177 void (*txrx_mgmt_tx_cb_set)(struct cdp_pdev *pdev, uint8_t type, 178 ol_txrx_mgmt_tx_cb download_cb, 179 ol_txrx_mgmt_tx_cb ota_ack_cb, 180 void *ctxt); 181 182 int (*txrx_get_tx_pending)(struct cdp_pdev *pdev); 183 184 /** 185 * ol_txrx_data_tx_cb - Function registered with the data path 186 * that is called when tx frames marked as "no free" are 187 * done being transmitted 188 */ 189 190 void (*txrx_data_tx_cb_set)(struct cdp_vdev *data_vdev, 191 ol_txrx_data_tx_cb callback, void *ctxt); 192 193 /******************************************************************* 194 * Statistics and Debugging Interface (C Interface) 195 ********************************************************************/ 196 197 int (*txrx_aggr_cfg)(struct cdp_vdev *vdev, int max_subfrms_ampdu, 198 int max_subfrms_amsdu); 199 200 A_STATUS (*txrx_fw_stats_get)(struct cdp_vdev *vdev, 201 struct ol_txrx_stats_req *req, 202 bool per_vdev, bool response_expected); 203 204 int (*txrx_debug)(struct cdp_vdev *vdev, int debug_specs); 205 206 void (*txrx_fw_stats_cfg)(struct cdp_vdev *vdev, 207 uint8_t cfg_stats_type, uint32_t cfg_val); 208 209 void (*txrx_print_level_set)(unsigned level); 210 211 /** 212 * ol_txrx_get_vdev_mac_addr() - Return mac addr of vdev 213 * @vdev: vdev handle 214 * 215 * Return: vdev mac address 216 */ 217 uint8_t * (*txrx_get_vdev_mac_addr)(struct cdp_vdev *vdev); 218 219 /** 220 * ol_txrx_get_vdev_struct_mac_addr() - Return handle to struct qdf_mac_addr of 221 * vdev 222 * @vdev: vdev handle 223 * 224 * Return: Handle to struct qdf_mac_addr 225 */ 226 struct qdf_mac_addr * 227 (*txrx_get_vdev_struct_mac_addr)(struct cdp_vdev *vdev); 228 229 /** 230 * ol_txrx_get_pdev_from_vdev() - Return handle to pdev of vdev 231 * @vdev: vdev handle 232 * 233 * Return: Handle to pdev 234 */ 235 struct cdp_pdev *(*txrx_get_pdev_from_vdev) 236 (struct cdp_vdev *vdev); 237 238 /** 239 * ol_txrx_get_ctrl_pdev_from_vdev() - Return control pdev of vdev 240 * @vdev: vdev handle 241 * 242 * Return: Handle to control pdev 243 */ 244 struct cdp_cfg * 245 (*txrx_get_ctrl_pdev_from_vdev)(struct cdp_vdev *vdev); 246 247 struct cdp_vdev * 248 (*txrx_get_vdev_from_vdev_id)(struct cdp_pdev *pdev, 249 uint8_t vdev_id); 250 251 void (*txrx_soc_detach)(void *soc); 252 253 int (*addba_requestprocess)(void *peer_handle, uint8_t dialogtoken, 254 uint16_t tid, uint16_t batimeout, uint16_t buffersize, 255 uint16_t startseqnum); 256 257 void (*addba_responsesetup)(void *peer_handle, uint8_t tid, 258 uint8_t *dialogtoken, uint16_t *statuscode, 259 uint16_t *buffersize, uint16_t *batimeout); 260 261 int (*delba_process)(void *peer_handle, 262 int tid, uint16_t reasoncode); 263 264 void (*set_addba_response)(void *peer_handle, 265 uint8_t tid, uint16_t statuscode); 266 267 uint8_t (*get_peer_mac_addr_frm_id)(struct cdp_soc_t *soc_handle, 268 uint16_t peer_id, uint8_t *mac_addr); 269 270 void (*set_vdev_dscp_tid_map)(struct cdp_vdev *vdev_handle, 271 uint8_t map_id); 272 273 void (*flush_cache_rx_queue)(void); 274 void (*set_pdev_dscp_tid_map)(struct cdp_pdev *pdev, uint8_t map_id, 275 uint8_t tos, uint8_t tid); 276 277 int (*txrx_stats_request)(struct cdp_vdev *vdev, 278 struct cdp_txrx_stats_req *req); 279 280 QDF_STATUS (*display_stats)(void *psoc, uint16_t value, 281 enum qdf_stats_verbosity_level level); 282 void (*txrx_soc_set_nss_cfg)(ol_txrx_soc_handle soc, int config); 283 284 int(*txrx_soc_get_nss_cfg)(ol_txrx_soc_handle soc); 285 QDF_STATUS (*txrx_intr_attach)(void *soc); 286 void (*txrx_intr_detach)(void *soc); 287 void (*set_pn_check)(struct cdp_vdev *vdev, 288 struct cdp_peer *peer_handle, enum cdp_sec_type sec_type, 289 uint32_t *rx_pn); 290 QDF_STATUS (*update_config_parameters)(struct cdp_soc *psoc, 291 struct cdp_config_params *params); 292 293 void *(*get_dp_txrx_handle)(struct cdp_pdev *pdev_hdl); 294 void (*set_dp_txrx_handle)(struct cdp_pdev *pdev_hdl, 295 void *dp_txrx_hdl); 296 297 void *(*get_soc_dp_txrx_handle)(struct cdp_soc *soc_handle); 298 void (*set_soc_dp_txrx_handle)(struct cdp_soc *soc_handle, 299 void *dp_txrx_handle); 300 301 void (*txrx_peer_reset_ast) 302 (ol_txrx_soc_handle soc, uint8_t *ast_macaddr, void *vdev_hdl); 303 304 void (*txrx_peer_reset_ast_table)(ol_txrx_soc_handle soc, 305 void *vdev_hdl); 306 307 void (*txrx_peer_flush_ast_table)(ol_txrx_soc_handle soc); 308 309 QDF_STATUS (*txrx_peer_map_attach)(ol_txrx_soc_handle soc, 310 uint32_t num_peers); 311 312 void (*txrx_pdev_set_ctrl_pdev)(struct cdp_pdev *pdev_hdl, 313 struct cdp_ctrl_objmgr_pdev *ctrl_pdev); 314 315 ol_txrx_tx_fp tx_send; 316 }; 317 318 struct cdp_ctrl_ops { 319 320 int 321 (*txrx_mempools_attach)(void *ctrl_pdev); 322 int 323 (*txrx_set_filter_neighbour_peers)( 324 struct cdp_pdev *pdev, 325 uint32_t val); 326 int 327 (*txrx_update_filter_neighbour_peers)( 328 struct cdp_pdev *pdev, 329 uint32_t cmd, uint8_t *macaddr); 330 /** 331 * @brief set the safemode of the device 332 * @details 333 * This flag is used to bypass the encrypt and decrypt processes when 334 * send and receive packets. It works like open AUTH mode, HW will 335 * ctreate all packets as non-encrypt frames because no key installed. 336 * For rx fragmented frames,it bypasses all the rx defragmentaion. 337 * 338 * @param vdev - the data virtual device object 339 * @param val - the safemode state 340 * @return - void 341 */ 342 343 void 344 (*txrx_set_safemode)( 345 struct cdp_vdev *vdev, 346 u_int32_t val); 347 /** 348 * @brief configure the drop unencrypted frame flag 349 * @details 350 * Rx related. When set this flag, all the unencrypted frames 351 * received over a secure connection will be discarded 352 * 353 * @param vdev - the data virtual device object 354 * @param val - flag 355 * @return - void 356 */ 357 void 358 (*txrx_set_drop_unenc)( 359 struct cdp_vdev *vdev, 360 u_int32_t val); 361 362 363 /** 364 * @brief set the Tx encapsulation type of the VDEV 365 * @details 366 * This will be used to populate the HTT desc packet type field 367 * during Tx 368 * @param vdev - the data virtual device object 369 * @param val - the Tx encap type 370 * @return - void 371 */ 372 void 373 (*txrx_set_tx_encap_type)( 374 struct cdp_vdev *vdev, 375 enum htt_cmn_pkt_type val); 376 /** 377 * @brief set the Rx decapsulation type of the VDEV 378 * @details 379 * This will be used to configure into firmware and hardware 380 * which format to decap all Rx packets into, for all peers under 381 * the VDEV. 382 * @param vdev - the data virtual device object 383 * @param val - the Rx decap mode 384 * @return - void 385 */ 386 void 387 (*txrx_set_vdev_rx_decap_type)( 388 struct cdp_vdev *vdev, 389 enum htt_cmn_pkt_type val); 390 391 /** 392 * @brief get the Rx decapsulation type of the VDEV 393 * 394 * @param vdev - the data virtual device object 395 * @return - the Rx decap type 396 */ 397 enum htt_cmn_pkt_type 398 (*txrx_get_vdev_rx_decap_type)(struct cdp_vdev *vdev); 399 400 /* Is this similar to ol_txrx_peer_state_update() in MCL */ 401 /** 402 * @brief Update the authorize peer object at association time 403 * @details 404 * For the host-based implementation of rate-control, it 405 * updates the peer/node-related parameters within rate-control 406 * context of the peer at association. 407 * 408 * @param peer - pointer to the node's object 409 * @authorize - either to authorize or unauthorize peer 410 * 411 * @return none 412 */ 413 void 414 (*txrx_peer_authorize)(struct cdp_peer *peer, 415 u_int32_t authorize); 416 417 bool 418 (*txrx_set_inact_params)(struct cdp_pdev *pdev, 419 u_int16_t inact_check_interval, 420 u_int16_t inact_normal, 421 u_int16_t inact_overload); 422 bool 423 (*txrx_start_inact_timer)( 424 struct cdp_pdev *pdev, 425 bool enable); 426 427 428 /** 429 * @brief Set the overload status of the radio 430 * @details 431 * Set the overload status of the radio, updating the inactivity 432 * threshold and inactivity count for each node. 433 * 434 * @param pdev - the data physical device object 435 * @param overload - whether the radio is overloaded or not 436 */ 437 void (*txrx_set_overload)( 438 struct cdp_pdev *pdev, 439 bool overload); 440 /** 441 * @brief Check the inactivity status of the peer/node 442 * 443 * @param peer - pointer to the node's object 444 * @return true if the node is inactive; otherwise return false 445 */ 446 bool 447 (*txrx_peer_is_inact)(void *peer); 448 449 /** 450 * @brief Mark inactivity status of the peer/node 451 * @details 452 * If it becomes active, reset inactivity count to reload value; 453 * if the inactivity status changed, notify umac band steering. 454 * 455 * @param peer - pointer to the node's object 456 * @param inactive - whether the node is inactive or not 457 */ 458 void (*txrx_mark_peer_inact)( 459 void *peer, 460 bool inactive); 461 462 463 /* Should be ol_txrx_ctrl_api.h */ 464 void (*txrx_set_mesh_mode)(struct cdp_vdev *vdev, u_int32_t val); 465 466 /** 467 * @brief setting mesh rx filter 468 * @details 469 * based on the bits enabled in the filter packets has to be dropped. 470 * 471 * @param vdev - the data virtual device object 472 * @param val - value to set 473 */ 474 void (*txrx_set_mesh_rx_filter)(struct cdp_vdev *vdev, uint32_t val); 475 476 void (*tx_flush_buffers)(struct cdp_vdev *vdev); 477 478 int (*txrx_is_target_ar900b)(struct cdp_vdev *vdev); 479 480 void (*txrx_set_vdev_param)(struct cdp_vdev *vdev, 481 enum cdp_vdev_param_type param, uint32_t val); 482 483 void (*txrx_peer_set_nawds)(struct cdp_peer *peer, uint8_t value); 484 /** 485 * @brief Set the reo dest ring num of the radio 486 * @details 487 * Set the reo destination ring no on which we will receive 488 * pkts for this radio. 489 * 490 * @param pdev - the data physical device object 491 * @param reo_dest_ring_num - value ranges between 1 - 4 492 */ 493 void (*txrx_set_pdev_reo_dest)( 494 struct cdp_pdev *pdev, 495 enum cdp_host_reo_dest_ring reo_dest_ring_num); 496 497 /** 498 * @brief Get the reo dest ring num of the radio 499 * @details 500 * Get the reo destination ring no on which we will receive 501 * pkts for this radio. 502 * 503 * @param pdev - the data physical device object 504 * @return the reo destination ring number 505 */ 506 enum cdp_host_reo_dest_ring (*txrx_get_pdev_reo_dest)( 507 struct cdp_pdev *pdev); 508 509 int (*txrx_wdi_event_sub)(struct cdp_pdev *pdev, void *event_cb_sub, 510 uint32_t event); 511 512 int (*txrx_wdi_event_unsub)(struct cdp_pdev *pdev, void *event_cb_sub, 513 uint32_t event); 514 int (*txrx_get_sec_type)(struct cdp_peer *peer, uint8_t sec_idx); 515 516 void (*txrx_update_mgmt_txpow_vdev)(struct cdp_vdev *vdev, 517 uint8_t subtype, uint8_t tx_power); 518 519 void (*txrx_set_pdev_param)(struct cdp_pdev *pdev, 520 enum cdp_pdev_param_type type, uint8_t val); 521 void * (*txrx_get_pldev)(struct cdp_pdev *pdev); 522 523 #ifdef ATH_SUPPORT_NAC_RSSI 524 QDF_STATUS (*txrx_vdev_config_for_nac_rssi)(struct cdp_vdev *vdev, 525 enum cdp_nac_param_cmd cmd, char *bssid, char *client_macaddr, 526 uint8_t chan_num); 527 #endif 528 void (*set_key)(struct cdp_peer *peer_handle, 529 bool is_unicast, uint32_t *key); 530 }; 531 532 struct cdp_me_ops { 533 534 u_int16_t (*tx_desc_alloc_and_mark_for_mcast_clone) 535 (struct cdp_pdev *pdev, u_int16_t buf_count); 536 537 u_int16_t (*tx_desc_free_and_unmark_for_mcast_clone)( 538 struct cdp_pdev *pdev, 539 u_int16_t buf_count); 540 541 u_int16_t 542 (*tx_get_mcast_buf_allocated_marked) 543 (struct cdp_pdev *pdev); 544 void 545 (*tx_me_alloc_descriptor)(struct cdp_pdev *pdev); 546 547 void 548 (*tx_me_free_descriptor)(struct cdp_pdev *pdev); 549 550 uint16_t 551 (*tx_me_convert_ucast)(struct cdp_vdev *vdev, 552 qdf_nbuf_t wbuf, u_int8_t newmac[][6], 553 uint8_t newmaccnt); 554 /* Should be a function pointer in ol_txrx_osif_ops{} */ 555 /** 556 * @brief notify mcast frame indication from FW. 557 * @details 558 * This notification will be used to convert 559 * multicast frame to unicast. 560 * 561 * @param pdev - handle to the ctrl SW's physical device object 562 * @param vdev_id - ID of the virtual device received the special data 563 * @param msdu - the multicast msdu returned by FW for host inspect 564 */ 565 566 int (*mcast_notify)(struct cdp_pdev *pdev, 567 u_int8_t vdev_id, qdf_nbuf_t msdu); 568 }; 569 570 struct cdp_mon_ops { 571 572 void (*txrx_monitor_set_filter_ucast_data) 573 (struct cdp_pdev *, u_int8_t val); 574 void (*txrx_monitor_set_filter_mcast_data) 575 (struct cdp_pdev *, u_int8_t val); 576 void (*txrx_monitor_set_filter_non_data) 577 (struct cdp_pdev *, u_int8_t val); 578 579 bool (*txrx_monitor_get_filter_ucast_data) 580 (struct cdp_vdev *vdev_txrx_handle); 581 bool (*txrx_monitor_get_filter_mcast_data) 582 (struct cdp_vdev *vdev_txrx_handle); 583 bool (*txrx_monitor_get_filter_non_data) 584 (struct cdp_vdev *vdev_txrx_handle); 585 int (*txrx_reset_monitor_mode)(struct cdp_pdev *pdev); 586 587 /* HK advance monitor filter support */ 588 int (*txrx_set_advance_monitor_filter) 589 (struct cdp_pdev *pdev, struct cdp_monitor_filter *filter_val); 590 }; 591 592 struct cdp_host_stats_ops { 593 int (*txrx_host_stats_get)(struct cdp_vdev *vdev, 594 struct ol_txrx_stats_req *req); 595 596 void (*txrx_host_stats_clr)(struct cdp_vdev *vdev); 597 598 void (*txrx_host_ce_stats)(struct cdp_vdev *vdev); 599 600 int (*txrx_stats_publish)(struct cdp_pdev *pdev, 601 void *buf); 602 /** 603 * @brief Enable enhanced stats functionality. 604 * 605 * @param pdev - the physical device object 606 * @return - void 607 */ 608 void (*txrx_enable_enhanced_stats)(struct cdp_pdev *pdev); 609 610 /** 611 * @brief Disable enhanced stats functionality. 612 * 613 * @param pdev - the physical device object 614 * @return - void 615 */ 616 void (*txrx_disable_enhanced_stats)(struct cdp_pdev *pdev); 617 618 /** 619 * @brief Get the desired stats from the message. 620 * 621 * @param pdev - the physical device object 622 * @param stats_base - stats buffer received from FW 623 * @param type - stats type. 624 * @return - pointer to requested stat identified by type 625 */ 626 uint32_t * (*txrx_get_stats_base)(struct cdp_pdev *pdev, 627 uint32_t *stats_base, uint32_t msg_len, uint8_t type); 628 void 629 (*tx_print_tso_stats)(struct cdp_vdev *vdev); 630 631 void 632 (*tx_rst_tso_stats)(struct cdp_vdev *vdev); 633 634 void 635 (*tx_print_sg_stats)(struct cdp_vdev *vdev); 636 637 void 638 (*tx_rst_sg_stats)(struct cdp_vdev *vdev); 639 640 void 641 (*print_rx_cksum_stats)(struct cdp_vdev *vdev); 642 643 void 644 (*rst_rx_cksum_stats)(struct cdp_vdev *vdev); 645 646 A_STATUS 647 (*txrx_host_me_stats)(struct cdp_vdev *vdev); 648 void 649 (*txrx_per_peer_stats)(struct cdp_pdev *pdev, char *addr); 650 int (*txrx_host_msdu_ttl_stats)(struct cdp_vdev *vdev, 651 struct ol_txrx_stats_req *req); 652 653 void 654 (*print_lro_stats)(struct cdp_vdev *vdev); 655 656 void 657 (*reset_lro_stats)(struct cdp_vdev *vdev); 658 659 void 660 (*get_fw_peer_stats)(struct cdp_pdev *pdev, uint8_t *addr, 661 uint32_t cap); 662 void 663 (*get_htt_stats)(struct cdp_pdev *pdev, void *data, 664 uint32_t data_len); 665 }; 666 667 struct cdp_wds_ops { 668 void 669 (*txrx_set_wds_rx_policy)(struct cdp_vdev *vdev, 670 u_int32_t val); 671 void 672 (*txrx_wds_peer_tx_policy_update)(struct cdp_peer *peer, 673 int wds_tx_ucast, int wds_tx_mcast); 674 int (*vdev_set_wds)(void *vdev, uint32_t val); 675 }; 676 677 struct cdp_raw_ops { 678 int (*txrx_get_nwifi_mode)(struct cdp_vdev *vdev); 679 680 void (*rsim_get_astentry)(struct cdp_vdev *vdev, 681 qdf_nbuf_t *pnbuf, 682 struct cdp_raw_ast *raw_ast); 683 }; 684 685 #ifdef CONFIG_WIN 686 struct cdp_pflow_ops { 687 uint32_t(*pflow_update_pdev_params)(void *, 688 enum _ol_ath_param_t, uint32_t, void *); 689 }; 690 #endif /* CONFIG_WIN */ 691 692 #define LRO_IPV4_SEED_ARR_SZ 5 693 #define LRO_IPV6_SEED_ARR_SZ 11 694 695 /** 696 * struct cdp_lro_hash_config - set rx_offld(LRO/GRO) init parameters 697 * @lro_enable: indicates whether rx_offld is enabled 698 * @tcp_flag: If the TCP flags from the packet do not match 699 * the values in this field after masking with TCP flags mask 700 * below, packet is not rx_offld eligible 701 * @tcp_flag_mask: field for comparing the TCP values provided 702 * above with the TCP flags field in the received packet 703 * @toeplitz_hash_ipv4: contains seed needed to compute the flow id 704 * 5-tuple toeplitz hash for ipv4 packets 705 * @toeplitz_hash_ipv6: contains seed needed to compute the flow id 706 * 5-tuple toeplitz hash for ipv6 packets 707 */ 708 struct cdp_lro_hash_config { 709 uint32_t lro_enable; 710 uint32_t tcp_flag:9, 711 tcp_flag_mask:9; 712 uint32_t toeplitz_hash_ipv4[LRO_IPV4_SEED_ARR_SZ]; 713 uint32_t toeplitz_hash_ipv6[LRO_IPV6_SEED_ARR_SZ]; 714 }; 715 716 struct ol_if_ops { 717 void 718 (*peer_set_default_routing)(struct cdp_ctrl_objmgr_pdev *ctrl_pdev, 719 uint8_t *peer_macaddr, uint8_t vdev_id, 720 bool hash_based, uint8_t ring_num); 721 QDF_STATUS 722 (*peer_rx_reorder_queue_setup)(struct cdp_ctrl_objmgr_pdev *ctrl_pdev, 723 uint8_t vdev_id, uint8_t *peer_mac, 724 qdf_dma_addr_t hw_qdesc, int tid, 725 uint16_t queue_num); 726 QDF_STATUS 727 (*peer_rx_reorder_queue_remove)(struct cdp_ctrl_objmgr_pdev *ctrl_pdev, 728 uint8_t vdev_id, uint8_t *peer_macaddr, 729 uint32_t tid_mask); 730 int (*peer_unref_delete)(void *scn_handle, uint8_t vdev_id, 731 uint8_t *peer_macaddr); 732 bool (*is_hw_dbs_2x2_capable)(struct wlan_objmgr_psoc *psoc); 733 int (*peer_add_wds_entry)(void *ol_soc_handle, 734 const uint8_t *dest_macaddr, uint8_t *peer_macaddr, 735 uint32_t flags); 736 int (*peer_update_wds_entry)(void *ol_soc_handle, 737 uint8_t *dest_macaddr, uint8_t *peer_macaddr, 738 uint32_t flags); 739 void (*peer_del_wds_entry)(void *ol_soc_handle, 740 uint8_t *wds_macaddr); 741 QDF_STATUS 742 (*lro_hash_config)(struct wlan_objmgr_psoc *ctrl_psoc, 743 struct cdp_lro_hash_config *rx_offld_hash); 744 void (*update_dp_stats)(void *soc, void *stats, uint16_t id, 745 uint8_t type); 746 uint8_t (*rx_invalid_peer)(void *ctrl_pdev, void *msg); 747 748 int (*peer_map_event)(void *ol_soc_handle, uint16_t peer_id, uint16_t hw_peer_id, 749 uint8_t vdev_id, uint8_t *peer_mac_addr, 750 enum cdp_txrx_ast_entry_type peer_type); 751 int (*peer_unmap_event)(void *ol_soc_handle, uint16_t peer_id); 752 753 int (*get_dp_cfg_param)(void *ol_soc_handle, enum cdp_cfg_param_type param_num); 754 755 void (*rx_mic_error)(void *ol_soc_handle, 756 uint16_t vdev_id, void *wh); 757 bool (*rx_frag_tkip_demic)(struct wlan_objmgr_peer *ctrl_peer, 758 qdf_nbuf_t nbuf, 759 uint16_t hdr_space); 760 uint8_t (*freq_to_channel)(void *ol_soc_handle, uint16_t vdev_id); 761 762 void (*record_act_change)(struct wlan_objmgr_pdev *pdev, 763 u_int8_t *dstmac, bool active); 764 #ifdef ATH_SUPPORT_NAC_RSSI 765 int (*config_fw_for_nac_rssi)(struct wlan_objmgr_pdev *pdev, 766 u_int8_t vdev_id, enum cdp_nac_param_cmd cmd, char *bssid, 767 char *client_macaddr, uint8_t chan_num); 768 int (*config_bssid_in_fw_for_nac_rssi)(struct wlan_objmgr_pdev *pdev, 769 u_int8_t vdev_id, enum cdp_nac_param_cmd cmd, char *bssid); 770 #endif 771 int (*peer_sta_kickout)(void *ctrl_pdev, uint8_t *peer_macaddr); 772 773 /* TODO: Add any other control path calls required to OL_IF/WMA layer */ 774 }; 775 776 #ifndef CONFIG_WIN 777 /* From here MCL specific OPs */ 778 /** 779 * struct cdp_misc_ops - mcl ops not classified 780 * @set_ibss_vdev_heart_beat_timer: 781 * @bad_peer_txctl_set_setting: 782 * @bad_peer_txctl_update_threshold: 783 * @hl_tdls_flag_reset: 784 * @tx_non_std: 785 * @get_vdev_id: 786 * @set_wisa_mode: 787 * @txrx_data_stall_cb_register: 788 * @txrx_data_stall_cb_deregister: 789 * @txrx_post_data_stall_event 790 * @runtime_suspend: 791 * @runtime_resume: 792 */ 793 struct cdp_misc_ops { 794 uint16_t (*set_ibss_vdev_heart_beat_timer)(struct cdp_vdev *vdev, 795 uint16_t timer_value_sec); 796 void (*set_wmm_param)(struct cdp_pdev *cfg_pdev, 797 struct ol_tx_wmm_param_t wmm_param); 798 void (*bad_peer_txctl_set_setting)(struct cdp_pdev *pdev, int enable, 799 int period, int txq_limit); 800 void (*bad_peer_txctl_update_threshold)(struct cdp_pdev *pdev, 801 int level, int tput_thresh, int tx_limit); 802 void (*hl_tdls_flag_reset)(struct cdp_vdev *vdev, bool flag); 803 qdf_nbuf_t (*tx_non_std)(struct cdp_vdev *vdev, 804 enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list); 805 uint16_t (*get_vdev_id)(struct cdp_vdev *vdev); 806 uint32_t (*get_tx_ack_stats)(uint8_t vdev_id); 807 QDF_STATUS (*set_wisa_mode)(struct cdp_vdev *vdev, bool enable); 808 QDF_STATUS (*txrx_data_stall_cb_register)(data_stall_detect_cb cb); 809 QDF_STATUS (*txrx_data_stall_cb_deregister)(data_stall_detect_cb cb); 810 void (*txrx_post_data_stall_event)( 811 enum data_stall_log_event_indicator indicator, 812 enum data_stall_log_event_type data_stall_type, 813 uint32_t pdev_id, uint32_t vdev_id_bitmap, 814 enum data_stall_log_recovery_type recovery_type); 815 QDF_STATUS (*runtime_suspend)(struct cdp_pdev *pdev); 816 QDF_STATUS (*runtime_resume)(struct cdp_pdev *pdev); 817 int (*get_opmode)(struct cdp_vdev *vdev); 818 void (*mark_first_wakeup_packet)(uint8_t value); 819 void (*update_mac_id)(uint8_t vdev_id, uint8_t mac_id); 820 void (*flush_rx_frames)(void *peer, bool drop); 821 A_STATUS (*get_intra_bss_fwd_pkts_count)(uint8_t vdev_id, 822 uint64_t *fwd_tx_packets, uint64_t *fwd_rx_packets); 823 void (*pkt_log_init)(struct cdp_pdev *handle, void *scn); 824 void (*pkt_log_con_service)(struct cdp_pdev *pdev, void *scn); 825 }; 826 827 /** 828 * struct cdp_tx_delay_ops - mcl tx delay ops 829 * @tx_delay: 830 * @tx_delay_hist: 831 * @tx_packet_count: 832 * @tx_set_compute_interval: 833 */ 834 struct cdp_tx_delay_ops { 835 void (*tx_delay)(struct cdp_pdev *pdev, uint32_t *queue_delay_microsec, 836 uint32_t *tx_delay_microsec, int category); 837 void (*tx_delay_hist)(struct cdp_pdev *pdev, 838 uint16_t *bin_values, int category); 839 void (*tx_packet_count)(struct cdp_pdev *pdev, 840 uint16_t *out_packet_count, 841 uint16_t *out_packet_loss_count, int category); 842 void (*tx_set_compute_interval)(struct cdp_pdev *pdev, 843 uint32_t interval); 844 }; 845 846 /** 847 * struct cdp_pmf_ops - mcl protected management frame ops 848 * @get_pn_info: 849 */ 850 struct cdp_pmf_ops { 851 void (*get_pn_info)(void *peer, uint8_t **last_pn_valid, 852 uint64_t **last_pn, uint32_t **rmf_pn_replays); 853 }; 854 855 /** 856 * struct cdp_cfg_ops - mcl configuration ops 857 * @set_cfg_rx_fwd_disabled: 858 * @set_cfg_packet_log_enabled: 859 * @cfg_attach: 860 * @vdev_rx_set_intrabss_fwd: 861 * @get_opmode: 862 * @is_rx_fwd_disabled: 863 * @tx_set_is_mgmt_over_wmi_enabled: 864 * @is_high_latency: 865 * @set_flow_control_parameters: 866 */ 867 struct cdp_cfg_ops { 868 void (*set_cfg_rx_fwd_disabled)(struct cdp_cfg *cfg_pdev, 869 uint8_t disable_rx_fwd); 870 void (*set_cfg_packet_log_enabled)(struct cdp_cfg *cfg_pdev, 871 uint8_t val); 872 struct cdp_cfg * (*cfg_attach)(qdf_device_t osdev, void *cfg_param); 873 void (*vdev_rx_set_intrabss_fwd)(struct cdp_vdev *vdev, bool val); 874 uint8_t (*is_rx_fwd_disabled)(struct cdp_vdev *vdev); 875 void (*tx_set_is_mgmt_over_wmi_enabled)(uint8_t value); 876 int (*is_high_latency)(struct cdp_cfg *cfg_pdev); 877 void (*set_flow_control_parameters)(struct cdp_cfg *cfg_pdev, 878 void *param); 879 void (*set_flow_steering)(struct cdp_cfg *cfg_pdev, uint8_t val); 880 void (*set_ptp_rx_opt_enabled)(struct cdp_cfg *cfg_pdev, uint8_t val); 881 }; 882 883 /** 884 * struct cdp_flowctl_ops - mcl flow control 885 * @register_pause_cb: 886 * @set_desc_global_pool_size: 887 * @dump_flow_pool_info: 888 */ 889 struct cdp_flowctl_ops { 890 QDF_STATUS (*flow_pool_map_handler)(struct cdp_soc_t *soc, 891 struct cdp_pdev *pdev, 892 uint8_t vdev_id); 893 void (*flow_pool_unmap_handler)(struct cdp_soc_t *soc, 894 struct cdp_pdev *pdev, 895 uint8_t vdev_id); 896 QDF_STATUS (*register_pause_cb)(struct cdp_soc_t *soc, 897 tx_pause_callback); 898 void (*set_desc_global_pool_size)(uint32_t num_msdu_desc); 899 900 void (*dump_flow_pool_info)(void *); 901 }; 902 903 /** 904 * struct cdp_lflowctl_ops - mcl legacy flow control ops 905 * @register_tx_flow_control: 906 * @deregister_tx_flow_control_cb: 907 * @flow_control_cb: 908 * @get_tx_resource: 909 * @ll_set_tx_pause_q_depth: 910 * @vdev_flush: 911 * @vdev_pause: 912 * @vdev_unpause: 913 */ 914 struct cdp_lflowctl_ops { 915 #ifdef QCA_HL_NETDEV_FLOW_CONTROL 916 int (*register_tx_flow_control)(struct cdp_soc_t *soc, 917 tx_pause_callback flowcontrol); 918 int (*set_vdev_tx_desc_limit)(u8 vdev_id, u8 chan); 919 int (*set_vdev_os_queue_status)(u8 vdev_id, 920 enum netif_action_type action); 921 #else 922 int (*register_tx_flow_control)(uint8_t vdev_id, 923 ol_txrx_tx_flow_control_fp flowControl, void *osif_fc_ctx, 924 ol_txrx_tx_flow_control_is_pause_fp flow_control_is_pause); 925 #endif /* QCA_HL_NETDEV_FLOW_CONTROL */ 926 int (*deregister_tx_flow_control_cb)(uint8_t vdev_id); 927 void (*flow_control_cb)(struct cdp_vdev *vdev, bool tx_resume); 928 bool (*get_tx_resource)(uint8_t sta_id, 929 unsigned int low_watermark, 930 unsigned int high_watermark_offset); 931 int (*ll_set_tx_pause_q_depth)(uint8_t vdev_id, int pause_q_depth); 932 void (*vdev_flush)(struct cdp_vdev *vdev); 933 void (*vdev_pause)(struct cdp_vdev *vdev, uint32_t reason); 934 void (*vdev_unpause)(struct cdp_vdev *vdev, uint32_t reason); 935 }; 936 937 #ifdef IPA_OFFLOAD 938 /** 939 * struct cdp_ipa_ops - mcl ipa data path ops 940 * @ipa_get_resource: 941 * @ipa_set_doorbell_paddr: 942 * @ipa_set_active: 943 * @ipa_op_response: 944 * @ipa_register_op_cb: 945 * @ipa_get_stat: 946 * @ipa_tx_data_frame: 947 */ 948 struct cdp_ipa_ops { 949 QDF_STATUS (*ipa_get_resource)(struct cdp_pdev *pdev); 950 QDF_STATUS (*ipa_set_doorbell_paddr)(struct cdp_pdev *pdev); 951 QDF_STATUS (*ipa_set_active)(struct cdp_pdev *pdev, bool uc_active, 952 bool is_tx); 953 QDF_STATUS (*ipa_op_response)(struct cdp_pdev *pdev, uint8_t *op_msg); 954 QDF_STATUS (*ipa_register_op_cb)(struct cdp_pdev *pdev, 955 void (*ipa_uc_op_cb_type)(uint8_t *op_msg, void *osif_ctxt), 956 void *usr_ctxt); 957 QDF_STATUS (*ipa_get_stat)(struct cdp_pdev *pdev); 958 qdf_nbuf_t (*ipa_tx_data_frame)(struct cdp_vdev *vdev, qdf_nbuf_t skb); 959 void (*ipa_set_uc_tx_partition_base)(struct cdp_cfg *pdev, 960 uint32_t value); 961 #ifdef FEATURE_METERING 962 QDF_STATUS (*ipa_uc_get_share_stats)(struct cdp_pdev *pdev, 963 uint8_t reset_stats); 964 QDF_STATUS (*ipa_uc_set_quota)(struct cdp_pdev *pdev, 965 uint64_t quota_bytes); 966 #endif 967 QDF_STATUS (*ipa_enable_autonomy)(struct cdp_pdev *pdev); 968 QDF_STATUS (*ipa_disable_autonomy)(struct cdp_pdev *pdev); 969 #ifdef CONFIG_IPA_WDI_UNIFIED_API 970 QDF_STATUS (*ipa_setup)(struct cdp_pdev *pdev, void *ipa_i2w_cb, 971 void *ipa_w2i_cb, void *ipa_wdi_meter_notifier_cb, 972 uint32_t ipa_desc_size, void *ipa_priv, bool is_rm_enabled, 973 uint32_t *tx_pipe_handle, uint32_t *rx_pipe_handle, 974 bool is_smmu_enabled, qdf_ipa_sys_connect_params_t *sys_in); 975 #else /* CONFIG_IPA_WDI_UNIFIED_API */ 976 QDF_STATUS (*ipa_setup)(struct cdp_pdev *pdev, void *ipa_i2w_cb, 977 void *ipa_w2i_cb, void *ipa_wdi_meter_notifier_cb, 978 uint32_t ipa_desc_size, void *ipa_priv, bool is_rm_enabled, 979 uint32_t *tx_pipe_handle, uint32_t *rx_pipe_handle); 980 #endif /* CONFIG_IPA_WDI_UNIFIED_API */ 981 QDF_STATUS (*ipa_cleanup)(uint32_t tx_pipe_handle, 982 uint32_t rx_pipe_handle); 983 QDF_STATUS (*ipa_setup_iface)(char *ifname, uint8_t *mac_addr, 984 qdf_ipa_client_type_t prod_client, 985 qdf_ipa_client_type_t cons_client, 986 uint8_t session_id, bool is_ipv6_enabled); 987 QDF_STATUS (*ipa_cleanup_iface)(char *ifname, bool is_ipv6_enabled); 988 QDF_STATUS (*ipa_enable_pipes)(struct cdp_pdev *pdev); 989 QDF_STATUS (*ipa_disable_pipes)(struct cdp_pdev *pdev); 990 QDF_STATUS (*ipa_set_perf_level)(int client, 991 uint32_t max_supported_bw_mbps); 992 }; 993 #endif 994 995 /** 996 * struct cdp_bus_ops - mcl bus suspend/resume ops 997 * @bus_suspend: 998 * @bus_resume: 999 */ 1000 struct cdp_bus_ops { 1001 QDF_STATUS (*bus_suspend)(struct cdp_pdev *opaque_pdev); 1002 QDF_STATUS (*bus_resume)(struct cdp_pdev *opaque_pdev); 1003 }; 1004 1005 /** 1006 * struct cdp_ocb_ops - mcl ocb ops 1007 * @set_ocb_chan_info: 1008 * @get_ocb_chan_info: 1009 */ 1010 struct cdp_ocb_ops { 1011 void (*set_ocb_chan_info)(struct cdp_vdev *vdev, 1012 struct ol_txrx_ocb_set_chan ocb_set_chan); 1013 struct ol_txrx_ocb_chan_info * 1014 (*get_ocb_chan_info)(struct cdp_vdev *vdev); 1015 }; 1016 1017 /** 1018 * struct cdp_peer_ops - mcl peer related ops 1019 * @register_peer: 1020 * @clear_peer: 1021 * @cfg_attach: 1022 * @find_peer_by_addr: 1023 * @find_peer_by_addr_and_vdev: 1024 * @local_peer_id: 1025 * @peer_find_by_local_id: 1026 * @peer_state_update: 1027 * @get_vdevid: 1028 * @get_vdev_by_sta_id: 1029 * @register_ocb_peer: 1030 * @peer_get_peer_mac_addr: 1031 * @get_peer_state: 1032 * @get_vdev_for_peer: 1033 * @update_ibss_add_peer_num_of_vdev: 1034 * @remove_peers_for_vdev: 1035 * @remove_peers_for_vdev_no_lock: 1036 * @copy_mac_addr_raw: 1037 * @add_last_real_peer: 1038 * @last_assoc_received: 1039 * @last_disassoc_received: 1040 * @last_deauth_received: 1041 * @is_vdev_restore_last_peer: 1042 * @update_last_real_peer: 1043 */ 1044 struct cdp_peer_ops { 1045 QDF_STATUS (*register_peer)(struct cdp_pdev *pdev, 1046 struct ol_txrx_desc_type *sta_desc); 1047 QDF_STATUS (*clear_peer)(struct cdp_pdev *pdev, uint8_t sta_id); 1048 QDF_STATUS (*change_peer_state)(uint8_t sta_id, 1049 enum ol_txrx_peer_state sta_state, 1050 bool roam_synch_in_progress); 1051 void * (*peer_get_ref_by_addr)(struct cdp_pdev *pdev, 1052 u8 *peer_addr, uint8_t *peer_id, 1053 enum peer_debug_id_type debug_id); 1054 void (*peer_release_ref)(void *peer, enum peer_debug_id_type debug_id); 1055 void * (*find_peer_by_addr)(struct cdp_pdev *pdev, 1056 uint8_t *peer_addr, uint8_t *peer_id); 1057 void * (*find_peer_by_addr_and_vdev)(struct cdp_pdev *pdev, 1058 struct cdp_vdev *vdev, 1059 uint8_t *peer_addr, uint8_t *peer_id); 1060 uint16_t (*local_peer_id)(void *peer); 1061 void * (*peer_find_by_local_id)(struct cdp_pdev *pdev, 1062 uint8_t local_peer_id); 1063 QDF_STATUS (*peer_state_update)(struct cdp_pdev *pdev, 1064 uint8_t *peer_addr, 1065 enum ol_txrx_peer_state state); 1066 QDF_STATUS (*get_vdevid)(void *peer, uint8_t *vdev_id); 1067 struct cdp_vdev * (*get_vdev_by_sta_id)(struct cdp_pdev *pdev, 1068 uint8_t sta_id); 1069 QDF_STATUS (*register_ocb_peer)(uint8_t *mac_addr, uint8_t *peer_id); 1070 uint8_t * (*peer_get_peer_mac_addr)(void *peer); 1071 int (*get_peer_state)(void *peer); 1072 struct cdp_vdev * (*get_vdev_for_peer)(void *peer); 1073 int16_t (*update_ibss_add_peer_num_of_vdev)(struct cdp_vdev *vdev, 1074 int16_t peer_num_delta); 1075 void (*remove_peers_for_vdev)(struct cdp_vdev *vdev, 1076 ol_txrx_vdev_peer_remove_cb callback, 1077 void *callback_context, bool remove_last_peer); 1078 void (*remove_peers_for_vdev_no_lock)(struct cdp_vdev *vdev, 1079 ol_txrx_vdev_peer_remove_cb callback, 1080 void *callback_context); 1081 void (*copy_mac_addr_raw)(struct cdp_vdev *vdev, uint8_t *bss_addr); 1082 void (*add_last_real_peer)(struct cdp_pdev *pdev, 1083 struct cdp_vdev *vdev, uint8_t *peer_id); 1084 qdf_time_t * (*last_assoc_received)(void *peer); 1085 qdf_time_t * (*last_disassoc_received)(void *peer); 1086 qdf_time_t * (*last_deauth_received)(void *peer); 1087 bool (*is_vdev_restore_last_peer)(void *peer); 1088 void (*update_last_real_peer)(struct cdp_pdev *pdev, void *peer, 1089 uint8_t *peer_id, bool restore_last_peer); 1090 void (*peer_detach_force_delete)(void *peer); 1091 }; 1092 1093 /** 1094 * struct cdp_ocb_ops - mcl ocb ops 1095 * @throttle_init_period: 1096 * @throttle_set_level: 1097 */ 1098 struct cdp_throttle_ops { 1099 void (*throttle_init_period)(struct cdp_pdev *pdev, int period, 1100 uint8_t *dutycycle_level); 1101 void (*throttle_set_level)(struct cdp_pdev *pdev, int level); 1102 }; 1103 1104 /** 1105 * struct cdp_ocb_ops - mcl ocb ops 1106 * @clear_stats: 1107 * @stats: 1108 */ 1109 struct cdp_mob_stats_ops { 1110 void (*clear_stats)(uint16_t bitmap); 1111 int (*stats)(uint8_t vdev_id, char *buffer, unsigned buf_len); 1112 }; 1113 #endif /* CONFIG_WIN */ 1114 1115 #ifdef RECEIVE_OFFLOAD 1116 /** 1117 * struct cdp_rx_offld_ops - mcl receive offload ops 1118 * @register_rx_offld_flush_cb: 1119 * @deregister_rx_offld_flush_cb: 1120 */ 1121 struct cdp_rx_offld_ops { 1122 void (*register_rx_offld_flush_cb)(void (rx_offld_flush_cb)(void *)); 1123 void (*deregister_rx_offld_flush_cb)(void); 1124 }; 1125 #endif 1126 1127 struct cdp_ops { 1128 struct cdp_cmn_ops *cmn_drv_ops; 1129 struct cdp_ctrl_ops *ctrl_ops; 1130 struct cdp_me_ops *me_ops; 1131 struct cdp_mon_ops *mon_ops; 1132 struct cdp_host_stats_ops *host_stats_ops; 1133 struct cdp_wds_ops *wds_ops; 1134 struct cdp_raw_ops *raw_ops; 1135 struct cdp_pflow_ops *pflow_ops; 1136 #ifndef CONFIG_WIN 1137 struct cdp_misc_ops *misc_ops; 1138 struct cdp_cfg_ops *cfg_ops; 1139 struct cdp_flowctl_ops *flowctl_ops; 1140 struct cdp_lflowctl_ops *l_flowctl_ops; 1141 #ifdef IPA_OFFLOAD 1142 struct cdp_ipa_ops *ipa_ops; 1143 #endif 1144 #ifdef RECEIVE_OFFLOAD 1145 struct cdp_rx_offld_ops *rx_offld_ops; 1146 #endif 1147 struct cdp_bus_ops *bus_ops; 1148 struct cdp_ocb_ops *ocb_ops; 1149 struct cdp_peer_ops *peer_ops; 1150 struct cdp_throttle_ops *throttle_ops; 1151 struct cdp_mob_stats_ops *mob_stats_ops; 1152 struct cdp_tx_delay_ops *delay_ops; 1153 struct cdp_pmf_ops *pmf_ops; 1154 #endif /* CONFIG_WIN */ 1155 }; 1156 #endif 1157