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