1 /* 2 * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 /* 20 * This file contains the API definitions for the Unified Wireless Module 21 * Interface (WMI). 22 */ 23 24 #ifndef _WMI_UNIFIED_API_H_ 25 #define _WMI_UNIFIED_API_H_ 26 27 #include <osdep.h> 28 #ifdef CONFIG_MCL 29 #include "wmi.h" 30 #endif 31 #include "htc_api.h" 32 #include "wmi_unified_param.h" 33 #include "service_ready_param.h" 34 #include "wlan_objmgr_psoc_obj.h" 35 #include "wlan_mgmt_txrx_utils_api.h" 36 #ifdef WLAN_POWER_MANAGEMENT_OFFLOAD 37 #include "wmi_unified_pmo_api.h" 38 #endif 39 #include "wlan_scan_public_structs.h" 40 #ifdef WLAN_FEATURE_DISA 41 #include "wlan_disa_public_struct.h" 42 #endif 43 #ifdef WLAN_FEATURE_ACTION_OUI 44 #include "wlan_action_oui_public_struct.h" 45 #endif 46 #ifdef WLAN_SUPPORT_GREEN_AP 47 #include "wlan_green_ap_api.h" 48 #endif 49 #ifdef WLAN_FEATURE_DSRC 50 #include "wlan_ocb_public_structs.h" 51 #endif 52 #ifdef WLAN_SUPPORT_TWT 53 #include "wmi_unified_twt_param.h" 54 #include "wmi_unified_twt_api.h" 55 #endif 56 57 #ifdef FEATURE_WLAN_EXTSCAN 58 #include "wmi_unified_extscan_api.h" 59 #endif 60 61 #ifdef IPA_OFFLOAD 62 #include "wlan_ipa_public_struct.h" 63 #endif 64 65 #ifdef WMI_SMART_ANT_SUPPORT 66 #include "wmi_unified_smart_ant_api.h" 67 #endif 68 69 #ifdef WMI_DBR_SUPPORT 70 #include "wmi_unified_dbr_api.h" 71 #endif 72 73 #ifdef WMI_ATF_SUPPORT 74 #include "wmi_unified_atf_api.h" 75 #endif 76 77 #ifdef WMI_AP_SUPPORT 78 #include "wmi_unified_ap_api.h" 79 #endif 80 81 #ifdef WLAN_FEATURE_DSRC 82 #include "wmi_unified_ocb_api.h" 83 #endif 84 85 #ifdef WLAN_FEATURE_NAN 86 #include "wmi_unified_nan_api.h" 87 #endif 88 89 #ifdef CONVERGED_P2P_ENABLE 90 #include <wmi_unified_p2p_api.h> 91 #endif 92 93 #ifdef WMI_ROAM_SUPPORT 94 #include "wmi_unified_roam_api.h" 95 #endif 96 97 #ifdef WMI_CONCURRENCY_SUPPORT 98 #include "wmi_unified_concurrency_api.h" 99 #endif 100 101 #ifdef WMI_STA_SUPPORT 102 #include "wmi_unified_sta_api.h" 103 #endif 104 105 typedef qdf_nbuf_t wmi_buf_t; 106 #define wmi_buf_data(_buf) qdf_nbuf_data(_buf) 107 108 #define WMI_LOGD(args ...) \ 109 QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_DEBUG, ## args) 110 #define WMI_LOGI(args ...) \ 111 QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_INFO, ## args) 112 #define WMI_LOGW(args ...) \ 113 QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_WARN, ## args) 114 #define WMI_LOGE(args ...) \ 115 QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_ERROR, ## args) 116 #define WMI_LOGP(args ...) \ 117 QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_FATAL, ## args) 118 119 /* Number of bits to shift to combine 32 bit integer to 64 bit */ 120 #define WMI_LOWER_BITS_SHIFT_32 0x20 121 122 #define PHYERROR_MAX_BUFFER_LENGTH 0x7F000000 123 124 struct wmi_soc; 125 struct policy_mgr_dual_mac_config; 126 /** 127 * struct wmi_rx_ops - handle to wmi rx ops 128 * @scn_handle: handle to scn 129 * @ev: event buffer 130 * @rx_ctx: rx execution context 131 * @wma_process_fw_event_handler_cbk: generic event handler callback 132 */ 133 struct wmi_rx_ops { 134 135 int (*wma_process_fw_event_handler_cbk)(ol_scn_t scn_handle, 136 void *ev, 137 uint8_t rx_ctx); 138 }; 139 140 /** 141 * enum wmi_target_type - type of supported wmi command 142 * @WMI_TLV_TARGET: tlv based target 143 * @WMI_NON_TLV_TARGET: non-tlv based target 144 * 145 */ 146 enum wmi_target_type { 147 WMI_TLV_TARGET, 148 WMI_NON_TLV_TARGET, 149 WMI_MAX_TARGET_TYPE 150 }; 151 152 /** 153 * enum wmi_rx_exec_ctx - wmi rx execution context 154 * @WMI_RX_WORK_CTX: work queue context execution provided by WMI layer 155 * @WMI_RX_UMAC_CTX: execution context provided by umac layer 156 * 157 */ 158 enum wmi_rx_exec_ctx { 159 WMI_RX_WORK_CTX, 160 WMI_RX_UMAC_CTX 161 }; 162 163 /** 164 * struct wmi_unified_attach_params - wmi init parameters 165 * @osdev: NIC device 166 * @target_type: type of supported wmi command 167 * @use_cookie: flag to indicate cookie based allocation 168 * @is_async_ep: queueing interrupt or non-interrupt endpoint 169 * @rx_ops: handle to wmi ops 170 * @psoc: objmgr psoc 171 * @max_commands: max commands 172 * @soc_id: SoC device instance id 173 */ 174 struct wmi_unified_attach_params { 175 osdev_t osdev; 176 enum wmi_target_type target_type; 177 bool use_cookie; 178 bool is_async_ep; 179 struct wmi_rx_ops *rx_ops; 180 struct wlan_objmgr_psoc *psoc; 181 uint16_t max_commands; 182 uint32_t soc_id; 183 }; 184 185 /** 186 * attach for unified WMI 187 * 188 * @param scn_handle : handle to SCN. 189 * @param params : attach params for WMI 190 * 191 */ 192 void *wmi_unified_attach(void *scn_handle, 193 struct wmi_unified_attach_params *params); 194 195 196 197 /** 198 * wmi_mgmt_cmd_record() - Wrapper function for mgmt command logging macro 199 * 200 * @wmi_handle: wmi handle 201 * @cmd: mgmt command 202 * @header: pointer to 802.11 header 203 * @vdev_id: vdev id 204 * @chanfreq: channel frequency 205 * 206 * Return: none 207 */ 208 void wmi_mgmt_cmd_record(wmi_unified_t wmi_handle, uint32_t cmd, 209 void *header, uint32_t vdev_id, uint32_t chanfreq); 210 211 /** 212 * detach for unified WMI 213 * 214 * @param wmi_handle : handle to WMI. 215 * @return void. 216 */ 217 void wmi_unified_detach(struct wmi_unified *wmi_handle); 218 219 /** 220 * API to sync time between host and firmware 221 * 222 * @param wmi_handle : handle to WMI. 223 * @return void. 224 */ 225 void wmi_send_time_stamp_sync_cmd_tlv(void *wmi_hdl); 226 227 void 228 wmi_unified_remove_work(struct wmi_unified *wmi_handle); 229 230 /** 231 * generic function to allocate WMI buffer 232 * 233 * @param wmi_handle : handle to WMI. 234 * @param len : length of the buffer 235 * @return wmi_buf_t. 236 */ 237 #ifdef NBUF_MEMORY_DEBUG 238 #define wmi_buf_alloc(h, l) wmi_buf_alloc_debug(h, l, __func__, __LINE__) 239 wmi_buf_t 240 wmi_buf_alloc_debug(wmi_unified_t wmi_handle, uint32_t len, 241 const char *func_name, uint32_t line_num); 242 #else 243 /** 244 * wmi_buf_alloc() - generic function to allocate WMI buffer 245 * @wmi_handle: handle to WMI. 246 * @len: length of the buffer 247 * 248 * Return: return wmi_buf_t or null if memory alloc fails 249 */ 250 #define wmi_buf_alloc(wmi_handle, len) \ 251 wmi_buf_alloc_fl(wmi_handle, len, __func__, __LINE__) 252 253 wmi_buf_t wmi_buf_alloc_fl(wmi_unified_t wmi_handle, uint32_t len, 254 const char *func, uint32_t line); 255 #endif 256 257 /** 258 * generic function frees WMI net buffer 259 * 260 * @param net_buf : Pointer ot net_buf to be freed 261 */ 262 void wmi_buf_free(wmi_buf_t net_buf); 263 264 /** 265 * wmi_unified_cmd_send() - generic function to send unified WMI command 266 * @wmi_handle: handle to WMI. 267 * @buf: wmi command buffer 268 * @buflen: wmi command buffer length 269 * @cmd_id: WMI cmd id 270 * 271 * Note, it is NOT safe to access buf after calling this function! 272 * 273 * Return: QDF_STATUS 274 */ 275 #define wmi_unified_cmd_send(wmi_handle, buf, buflen, cmd_id) \ 276 wmi_unified_cmd_send_fl(wmi_handle, buf, buflen, \ 277 cmd_id, __func__, __LINE__) 278 279 QDF_STATUS 280 wmi_unified_cmd_send_fl(wmi_unified_t wmi_handle, wmi_buf_t buf, 281 uint32_t buflen, uint32_t cmd_id, 282 const char *func, uint32_t line); 283 284 /** 285 * wmi_unified_register_event() - WMI event handler 286 * registration function for converged components 287 * 288 * @wmi_handle: handle to WMI. 289 * @event_id: WMI event ID 290 * @handler_func: Event handler call back function 291 * 292 * @return 0 on success and -ve on failure. 293 */ 294 int 295 wmi_unified_register_event(wmi_unified_t wmi_handle, 296 uint32_t event_id, 297 wmi_unified_event_handler handler_func); 298 299 /** 300 * wmi_unified_register_event_handler() - WMI event handler 301 * registration function 302 * 303 * @wmi_handle: handle to WMI. 304 * @event_id: WMI event ID 305 * @handler_func: Event handler call back function 306 * @rx_ctx: rx event processing context 307 * 308 * @return 0 on success and -ve on failure. 309 */ 310 int 311 wmi_unified_register_event_handler(wmi_unified_t wmi_handle, 312 wmi_conv_event_id event_id, 313 wmi_unified_event_handler handler_func, 314 uint8_t rx_ctx); 315 316 /** 317 * WMI event handler unregister function for converged componets 318 * 319 * @param wmi_handle : handle to WMI. 320 * @param event_id : WMI event ID 321 * @return 0 on success and -ve on failure. 322 */ 323 int 324 wmi_unified_unregister_event(wmi_unified_t wmi_handle, 325 uint32_t event_id); 326 327 /** 328 * WMI event handler unregister function 329 * 330 * @param wmi_handle : handle to WMI. 331 * @param event_id : WMI event ID 332 * @return 0 on success and -ve on failure. 333 */ 334 int 335 wmi_unified_unregister_event_handler(wmi_unified_t wmi_handle, 336 wmi_conv_event_id event_id); 337 338 /** 339 * request wmi to connet its htc service. 340 * @param wmi_handle : handle to WMI. 341 * @param htc_handle : handle to HTC. 342 * @return void 343 */ 344 QDF_STATUS 345 wmi_unified_connect_htc_service(struct wmi_unified *wmi_handle, 346 void *htc_handle); 347 348 /* 349 * WMI API to verify the host has enough credits to suspend 350 * @param wmi_handle : handle to WMI. 351 */ 352 353 int wmi_is_suspend_ready(wmi_unified_t wmi_handle); 354 355 /** 356 * WMI API to get updated host_credits 357 * @param wmi_handle : handle to WMI. 358 */ 359 360 int wmi_get_host_credits(wmi_unified_t wmi_handle); 361 362 /** 363 * WMI API to get WMI Pending Commands in the HTC queue 364 * @param wmi_handle : handle to WMI. 365 */ 366 367 int wmi_get_pending_cmds(wmi_unified_t wmi_handle); 368 369 /** 370 * WMI API to set target suspend state 371 * @param wmi_handle : handle to WMI. 372 * @param val : suspend state boolean 373 */ 374 void wmi_set_target_suspend(wmi_unified_t wmi_handle, bool val); 375 376 /** 377 * wmi_is_target_suspended() - WMI API to check target suspend state 378 * @wmi_handle: handle to WMI. 379 * 380 * WMI API to check target suspend state 381 * 382 * Return: true if target is suspended, else false. 383 */ 384 bool wmi_is_target_suspended(struct wmi_unified *wmi_handle); 385 386 /** 387 * WMI API to set bus suspend state 388 * @param wmi_handle: handle to WMI. 389 * @param val: suspend state boolean 390 */ 391 void wmi_set_is_wow_bus_suspended(wmi_unified_t wmi_handle, A_BOOL val); 392 393 /** 394 * WMI API to set crash injection state 395 * @param wmi_handle: handle to WMI. 396 * @param val: crash injection state boolean 397 */ 398 void wmi_tag_crash_inject(wmi_unified_t wmi_handle, A_BOOL flag); 399 400 /** 401 * WMI API to set target assert 402 * @param wmi_handle: handle to WMI. 403 * @param val: target assert config value. 404 * 405 * Return: none. 406 */ 407 void wmi_set_tgt_assert(wmi_unified_t wmi_handle, bool val); 408 409 /** 410 * generic function to block unified WMI command 411 * @param wmi_handle : handle to WMI. 412 * @return 0 on success and -ve on failure. 413 */ 414 int 415 wmi_stop(wmi_unified_t wmi_handle); 416 417 /** 418 * API to flush all the previous packets associated with the wmi endpoint 419 * 420 * @param wmi_handle : handle to WMI. 421 */ 422 void 423 wmi_flush_endpoint(wmi_unified_t wmi_handle); 424 425 /** 426 * wmi_pdev_id_conversion_enable() - API to enable pdev_id conversion in WMI 427 * By default pdev_id conversion is not done in WMI. 428 * This API can be used enable conversion in WMI. 429 * @param wmi_handle : handle to WMI 430 * Return none 431 */ 432 void wmi_pdev_id_conversion_enable(wmi_unified_t wmi_handle); 433 434 /** 435 * API to handle wmi rx event after UMAC has taken care of execution 436 * context 437 * 438 * @param wmi_handle : handle to WMI. 439 * @param evt_buf : wmi event buffer 440 */ 441 void __wmi_control_rx(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf); 442 #ifdef FEATURE_RUNTIME_PM 443 void 444 wmi_set_runtime_pm_inprogress(wmi_unified_t wmi_handle, bool val); 445 bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle); 446 #else 447 static inline void 448 wmi_set_runtime_pm_inprogress(wmi_unified_t wmi_handle, bool val) 449 { 450 return; 451 } 452 static inline bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle) 453 { 454 return false; 455 } 456 #endif 457 458 void *wmi_unified_get_soc_handle(struct wmi_unified *wmi_handle); 459 460 void *wmi_unified_get_pdev_handle(struct wmi_soc *soc, uint32_t pdev_idx); 461 462 /** 463 * UMAC Callback to process fw event. 464 * @param wmi_handle : handle to WMI. 465 * @param evt_buf : wmi event buffer 466 */ 467 void wmi_process_fw_event(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf); 468 uint16_t wmi_get_max_msg_len(wmi_unified_t wmi_handle); 469 470 471 QDF_STATUS wmi_unified_vdev_create_send(void *wmi_hdl, 472 uint8_t macaddr[QDF_MAC_ADDR_SIZE], 473 struct vdev_create_params *param); 474 475 QDF_STATUS wmi_unified_vdev_delete_send(void *wmi_hdl, 476 uint8_t if_id); 477 478 /** 479 * wmi_unified_vdev_nss_chain_params_send() - send VDEV nss chain params to fw 480 * @wmi_handle: wmi handle 481 * @vdev_id: vdev id 482 * @nss_chains_user_cfg: user configured params to send 483 * 484 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 485 */ 486 QDF_STATUS wmi_unified_vdev_nss_chain_params_send(void *wmi_hdl, 487 uint8_t vdev_id, 488 struct vdev_nss_chains *nss_chains_user_cfg); 489 490 QDF_STATUS wmi_unified_vdev_stop_send(void *wmi_hdl, 491 uint8_t vdev_id); 492 493 QDF_STATUS wmi_unified_vdev_up_send(void *wmi_hdl, 494 uint8_t bssid[QDF_MAC_ADDR_SIZE], 495 struct vdev_up_params *params); 496 497 QDF_STATUS wmi_unified_vdev_down_send(void *wmi_hdl, 498 uint8_t vdev_id); 499 500 QDF_STATUS wmi_unified_vdev_start_send(void *wmi_hdl, 501 struct vdev_start_params *req); 502 /** 503 * wmi_unified_vdev_set_nac_rssi_send() - send NAC_RSSI command to fw 504 * @param wmi_handle : handle to WMI 505 * @param req : pointer to hold nac rssi request data 506 * 507 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 508 */ 509 QDF_STATUS wmi_unified_vdev_set_nac_rssi_send(void *wmi_hdl, 510 struct vdev_scan_nac_rssi_params *req); 511 512 QDF_STATUS wmi_unified_hidden_ssid_vdev_restart_send(void *wmi_hdl, 513 struct hidden_ssid_vdev_restart_params *restart_params); 514 515 QDF_STATUS wmi_unified_vdev_set_param_send(void *wmi_hdl, 516 struct vdev_set_params *param); 517 518 QDF_STATUS wmi_unified_sifs_trigger_send(void *wmi_hdl, 519 struct sifs_trigger_param *param); 520 521 QDF_STATUS wmi_unified_peer_delete_send(void *wmi_hdl, 522 uint8_t 523 peer_addr[QDF_MAC_ADDR_SIZE], 524 uint8_t vdev_id); 525 526 QDF_STATUS wmi_unified_peer_flush_tids_send(void *wmi_hdl, 527 uint8_t peer_addr[QDF_MAC_ADDR_SIZE], 528 struct peer_flush_params *param); 529 530 QDF_STATUS wmi_set_peer_param_send(void *wmi_hdl, 531 uint8_t peer_addr[QDF_MAC_ADDR_SIZE], 532 struct peer_set_params *param); 533 534 QDF_STATUS wmi_unified_peer_create_send(void *wmi_hdl, 535 struct peer_create_params *param); 536 537 QDF_STATUS wmi_unified_stats_request_send(wmi_unified_t wmi_handle, 538 uint8_t macaddr[QDF_MAC_ADDR_SIZE], 539 struct stats_request_params *param); 540 541 QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl, 542 uint32_t value, uint8_t pdev_id); 543 544 QDF_STATUS wmi_unified_wow_enable_send(void *wmi_hdl, 545 struct wow_cmd_params *param, 546 uint8_t mac_id); 547 548 QDF_STATUS wmi_unified_wow_wakeup_send(void *wmi_hdl); 549 550 QDF_STATUS wmi_unified_wow_add_wakeup_event_send(void *wmi_hdl, 551 struct wow_add_wakeup_params *param); 552 553 QDF_STATUS wmi_unified_wow_add_wakeup_pattern_send(void *wmi_hdl, 554 struct wow_add_wakeup_pattern_params *param); 555 556 QDF_STATUS wmi_unified_wow_remove_wakeup_pattern_send(void *wmi_hdl, 557 struct wow_remove_wakeup_pattern_params *param); 558 559 #ifndef CONFIG_MCL 560 QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl, 561 WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT, uint8_t mac_id); 562 563 /** 564 * wmi_unified_peer_based_pktlog_send() - WMI request enable peer 565 * based filtering 566 * @wmi_handle: handle to WMI. 567 * @macaddr: PEER mac address to be filtered 568 * @mac_id: Mac id 569 * @enb_dsb: Enable or Disable peer based pktlog 570 * filtering 571 * 572 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 573 */ 574 QDF_STATUS wmi_unified_peer_based_pktlog_send(void *wmi_hdl, 575 uint8_t *macaddr, 576 uint8_t mac_id, 577 uint8_t enb_dsb); 578 #else 579 QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl, 580 uint8_t macaddr[QDF_MAC_ADDR_SIZE], 581 struct packet_enable_params *param); 582 #endif 583 584 QDF_STATUS wmi_unified_packet_log_disable_send(void *wmi_hdl, uint8_t mac_id); 585 586 QDF_STATUS wmi_unified_suspend_send(void *wmi_hdl, 587 struct suspend_params *param, 588 uint8_t mac_id); 589 590 QDF_STATUS wmi_unified_resume_send(void *wmi_hdl, 591 uint8_t mac_id); 592 593 QDF_STATUS 594 wmi_unified_pdev_param_send(void *wmi_hdl, 595 struct pdev_params *param, 596 uint8_t mac_id); 597 598 QDF_STATUS wmi_unified_beacon_tmpl_send_cmd(void *wmi_hdl, 599 struct beacon_tmpl_params *param); 600 601 602 QDF_STATUS wmi_unified_peer_assoc_send(void *wmi_hdl, 603 struct peer_assoc_params *param); 604 605 QDF_STATUS wmi_unified_sta_ps_cmd_send(void *wmi_hdl, 606 struct sta_ps_params *param); 607 608 QDF_STATUS wmi_unified_ap_ps_cmd_send(void *wmi_hdl, 609 uint8_t macaddr[QDF_MAC_ADDR_SIZE], 610 struct ap_ps_params *param); 611 612 QDF_STATUS wmi_unified_scan_start_cmd_send(void *wmi_hdl, 613 struct scan_req_params *param); 614 615 QDF_STATUS wmi_unified_scan_stop_cmd_send(void *wmi_hdl, 616 struct scan_cancel_param *param); 617 618 QDF_STATUS wmi_unified_scan_chan_list_cmd_send(void *wmi_hdl, 619 struct scan_chan_list_params *param); 620 621 622 QDF_STATUS wmi_crash_inject(void *wmi_hdl, 623 struct crash_inject *param); 624 625 QDF_STATUS wmi_unified_pdev_utf_cmd_send(void *wmi_hdl, 626 struct pdev_utf_params *param, 627 uint8_t mac_id); 628 629 #ifdef FEATURE_FW_LOG_PARSING 630 QDF_STATUS wmi_unified_dbglog_cmd_send(void *wmi_hdl, 631 struct dbglog_params *param); 632 #else 633 static inline QDF_STATUS 634 wmi_unified_dbglog_cmd_send(void *wmi_hdl, 635 struct dbglog_params *param) 636 { 637 return QDF_STATUS_SUCCESS; 638 } 639 #endif 640 641 QDF_STATUS wmi_mgmt_unified_cmd_send(void *wmi_hdl, 642 struct wmi_mgmt_params *param); 643 644 QDF_STATUS wmi_offchan_data_tx_cmd_send(void *wmi_hdl, 645 struct wmi_offchan_data_tx_params *param); 646 647 QDF_STATUS wmi_unified_modem_power_state(void *wmi_hdl, 648 uint32_t param_value); 649 650 QDF_STATUS wmi_unified_set_sta_ps_mode(void *wmi_hdl, 651 uint32_t vdev_id, uint8_t val); 652 QDF_STATUS 653 wmi_unified_set_sta_uapsd_auto_trig_cmd(void *wmi_hdl, 654 struct sta_uapsd_trig_params *param); 655 656 QDF_STATUS wmi_unified_get_temperature(void *wmi_hdl); 657 658 QDF_STATUS wmi_unified_set_smps_params(void *wmi_hdl, uint8_t vdev_id, 659 int value); 660 661 QDF_STATUS wmi_unified_set_mimops(void *wmi_hdl, uint8_t vdev_id, int value); 662 663 QDF_STATUS wmi_unified_lro_config_cmd(void *wmi_hdl, 664 struct wmi_lro_config_cmd_t *wmi_lro_cmd); 665 666 QDF_STATUS wmi_unified_set_thermal_mgmt_cmd(void *wmi_hdl, 667 struct thermal_cmd_params *thermal_info); 668 669 QDF_STATUS wmi_unified_peer_rate_report_cmd(void *wmi_hdl, 670 struct wmi_peer_rate_report_params *rate_report_params); 671 672 QDF_STATUS wmi_unified_process_update_edca_param(void *wmi_hdl, 673 uint8_t vdev_id, bool mu_edca_param, 674 struct wmi_host_wme_vparams wmm_vparams[WMI_MAX_NUM_AC]); 675 676 QDF_STATUS wmi_unified_probe_rsp_tmpl_send_cmd(void *wmi_hdl, 677 uint8_t vdev_id, 678 struct wmi_probe_resp_params *probe_rsp_info); 679 680 QDF_STATUS wmi_unified_setup_install_key_cmd(void *wmi_hdl, 681 struct set_key_params *key_params); 682 683 QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(void *wmi_hdl, 684 uint32_t vdev_id, uint8_t *p2p_ie); 685 686 QDF_STATUS wmi_unified_scan_probe_setoui_cmd(void *wmi_hdl, 687 struct scan_mac_oui *psetoui); 688 689 #ifdef IPA_OFFLOAD 690 QDF_STATUS wmi_unified_ipa_offload_control_cmd(void *wmi_hdl, 691 struct ipa_uc_offload_control_params *ipa_offload); 692 #endif 693 694 QDF_STATUS wmi_unified_pno_stop_cmd(void *wmi_hdl, uint8_t vdev_id); 695 696 #ifdef FEATURE_WLAN_SCAN_PNO 697 QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl, 698 struct pno_scan_req_params *pno); 699 #endif 700 701 QDF_STATUS wmi_unified_nlo_mawc_cmd(void *wmi_hdl, 702 struct nlo_mawc_params *params); 703 704 #ifdef WLAN_FEATURE_LINK_LAYER_STATS 705 /** 706 * wmi_unified_process_ll_stats_clear_cmd() - clear link layer stats 707 * @wmi_handle: wmi handle 708 * @clear_req: ll stats clear request command params 709 * 710 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 711 */ 712 QDF_STATUS wmi_unified_process_ll_stats_clear_cmd(wmi_unified_t wmi_handle, 713 const struct ll_stats_clear_params *clear_req); 714 715 /** 716 * wmi_unified_process_ll_stats_set_cmd() - link layer stats set request 717 * @wmi_handle: wmi handle 718 * @set_req: ll stats set request command params 719 * 720 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 721 */ 722 QDF_STATUS wmi_unified_process_ll_stats_set_cmd(wmi_unified_t wmi_handle, 723 const struct ll_stats_set_params *set_req); 724 725 /** 726 * wmi_unified_process_ll_stats_get_cmd() - link layer stats get request 727 * @wmi_handle: wmi handle 728 * @get_req: ll stats get request command params 729 * 730 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 731 */ 732 QDF_STATUS wmi_unified_process_ll_stats_get_cmd(wmi_unified_t wmi_handle, 733 const struct ll_stats_get_params *get_req); 734 #endif /* WLAN_FEATURE_LINK_LAYER_STATS */ 735 736 /** 737 * wmi_unified_congestion_request_cmd() - send request to fw to get CCA 738 * @wmi_hdl: wma handle 739 * @vdev_id: vdev id 740 * 741 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 742 */ 743 QDF_STATUS wmi_unified_congestion_request_cmd(void *wmi_hdl, 744 uint8_t vdev_id); 745 746 QDF_STATUS wmi_unified_snr_request_cmd(void *wmi_hdl); 747 748 QDF_STATUS wmi_unified_snr_cmd(void *wmi_hdl, uint8_t vdev_id); 749 750 /** 751 * wmi_unified_link_status_req_cmd() - process link status request from UMAC 752 * @wmi_handle: wmi handle 753 * @params: get link status params 754 * 755 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 756 */ 757 QDF_STATUS wmi_unified_link_status_req_cmd(wmi_unified_t wmi_handle, 758 struct link_status_params *params); 759 760 #ifdef WLAN_SUPPORT_GREEN_AP 761 QDF_STATUS wmi_unified_egap_conf_params_cmd(void *wmi_hdl, 762 struct wlan_green_ap_egap_params *egap_params); 763 #endif 764 765 QDF_STATUS wmi_unified_csa_offload_enable(void *wmi_hdl, uint8_t vdev_id); 766 767 #ifdef WLAN_FEATURE_CIF_CFR 768 /** 769 * wmi_unified_oem_dma_ring_cfg() - configure OEM DMA rings 770 * @wmi_handle: wmi handle 771 * @data_len: len of dma cfg req 772 * @data: dma cfg req 773 * 774 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 775 */ 776 QDF_STATUS wmi_unified_oem_dma_ring_cfg(void *wmi_hdl, 777 wmi_oem_dma_ring_cfg_req_fixed_param *cfg); 778 #endif 779 780 QDF_STATUS wmi_unified_start_oem_data_cmd(void *wmi_hdl, 781 uint32_t data_len, 782 uint8_t *data); 783 784 QDF_STATUS wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl, 785 bool dfs_phyerr_filter_offload); 786 787 #ifdef CONFIG_MCL 788 QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl, 789 WMI_PKTLOG_EVENT pktlog_event, 790 uint32_t cmd_id, 791 uint8_t user_triggered); 792 #endif 793 794 QDF_STATUS wmi_unified_stats_ext_req_cmd(void *wmi_hdl, 795 struct stats_ext_params *preq); 796 797 QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(void *wmi_hdl, 798 struct dhcp_offload_info_params *params); 799 800 QDF_STATUS wmi_unified_send_regdomain_info_to_fw_cmd(void *wmi_hdl, 801 uint32_t reg_dmn, uint16_t regdmn2G, 802 uint16_t regdmn5G, uint8_t ctl2G, 803 uint8_t ctl5G); 804 805 QDF_STATUS wmi_unified_process_fw_mem_dump_cmd(void *wmi_hdl, 806 struct fw_dump_req_param *mem_dump_req); 807 808 QDF_STATUS wmi_unified_cfg_action_frm_tb_ppdu_cmd(void *wmi_hdl, 809 struct cfg_action_frm_tb_ppdu_param *cfg_info); 810 811 QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl, 812 void *evt_buf); 813 814 QDF_STATUS wmi_unified_log_supported_evt_cmd(void *wmi_hdl, 815 uint8_t *event, 816 uint32_t len); 817 818 QDF_STATUS wmi_unified_enable_specific_fw_logs_cmd(void *wmi_hdl, 819 struct wmi_wifi_start_log *start_log); 820 821 QDF_STATUS wmi_unified_flush_logs_to_fw_cmd(void *wmi_hdl); 822 823 QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl, 824 struct wmi_unit_test_cmd *wmi_utest); 825 826 #ifdef FEATURE_WLAN_APF 827 /** 828 * wmi_unified_set_active_apf_mode_cmd() - config active APF mode in FW 829 * @wmi: the WMI handle 830 * @vdev_id: the Id of the vdev to apply the configuration to 831 * @ucast_mode: the active APF mode to configure for unicast packets 832 * @mcast_bcast_mode: the active APF mode to configure for multicast/broadcast 833 * packets 834 */ 835 QDF_STATUS 836 wmi_unified_set_active_apf_mode_cmd(wmi_unified_t wmi, uint8_t vdev_id, 837 enum wmi_host_active_apf_mode ucast_mode, 838 enum wmi_host_active_apf_mode 839 mcast_bcast_mode); 840 841 /** 842 * wmi_unified_send_apf_enable_cmd() - send apf enable/disable cmd 843 * @wmi: wmi handle 844 * @vdev_id: VDEV id 845 * @enable: true: enable, false: disable 846 * 847 * This function passes the apf enable command to fw 848 * 849 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 850 */ 851 QDF_STATUS wmi_unified_send_apf_enable_cmd(wmi_unified_t wmi, 852 uint32_t vdev_id, bool enable); 853 854 /** 855 * wmi_unified_send_apf_write_work_memory_cmd() - send cmd to write into the APF 856 * work memory. 857 * @wmi: wmi handle 858 * @write_params: parameters and buffer pointer for the write 859 * 860 * This function passes the write apf work mem command to fw 861 * 862 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 863 */ 864 QDF_STATUS wmi_unified_send_apf_write_work_memory_cmd(wmi_unified_t wmi, 865 struct wmi_apf_write_memory_params *write_params); 866 867 /** 868 * wmi_unified_send_apf_read_work_memory_cmd() - send cmd to read part of APF 869 * work memory 870 * @wmi: wmi handle 871 * @read_params: contains relative address and length to read from 872 * 873 * This function passes the read apf work mem command to fw 874 * 875 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 876 */ 877 QDF_STATUS wmi_unified_send_apf_read_work_memory_cmd(wmi_unified_t wmi, 878 struct wmi_apf_read_memory_params *read_params); 879 880 /** 881 * wmi_extract_apf_read_memory_resp_event() - exctract read mem resp event 882 * @wmi: wmi handle 883 * @evt_buf: Pointer to the event buffer 884 * @resp: pointer to memory to extract event parameters into 885 * 886 * This function exctracts read mem response event into the given structure ptr 887 * 888 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 889 */ 890 QDF_STATUS 891 wmi_extract_apf_read_memory_resp_event(wmi_unified_t wmi, void *evt_buf, 892 struct wmi_apf_read_memory_resp_event_params 893 *read_mem_evt); 894 #endif /* FEATURE_WLAN_APF */ 895 896 QDF_STATUS wmi_send_get_user_position_cmd(void *wmi_hdl, uint32_t value); 897 898 QDF_STATUS wmi_send_get_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value); 899 900 QDF_STATUS wmi_send_reset_peer_mumimo_tx_count_cmd(void *wmi_hdl, 901 uint32_t value); 902 903 QDF_STATUS wmi_unified_send_btcoex_wlan_priority_cmd(void *wmi_hdl, 904 struct btcoex_cfg_params *param); 905 906 QDF_STATUS wmi_unified_send_btcoex_duty_cycle_cmd(void *wmi_hdl, 907 struct btcoex_cfg_params *param); 908 909 QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl, 910 coex_ver_cfg_t *param); 911 912 QDF_STATUS wmi_unified_send_coex_config_cmd(void *wmi_hdl, 913 struct coex_config_params *param); 914 915 QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl, 916 struct fips_params *param); 917 918 QDF_STATUS wmi_unified_wlan_profile_enable_cmd_send(void *wmi_hdl, 919 struct wlan_profile_params *param); 920 921 QDF_STATUS wmi_unified_wlan_profile_trigger_cmd_send(void *wmi_hdl, 922 struct wlan_profile_params *param); 923 924 QDF_STATUS wmi_unified_set_chan_cmd_send(void *wmi_hdl, 925 struct channel_param *param); 926 927 QDF_STATUS wmi_unified_set_ratepwr_table_cmd_send(void *wmi_hdl, 928 struct ratepwr_table_params *param); 929 930 QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(void *wmi_hdl); 931 932 QDF_STATUS wmi_unified_set_ratepwr_chainmsk_cmd_send(void *wmi_hdl, 933 struct ratepwr_chainmsk_params *param); 934 935 QDF_STATUS wmi_unified_set_macaddr_cmd_send(void *wmi_hdl, 936 struct macaddr_params *param); 937 938 QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(void *wmi_hdl); 939 940 QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(void *wmi_hdl); 941 942 QDF_STATUS wmi_unified_set_acparams_cmd_send(void *wmi_hdl, 943 struct acparams_params *param); 944 945 QDF_STATUS wmi_unified_set_vap_dscp_tid_map_cmd_send(void *wmi_hdl, 946 struct vap_dscp_tid_map_params *param); 947 948 QDF_STATUS wmi_unified_proxy_ast_reserve_cmd_send(void *wmi_hdl, 949 struct proxy_ast_reserve_params *param); 950 951 /** 952 * wmi_unified_set_bridge_mac_addr_cmd_send() - WMI set bridge mac addr cmd function 953 * @param wmi_hdl : handle to WMI. 954 * @param param : pointer to hold bridge mac addr param 955 * 956 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 957 */ 958 QDF_STATUS wmi_unified_set_bridge_mac_addr_cmd_send(void *wmi_hdl, 959 struct set_bridge_mac_addr_params *param); 960 961 962 QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl); 963 964 QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl); 965 966 QDF_STATUS wmi_unified_phyerr_disable_cmd_send(void *wmi_hdl); 967 968 QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(void *wmi_hdl, 969 struct smart_ant_enable_tx_feedback_params *param); 970 971 QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(void *wmi_hdl, 972 struct vdev_spectral_configure_params *param); 973 974 QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(void *wmi_hdl, 975 struct vdev_spectral_enable_params *param); 976 977 QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(void *wmi_hdl, 978 struct bss_chan_info_request_params *param); 979 980 QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(void *wmi_hdl, 981 struct thermal_mitigation_params *param); 982 983 QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(void *wmi_hdl, 984 struct set_fwtest_params *param); 985 986 /** 987 * wmi_unified_vdev_set_custom_aggr_size_cmd_send() - WMI set custom aggr 988 * size command 989 * @param wmi_hdl : handle to WMI. 990 * @param param : pointer to hold custom aggr size param 991 * 992 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 993 */ 994 QDF_STATUS wmi_unified_vdev_set_custom_aggr_size_cmd_send(void *wmi_hdl, 995 struct set_custom_aggr_size_params *param); 996 997 /** 998 * wmi_unified_vdev_set_qdepth_thresh_cmd_send() - WMI set qdepth threshold 999 * @param wmi_hdl : handle to WMI. 1000 * @param param : pointer to hold set qdepth thresh param 1001 * 1002 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1003 */ 1004 QDF_STATUS wmi_unified_vdev_set_qdepth_thresh_cmd_send(void *wmi_hdl, 1005 struct set_qdepth_thresh_params *param); 1006 1007 QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(void *wmi_hdl, 1008 struct pdev_set_regdomain_params *param); 1009 1010 QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(void *wmi_hdl, 1011 struct set_beacon_filter_params *param); 1012 1013 QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(void *wmi_hdl, 1014 struct remove_beacon_filter_params *param); 1015 1016 QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(void *wmi_hdl, 1017 uint8_t macaddr[QDF_MAC_ADDR_SIZE], 1018 struct addba_clearresponse_params *param); 1019 1020 QDF_STATUS wmi_unified_addba_send_cmd_send(void *wmi_hdl, 1021 uint8_t macaddr[QDF_MAC_ADDR_SIZE], 1022 struct addba_send_params *param); 1023 1024 QDF_STATUS wmi_unified_delba_send_cmd_send(void *wmi_hdl, 1025 uint8_t macaddr[QDF_MAC_ADDR_SIZE], 1026 struct delba_send_params *param); 1027 1028 QDF_STATUS wmi_unified_addba_setresponse_cmd_send(void *wmi_hdl, 1029 uint8_t macaddr[QDF_MAC_ADDR_SIZE], 1030 struct addba_setresponse_params *param); 1031 1032 QDF_STATUS wmi_unified_singleamsdu_cmd_send(void *wmi_hdl, 1033 uint8_t macaddr[QDF_MAC_ADDR_SIZE], 1034 struct singleamsdu_params *param); 1035 1036 QDF_STATUS wmi_unified_mu_scan_cmd_send(void *wmi_hdl, 1037 struct mu_scan_params *param); 1038 1039 QDF_STATUS wmi_unified_lteu_config_cmd_send(void *wmi_hdl, 1040 struct lteu_config_params *param); 1041 1042 QDF_STATUS wmi_unified_set_psmode_cmd_send(void *wmi_hdl, 1043 struct set_ps_mode_params *param); 1044 1045 QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl, 1046 struct wmi_init_cmd_param *param); 1047 1048 bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id); 1049 1050 /** 1051 * wmi_save_service_bitmap() - save service bitmap 1052 * @wmi_handle: wmi handle 1053 * @param evt_buf: pointer to event buffer 1054 * 1055 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS failure code 1056 */ 1057 QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf, 1058 void *bitmap_buf); 1059 1060 /** 1061 * wmi_save_ext_service_bitmap() - save extended service bitmap 1062 * @wmi_handle: wmi handle 1063 * @param evt_buf: pointer to event buffer 1064 * 1065 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS failure code 1066 */ 1067 QDF_STATUS wmi_save_ext_service_bitmap(void *wmi_hdl, void *evt_buf, 1068 void *bitmap_buf); 1069 1070 QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf); 1071 1072 QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl, 1073 void *evt_buf, 1074 struct wlan_psoc_target_capability_info *ev); 1075 1076 QDF_STATUS wmi_extract_hal_reg_cap(void *wmi_hdl, void *evt_buf, 1077 struct wlan_psoc_hal_reg_capability *hal_reg_cap); 1078 1079 host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl, 1080 void *evt_buf, uint8_t *num_entries); 1081 1082 uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev); 1083 1084 QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl, 1085 void *ev, uint8_t *macaddr); 1086 1087 wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev, 1088 uint8_t *num_mac_addr); 1089 1090 /** 1091 * wmi_extract_ready_params() - Extract data from ready event apart from 1092 * status, macaddr and version. 1093 * @wmi_handle: Pointer to WMI handle. 1094 * @evt_buf: Pointer to Ready event buffer. 1095 * @ev_param: Pointer to host defined struct to copy the data from event. 1096 * 1097 * Return: QDF_STATUS_SUCCESS on success. 1098 */ 1099 QDF_STATUS wmi_extract_ready_event_params(void *wmi_hdl, 1100 void *evt_buf, struct wmi_host_ready_ev_param *ev_param); 1101 1102 QDF_STATUS wmi_extract_fw_version(void *wmi_hdl, 1103 void *ev, struct wmi_host_fw_ver *fw_ver); 1104 1105 QDF_STATUS wmi_extract_fw_abi_version(void *wmi_hdl, 1106 void *ev, struct wmi_host_fw_abi_ver *fw_ver); 1107 1108 QDF_STATUS wmi_check_and_update_fw_version(void *wmi_hdl, void *ev); 1109 1110 uint8_t *wmi_extract_dbglog_data_len(void *wmi_hdl, 1111 void *evt_b, uint32_t *len); 1112 1113 QDF_STATUS wmi_send_ext_resource_config(void *wmi_hdl, 1114 wmi_host_ext_resource_config *ext_cfg); 1115 1116 QDF_STATUS wmi_unified_rtt_meas_req_test_cmd_send(void *wmi_hdl, 1117 struct rtt_meas_req_test_params *param); 1118 1119 QDF_STATUS wmi_unified_rtt_meas_req_cmd_send(void *wmi_hdl, 1120 struct rtt_meas_req_params *param); 1121 1122 QDF_STATUS wmi_unified_rtt_keepalive_req_cmd_send(void *wmi_hdl, 1123 struct rtt_keepalive_req_params *param); 1124 1125 QDF_STATUS wmi_unified_lci_set_cmd_send(void *wmi_hdl, 1126 struct lci_set_params *param); 1127 1128 QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl, 1129 struct lcr_set_params *param); 1130 1131 QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl, 1132 struct periodic_chan_stats_params *param); 1133 1134 /* Extract APIs */ 1135 1136 QDF_STATUS wmi_extract_fips_event_data(void *wmi_hdl, void *evt_buf, 1137 struct wmi_host_fips_event_param *param); 1138 1139 QDF_STATUS wmi_extract_mgmt_rx_params(void *wmi_hdl, void *evt_buf, 1140 struct mgmt_rx_event_params *hdr, uint8_t **bufp); 1141 1142 QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf, 1143 wmi_host_roam_event *ev); 1144 1145 QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf, 1146 struct scan_event *param); 1147 1148 QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf, 1149 wmi_host_mu_report_event *param); 1150 1151 QDF_STATUS wmi_extract_mu_db_entry(void *wmi_hdl, void *evt_buf, 1152 uint8_t idx, wmi_host_mu_db_entry *param); 1153 1154 QDF_STATUS wmi_extract_mumimo_tx_count_ev_param(void *wmi_hdl, void *evt_buf, 1155 wmi_host_peer_txmu_cnt_event *param); 1156 1157 QDF_STATUS wmi_extract_peer_gid_userpos_list_ev_param(void *wmi_hdl, 1158 void *evt_buf, wmi_host_peer_gid_userpos_list_event *param); 1159 1160 QDF_STATUS 1161 wmi_extract_esp_estimate_ev_param(void *wmi_hdl, void *evt_buf, 1162 struct esp_estimation_event *param); 1163 1164 QDF_STATUS wmi_extract_gpio_input_ev_param(void *wmi_hdl, 1165 void *evt_buf, uint32_t *gpio_num); 1166 1167 QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(void *wmi_hdl, 1168 void *evt_buf, struct wmi_host_proxy_ast_reserve_param *param); 1169 1170 QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl, 1171 void *evt_buf, 1172 wmi_host_pdev_generic_buffer_event *param); 1173 1174 QDF_STATUS wmi_extract_peer_ratecode_list_ev(void *wmi_hdl, void *evt_buf, 1175 uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap); 1176 1177 QDF_STATUS wmi_extract_bcnflt_stats(void *wmi_hdl, void *evt_buf, 1178 uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats); 1179 1180 QDF_STATUS wmi_extract_rtt_hdr(void *wmi_hdl, void *evt_buf, 1181 wmi_host_rtt_event_hdr *ev); 1182 1183 QDF_STATUS wmi_extract_rtt_ev(void *wmi_hdl, void *evt_buf, 1184 wmi_host_rtt_meas_event *ev, uint8_t *hdump, 1185 uint16_t hdump_len); 1186 1187 QDF_STATUS wmi_extract_rtt_error_report_ev(void *wmi_hdl, void *evt_buf, 1188 wmi_host_rtt_error_report_event *ev); 1189 1190 QDF_STATUS wmi_extract_chan_stats(void *wmi_hdl, void *evt_buf, 1191 uint32_t index, wmi_host_chan_stats *chan_stats); 1192 1193 QDF_STATUS wmi_extract_thermal_stats(void *wmi_hdl, void *evt_buf, 1194 uint32_t *temp, uint32_t *level, uint32_t *pdev_id); 1195 1196 QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf, 1197 uint8_t idx, uint32_t *levelcount, uint32_t *dccount); 1198 1199 QDF_STATUS wmi_extract_comb_phyerr(void *wmi_hdl, void *evt_buf, 1200 uint16_t datalen, uint16_t *buf_offset, 1201 wmi_host_phyerr_t *phyerr); 1202 1203 QDF_STATUS wmi_extract_single_phyerr(void *wmi_hdl, void *evt_buf, 1204 uint16_t datalen, uint16_t *buf_offset, 1205 wmi_host_phyerr_t *phyerr); 1206 1207 QDF_STATUS wmi_extract_composite_phyerr(void *wmi_hdl, void *evt_buf, 1208 uint16_t datalen, wmi_host_phyerr_t *phyerr); 1209 1210 QDF_STATUS wmi_extract_profile_ctx(void *wmi_hdl, void *evt_buf, 1211 wmi_host_wlan_profile_ctx_t *profile_ctx); 1212 1213 QDF_STATUS wmi_extract_profile_data(void *wmi_hdl, void *evt_buf, uint8_t idx, 1214 wmi_host_wlan_profile_t *profile_data); 1215 1216 QDF_STATUS wmi_extract_stats_param(void *wmi_hdl, void *evt_buf, 1217 wmi_host_stats_event *stats_param); 1218 1219 QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf, 1220 uint32_t index, 1221 wmi_host_pdev_stats *pdev_stats); 1222 1223 QDF_STATUS wmi_extract_unit_test(void *wmi_hdl, void *evt_buf, 1224 wmi_unit_test_event *unit_test, uint32_t maxspace); 1225 1226 QDF_STATUS wmi_extract_pdev_ext_stats(void *wmi_hdl, void *evt_buf, 1227 uint32_t index, 1228 wmi_host_pdev_ext_stats *pdev_ext_stats); 1229 1230 QDF_STATUS wmi_extract_peer_extd_stats(void *wmi_hdl, void *evt_buf, 1231 uint32_t index, 1232 wmi_host_peer_extd_stats *peer_extd_stats); 1233 1234 QDF_STATUS wmi_extract_peer_adv_stats(wmi_unified_t wmi_handle, void *evt_buf, 1235 struct wmi_host_peer_adv_stats 1236 *peer_adv_stats); 1237 1238 QDF_STATUS wmi_extract_bss_chan_info_event(void *wmi_hdl, void *evt_buf, 1239 wmi_host_pdev_bss_chan_info_event *bss_chan_info); 1240 1241 QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf, 1242 uint32_t index, wmi_host_peer_stats *peer_stats); 1243 1244 QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf, 1245 wmi_host_tx_data_traffic_ctrl_event *ev); 1246 1247 QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf, 1248 uint32_t index, wmi_host_vdev_stats *vdev_stats); 1249 1250 QDF_STATUS wmi_extract_per_chain_rssi_stats(void *wmi_hdl, void *evt_buf, 1251 uint32_t index, struct wmi_host_per_chain_rssi_stats *rssi_stats); 1252 1253 QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf, 1254 uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats); 1255 1256 QDF_STATUS wmi_extract_bcn_stats(void *wmi_hdl, void *evt_buf, 1257 uint32_t index, wmi_host_bcn_stats *vdev_bcn_stats); 1258 1259 /** 1260 * wmi_extract_vdev_nac_rssi_stats() - extract NAC_RSSI stats from event 1261 * @wmi_handle: wmi handle 1262 * @param evt_buf: pointer to event buffer 1263 * @param vdev_extd_stats: Pointer to hold nac rssi stats 1264 * 1265 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1266 */ 1267 QDF_STATUS wmi_extract_vdev_nac_rssi_stats(void *wmi_hdl, void *evt_buf, 1268 struct wmi_host_vdev_nac_rssi_event *vdev_nac_rssi_stats); 1269 1270 /** 1271 * wmi_extract_peer_retry_stats() - extract peer retry stats from event 1272 * @wmi_handle: wmi handle 1273 * @evt_buf: pointer to event buffer 1274 * @index: Index into peer retry stats 1275 * @peer_retry_stats: Pointer to hold peer retry stats 1276 * 1277 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1278 */ 1279 QDF_STATUS wmi_extract_peer_retry_stats(void *wmi_hdl, void *evt_buf, 1280 uint32_t index, struct wmi_host_peer_retry_stats *peer_retry_stats); 1281 1282 QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl, 1283 struct wmi_power_dbg_params *param); 1284 1285 /** 1286 * wmi_extract_sar_cap_service_ready_ext() - extract SAR cap from 1287 * FW service ready event 1288 * @wmi_hdl: wmi handle 1289 * @evt_buf: event buffer received from firmware 1290 * @ext_param: extended target info 1291 * 1292 * Return: QDF_STATUS_SUCCESS for success or error code 1293 */ 1294 QDF_STATUS wmi_extract_sar_cap_service_ready_ext( 1295 void *wmi_hdl, 1296 uint8_t *evt_buf, 1297 struct wlan_psoc_host_service_ext_param *ext_param); 1298 1299 QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl, 1300 struct set_fwtest_params *wmi_fwtest); 1301 1302 QDF_STATUS wmi_unified_peer_rx_reorder_queue_setup_send(void *wmi_hdl, 1303 struct rx_reorder_queue_setup_params *param); 1304 QDF_STATUS wmi_unified_peer_rx_reorder_queue_remove_send(void *wmi_hdl, 1305 struct rx_reorder_queue_remove_params *param); 1306 1307 QDF_STATUS wmi_extract_service_ready_ext(void *wmi_hdl, uint8_t *evt_buf, 1308 struct wlan_psoc_host_service_ext_param *param); 1309 QDF_STATUS wmi_extract_hw_mode_cap_service_ready_ext( 1310 void *wmi_hdl, 1311 uint8_t *evt_buf, uint8_t hw_mode_idx, 1312 struct wlan_psoc_host_hw_mode_caps *param); 1313 QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext( 1314 void *wmi_hdl, 1315 uint8_t *evt_buf, 1316 uint8_t hw_mode_id, 1317 uint8_t phy_id, 1318 struct wlan_psoc_host_mac_phy_caps *param); 1319 QDF_STATUS wmi_extract_reg_cap_service_ready_ext( 1320 void *wmi_hdl, 1321 uint8_t *evt_buf, uint8_t phy_idx, 1322 struct wlan_psoc_host_hal_reg_capabilities_ext *param); 1323 1324 /** 1325 * wmi_extract_dbr_ring_cap_service_ready_ext: Extract direct buffer rx 1326 * capability received through 1327 * extended service ready event 1328 * @wmi_hdl: WMI handle 1329 * @evt_buf: Event buffer 1330 * @idx: Index of the module for which capability is received 1331 * @param: Pointer to direct buffer rx ring cap struct 1332 * 1333 * Return: QDF status of operation 1334 */ 1335 QDF_STATUS wmi_extract_dbr_ring_cap_service_ready_ext( 1336 void *wmi_hdl, 1337 uint8_t *evt_buf, uint8_t idx, 1338 struct wlan_psoc_host_dbr_ring_caps *param); 1339 1340 /** 1341 * wmi_extract_spectral_scaling_params_service_ready_ext: Extract Spectral 1342 * scaling params received through 1343 * extended service ready event 1344 * @wmi_hdl: WMI handle 1345 * @evt_buf: Event buffer 1346 * @idx: Index 1347 * @param: Pointer to Spectral scaling params 1348 * 1349 * Return: QDF status of operation 1350 */ 1351 QDF_STATUS wmi_extract_spectral_scaling_params_service_ready_ext( 1352 void *wmi_hdl, 1353 uint8_t *evt_buf, uint8_t idx, 1354 struct wlan_psoc_host_spectral_scaling_params *param); 1355 1356 QDF_STATUS wmi_extract_pdev_utf_event(void *wmi_hdl, 1357 uint8_t *evt_buf, 1358 struct wmi_host_pdev_utf_event *param); 1359 1360 QDF_STATUS wmi_extract_pdev_qvit_event(void *wmi_hdl, 1361 uint8_t *evt_buf, 1362 struct wmi_host_pdev_qvit_event *param); 1363 1364 QDF_STATUS wmi_extract_chainmask_tables(void *wmi_hdl, uint8_t *evt_buf, 1365 struct wlan_psoc_host_chainmask_table *chainmask_table); 1366 /** 1367 * wmi_unified_dfs_phyerr_offload_en_cmd() - enable dfs phyerr offload 1368 * @wmi_handle: wmi handle 1369 * @pdev_id: pdev id 1370 * 1371 * Return: QDF_STATUS 1372 */ 1373 QDF_STATUS wmi_unified_dfs_phyerr_offload_en_cmd(void *wmi_hdl, 1374 uint32_t pdev_id); 1375 1376 /** 1377 * wmi_unified_dfs_phyerr_offload_dis_cmd() - disable dfs phyerr offload 1378 * @wmi_handle: wmi handle 1379 * @pdev_id: pdev id 1380 * 1381 * Return: QDF_STATUS 1382 */ 1383 QDF_STATUS wmi_unified_dfs_phyerr_offload_dis_cmd(void *wmi_hdl, 1384 uint32_t pdev_id); 1385 1386 #ifdef QCA_SUPPORT_AGILE_DFS 1387 /** 1388 * wmi_unified_send_vdev_adfs_ch_cfg_cmd() - send adfs channel config command 1389 * @wmi_handle: wmi handle 1390 * @vdev_adfs_ch_cfg_params: adfs channel config params 1391 * 1392 * Return: QDF_STATUS 1393 */ 1394 QDF_STATUS 1395 wmi_unified_send_vdev_adfs_ch_cfg_cmd(void *wmi_hdl, 1396 struct vdev_adfs_ch_cfg_params *param); 1397 1398 /** 1399 * wmi_unified_send_vdev_adfs_ocac_abort_cmd() - send adfs o-cac abort command 1400 * @wmi_handle: wmi handle 1401 * @vdev_adfs_abort_params: adfs channel o-cac abort params 1402 * 1403 * Return: QDF_STATUS 1404 */ 1405 QDF_STATUS 1406 wmi_unified_send_vdev_adfs_ocac_abort_cmd(void *wmi_hdl, 1407 struct vdev_adfs_abort_params *param); 1408 #endif 1409 1410 QDF_STATUS wmi_unified_set_country_cmd_send(void *wmi_hdl, 1411 struct set_country *param); 1412 1413 #ifdef WLAN_FEATURE_ACTION_OUI 1414 /** 1415 * wmi_unified_send_action_oui_cmd() - send action oui cmd to fw 1416 * @wmi_hdl: wma handle 1417 * @req: wmi action oui message to be send 1418 * 1419 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1420 */ 1421 QDF_STATUS 1422 wmi_unified_send_action_oui_cmd(void *wmi_hdl, 1423 struct action_oui_request *req); 1424 #endif /* WLAN_FEATURE_ACTION_OUI */ 1425 1426 /** 1427 * wmi_unified_send_request_get_rcpi_cmd() - command to request rcpi value 1428 * @wmi_hdl: wma handle 1429 * @get_rcpi_param: rcpi params 1430 * 1431 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1432 */ 1433 QDF_STATUS wmi_unified_send_request_get_rcpi_cmd(void *wmi_hdl, 1434 struct rcpi_req *get_rcpi_param); 1435 1436 /** 1437 * wmi_extract_rcpi_response_event - api to extract RCPI event params 1438 * @wmi_handle: wma handle 1439 * @evt_buf: pointer to event buffer 1440 * @res: pointer to hold rcpi response from firmware 1441 * 1442 * Return: QDF_STATUS_SUCCESS for successful event parse 1443 * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE 1444 */ 1445 QDF_STATUS wmi_extract_rcpi_response_event(void *wmi_hdl, void *evt_buf, 1446 struct rcpi_res *res); 1447 1448 #ifdef WMI_INTERFACE_EVENT_LOGGING 1449 void wmi_print_cmd_log(wmi_unified_t wmi, uint32_t count, 1450 qdf_abstract_print *print, void *print_priv); 1451 1452 void wmi_print_cmd_tx_cmp_log(wmi_unified_t wmi, uint32_t count, 1453 qdf_abstract_print *print, void *print_priv); 1454 1455 void wmi_print_mgmt_cmd_log(wmi_unified_t wmi, uint32_t count, 1456 qdf_abstract_print *print, void *print_priv); 1457 1458 void wmi_print_mgmt_cmd_tx_cmp_log(wmi_unified_t wmi, uint32_t count, 1459 qdf_abstract_print *print, void *print_priv); 1460 1461 void wmi_print_event_log(wmi_unified_t wmi, uint32_t count, 1462 qdf_abstract_print *print, void *print_priv); 1463 1464 void wmi_print_rx_event_log(wmi_unified_t wmi, uint32_t count, 1465 qdf_abstract_print *print, void *print_priv); 1466 1467 void wmi_print_mgmt_event_log(wmi_unified_t wmi, uint32_t count, 1468 qdf_abstract_print *print, void *print_priv); 1469 1470 #endif /* WMI_INTERFACE_EVENT_LOGGING */ 1471 1472 /** 1473 * wmi_unified_send_wds_entry_list_cmd() - WMI function to get list of 1474 * wds entries from FW 1475 * @wmi_hdl: wmi handle 1476 * 1477 * Send WMI_PDEV_WDS_ENTRY_LIST_CMDID parameters to fw. 1478 * 1479 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 1480 */ 1481 1482 QDF_STATUS wmi_unified_send_dump_wds_table_cmd(void *wmi_hdl); 1483 1484 /** 1485 * wmi_extract_wds_entry - api to extract wds entry 1486 * @wmi_hdl: wmi handle 1487 * @evt_buf: pointer to event buffer 1488 * @wds_entry: wds entry 1489 * @idx: index to point wds entry in event buffer 1490 * 1491 * Return: QDF_STATUS_SUCCESS for successful event parse 1492 * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE 1493 */ 1494 1495 QDF_STATUS wmi_extract_wds_entry(void *wmi_hdl, uint8_t *evt_buf, 1496 struct wdsentry *wds_entry, u_int32_t idx); 1497 1498 /** 1499 * wmi_unified_send_obss_detection_cfg_cmd() - WMI function to send obss 1500 * detection configuration to FW. 1501 * @wmi_hdl: wmi handle 1502 * @cfg: obss detection configuration 1503 * 1504 * Send WMI_SAP_OBSS_DETECTION_CFG_CMDID parameters to fw. 1505 * 1506 * Return: QDF_STATUS 1507 */ 1508 1509 QDF_STATUS wmi_unified_send_obss_detection_cfg_cmd(void *wmi_hdl, 1510 struct wmi_obss_detection_cfg_param *cfg); 1511 1512 /** 1513 * wmi_unified_extract_obss_detection_info() - WMI function to extract obss 1514 * detection info from FW. 1515 * @wmi_hdl: wmi handle 1516 * @data: event data from firmware 1517 * @info: Pointer to hold obss detection info 1518 * 1519 * This function is used to extract obss info from firmware. 1520 * 1521 * Return: QDF_STATUS 1522 */ 1523 1524 QDF_STATUS wmi_unified_extract_obss_detection_info(void *wmi_hdl, 1525 uint8_t *data, 1526 struct wmi_obss_detect_info 1527 *info); 1528 1529 #ifdef WLAN_SUPPORT_GREEN_AP 1530 QDF_STATUS wmi_extract_green_ap_egap_status_info( 1531 void *wmi_hdl, uint8_t *evt_buf, 1532 struct wlan_green_ap_egap_status_info *egap_status_info_params); 1533 #endif 1534 1535 /** 1536 * wmi_unified_send_roam_scan_stats_cmd() - Wrapper to request roam scan stats 1537 * @wmi_hdl: wmi handle 1538 * @params: request params 1539 * 1540 * This function is used to send the roam scan stats request command to 1541 * firmware. 1542 * 1543 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1544 */ 1545 QDF_STATUS 1546 wmi_unified_send_roam_scan_stats_cmd(void *wmi_hdl, 1547 struct wmi_roam_scan_stats_req *params); 1548 1549 /** 1550 * wmi_extract_roam_scan_stats_res_evt() - API to extract roam scan stats res 1551 * @wmi: wmi handle 1552 * @evt_buf: pointer to the event buffer 1553 * @vdev_id: output pointer to hold vdev id 1554 * @res_param: output pointer to hold extracted memory 1555 * 1556 * Return: QDF_STATUS 1557 */ 1558 QDF_STATUS 1559 wmi_extract_roam_scan_stats_res_evt(wmi_unified_t wmi, void *evt_buf, 1560 uint32_t *vdev_id, 1561 struct wmi_roam_scan_stats_res **res_param); 1562 1563 /** 1564 * wmi_extract_offload_bcn_tx_status_evt() - API to extract bcn tx status event 1565 * @wmi: wmi handle 1566 * @evt_buf: pointer to the event buffer 1567 * @vdev_id: output pointer to hold vdev id 1568 * @tx_status: output pointer to hold bcn tx status 1569 * 1570 * Return: QDF_STATUS 1571 */ 1572 QDF_STATUS 1573 wmi_extract_offload_bcn_tx_status_evt(void *wmi_hdl, void *evt_buf, 1574 uint32_t *vdev_id, uint32_t *tx_status); 1575 1576 /* wmi_get_ch_width_from_phy_mode() - convert phy mode to channel width 1577 * @wmi_hdl: wmi handle 1578 * @phymode: phy mode 1579 * 1580 * Return: wmi channel width 1581 */ 1582 wmi_host_channel_width wmi_get_ch_width_from_phy_mode(void *wmi_hdl, 1583 WMI_HOST_WLAN_PHY_MODE phymode); 1584 1585 #ifdef QCA_SUPPORT_CP_STATS 1586 /** 1587 * wmi_extract_cca_stats() - api to extract congestion stats from event buffer 1588 * @wmi_handle: wma handle 1589 * @evt_buf: event buffer 1590 * @datalen: length of buffer 1591 * @stats: buffer to populated after stats extraction 1592 * 1593 * Return: status of operation 1594 */ 1595 QDF_STATUS wmi_extract_cca_stats(wmi_unified_t wmi_handle, void *evt_buf, 1596 struct wmi_host_congestion_stats *stats); 1597 #endif /* QCA_SUPPORT_CP_STATS */ 1598 1599 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) 1600 /** 1601 * wmi_unified_dfs_send_avg_params_cmd() - send average radar parameters cmd. 1602 * @wmi_hdl: wmi handle 1603 * @params: radar found params 1604 * 1605 * This function passes the average radar parameters to fw 1606 * 1607 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1608 */ 1609 QDF_STATUS 1610 wmi_unified_dfs_send_avg_params_cmd(void *wmi_hdl, 1611 struct dfs_radar_found_params *params); 1612 1613 /** 1614 * wmi_extract_dfs_status_from_fw() - extract host dfs status from fw. 1615 * @wmi_hdl: wmi handle 1616 * @evt_buf: pointer to event buffer 1617 * @dfs_status_check: pointer to the host dfs status 1618 * 1619 * This function extracts the result of host dfs from fw 1620 * 1621 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1622 */ 1623 QDF_STATUS wmi_extract_dfs_status_from_fw(void *wmi_hdl, void *evt_buf, 1624 uint32_t *dfs_status_check); 1625 #endif 1626 #ifdef OL_ATH_SMART_LOGGING 1627 /** 1628 * wmi_unified_send_smart_logging_enable_cmd() - send smart logging enable cmd 1629 * @wmi_hdl: wmi handle 1630 * @params: enable/disable 1631 * 1632 * This function enables/disable the smart logging feature 1633 * 1634 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1635 */ 1636 QDF_STATUS wmi_unified_send_smart_logging_enable_cmd(void *wmi_hdl, 1637 uint32_t param); 1638 1639 /** 1640 * wmi_unified_send_smart_logging_fatal_cmd() - send smart logging fatal cmd 1641 * @wmi_hdl: wmi handle 1642 * @param: Fatal event 1643 * 1644 * This function sends the smart log fatal events to the FW 1645 * 1646 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1647 */ 1648 QDF_STATUS wmi_unified_send_smart_logging_fatal_cmd 1649 (void *wmi_hdl, 1650 struct wmi_debug_fatal_events *param); 1651 1652 /** 1653 * wmi_extract_smartlog_ev() - extract smartlog event info from event 1654 * @wmi_handle: wmi handle 1655 * @param evt_buf: pointer to event buffer 1656 * @param ev: Pointer to hold fatal events 1657 * 1658 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1659 */ 1660 QDF_STATUS wmi_extract_smartlog_ev 1661 (void *wmi_hdl, void *evt_buf, 1662 struct wmi_debug_fatal_events *ev); 1663 1664 #endif /* OL_ATH_SMART_LOGGING */ 1665 1666 /** 1667 * wmi_process_fw_event_worker_thread_ctx() - process in worker thread context 1668 * @wmi_handle: handle to wmi 1669 * @evt_buf: pointer to event buffer 1670 * 1671 * Event process by below function will be in worker thread context. 1672 * Use this method for events which are not critical and not 1673 * handled in protocol stack. 1674 * 1675 * Return: none 1676 */ 1677 void wmi_process_fw_event_worker_thread_ctx(struct wmi_unified *wmi_handle, 1678 void *evt_buf); 1679 1680 /** 1681 * wmi_extract_ctl_failsafe_check_ev_param() - extract ctl failsafe 1682 * status from event 1683 * @wmi_handle: wmi handle 1684 * @param evt_buf: pointer to event buffer 1685 * @param ev: Pointer to hold ctl status 1686 * 1687 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1688 */ 1689 QDF_STATUS 1690 wmi_extract_ctl_failsafe_check_ev_param(void *wmi_hdl, 1691 void *evt_buf, 1692 struct wmi_host_pdev_ctl_failsafe_event 1693 *param); 1694 1695 #ifdef OBSS_PD 1696 /** 1697 * wmi_unified_send_obss_spatial_reuse_set_cmd() - send obss pd offset 1698 * @wmi_handle: wmi handle 1699 * @oobss_spatial_reuse_param: Pointer to obsspd min max offset 1700 * 1701 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1702 */ 1703 QDF_STATUS wmi_unified_send_obss_spatial_reuse_set_cmd(void *wmi_handle, 1704 struct wmi_host_obss_spatial_reuse_set_param *obss_spatial_reuse_param); 1705 1706 /** 1707 * wmi_unified_send_obss_spatial_reuse_set_def_thresh_cmd() - send def thresh 1708 * @wmi_handle: wmi handle 1709 * @thresh: Pointer to def thresh 1710 * 1711 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1712 */ 1713 QDF_STATUS wmi_unified_send_obss_spatial_reuse_set_def_thresh_cmd(void *wmi_hdl, 1714 struct wmi_host_obss_spatial_reuse_set_def_thresh *thresh); 1715 1716 #endif /* OBSS_PD */ 1717 1718 /** 1719 * wmi_convert_pdev_id_host_to_target() - Convert pdev_id from host to target 1720 * defines. For legacy there is not conversion required. Just return pdev_id as 1721 * it is. 1722 * @wmi_hdl: wmi handle 1723 * @host_pdev_id: host pdev_id to be converted. 1724 * @target_pdev_id: Output target pdev id. 1725 * 1726 * Return: QDF_STATUS 1727 */ 1728 QDF_STATUS wmi_convert_pdev_id_host_to_target(void *wmi_hdl, 1729 uint32_t host_pdev_id, 1730 uint32_t *target_pdev_id); 1731 1732 /** 1733 * wmi_unified_send_bss_color_change_enable_cmd() - WMI function to send bss 1734 * color change enable to FW. 1735 * @wmi_hdl: wmi handle 1736 * @vdev_id: vdev ID 1737 * @enable: enable or disable color change handeling within firmware 1738 * 1739 * Send WMI_BSS_COLOR_CHANGE_ENABLE_CMDID parameters to fw, 1740 * thereby firmware updates bss color when AP announces bss color change. 1741 * 1742 * Return: QDF_STATUS 1743 */ 1744 QDF_STATUS wmi_unified_send_bss_color_change_enable_cmd(void *wmi_hdl, 1745 uint32_t vdev_id, 1746 bool enable); 1747 1748 /** 1749 * wmi_unified_send_obss_color_collision_cfg_cmd() - WMI function to send bss 1750 * color collision detection configuration to FW. 1751 * @wmi_hdl: wmi handle 1752 * @cfg: obss color collision detection configuration 1753 * 1754 * Send WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID parameters to fw. 1755 * 1756 * Return: QDF_STATUS 1757 */ 1758 QDF_STATUS wmi_unified_send_obss_color_collision_cfg_cmd(void *wmi_hdl, 1759 struct wmi_obss_color_collision_cfg_param *cfg); 1760 1761 /** 1762 * wmi_unified_extract_obss_color_collision_info() - WMI function to extract 1763 * obss color collision info from FW. 1764 * @wmi_hdl: wmi handle 1765 * @data: event data from firmware 1766 * @info: Pointer to hold bss color collision info 1767 * 1768 * This function is used to extract bss collision info from firmware. 1769 * 1770 * Return: QDF_STATUS 1771 */ 1772 QDF_STATUS wmi_unified_extract_obss_color_collision_info(void *wmi_hdl, 1773 uint8_t *data, struct wmi_obss_color_collision_info *info); 1774 1775 #ifdef CRYPTO_SET_KEY_CONVERGED 1776 /** 1777 * wlan_crypto_cipher_to_wmi_cipher() - Convert crypto cipher to WMI cipher 1778 * @crypto_cipher: cipher type in crypto format 1779 * 1780 * Return: cipher type in WMI cipher type 1781 */ 1782 uint8_t wlan_crypto_cipher_to_wmi_cipher( 1783 enum wlan_crypto_cipher_type crypto_cipher); 1784 1785 /** 1786 * wlan_crypto_cipher_to_cdp_sec_type() - Convert crypto cipher to CDP type 1787 * @crypto_cipher: cipher type in crypto format 1788 * 1789 * Return: security type in cdp_sec_type data format type 1790 */ 1791 enum cdp_sec_type wlan_crypto_cipher_to_cdp_sec_type( 1792 enum wlan_crypto_cipher_type crypto_cipher); 1793 1794 #endif 1795 1796 /** 1797 * wmi_unified_send_mws_coex_req_cmd() - WMI function to send coex req cmd 1798 * @wmi_hdl: wmi handle 1799 * @vdev_id: Vdev Id 1800 * @cmd_id: Coex cmd for which info is required 1801 * 1802 * Send wmi coex command to fw. 1803 * 1804 * Return: QDF_STATUS 1805 */ 1806 QDF_STATUS wmi_unified_send_mws_coex_req_cmd(struct wmi_unified *wmi_handle, 1807 uint32_t vdev_id, uint32_t cmd_id); 1808 1809 /** 1810 * wmi_unified_send_idle_trigger_monitor() - send idle trigger monitor command 1811 * @wmi_handle: WMI handle 1812 * @val: idle trigger monitor value - 1 for idle monitor on, 0 for idle monitor 1813 * off 1814 * 1815 * Return: QDF_STATUS_SUCCESS if success, else returns proper error code. 1816 */ 1817 QDF_STATUS 1818 wmi_unified_send_idle_trigger_monitor(wmi_unified_t wmi_handle, uint8_t val); 1819 1820 #ifdef WLAN_CFR_ENABLE 1821 /** 1822 * wmi_unified_send_peer_cfr_capture_cmd() - WMI function to start CFR capture 1823 * for a peer 1824 * @wmi_hdl: WMI handle 1825 * @param: configuration params for capture 1826 * 1827 * Return: QDF_STATUS_SUCCESS if success, else returns proper error code. 1828 */ 1829 QDF_STATUS 1830 wmi_unified_send_peer_cfr_capture_cmd(void *wmi_hdl, 1831 struct peer_cfr_params *param); 1832 /** 1833 * wmi_extract_cfr_peer_tx_event_param() - WMI function to extract cfr tx event 1834 * for a peer 1835 * @wmi_hdl: WMI handle 1836 * @evt_buf: Buffer holding event data 1837 * @peer_tx_event: pointer to hold tx event data 1838 * 1839 * Return: QDF_STATUS_SUCCESS if success, else returns proper error code. 1840 */ 1841 QDF_STATUS 1842 wmi_extract_cfr_peer_tx_event_param(void *wmi_hdl, void *evt_buf, 1843 wmi_cfr_peer_tx_event_param *peer_tx_event); 1844 1845 #endif /* WLAN_CFR_ENABLE */ 1846 #endif /* _WMI_UNIFIED_API_H_ */ 1847