1 /* 2 * Copyright (c) 2013-2018 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_PMO_ENABLE 37 #include "wmi_unified_pmo_api.h" 38 #endif 39 #ifdef CONVERGED_P2P_ENABLE 40 #include "wlan_p2p_public_struct.h" 41 #endif 42 #include "wlan_scan_public_structs.h" 43 #ifdef WLAN_FEATURE_DISA 44 #include "wlan_disa_public_struct.h" 45 #endif 46 47 #ifdef WLAN_FEATURE_NAN_CONVERGENCE 48 #include "nan_public_structs.h" 49 #endif 50 #ifdef WLAN_SUPPORT_GREEN_AP 51 #include "wlan_green_ap_api.h" 52 #endif 53 #ifdef WLAN_FEATURE_DSRC 54 #include "wlan_ocb_public_structs.h" 55 #endif 56 #ifdef WLAN_SUPPORT_TWT 57 #include "wmi_unified_twt_param.h" 58 #include "wmi_unified_twt_api.h" 59 #endif 60 61 #ifdef IPA_OFFLOAD 62 #include "wlan_ipa_public_struct.h" 63 #endif 64 65 typedef qdf_nbuf_t wmi_buf_t; 66 #define wmi_buf_data(_buf) qdf_nbuf_data(_buf) 67 68 #define WMI_LOGD(args ...) \ 69 QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_DEBUG, ## args) 70 #define WMI_LOGI(args ...) \ 71 QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_INFO, ## args) 72 #define WMI_LOGW(args ...) \ 73 QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_WARN, ## args) 74 #define WMI_LOGE(args ...) \ 75 QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_ERROR, ## args) 76 #define WMI_LOGP(args ...) \ 77 QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_FATAL, ## args) 78 79 80 81 #define PHYERROR_MAX_BUFFER_LENGTH 0x7F000000 82 83 struct wmi_soc; 84 struct policy_mgr_dual_mac_config; 85 /** 86 * struct wmi_ops - service callbacks to upper layer 87 * @service_ready_cbk: service ready callback 88 * @service_ready_ext_cbk: service ready ext callback 89 * @ready_cbk: ready calback 90 * @wma_process_fw_event_handler_cbk: generic event handler callback 91 */ 92 struct wmi_rx_ops { 93 94 int (*wma_process_fw_event_handler_cbk)(void *ctx, 95 void *ev, uint8_t rx_ctx); 96 }; 97 98 /** 99 * enum wmi_target_type - type of supported wmi command 100 * @WMI_TLV_TARGET: tlv based target 101 * @WMI_NON_TLV_TARGET: non-tlv based target 102 * 103 */ 104 enum wmi_target_type { 105 WMI_TLV_TARGET, 106 WMI_NON_TLV_TARGET, 107 WMI_MAX_TARGET_TYPE 108 }; 109 110 /** 111 * enum wmi_rx_exec_ctx - wmi rx execution context 112 * @WMI_RX_WORK_CTX: work queue context execution provided by WMI layer 113 * @WMI_RX_UMAC_CTX: execution context provided by umac layer 114 * 115 */ 116 enum wmi_rx_exec_ctx { 117 WMI_RX_WORK_CTX, 118 WMI_RX_UMAC_CTX 119 }; 120 121 /** 122 * struct wmi_unified_attach_params - wmi init parameters 123 * @param osdev : NIC device 124 * @param target_type : type of supported wmi command 125 * @param use_cookie : flag to indicate cookie based allocation 126 * @param ops : handle to wmi ops 127 * @psoc : objmgr psoc 128 * @max_commands : max commands 129 */ 130 struct wmi_unified_attach_params { 131 osdev_t osdev; 132 enum wmi_target_type target_type; 133 bool use_cookie; 134 struct wmi_rx_ops *rx_ops; 135 struct wlan_objmgr_psoc *psoc; 136 uint16_t max_commands; 137 }; 138 139 /** 140 * attach for unified WMI 141 * 142 * @param scn_handle : handle to SCN. 143 * @param params : attach params for WMI 144 * 145 */ 146 void *wmi_unified_attach(void *scn_handle, 147 struct wmi_unified_attach_params *params); 148 149 150 151 /** 152 * wmi_mgmt_cmd_record() - Wrapper function for mgmt command logging macro 153 * 154 * @wmi_handle: wmi handle 155 * @cmd: mgmt command 156 * @header: pointer to 802.11 header 157 * @vdev_id: vdev id 158 * @chanfreq: channel frequency 159 * 160 * Return: none 161 */ 162 void wmi_mgmt_cmd_record(wmi_unified_t wmi_handle, uint32_t cmd, 163 void *header, uint32_t vdev_id, uint32_t chanfreq); 164 165 /** 166 * detach for unified WMI 167 * 168 * @param wmi_handle : handle to WMI. 169 * @return void. 170 */ 171 void wmi_unified_detach(struct wmi_unified *wmi_handle); 172 173 /** 174 * API to sync time between host and firmware 175 * 176 * @param wmi_handle : handle to WMI. 177 * @return void. 178 */ 179 void wmi_send_time_stamp_sync_cmd_tlv(void *wmi_hdl); 180 181 void 182 wmi_unified_remove_work(struct wmi_unified *wmi_handle); 183 184 /** 185 * generic function to allocate WMI buffer 186 * 187 * @param wmi_handle : handle to WMI. 188 * @param len : length of the buffer 189 * @return wmi_buf_t. 190 */ 191 #ifdef NBUF_MEMORY_DEBUG 192 #define wmi_buf_alloc(h, l) wmi_buf_alloc_debug(h, l, __FILE__, __LINE__) 193 wmi_buf_t 194 wmi_buf_alloc_debug(wmi_unified_t wmi_handle, uint16_t len, 195 uint8_t *file_name, uint32_t line_num); 196 #else 197 wmi_buf_t wmi_buf_alloc(wmi_unified_t wmi_handle, uint16_t len); 198 #endif 199 200 /** 201 * generic function frees WMI net buffer 202 * 203 * @param net_buf : Pointer ot net_buf to be freed 204 */ 205 void wmi_buf_free(wmi_buf_t net_buf); 206 207 /** 208 * generic function to send unified WMI command 209 * 210 * @param wmi_handle : handle to WMI. 211 * @param buf : wmi command buffer 212 * @param buflen : wmi command buffer length 213 * @param cmd_id : WMI cmd id 214 * @return 0 on success and -ve on failure. 215 */ 216 QDF_STATUS 217 wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf, uint32_t buflen, 218 uint32_t cmd_id); 219 220 /** 221 * wmi_unified_register_event() - WMI event handler 222 * registration function for converged components 223 * 224 * @wmi_handle: handle to WMI. 225 * @event_id: WMI event ID 226 * @handler_func: Event handler call back function 227 * 228 * @return 0 on success and -ve on failure. 229 */ 230 int 231 wmi_unified_register_event(wmi_unified_t wmi_handle, 232 uint32_t event_id, 233 wmi_unified_event_handler handler_func); 234 235 /** 236 * wmi_unified_register_event_handler() - WMI event handler 237 * registration function 238 * 239 * @wmi_handle: handle to WMI. 240 * @event_id: WMI event ID 241 * @handler_func: Event handler call back function 242 * @rx_ctx: rx event processing context 243 * 244 * @return 0 on success and -ve on failure. 245 */ 246 int 247 wmi_unified_register_event_handler(wmi_unified_t wmi_handle, 248 wmi_conv_event_id event_id, 249 wmi_unified_event_handler handler_func, 250 uint8_t rx_ctx); 251 252 /** 253 * WMI event handler unregister function for converged componets 254 * 255 * @param wmi_handle : handle to WMI. 256 * @param event_id : WMI event ID 257 * @return 0 on success and -ve on failure. 258 */ 259 int 260 wmi_unified_unregister_event(wmi_unified_t wmi_handle, 261 uint32_t event_id); 262 263 /** 264 * WMI event handler unregister function 265 * 266 * @param wmi_handle : handle to WMI. 267 * @param event_id : WMI event ID 268 * @return 0 on success and -ve on failure. 269 */ 270 int 271 wmi_unified_unregister_event_handler(wmi_unified_t wmi_handle, 272 wmi_conv_event_id event_id); 273 274 /** 275 * request wmi to connet its htc service. 276 * @param wmi_handle : handle to WMI. 277 * @param htc_handle : handle to HTC. 278 * @return void 279 */ 280 QDF_STATUS 281 wmi_unified_connect_htc_service(struct wmi_unified *wmi_handle, 282 void *htc_handle); 283 284 /* 285 * WMI API to verify the host has enough credits to suspend 286 * @param wmi_handle : handle to WMI. 287 */ 288 289 int wmi_is_suspend_ready(wmi_unified_t wmi_handle); 290 291 /** 292 * WMI API to get updated host_credits 293 * @param wmi_handle : handle to WMI. 294 */ 295 296 int wmi_get_host_credits(wmi_unified_t wmi_handle); 297 298 /** 299 * WMI API to get WMI Pending Commands in the HTC queue 300 * @param wmi_handle : handle to WMI. 301 */ 302 303 int wmi_get_pending_cmds(wmi_unified_t wmi_handle); 304 305 /** 306 * WMI API to set target suspend state 307 * @param wmi_handle : handle to WMI. 308 * @param val : suspend state boolean 309 */ 310 void wmi_set_target_suspend(wmi_unified_t wmi_handle, bool val); 311 312 /** 313 * WMI API to set bus suspend state 314 * @param wmi_handle: handle to WMI. 315 * @param val: suspend state boolean 316 */ 317 void wmi_set_is_wow_bus_suspended(wmi_unified_t wmi_handle, A_BOOL val); 318 319 /** 320 * WMI API to set crash injection state 321 * @param wmi_handle: handle to WMI. 322 * @param val: crash injection state boolean 323 */ 324 void wmi_tag_crash_inject(wmi_unified_t wmi_handle, A_BOOL flag); 325 326 /** 327 * WMI API to set target assert 328 * @param wmi_handle: handle to WMI. 329 * @param val: target assert config value. 330 * 331 * Return: none. 332 */ 333 void wmi_set_tgt_assert(wmi_unified_t wmi_handle, bool val); 334 335 /** 336 * generic function to block unified WMI command 337 * @param wmi_handle : handle to WMI. 338 * @return 0 on success and -ve on failure. 339 */ 340 int 341 wmi_stop(wmi_unified_t wmi_handle); 342 343 /** 344 * API to flush all the previous packets associated with the wmi endpoint 345 * 346 * @param wmi_handle : handle to WMI. 347 */ 348 void 349 wmi_flush_endpoint(wmi_unified_t wmi_handle); 350 351 /** 352 * wmi_pdev_id_conversion_enable() - API to enable pdev_id conversion in WMI 353 * By default pdev_id conversion is not done in WMI. 354 * This API can be used enable conversion in WMI. 355 * @param wmi_handle : handle to WMI 356 * Return none 357 */ 358 void wmi_pdev_id_conversion_enable(wmi_unified_t wmi_handle); 359 360 /** 361 * API to handle wmi rx event after UMAC has taken care of execution 362 * context 363 * 364 * @param wmi_handle : handle to WMI. 365 * @param evt_buf : wmi event buffer 366 */ 367 void __wmi_control_rx(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf); 368 #ifdef FEATURE_RUNTIME_PM 369 void 370 wmi_set_runtime_pm_inprogress(wmi_unified_t wmi_handle, bool val); 371 bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle); 372 #else 373 static inline void 374 wmi_set_runtime_pm_inprogress(wmi_unified_t wmi_handle, bool val) 375 { 376 return; 377 } 378 static inline bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle) 379 { 380 return false; 381 } 382 #endif 383 384 void *wmi_unified_get_soc_handle(struct wmi_unified *wmi_handle); 385 386 void *wmi_unified_get_pdev_handle(struct wmi_soc *soc, uint32_t pdev_idx); 387 388 /** 389 * UMAC Callback to process fw event. 390 * @param wmi_handle : handle to WMI. 391 * @param evt_buf : wmi event buffer 392 */ 393 void wmi_process_fw_event(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf); 394 uint16_t wmi_get_max_msg_len(wmi_unified_t wmi_handle); 395 396 397 QDF_STATUS wmi_unified_vdev_create_send(void *wmi_hdl, 398 uint8_t macaddr[IEEE80211_ADDR_LEN], 399 struct vdev_create_params *param); 400 401 QDF_STATUS wmi_unified_vdev_delete_send(void *wmi_hdl, 402 uint8_t if_id); 403 404 QDF_STATUS wmi_unified_vdev_restart_send(void *wmi_hdl, 405 uint8_t macaddr[IEEE80211_ADDR_LEN], 406 struct vdev_start_params *param); 407 408 QDF_STATUS wmi_unified_vdev_stop_send(void *wmi_hdl, 409 uint8_t vdev_id); 410 411 QDF_STATUS wmi_unified_vdev_up_send(void *wmi_hdl, 412 uint8_t bssid[IEEE80211_ADDR_LEN], 413 struct vdev_up_params *params); 414 415 QDF_STATUS wmi_unified_vdev_down_send(void *wmi_hdl, 416 uint8_t vdev_id); 417 418 QDF_STATUS wmi_unified_vdev_start_send(void *wmi_hdl, 419 struct vdev_start_params *req); 420 /** 421 * wmi_unified_vdev_set_nac_rssi_send() - send NAC_RSSI command to fw 422 * @param wmi_handle : handle to WMI 423 * @param req : pointer to hold nac rssi request data 424 * 425 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 426 */ 427 QDF_STATUS wmi_unified_vdev_set_nac_rssi_send(void *wmi_hdl, 428 struct vdev_scan_nac_rssi_params *req); 429 430 QDF_STATUS wmi_unified_hidden_ssid_vdev_restart_send(void *wmi_hdl, 431 struct hidden_ssid_vdev_restart_params *restart_params); 432 433 QDF_STATUS wmi_unified_vdev_set_param_send(void *wmi_hdl, 434 struct vdev_set_params *param); 435 436 QDF_STATUS wmi_unified_peer_delete_send(void *wmi_hdl, 437 uint8_t 438 peer_addr[IEEE80211_ADDR_LEN], 439 uint8_t vdev_id); 440 441 QDF_STATUS wmi_unified_peer_flush_tids_send(void *wmi_hdl, 442 uint8_t peer_addr[IEEE80211_ADDR_LEN], 443 struct peer_flush_params *param); 444 445 QDF_STATUS wmi_set_peer_param_send(void *wmi_hdl, 446 uint8_t peer_addr[IEEE80211_ADDR_LEN], 447 struct peer_set_params *param); 448 449 QDF_STATUS wmi_unified_peer_create_send(void *wmi_hdl, 450 struct peer_create_params *param); 451 452 QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl, 453 uint8_t macaddr[IEEE80211_ADDR_LEN], 454 struct stats_request_params *param); 455 456 QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl, 457 uint32_t value, uint8_t pdev_id); 458 459 #ifdef FEATURE_WLAN_D0WOW 460 QDF_STATUS wmi_unified_d0wow_enable_send(void *wmi_hdl, 461 uint8_t mac_id); 462 QDF_STATUS wmi_unified_d0wow_disable_send(void *wmi_hdl, 463 uint8_t mac_id); 464 #endif 465 466 QDF_STATUS wmi_unified_wow_enable_send(void *wmi_hdl, 467 struct wow_cmd_params *param, 468 uint8_t mac_id); 469 470 QDF_STATUS wmi_unified_wow_wakeup_send(void *wmi_hdl); 471 472 QDF_STATUS wmi_unified_wow_add_wakeup_event_send(void *wmi_hdl, 473 struct wow_add_wakeup_params *param); 474 475 QDF_STATUS wmi_unified_wow_add_wakeup_pattern_send(void *wmi_hdl, 476 struct wow_add_wakeup_pattern_params *param); 477 478 QDF_STATUS wmi_unified_wow_remove_wakeup_pattern_send(void *wmi_hdl, 479 struct wow_remove_wakeup_pattern_params *param); 480 481 #ifndef CONFIG_MCL 482 QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl, 483 WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT, uint8_t mac_id); 484 #else 485 QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl, 486 uint8_t macaddr[IEEE80211_ADDR_LEN], 487 struct packet_enable_params *param); 488 #endif 489 490 QDF_STATUS wmi_unified_packet_log_disable_send(void *wmi_hdl, uint8_t mac_id); 491 492 QDF_STATUS wmi_unified_suspend_send(void *wmi_hdl, 493 struct suspend_params *param, 494 uint8_t mac_id); 495 496 QDF_STATUS wmi_unified_resume_send(void *wmi_hdl, 497 uint8_t mac_id); 498 499 QDF_STATUS 500 wmi_unified_pdev_param_send(void *wmi_hdl, 501 struct pdev_params *param, 502 uint8_t mac_id); 503 504 QDF_STATUS wmi_unified_beacon_tmpl_send_cmd(void *wmi_hdl, 505 struct beacon_tmpl_params *param); 506 507 508 QDF_STATUS wmi_unified_beacon_send_cmd(void *wmi_hdl, 509 struct beacon_params *param); 510 511 QDF_STATUS wmi_unified_peer_assoc_send(void *wmi_hdl, 512 struct peer_assoc_params *param); 513 514 QDF_STATUS wmi_unified_sta_ps_cmd_send(void *wmi_hdl, 515 struct sta_ps_params *param); 516 517 QDF_STATUS wmi_unified_ap_ps_cmd_send(void *wmi_hdl, 518 uint8_t macaddr[IEEE80211_ADDR_LEN], 519 struct ap_ps_params *param); 520 521 QDF_STATUS wmi_unified_scan_start_cmd_send(void *wmi_hdl, 522 struct scan_req_params *param); 523 524 QDF_STATUS wmi_unified_scan_stop_cmd_send(void *wmi_hdl, 525 struct scan_cancel_param *param); 526 527 QDF_STATUS wmi_unified_scan_chan_list_cmd_send(void *wmi_hdl, 528 struct scan_chan_list_params *param); 529 530 531 QDF_STATUS wmi_crash_inject(void *wmi_hdl, 532 struct crash_inject *param); 533 534 QDF_STATUS wmi_unified_pdev_utf_cmd_send(void *wmi_hdl, 535 struct pdev_utf_params *param, 536 uint8_t mac_id); 537 538 QDF_STATUS wmi_unified_dbglog_cmd_send(void *wmi_hdl, 539 struct dbglog_params *param); 540 541 QDF_STATUS wmi_mgmt_unified_cmd_send(void *wmi_hdl, 542 struct wmi_mgmt_params *param); 543 544 QDF_STATUS wmi_offchan_data_tx_cmd_send(void *wmi_hdl, 545 struct wmi_offchan_data_tx_params *param); 546 547 QDF_STATUS wmi_unified_modem_power_state(void *wmi_hdl, 548 uint32_t param_value); 549 550 QDF_STATUS wmi_unified_set_sta_ps_mode(void *wmi_hdl, 551 uint32_t vdev_id, uint8_t val); 552 QDF_STATUS 553 wmi_unified_set_sta_uapsd_auto_trig_cmd(void *wmi_hdl, 554 struct sta_uapsd_trig_params *param); 555 556 QDF_STATUS wmi_unified_get_temperature(void *wmi_hdl); 557 558 QDF_STATUS wmi_unified_set_p2pgo_oppps_req(void *wmi_hdl, 559 struct p2p_ps_params *oppps); 560 561 QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(void *wmi_hdl, 562 struct p2p_ps_params *noa); 563 564 #ifdef CONVERGED_P2P_ENABLE 565 QDF_STATUS wmi_unified_p2p_lo_start_cmd(void *wmi_hdl, 566 struct p2p_lo_start *param); 567 568 QDF_STATUS wmi_unified_p2p_lo_stop_cmd(void *wmi_hdl, uint8_t vdev_id); 569 #endif 570 571 QDF_STATUS wmi_unified_set_smps_params(void *wmi_hdl, uint8_t vdev_id, 572 int value); 573 574 QDF_STATUS wmi_unified_set_mimops(void *wmi_hdl, uint8_t vdev_id, int value); 575 576 #ifdef WLAN_FEATURE_DSRC 577 /** 578 * wmi_unified_ocb_start_timing_advert() - start sending the timing 579 * advertisement frames on a channel 580 * @wmi_handle: pointer to the wmi handle 581 * @timing_advert: pointer to the timing advertisement struct 582 * 583 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 584 */ 585 QDF_STATUS wmi_unified_ocb_start_timing_advert(struct wmi_unified *wmi_handle, 586 struct ocb_timing_advert_param *timing_advert); 587 588 /** 589 * wmi_unified_ocb_stop_timing_advert() - stop sending the timing 590 * advertisement frames on a channel 591 * @wmi_handle: pointer to the wmi handle 592 * @timing_advert: pointer to the timing advertisement struct 593 * 594 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 595 */ 596 QDF_STATUS wmi_unified_ocb_stop_timing_advert(struct wmi_unified *wmi_handle, 597 struct ocb_timing_advert_param *timing_advert); 598 599 /** 600 * wmi_unified_ocb_set_config() - send the OCB config to the FW 601 * @wmi_handle: pointer to the wmi handle 602 * @config: the OCB configuration 603 * 604 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures 605 */ 606 QDF_STATUS wmi_unified_ocb_set_config(struct wmi_unified *wmi_handle, 607 struct ocb_config *config); 608 609 /** 610 * wmi_unified_ocb_get_tsf_timer() - get ocb tsf timer val 611 * @wmi_handle: pointer to the wmi handle 612 * @req: request for tsf timer 613 * 614 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 615 */ 616 QDF_STATUS wmi_unified_ocb_get_tsf_timer(struct wmi_unified *wmi_handle, 617 struct ocb_get_tsf_timer_param *req); 618 619 /** 620 * wmi_unified_ocb_set_utc_time_cmd() - get ocb tsf timer val 621 * @wmi_handle: pointer to the wmi handle 622 * @vdev_id: vdev id 623 * 624 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 625 */ 626 QDF_STATUS wmi_unified_ocb_set_utc_time_cmd(struct wmi_unified *wmi_handle, 627 struct ocb_utc_param *utc); 628 629 /** 630 * wmi_unified_dcc_get_stats_cmd() - get the DCC channel stats 631 * @wmi_handle: pointer to the wmi handle 632 * @get_stats_param: pointer to the dcc stats 633 * 634 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 635 */ 636 QDF_STATUS wmi_unified_dcc_get_stats_cmd(struct wmi_unified *wmi_handle, 637 struct ocb_dcc_get_stats_param *get_stats_param); 638 639 /** 640 * wmi_unified_dcc_clear_stats() - command to clear the DCC stats 641 * @wmi_handle: pointer to the wmi handle 642 * @clear_stats_param: parameters to the command 643 * 644 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 645 */ 646 QDF_STATUS wmi_unified_dcc_clear_stats(struct wmi_unified *wmi_handle, 647 struct ocb_dcc_clear_stats_param *clear_stats_param); 648 649 /** 650 * wmi_unified_dcc_update_ndl() - command to update the NDL data 651 * @wmi_handle: pointer to the wmi handle 652 * @update_ndl_param: pointer to the request parameters 653 * 654 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures 655 */ 656 QDF_STATUS wmi_unified_dcc_update_ndl(struct wmi_unified *wmi_handle, 657 struct ocb_dcc_update_ndl_param *update_ndl_param); 658 659 /** 660 * wmi_extract_ocb_set_channel_config_resp() - extract status from wmi event 661 * @wmi_handle: wmi handle 662 * @evt_buf: pointer to event buffer 663 * @status: status buffer 664 * 665 * Return: QDF_STATUS_SUCCESS on success 666 */ 667 QDF_STATUS 668 wmi_extract_ocb_set_channel_config_resp(struct wmi_unified *wmi_handle, 669 void *evt_buf, 670 uint32_t *status); 671 672 /** 673 * wmi_extract_ocb_tsf_timer() - extract tsf timer from wmi event 674 * @wmi_handle: wmi handle 675 * @evt_buf: pointer to event buffer 676 * @resp: tsf timer 677 * 678 * Return: QDF_STATUS_SUCCESS on success 679 */ 680 QDF_STATUS wmi_extract_ocb_tsf_timer(struct wmi_unified *wmi_handle, 681 void *evt_buf, 682 struct ocb_get_tsf_timer_response *resp); 683 684 /** 685 * wmi_extract_dcc_update_ndl_resp() - extract NDL update from wmi event 686 * @wmi_handle: wmi handle 687 * @evt_buf: pointer to event buffer 688 * @resp: ndl update status 689 * 690 * Return: QDF_STATUS_SUCCESS on success 691 */ 692 QDF_STATUS wmi_extract_dcc_update_ndl_resp(struct wmi_unified *wmi_handle, 693 void *evt_buf, struct ocb_dcc_update_ndl_response *resp); 694 695 /** 696 * wmi_extract_dcc_stats() - extract DCC stats from wmi event 697 * @wmi_handle: wmi handle 698 * @evt_buf: pointer to event buffer 699 * @resp: DCC stats 700 * 701 * Since length of the response is variable, response buffer will be allocated. 702 * The caller must free the response buffer. 703 * 704 * Return: QDF_STATUS_SUCCESS on success 705 */ 706 QDF_STATUS wmi_extract_dcc_stats(struct wmi_unified *wmi_handle, 707 void *evt_buf, 708 struct ocb_dcc_get_stats_response **response); 709 #endif 710 711 QDF_STATUS wmi_unified_lro_config_cmd(void *wmi_hdl, 712 struct wmi_lro_config_cmd_t *wmi_lro_cmd); 713 714 QDF_STATUS wmi_unified_set_thermal_mgmt_cmd(void *wmi_hdl, 715 struct thermal_cmd_params *thermal_info); 716 717 QDF_STATUS wmi_unified_peer_rate_report_cmd(void *wmi_hdl, 718 struct wmi_peer_rate_report_params *rate_report_params); 719 720 QDF_STATUS wmi_unified_set_mcc_channel_time_quota_cmd 721 (void *wmi_hdl, 722 uint32_t adapter_1_chan_freq, 723 uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq); 724 725 QDF_STATUS wmi_unified_set_mcc_channel_time_latency_cmd 726 (void *wmi_hdl, 727 uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency); 728 729 QDF_STATUS wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd( 730 void *wmi_hdl, uint32_t mcc_adaptive_scheduler, 731 uint32_t pdev_id); 732 733 #ifdef CONFIG_MCL 734 QDF_STATUS wmi_unified_bcn_buf_ll_cmd(void *wmi_hdl, 735 wmi_bcn_send_from_host_cmd_fixed_param *param); 736 #endif 737 738 QDF_STATUS wmi_unified_set_sta_sa_query_param_cmd(void *wmi_hdl, 739 uint8_t vdev_id, uint32_t max_retries, 740 uint32_t retry_interval); 741 742 743 QDF_STATUS wmi_unified_set_sta_keep_alive_cmd(void *wmi_hdl, 744 struct sta_params *params); 745 746 QDF_STATUS wmi_unified_vdev_set_gtx_cfg_cmd(void *wmi_hdl, uint32_t if_id, 747 struct wmi_gtx_config *gtx_info); 748 749 QDF_STATUS wmi_unified_process_update_edca_param(void *wmi_hdl, 750 uint8_t vdev_id, bool mu_edca_param, 751 struct wmi_host_wme_vparams wmm_vparams[WMI_MAX_NUM_AC]); 752 753 QDF_STATUS wmi_unified_probe_rsp_tmpl_send_cmd(void *wmi_hdl, 754 uint8_t vdev_id, 755 struct wmi_probe_resp_params *probe_rsp_info); 756 757 QDF_STATUS wmi_unified_setup_install_key_cmd(void *wmi_hdl, 758 struct set_key_params *key_params); 759 760 #ifdef WLAN_FEATURE_DISA 761 /** 762 * wmi_unified_encrypt_decrypt_send_cmd() - send encryptdecrypt cmd to fw 763 * @wmi_hdl: wmi handle 764 * @params: encrypt/decrypt params 765 * 766 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 767 */ 768 QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl, 769 struct disa_encrypt_decrypt_req_params *params); 770 771 /** 772 * wmi_extract_encrypt_decrypt_resp_params() - 773 * extract encrypt decrypt resp params from event buffer 774 * @wmi_handle: wmi handle 775 * @evt_buf: pointer to event buffer 776 * @resp: encrypt decrypt resp params 777 * 778 * Return: QDF_STATUS_SUCCESS for success or error code 779 */ 780 QDF_STATUS wmi_extract_encrypt_decrypt_resp_params(void *wmi_hdl, 781 uint8_t *evt_buf, 782 struct disa_encrypt_decrypt_resp_params *resp); 783 #endif 784 785 QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(void *wmi_hdl, 786 uint32_t vdev_id, uint8_t *p2p_ie); 787 788 789 QDF_STATUS wmi_unified_set_gateway_params_cmd(void *wmi_hdl, 790 struct gateway_update_req_param *req); 791 792 QDF_STATUS wmi_unified_set_rssi_monitoring_cmd(void *wmi_hdl, 793 struct rssi_monitor_param *req); 794 795 QDF_STATUS wmi_unified_scan_probe_setoui_cmd(void *wmi_hdl, 796 struct scan_mac_oui *psetoui); 797 798 QDF_STATUS wmi_unified_reset_passpoint_network_list_cmd(void *wmi_hdl, 799 struct wifi_passpoint_req_param *req); 800 801 QDF_STATUS wmi_unified_set_passpoint_network_list_cmd(void *wmi_hdl, 802 struct wifi_passpoint_req_param *req); 803 804 #ifdef CONFIG_MCL 805 QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(void *wmi_hdl, 806 wmi_start_scan_cmd_fixed_param *scan_cmd_fp, 807 struct roam_offload_scan_params *roam_req); 808 #endif 809 810 /** 811 * wmi_unified_roam_mawc_params_cmd() - configure roaming MAWC parameters 812 * @wmi_hdl: wmi handle 813 * @params: Parameters to be configured 814 * 815 * Pass the MAWC(Motion Aided wireless connectivity) related roaming 816 * parameters from the host to the target 817 * 818 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 819 */ 820 QDF_STATUS wmi_unified_roam_mawc_params_cmd(void *wmi_hdl, 821 struct wmi_mawc_roam_params *params); 822 823 QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(void *wmi_hdl, 824 struct roam_offload_scan_rssi_params *roam_req); 825 826 QDF_STATUS wmi_unified_roam_scan_filter_cmd(void *wmi_hdl, 827 struct roam_scan_filter_params *roam_req); 828 829 QDF_STATUS wmi_unified_set_epno_network_list_cmd(void *wmi_hdl, 830 struct wifi_enhanched_pno_params *req); 831 832 #ifdef IPA_OFFLOAD 833 QDF_STATUS wmi_unified_ipa_offload_control_cmd(void *wmi_hdl, 834 struct ipa_uc_offload_control_params *ipa_offload); 835 #endif 836 837 QDF_STATUS wmi_unified_extscan_get_capabilities_cmd(void *wmi_hdl, 838 struct extscan_capabilities_params *pgetcapab); 839 840 QDF_STATUS wmi_unified_extscan_get_cached_results_cmd(void *wmi_hdl, 841 struct extscan_cached_result_params *pcached_results); 842 843 844 QDF_STATUS wmi_unified_extscan_stop_change_monitor_cmd(void *wmi_hdl, 845 struct extscan_capabilities_reset_params *reset_req); 846 847 848 QDF_STATUS wmi_unified_extscan_start_change_monitor_cmd(void *wmi_hdl, 849 struct extscan_set_sig_changereq_params * 850 psigchange); 851 852 QDF_STATUS wmi_unified_extscan_stop_hotlist_monitor_cmd(void *wmi_hdl, 853 struct extscan_bssid_hotlist_reset_params *photlist_reset); 854 855 QDF_STATUS wmi_unified_stop_extscan_cmd(void *wmi_hdl, 856 struct extscan_stop_req_params *pstopcmd); 857 858 QDF_STATUS wmi_unified_start_extscan_cmd(void *wmi_hdl, 859 struct wifi_scan_cmd_req_params *pstart); 860 861 QDF_STATUS wmi_unified_plm_stop_cmd(void *wmi_hdl, 862 const struct plm_req_params *plm); 863 864 QDF_STATUS wmi_unified_plm_start_cmd(void *wmi_hdl, 865 const struct plm_req_params *plm, 866 uint32_t *gchannel_list); 867 868 QDF_STATUS wmi_unified_pno_stop_cmd(void *wmi_hdl, uint8_t vdev_id); 869 870 #ifdef FEATURE_WLAN_SCAN_PNO 871 QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl, 872 struct pno_scan_req_params *pno); 873 #endif 874 875 QDF_STATUS wmi_unified_nlo_mawc_cmd(void *wmi_hdl, 876 struct nlo_mawc_params *params); 877 878 QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg, 879 uint8_t is_add_ts); 880 881 QDF_STATUS wmi_unified_process_ll_stats_clear_cmd 882 (void *wmi_hdl, const struct ll_stats_clear_params *clear_req, 883 uint8_t addr[IEEE80211_ADDR_LEN]); 884 885 QDF_STATUS wmi_unified_process_ll_stats_set_cmd 886 (void *wmi_hdl, const struct ll_stats_set_params *set_req); 887 888 QDF_STATUS wmi_unified_process_ll_stats_get_cmd 889 (void *wmi_hdl, const struct ll_stats_get_params *get_req, 890 uint8_t addr[IEEE80211_ADDR_LEN]); 891 892 /** 893 * wmi_unified_congestion_request_cmd() - send request to fw to get CCA 894 * @wmi_hdl: wma handle 895 * @vdev_id: vdev id 896 * 897 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 898 */ 899 QDF_STATUS wmi_unified_congestion_request_cmd(void *wmi_hdl, 900 uint8_t vdev_id); 901 902 QDF_STATUS wmi_unified_snr_request_cmd(void *wmi_hdl); 903 904 QDF_STATUS wmi_unified_snr_cmd(void *wmi_hdl, uint8_t vdev_id); 905 906 QDF_STATUS wmi_unified_link_status_req_cmd(void *wmi_hdl, 907 struct link_status_params *link_status); 908 909 #ifdef CONFIG_MCL 910 QDF_STATUS wmi_unified_process_dhcp_ind(void *wmi_hdl, 911 wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind); 912 913 QDF_STATUS wmi_unified_get_link_speed_cmd(void *wmi_hdl, 914 wmi_mac_addr peer_macaddr); 915 #endif 916 917 #ifdef WLAN_SUPPORT_GREEN_AP 918 QDF_STATUS wmi_unified_egap_conf_params_cmd(void *wmi_hdl, 919 struct wlan_green_ap_egap_params *egap_params); 920 #endif 921 922 QDF_STATUS wmi_unified_fw_profiling_data_cmd(void *wmi_hdl, 923 uint32_t cmd, uint32_t value1, uint32_t value2); 924 925 QDF_STATUS wmi_unified_wow_timer_pattern_cmd(void *wmi_hdl, uint8_t vdev_id, 926 uint32_t cookie, uint32_t time); 927 928 QDF_STATUS wmi_unified_nat_keepalive_en_cmd(void *wmi_hdl, uint8_t vdev_id); 929 930 /** 931 * wmi_unified_set_latency_config_cmd() 932 * @wmi_handle: wmi handle 933 * @param: WLM parameters 934 * 935 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 936 */ 937 QDF_STATUS wmi_unified_wlm_latency_level_cmd(void *wmi_hdl, 938 struct wlm_latency_level_param *param); 939 940 QDF_STATUS wmi_unified_csa_offload_enable(void *wmi_hdl, uint8_t vdev_id); 941 942 #ifdef WLAN_FEATURE_CIF_CFR 943 /** 944 * wmi_unified_oem_dma_ring_cfg() - configure OEM DMA rings 945 * @wmi_handle: wmi handle 946 * @data_len: len of dma cfg req 947 * @data: dma cfg req 948 * 949 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 950 */ 951 QDF_STATUS wmi_unified_oem_dma_ring_cfg(void *wmi_hdl, 952 wmi_oem_dma_ring_cfg_req_fixed_param *cfg); 953 #endif 954 955 /** 956 * wmi_unified_dbr_ring_cfg: Configure direct buffer rx rings 957 * @wmi_hdl: WMI handle 958 * @cfg: pointer to direct buffer rx config request 959 * 960 * Return: QDF status of operation 961 */ 962 QDF_STATUS wmi_unified_dbr_ring_cfg(void *wmi_hdl, 963 struct direct_buf_rx_cfg_req *cfg); 964 965 QDF_STATUS wmi_unified_start_oem_data_cmd(void *wmi_hdl, 966 uint32_t data_len, 967 uint8_t *data); 968 969 QDF_STATUS wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl, 970 bool dfs_phyerr_filter_offload); 971 972 #ifdef CONFIG_MCL 973 QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl, 974 WMI_PKTLOG_EVENT pktlog_event, 975 uint32_t cmd_id, 976 uint8_t user_triggered); 977 #endif 978 979 QDF_STATUS wmi_unified_wow_delete_pattern_cmd(void *wmi_hdl, uint8_t ptrn_id, 980 uint8_t vdev_id); 981 982 QDF_STATUS wmi_unified_host_wakeup_ind_to_fw_cmd(void *wmi_hdl); 983 QDF_STATUS wmi_unified_del_ts_cmd(void *wmi_hdl, uint8_t vdev_id, 984 uint8_t ac); 985 986 QDF_STATUS wmi_unified_aggr_qos_cmd(void *wmi_hdl, 987 struct aggr_add_ts_param *aggr_qos_rsp_msg); 988 989 QDF_STATUS wmi_unified_add_ts_cmd(void *wmi_hdl, 990 struct add_ts_param *msg); 991 992 QDF_STATUS wmi_unified_process_add_periodic_tx_ptrn_cmd(void *wmi_hdl, 993 struct periodic_tx_pattern * 994 pAddPeriodicTxPtrnParams, 995 uint8_t vdev_id); 996 997 QDF_STATUS wmi_unified_process_del_periodic_tx_ptrn_cmd(void *wmi_hdl, 998 uint8_t vdev_id, 999 uint8_t pattern_id); 1000 1001 QDF_STATUS wmi_unified_stats_ext_req_cmd(void *wmi_hdl, 1002 struct stats_ext_params *preq); 1003 1004 QDF_STATUS wmi_unified_enable_ext_wow_cmd(void *wmi_hdl, 1005 struct ext_wow_params *params); 1006 1007 QDF_STATUS wmi_unified_set_app_type2_params_in_fw_cmd(void *wmi_hdl, 1008 struct app_type2_params *appType2Params); 1009 1010 QDF_STATUS wmi_unified_set_auto_shutdown_timer_cmd(void *wmi_hdl, 1011 uint32_t timer_val); 1012 1013 QDF_STATUS wmi_unified_nan_req_cmd(void *wmi_hdl, 1014 struct nan_req_params *nan_req); 1015 1016 QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(void *wmi_hdl, 1017 struct dhcp_offload_info_params *params); 1018 1019 QDF_STATUS wmi_unified_process_ch_avoid_update_cmd(void *wmi_hdl); 1020 1021 QDF_STATUS wmi_unified_send_regdomain_info_to_fw_cmd(void *wmi_hdl, 1022 uint32_t reg_dmn, uint16_t regdmn2G, 1023 uint16_t regdmn5G, uint8_t ctl2G, 1024 uint8_t ctl5G); 1025 1026 QDF_STATUS wmi_unified_set_tdls_offchan_mode_cmd(void *wmi_hdl, 1027 struct tdls_channel_switch_params *chan_switch_params); 1028 1029 QDF_STATUS wmi_unified_update_fw_tdls_state_cmd(void *wmi_hdl, 1030 void *tdls_param, uint8_t tdls_state); 1031 1032 QDF_STATUS wmi_unified_update_tdls_peer_state_cmd(void *wmi_hdl, 1033 struct tdls_peer_state_params *peerStateParams, 1034 uint32_t *ch_mhz); 1035 1036 QDF_STATUS wmi_unified_process_fw_mem_dump_cmd(void *wmi_hdl, 1037 struct fw_dump_req_param *mem_dump_req); 1038 1039 QDF_STATUS wmi_unified_process_set_ie_info_cmd(void *wmi_hdl, 1040 struct vdev_ie_info_param *ie_info); 1041 1042 QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl, 1043 void *evt_buf); 1044 1045 QDF_STATUS wmi_unified_set_base_macaddr_indicate_cmd(void *wmi_hdl, 1046 uint8_t *custom_addr); 1047 1048 QDF_STATUS wmi_unified_log_supported_evt_cmd(void *wmi_hdl, 1049 uint8_t *event, 1050 uint32_t len); 1051 1052 QDF_STATUS wmi_unified_enable_specific_fw_logs_cmd(void *wmi_hdl, 1053 struct wmi_wifi_start_log *start_log); 1054 1055 QDF_STATUS wmi_unified_flush_logs_to_fw_cmd(void *wmi_hdl); 1056 1057 QDF_STATUS wmi_unified_pdev_set_pcl_cmd(void *wmi_hdl, 1058 struct wmi_pcl_chan_weights *msg); 1059 1060 QDF_STATUS wmi_unified_soc_set_hw_mode_cmd(void *wmi_hdl, 1061 uint32_t hw_mode_index); 1062 1063 QDF_STATUS wmi_unified_pdev_set_dual_mac_config_cmd(void *wmi_hdl, 1064 struct policy_mgr_dual_mac_config *msg); 1065 1066 QDF_STATUS wmi_unified_set_led_flashing_cmd(void *wmi_hdl, 1067 struct flashing_req_params *flashing); 1068 1069 QDF_STATUS wmi_unified_app_type1_params_in_fw_cmd(void *wmi_hdl, 1070 struct app_type1_params *app_type1_params); 1071 1072 QDF_STATUS wmi_unified_set_ssid_hotlist_cmd(void *wmi_hdl, 1073 struct ssid_hotlist_request_params *request); 1074 1075 QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl, 1076 uint8_t vdev_id); 1077 1078 QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl, 1079 struct wmi_unit_test_cmd *wmi_utest); 1080 1081 QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl, 1082 struct wmi_roam_invoke_cmd *roaminvoke, 1083 uint32_t ch_hz); 1084 1085 QDF_STATUS wmi_unified_roam_scan_offload_cmd(void *wmi_hdl, 1086 uint32_t command, uint32_t vdev_id); 1087 1088 #ifdef CONFIG_MCL 1089 QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl, 1090 struct ap_profile_params *ap_profile); 1091 #endif 1092 1093 QDF_STATUS wmi_unified_roam_scan_offload_scan_period(void *wmi_hdl, 1094 uint32_t scan_period, 1095 uint32_t scan_age, 1096 uint32_t vdev_id); 1097 1098 QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl, 1099 uint8_t chan_count, 1100 uint32_t *chan_list, 1101 uint8_t list_type, uint32_t vdev_id); 1102 1103 QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl, 1104 uint32_t vdev_id, 1105 int32_t rssi_change_thresh, 1106 uint32_t bcn_rssi_weight, 1107 uint32_t hirssi_delay_btw_scans); 1108 1109 /** 1110 * wmi_unified_set_per_roam_config() - set PER roam config in FW 1111 * @wmi_hdl: wmi handle 1112 * @req_buf: per roam config request buffer 1113 * 1114 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1115 */ 1116 QDF_STATUS wmi_unified_set_per_roam_config(void *wmi_hdl, 1117 struct wmi_per_roam_config_req *req_buf); 1118 1119 QDF_STATUS wmi_unified_get_buf_extscan_hotlist_cmd(void *wmi_hdl, 1120 struct ext_scan_setbssi_hotlist_params * 1121 photlist, int *buf_len); 1122 1123 /** 1124 * wmi_unified_set_active_bpf_mode_cmd() - config active BPF mode in FW 1125 * @wmi_hdl: the WMI handle 1126 * @vdev_id: the Id of the vdev to apply the configuration to 1127 * @ucast_mode: the active BPF mode to configure for unicast packets 1128 * @mcast_bcast_mode: the active BPF mode to configure for multicast/broadcast 1129 * packets 1130 */ 1131 QDF_STATUS wmi_unified_set_active_bpf_mode_cmd(void *wmi_hdl, 1132 uint8_t vdev_id, 1133 enum wmi_host_active_bpf_mode ucast_mode, 1134 enum wmi_host_active_bpf_mode mcast_bcast_mode); 1135 1136 QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl, 1137 uint8_t macaddr[IEEE80211_ADDR_LEN], 1138 struct stats_request_params *param); 1139 1140 QDF_STATUS wmi_unified_pdev_get_tpc_config_cmd_send(void *wmi_hdl, 1141 uint32_t param); 1142 1143 QDF_STATUS wmi_unified_set_bwf_cmd_send(void *wmi_hdl, 1144 struct set_bwf_params *param); 1145 1146 QDF_STATUS wmi_send_get_user_position_cmd(void *wmi_hdl, uint32_t value); 1147 1148 QDF_STATUS wmi_send_get_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value); 1149 1150 QDF_STATUS wmi_send_reset_peer_mumimo_tx_count_cmd(void *wmi_hdl, 1151 uint32_t value); 1152 1153 QDF_STATUS wmi_send_pdev_caldata_version_check_cmd(void *wmi_hdl, 1154 uint32_t value); 1155 1156 QDF_STATUS wmi_unified_send_btcoex_wlan_priority_cmd(void *wmi_hdl, 1157 struct btcoex_cfg_params *param); 1158 1159 QDF_STATUS wmi_unified_send_btcoex_duty_cycle_cmd(void *wmi_hdl, 1160 struct btcoex_cfg_params *param); 1161 1162 QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl, 1163 coex_ver_cfg_t *param); 1164 1165 QDF_STATUS wmi_unified_send_coex_config_cmd(void *wmi_hdl, 1166 struct coex_config_params *param); 1167 1168 QDF_STATUS wmi_unified_set_atf_cmd_send(void *wmi_hdl, 1169 struct set_atf_params *param); 1170 1171 QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl, 1172 struct fips_params *param); 1173 1174 QDF_STATUS wmi_unified_wlan_profile_enable_cmd_send(void *wmi_hdl, 1175 struct wlan_profile_params *param); 1176 1177 QDF_STATUS wmi_unified_wlan_profile_trigger_cmd_send(void *wmi_hdl, 1178 struct wlan_profile_params *param); 1179 1180 QDF_STATUS wmi_unified_set_chan_cmd_send(void *wmi_hdl, 1181 struct channel_param *param); 1182 1183 QDF_STATUS wmi_unified_set_ht_ie_cmd_send(void *wmi_hdl, 1184 struct ht_ie_params *param); 1185 1186 QDF_STATUS wmi_unified_set_vht_ie_cmd_send(void *wmi_hdl, 1187 struct vht_ie_params *param); 1188 1189 QDF_STATUS wmi_unified_wmm_update_cmd_send(void *wmi_hdl, 1190 struct wmm_update_params *param); 1191 1192 QDF_STATUS wmi_unified_set_ant_switch_tbl_cmd_send(void *wmi_hdl, 1193 struct ant_switch_tbl_params *param); 1194 1195 QDF_STATUS wmi_unified_set_ratepwr_table_cmd_send(void *wmi_hdl, 1196 struct ratepwr_table_params *param); 1197 1198 QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(void *wmi_hdl); 1199 1200 QDF_STATUS wmi_unified_set_ctl_table_cmd_send(void *wmi_hdl, 1201 struct ctl_table_params *param); 1202 1203 QDF_STATUS wmi_unified_set_mimogain_table_cmd_send(void *wmi_hdl, 1204 struct mimogain_table_params *param); 1205 1206 QDF_STATUS wmi_unified_set_ratepwr_chainmsk_cmd_send(void *wmi_hdl, 1207 struct ratepwr_chainmsk_params *param); 1208 1209 QDF_STATUS wmi_unified_set_macaddr_cmd_send(void *wmi_hdl, 1210 struct macaddr_params *param); 1211 1212 QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(void *wmi_hdl); 1213 1214 QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(void *wmi_hdl); 1215 1216 QDF_STATUS wmi_unified_set_acparams_cmd_send(void *wmi_hdl, 1217 struct acparams_params *param); 1218 1219 QDF_STATUS wmi_unified_set_vap_dscp_tid_map_cmd_send(void *wmi_hdl, 1220 struct vap_dscp_tid_map_params *param); 1221 1222 QDF_STATUS wmi_unified_proxy_ast_reserve_cmd_send(void *wmi_hdl, 1223 struct proxy_ast_reserve_params *param); 1224 1225 QDF_STATUS wmi_unified_pdev_qvit_cmd_send(void *wmi_hdl, 1226 struct pdev_qvit_params *param); 1227 1228 QDF_STATUS wmi_unified_mcast_group_update_cmd_send(void *wmi_hdl, 1229 struct mcast_group_update_params *param); 1230 1231 QDF_STATUS wmi_unified_peer_add_wds_entry_cmd_send(void *wmi_hdl, 1232 struct peer_add_wds_entry_params *param); 1233 1234 QDF_STATUS wmi_unified_peer_del_wds_entry_cmd_send(void *wmi_hdl, 1235 struct peer_del_wds_entry_params *param); 1236 1237 /** 1238 * wmi_unified_set_bridge_mac_addr_cmd_send() - WMI set bridge mac addr cmd function 1239 * @param wmi_hdl : handle to WMI. 1240 * @param param : pointer to hold bridge mac addr param 1241 * 1242 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1243 */ 1244 QDF_STATUS wmi_unified_set_bridge_mac_addr_cmd_send(void *wmi_hdl, 1245 struct set_bridge_mac_addr_params *param); 1246 1247 1248 QDF_STATUS wmi_unified_peer_update_wds_entry_cmd_send(void *wmi_hdl, 1249 struct peer_update_wds_entry_params *param); 1250 1251 QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl); 1252 1253 QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl); 1254 1255 QDF_STATUS wmi_unified_phyerr_disable_cmd_send(void *wmi_hdl); 1256 1257 QDF_STATUS wmi_unified_smart_ant_enable_cmd_send(void *wmi_hdl, 1258 struct smart_ant_enable_params *param); 1259 1260 QDF_STATUS wmi_unified_smart_ant_set_rx_ant_cmd_send(void *wmi_hdl, 1261 struct smart_ant_rx_ant_params *param); 1262 1263 QDF_STATUS wmi_unified_smart_ant_set_tx_ant_cmd_send(void *wmi_hdl, 1264 uint8_t macaddr[IEEE80211_ADDR_LEN], 1265 struct smart_ant_tx_ant_params *param); 1266 1267 QDF_STATUS wmi_unified_smart_ant_set_training_info_cmd_send(void *wmi_hdl, 1268 uint8_t macaddr[IEEE80211_ADDR_LEN], 1269 struct smart_ant_training_info_params *param); 1270 1271 QDF_STATUS wmi_unified_smart_ant_node_config_cmd_send(void *wmi_hdl, 1272 uint8_t macaddr[IEEE80211_ADDR_LEN], 1273 struct smart_ant_node_config_params *param); 1274 1275 QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(void *wmi_hdl, 1276 struct smart_ant_enable_tx_feedback_params *param); 1277 1278 QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(void *wmi_hdl, 1279 struct vdev_spectral_configure_params *param); 1280 1281 QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(void *wmi_hdl, 1282 struct vdev_spectral_enable_params *param); 1283 1284 QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(void *wmi_hdl, 1285 struct bss_chan_info_request_params *param); 1286 1287 QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(void *wmi_hdl, 1288 struct thermal_mitigation_params *param); 1289 1290 QDF_STATUS wmi_unified_vdev_set_neighbour_rx_cmd_send(void *wmi_hdl, 1291 uint8_t macaddr[IEEE80211_ADDR_LEN], 1292 struct set_neighbour_rx_params *param); 1293 1294 QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(void *wmi_hdl, 1295 struct set_fwtest_params *param); 1296 1297 QDF_STATUS wmi_unified_vdev_config_ratemask_cmd_send(void *wmi_hdl, 1298 struct config_ratemask_params *param); 1299 1300 /** 1301 * wmi_unified_vdev_set_custom_aggr_size_cmd_send() - WMI set custom aggr 1302 * size command 1303 * @param wmi_hdl : handle to WMI. 1304 * @param param : pointer to hold custom aggr size param 1305 * 1306 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1307 */ 1308 QDF_STATUS wmi_unified_vdev_set_custom_aggr_size_cmd_send(void *wmi_hdl, 1309 struct set_custom_aggr_size_params *param); 1310 1311 /** 1312 * wmi_unified_vdev_set_qdepth_thresh_cmd_send() - WMI set qdepth threshold 1313 * @param wmi_hdl : handle to WMI. 1314 * @param param : pointer to hold set qdepth thresh param 1315 * 1316 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1317 */ 1318 QDF_STATUS wmi_unified_vdev_set_qdepth_thresh_cmd_send(void *wmi_hdl, 1319 struct set_qdepth_thresh_params *param); 1320 1321 QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(void *wmi_hdl, 1322 struct pdev_set_regdomain_params *param); 1323 1324 QDF_STATUS wmi_unified_set_quiet_mode_cmd_send(void *wmi_hdl, 1325 struct set_quiet_mode_params *param); 1326 1327 QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(void *wmi_hdl, 1328 struct set_beacon_filter_params *param); 1329 1330 QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(void *wmi_hdl, 1331 struct remove_beacon_filter_params *param); 1332 1333 QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(void *wmi_hdl, 1334 uint8_t macaddr[IEEE80211_ADDR_LEN], 1335 struct addba_clearresponse_params *param); 1336 1337 QDF_STATUS wmi_unified_addba_send_cmd_send(void *wmi_hdl, 1338 uint8_t macaddr[IEEE80211_ADDR_LEN], 1339 struct addba_send_params *param); 1340 1341 QDF_STATUS wmi_unified_delba_send_cmd_send(void *wmi_hdl, 1342 uint8_t macaddr[IEEE80211_ADDR_LEN], 1343 struct delba_send_params *param); 1344 1345 QDF_STATUS wmi_unified_addba_setresponse_cmd_send(void *wmi_hdl, 1346 uint8_t macaddr[IEEE80211_ADDR_LEN], 1347 struct addba_setresponse_params *param); 1348 1349 QDF_STATUS wmi_unified_singleamsdu_cmd_send(void *wmi_hdl, 1350 uint8_t macaddr[IEEE80211_ADDR_LEN], 1351 struct singleamsdu_params *param); 1352 1353 QDF_STATUS wmi_unified_set_qboost_param_cmd_send(void *wmi_hdl, 1354 uint8_t macaddr[IEEE80211_ADDR_LEN], 1355 struct set_qboost_params *param); 1356 1357 QDF_STATUS wmi_unified_mu_scan_cmd_send(void *wmi_hdl, 1358 struct mu_scan_params *param); 1359 1360 QDF_STATUS wmi_unified_lteu_config_cmd_send(void *wmi_hdl, 1361 struct lteu_config_params *param); 1362 1363 QDF_STATUS wmi_unified_set_psmode_cmd_send(void *wmi_hdl, 1364 struct set_ps_mode_params *param); 1365 1366 QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl, 1367 struct wmi_init_cmd_param *param); 1368 1369 bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id); 1370 1371 /** 1372 * wmi_save_service_bitmap() - save service bitmap 1373 * @wmi_handle: wmi handle 1374 * @param evt_buf: pointer to event buffer 1375 * 1376 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS failure code 1377 */ 1378 QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf, 1379 void *bitmap_buf); 1380 1381 /** 1382 * wmi_save_ext_service_bitmap() - save extended service bitmap 1383 * @wmi_handle: wmi handle 1384 * @param evt_buf: pointer to event buffer 1385 * 1386 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS failure code 1387 */ 1388 QDF_STATUS wmi_save_ext_service_bitmap(void *wmi_hdl, void *evt_buf, 1389 void *bitmap_buf); 1390 1391 QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf); 1392 1393 QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl, 1394 void *evt_buf, 1395 struct wlan_psoc_target_capability_info *ev); 1396 1397 QDF_STATUS wmi_extract_hal_reg_cap(void *wmi_hdl, void *evt_buf, 1398 struct wlan_psoc_hal_reg_capability *hal_reg_cap); 1399 1400 host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl, 1401 void *evt_buf, uint8_t *num_entries); 1402 1403 uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev); 1404 1405 QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl, 1406 void *ev, uint8_t *macaddr); 1407 1408 wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev, 1409 uint8_t *num_mac_addr); 1410 1411 /** 1412 * wmi_extract_ready_params() - Extract data from ready event apart from 1413 * status, macaddr and version. 1414 * @wmi_handle: Pointer to WMI handle. 1415 * @evt_buf: Pointer to Ready event buffer. 1416 * @ev_param: Pointer to host defined struct to copy the data from event. 1417 * 1418 * Return: QDF_STATUS_SUCCESS on success. 1419 */ 1420 QDF_STATUS wmi_extract_ready_event_params(void *wmi_hdl, 1421 void *evt_buf, struct wmi_host_ready_ev_param *ev_param); 1422 1423 QDF_STATUS wmi_extract_fw_version(void *wmi_hdl, 1424 void *ev, struct wmi_host_fw_ver *fw_ver); 1425 1426 QDF_STATUS wmi_extract_fw_abi_version(void *wmi_hdl, 1427 void *ev, struct wmi_host_fw_abi_ver *fw_ver); 1428 1429 QDF_STATUS wmi_check_and_update_fw_version(void *wmi_hdl, void *ev); 1430 1431 uint8_t *wmi_extract_dbglog_data_len(void *wmi_hdl, 1432 void *evt_b, uint32_t *len); 1433 1434 QDF_STATUS wmi_send_ext_resource_config(void *wmi_hdl, 1435 wmi_host_ext_resource_config *ext_cfg); 1436 1437 QDF_STATUS wmi_unified_nf_dbr_dbm_info_get_cmd_send(void *wmi_hdl, 1438 uint8_t mac_id); 1439 1440 QDF_STATUS wmi_unified_packet_power_info_get_cmd_send(void *wmi_hdl, 1441 struct packet_power_info_params *param); 1442 1443 QDF_STATUS wmi_unified_gpio_config_cmd_send(void *wmi_hdl, 1444 struct gpio_config_params *param); 1445 1446 QDF_STATUS wmi_unified_gpio_output_cmd_send(void *wmi_hdl, 1447 struct gpio_output_params *param); 1448 1449 QDF_STATUS wmi_unified_rtt_meas_req_test_cmd_send(void *wmi_hdl, 1450 struct rtt_meas_req_test_params *param); 1451 1452 QDF_STATUS wmi_unified_rtt_meas_req_cmd_send(void *wmi_hdl, 1453 struct rtt_meas_req_params *param); 1454 1455 QDF_STATUS wmi_unified_rtt_keepalive_req_cmd_send(void *wmi_hdl, 1456 struct rtt_keepalive_req_params *param); 1457 1458 QDF_STATUS wmi_unified_lci_set_cmd_send(void *wmi_hdl, 1459 struct lci_set_params *param); 1460 1461 QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl, 1462 struct lcr_set_params *param); 1463 1464 QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl, 1465 struct periodic_chan_stats_params *param); 1466 1467 QDF_STATUS 1468 wmi_send_atf_peer_request_cmd(void *wmi_hdl, 1469 struct atf_peer_request_params *param); 1470 1471 QDF_STATUS 1472 wmi_send_set_atf_grouping_cmd(void *wmi_hdl, 1473 struct atf_grouping_params *param); 1474 /* Extract APIs */ 1475 1476 QDF_STATUS wmi_extract_wds_addr_event(void *wmi_hdl, 1477 void *evt_buf, uint16_t len, wds_addr_event_t *wds_ev); 1478 1479 QDF_STATUS wmi_extract_dcs_interference_type(void *wmi_hdl, 1480 void *evt_buf, struct wmi_host_dcs_interference_param *param); 1481 1482 QDF_STATUS wmi_extract_dcs_cw_int(void *wmi_hdl, void *evt_buf, 1483 wmi_host_ath_dcs_cw_int *cw_int); 1484 1485 QDF_STATUS wmi_extract_dcs_im_tgt_stats(void *wmi_hdl, void *evt_buf, 1486 wmi_host_dcs_im_tgt_stats_t *wlan_stat); 1487 1488 QDF_STATUS wmi_extract_fips_event_data(void *wmi_hdl, void *evt_buf, 1489 struct wmi_host_fips_event_param *param); 1490 1491 QDF_STATUS wmi_extract_vdev_start_resp(void *wmi_hdl, void *evt_buf, 1492 wmi_host_vdev_start_resp *vdev_rsp); 1493 1494 /** 1495 * wmi_extract_vdev_delete_resp - api to extract vdev delete 1496 * response event params 1497 * @wmi_handle: wma handle 1498 * @evt_buf: pointer to event buffer 1499 * @delele_rsp: pointer to hold delete response from firmware 1500 * 1501 * Return: QDF_STATUS_SUCCESS for successful event parse 1502 * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE 1503 */ 1504 QDF_STATUS wmi_extract_vdev_delete_resp(void *wmi_hdl, void *evt_buf, 1505 struct wmi_host_vdev_delete_resp *delele_rsp); 1506 1507 QDF_STATUS wmi_extract_tbttoffset_update_params(void *wmi_hdl, void *evt_buf, 1508 uint8_t idx, struct tbttoffset_params *tbtt_param); 1509 1510 QDF_STATUS wmi_extract_ext_tbttoffset_update_params(void *wmi_hdl, 1511 void *evt_buf, uint8_t idx, 1512 struct tbttoffset_params *tbtt_param); 1513 1514 QDF_STATUS wmi_extract_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf, 1515 uint32_t *num_vdevs); 1516 1517 QDF_STATUS wmi_extract_ext_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf, 1518 uint32_t *num_vdevs); 1519 1520 QDF_STATUS wmi_extract_mgmt_rx_params(void *wmi_hdl, void *evt_buf, 1521 struct mgmt_rx_event_params *hdr, uint8_t **bufp); 1522 1523 QDF_STATUS wmi_extract_vdev_stopped_param(void *wmi_hdl, void *evt_buf, 1524 uint32_t *vdev_id); 1525 1526 QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf, 1527 wmi_host_roam_event *ev); 1528 1529 QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf, 1530 struct scan_event *param); 1531 1532 #ifdef CONVERGED_TDLS_ENABLE 1533 /** 1534 * wmi_extract_vdev_tdls_ev_param - extract vdev tdls param from event 1535 * @wmi_handle: wmi handle 1536 * @param evt_buf: pointer to event buffer 1537 * @param param: Pointer to hold vdev tdls param 1538 * 1539 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1540 */ 1541 QDF_STATUS wmi_extract_vdev_tdls_ev_param(void *wmi_hdl, void *evt_buf, 1542 struct tdls_event_info *param); 1543 #endif 1544 1545 QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf, 1546 wmi_host_mu_report_event *param); 1547 1548 QDF_STATUS wmi_extract_mu_db_entry(void *wmi_hdl, void *evt_buf, 1549 uint8_t idx, wmi_host_mu_db_entry *param); 1550 1551 QDF_STATUS wmi_extract_mumimo_tx_count_ev_param(void *wmi_hdl, void *evt_buf, 1552 wmi_host_peer_txmu_cnt_event *param); 1553 1554 QDF_STATUS wmi_extract_peer_gid_userpos_list_ev_param(void *wmi_hdl, 1555 void *evt_buf, wmi_host_peer_gid_userpos_list_event *param); 1556 1557 QDF_STATUS wmi_extract_pdev_caldata_version_check_ev_param(void *wmi_hdl, 1558 void *evt_buf, wmi_host_pdev_check_cal_version_event *param); 1559 1560 QDF_STATUS wmi_extract_pdev_tpc_config_ev_param(void *wmi_hdl, void *evt_buf, 1561 wmi_host_pdev_tpc_config_event *param); 1562 1563 QDF_STATUS wmi_extract_gpio_input_ev_param(void *wmi_hdl, 1564 void *evt_buf, uint32_t *gpio_num); 1565 1566 QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(void *wmi_hdl, 1567 void *evt_buf, struct wmi_host_proxy_ast_reserve_param *param); 1568 1569 QDF_STATUS wmi_extract_nfcal_power_ev_param(void *wmi_hdl, void *evt_buf, 1570 wmi_host_pdev_nfcal_power_all_channels_event *param); 1571 1572 QDF_STATUS wmi_extract_pdev_tpc_ev_param(void *wmi_hdl, void *evt_buf, 1573 wmi_host_pdev_tpc_event *param); 1574 1575 QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl, 1576 void *evt_buf, 1577 wmi_host_pdev_generic_buffer_event *param); 1578 1579 QDF_STATUS wmi_extract_mgmt_tx_compl_param(void *wmi_hdl, void *evt_buf, 1580 wmi_host_mgmt_tx_compl_event *param); 1581 1582 QDF_STATUS wmi_extract_offchan_data_tx_compl_param(void *wmi_hdl, void *evt_buf, 1583 struct wmi_host_offchan_data_tx_compl_event *param); 1584 1585 QDF_STATUS wmi_extract_pdev_csa_switch_count_status(void *wmi_hdl, 1586 void *evt_buf, 1587 struct pdev_csa_switch_count_status *param); 1588 1589 QDF_STATUS wmi_extract_swba_num_vdevs(void *wmi_hdl, void *evt_buf, 1590 uint32_t *num_vdevs); 1591 1592 QDF_STATUS wmi_extract_swba_tim_info(void *wmi_hdl, void *evt_buf, 1593 uint32_t idx, wmi_host_tim_info *tim_info); 1594 1595 QDF_STATUS wmi_extract_swba_noa_info(void *wmi_hdl, void *evt_buf, 1596 uint32_t idx, wmi_host_p2p_noa_info *p2p_desc); 1597 1598 #ifdef CONVERGED_P2P_ENABLE 1599 QDF_STATUS wmi_extract_p2p_lo_stop_ev_param(void *wmi_hdl, 1600 void *evt_buf, struct p2p_lo_event *param); 1601 1602 QDF_STATUS wmi_extract_p2p_noa_ev_param(void *wmi_hdl, 1603 void *evt_buf, struct p2p_noa_info *param); 1604 #endif 1605 1606 QDF_STATUS wmi_extract_peer_sta_ps_statechange_ev(void *wmi_hdl, 1607 void *evt_buf, wmi_host_peer_sta_ps_statechange_event *ev); 1608 1609 QDF_STATUS wmi_extract_peer_sta_kickout_ev(void *wmi_hdl, void *evt_buf, 1610 wmi_host_peer_sta_kickout_event *ev); 1611 1612 QDF_STATUS wmi_extract_peer_ratecode_list_ev(void *wmi_hdl, void *evt_buf, 1613 uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap); 1614 1615 QDF_STATUS wmi_extract_bcnflt_stats(void *wmi_hdl, void *evt_buf, 1616 uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats); 1617 1618 QDF_STATUS wmi_extract_rtt_hdr(void *wmi_hdl, void *evt_buf, 1619 wmi_host_rtt_event_hdr *ev); 1620 1621 QDF_STATUS wmi_extract_rtt_ev(void *wmi_hdl, void *evt_buf, 1622 wmi_host_rtt_meas_event *ev, uint8_t *hdump, 1623 uint16_t hdump_len); 1624 1625 QDF_STATUS wmi_extract_rtt_error_report_ev(void *wmi_hdl, void *evt_buf, 1626 wmi_host_rtt_error_report_event *ev); 1627 1628 QDF_STATUS wmi_extract_chan_stats(void *wmi_hdl, void *evt_buf, 1629 uint32_t index, wmi_host_chan_stats *chan_stats); 1630 1631 QDF_STATUS wmi_extract_thermal_stats(void *wmi_hdl, void *evt_buf, 1632 uint32_t *temp, uint32_t *level, uint32_t *pdev_id); 1633 1634 QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf, 1635 uint8_t idx, uint32_t *levelcount, uint32_t *dccount); 1636 1637 QDF_STATUS wmi_extract_comb_phyerr(void *wmi_hdl, void *evt_buf, 1638 uint16_t datalen, uint16_t *buf_offset, 1639 wmi_host_phyerr_t *phyerr); 1640 1641 QDF_STATUS wmi_extract_single_phyerr(void *wmi_hdl, void *evt_buf, 1642 uint16_t datalen, uint16_t *buf_offset, 1643 wmi_host_phyerr_t *phyerr); 1644 1645 QDF_STATUS wmi_extract_composite_phyerr(void *wmi_hdl, void *evt_buf, 1646 uint16_t datalen, wmi_host_phyerr_t *phyerr); 1647 1648 QDF_STATUS wmi_extract_profile_ctx(void *wmi_hdl, void *evt_buf, 1649 wmi_host_wlan_profile_ctx_t *profile_ctx); 1650 1651 QDF_STATUS wmi_extract_profile_data(void *wmi_hdl, void *evt_buf, uint8_t idx, 1652 wmi_host_wlan_profile_t *profile_data); 1653 1654 QDF_STATUS wmi_extract_chan_info_event(void *wmi_hdl, void *evt_buf, 1655 wmi_host_chan_info_event *chan_info); 1656 1657 QDF_STATUS wmi_extract_channel_hopping_event(void *wmi_hdl, void *evt_buf, 1658 wmi_host_pdev_channel_hopping_event *ch_hopping); 1659 1660 QDF_STATUS wmi_extract_stats_param(void *wmi_hdl, void *evt_buf, 1661 wmi_host_stats_event *stats_param); 1662 1663 QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf, 1664 uint32_t index, 1665 wmi_host_pdev_stats *pdev_stats); 1666 1667 QDF_STATUS wmi_extract_unit_test(void *wmi_hdl, void *evt_buf, 1668 wmi_unit_test_event *unit_test, uint32_t maxspace); 1669 1670 QDF_STATUS wmi_extract_pdev_ext_stats(void *wmi_hdl, void *evt_buf, 1671 uint32_t index, 1672 wmi_host_pdev_ext_stats *pdev_ext_stats); 1673 1674 QDF_STATUS wmi_extract_peer_extd_stats(void *wmi_hdl, void *evt_buf, 1675 uint32_t index, 1676 wmi_host_peer_extd_stats *peer_extd_stats); 1677 1678 QDF_STATUS wmi_extract_bss_chan_info_event(void *wmi_hdl, void *evt_buf, 1679 wmi_host_pdev_bss_chan_info_event *bss_chan_info); 1680 1681 QDF_STATUS wmi_extract_inst_rssi_stats_event(void *wmi_hdl, void *evt_buf, 1682 wmi_host_inst_stats_resp *inst_rssi_resp); 1683 1684 QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf, 1685 uint32_t index, wmi_host_peer_stats *peer_stats); 1686 1687 QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf, 1688 wmi_host_tx_data_traffic_ctrl_event *ev); 1689 1690 QDF_STATUS wmi_extract_atf_peer_stats_ev(void *wmi_hdl, void *evt_buf, 1691 wmi_host_atf_peer_stats_event *ev); 1692 1693 QDF_STATUS wmi_extract_atf_token_info_ev(void *wmi_hdl, void *evt_buf, 1694 uint8_t idx, wmi_host_atf_peer_stats_info *atf_token_info); 1695 1696 QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf, 1697 uint32_t index, wmi_host_vdev_stats *vdev_stats); 1698 1699 QDF_STATUS wmi_extract_per_chain_rssi_stats(void *wmi_hdl, void *evt_buf, 1700 uint32_t index, struct wmi_host_per_chain_rssi_stats *rssi_stats); 1701 1702 QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf, 1703 uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats); 1704 1705 QDF_STATUS wmi_extract_bcn_stats(void *wmi_hdl, void *evt_buf, 1706 uint32_t index, wmi_host_bcn_stats *vdev_bcn_stats); 1707 1708 /** 1709 * wmi_extract_vdev_nac_rssi_stats() - extract NAC_RSSI stats from event 1710 * @wmi_handle: wmi handle 1711 * @param evt_buf: pointer to event buffer 1712 * @param vdev_extd_stats: Pointer to hold nac rssi stats 1713 * 1714 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1715 */ 1716 QDF_STATUS wmi_extract_vdev_nac_rssi_stats(void *wmi_hdl, void *evt_buf, 1717 struct wmi_host_vdev_nac_rssi_event *vdev_nac_rssi_stats); 1718 1719 QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl, 1720 struct wmi_power_dbg_params *param); 1721 1722 QDF_STATUS wmi_unified_send_multiple_vdev_restart_req_cmd(void *wmi_hdl, 1723 struct multiple_vdev_restart_params *param); 1724 1725 /** 1726 * wmi_unified_send_sar_limit_cmd() - send sar limit cmd to fw 1727 * @wmi_hdl: wmi handle 1728 * @params: sar limit command params 1729 * 1730 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1731 */ 1732 QDF_STATUS wmi_unified_send_sar_limit_cmd(void *wmi_hdl, 1733 struct sar_limit_cmd_params *params); 1734 1735 /** 1736 * wmi_unified_get_sar_limit_cmd() - request current SAR limits from FW 1737 * @wmi_hdl: wmi handle 1738 * 1739 * Return: QDF_STATUS_SUCCESS for success or error code 1740 */ 1741 QDF_STATUS wmi_unified_get_sar_limit_cmd(void *wmi_hdl); 1742 1743 /** 1744 * wmi_unified_extract_sar_limit_event() - extract SAR limits from FW event 1745 * @wmi_hdl: wmi handle 1746 * @evt_buf: event buffer received from firmware 1747 * @event: SAR limit event which is to be populated by data extracted from 1748 * the @evt_buf buffer 1749 * 1750 * Return: QDF_STATUS_SUCCESS for success or error code 1751 */ 1752 QDF_STATUS wmi_unified_extract_sar_limit_event(void *wmi_hdl, 1753 uint8_t *evt_buf, 1754 struct sar_limit_event *event); 1755 1756 QDF_STATUS wmi_unified_send_adapt_dwelltime_params_cmd(void *wmi_hdl, 1757 struct wmi_adaptive_dwelltime_params * 1758 wmi_param); 1759 QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl, 1760 struct set_fwtest_params *wmi_fwtest); 1761 1762 QDF_STATUS wmi_unified_peer_rx_reorder_queue_setup_send(void *wmi_hdl, 1763 struct rx_reorder_queue_setup_params *param); 1764 QDF_STATUS wmi_unified_peer_rx_reorder_queue_remove_send(void *wmi_hdl, 1765 struct rx_reorder_queue_remove_params *param); 1766 1767 QDF_STATUS wmi_extract_service_ready_ext(void *wmi_hdl, uint8_t *evt_buf, 1768 struct wlan_psoc_host_service_ext_param *param); 1769 QDF_STATUS wmi_extract_hw_mode_cap_service_ready_ext( 1770 void *wmi_hdl, 1771 uint8_t *evt_buf, uint8_t hw_mode_idx, 1772 struct wlan_psoc_host_hw_mode_caps *param); 1773 QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext( 1774 void *wmi_hdl, 1775 uint8_t *evt_buf, 1776 uint8_t hw_mode_id, 1777 uint8_t phy_id, 1778 struct wlan_psoc_host_mac_phy_caps *param); 1779 QDF_STATUS wmi_extract_reg_cap_service_ready_ext( 1780 void *wmi_hdl, 1781 uint8_t *evt_buf, uint8_t phy_idx, 1782 struct wlan_psoc_host_hal_reg_capabilities_ext *param); 1783 1784 /** 1785 * wmi_extract_dbr_ring_cap_service_ready_ext: Extract direct buffer rx 1786 * capability received through 1787 * extended service ready event 1788 * @wmi_hdl: WMI handle 1789 * @evt_buf: Event buffer 1790 * @idx: Index of the module for which capability is received 1791 * @param: Pointer to direct buffer rx ring cap struct 1792 * 1793 * Return: QDF status of operation 1794 */ 1795 QDF_STATUS wmi_extract_dbr_ring_cap_service_ready_ext( 1796 void *wmi_hdl, 1797 uint8_t *evt_buf, uint8_t idx, 1798 struct wlan_psoc_host_dbr_ring_caps *param); 1799 1800 /** 1801 * wmi_extract_dbr_buf_release_fixed : Extract direct buffer rx fixed param 1802 * from buffer release event 1803 * @wmi_hdl: WMI handle 1804 * @evt_buf: Event buffer 1805 * @param: Pointer to direct buffer rx response struct 1806 * 1807 * Return: QDF status of operation 1808 */ 1809 QDF_STATUS wmi_extract_dbr_buf_release_fixed( 1810 void *wmi_hdl, 1811 uint8_t *evt_buf, 1812 struct direct_buf_rx_rsp *param); 1813 1814 /** 1815 * wmi_extract_dbr_buf_release_entry: Extract direct buffer rx buffer tlv 1816 * 1817 * @wmi_hdl: WMI handle 1818 * @evt_buf: Event buffer 1819 * @idx: Index of the module for which capability is received 1820 * @param: Pointer to direct buffer rx entry 1821 * 1822 * Return: QDF status of operation 1823 */ 1824 QDF_STATUS wmi_extract_dbr_buf_release_entry( 1825 void *wmi_hdl, 1826 uint8_t *evt_buf, uint8_t idx, 1827 struct direct_buf_rx_entry *param); 1828 1829 /** 1830 * wmi_extract_dbr_buf_metadata: Extract direct buffer metadata 1831 * 1832 * @wmi_hdl: WMI handle 1833 * @evt_buf: Event buffer 1834 * @idx: Index of the module for which capability is received 1835 * @param: Pointer to direct buffer metadata 1836 * 1837 * Return: QDF status of operation 1838 */ 1839 QDF_STATUS wmi_extract_dbr_buf_metadata( 1840 void *wmi_hdl, 1841 uint8_t *evt_buf, uint8_t idx, 1842 struct direct_buf_rx_metadata *param); 1843 1844 QDF_STATUS wmi_extract_pdev_utf_event(void *wmi_hdl, 1845 uint8_t *evt_buf, 1846 struct wmi_host_pdev_utf_event *param); 1847 1848 QDF_STATUS wmi_extract_pdev_qvit_event(void *wmi_hdl, 1849 uint8_t *evt_buf, 1850 struct wmi_host_pdev_qvit_event *param); 1851 1852 QDF_STATUS wmi_extract_peer_delete_response_event(void *wmi_hdl, 1853 uint8_t *evt_buf, 1854 struct wmi_host_peer_delete_response_event *param); 1855 1856 QDF_STATUS wmi_extract_chainmask_tables(void *wmi_hdl, uint8_t *evt_buf, 1857 struct wlan_psoc_host_chainmask_table *chainmask_table); 1858 /** 1859 * wmi_unified_dfs_phyerr_offload_en_cmd() - enable dfs phyerr offload 1860 * @wmi_handle: wmi handle 1861 * @pdev_id: pdev id 1862 * 1863 * Return: QDF_STATUS 1864 */ 1865 QDF_STATUS wmi_unified_dfs_phyerr_offload_en_cmd(void *wmi_hdl, 1866 uint32_t pdev_id); 1867 1868 /** 1869 * wmi_unified_dfs_phyerr_offload_dis_cmd() - disable dfs phyerr offload 1870 * @wmi_handle: wmi handle 1871 * @pdev_id: pdev id 1872 * 1873 * Return: QDF_STATUS 1874 */ 1875 QDF_STATUS wmi_unified_dfs_phyerr_offload_dis_cmd(void *wmi_hdl, 1876 uint32_t pdev_id); 1877 1878 QDF_STATUS wmi_unified_set_country_cmd_send(void *wmi_hdl, 1879 struct set_country *param); 1880 /* 1881 * wmi_unified_set_del_pmkid_cache() - set delete PMKID 1882 * @wmi_hdl: wma handle 1883 * @pmksa: pointer to pmk cache entry 1884 * 1885 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1886 */ 1887 QDF_STATUS wmi_unified_set_del_pmkid_cache(void *wmi_hdl, 1888 struct wmi_unified_pmk_cache *pmksa); 1889 1890 #if defined(WLAN_FEATURE_FILS_SK) 1891 /* 1892 * wmi_unified_roam_send_hlp_cmd() -send HLP command info 1893 * @wmi_hdl: wma handle 1894 * @req_buf: Pointer to HLP params 1895 * 1896 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1897 */ 1898 QDF_STATUS wmi_unified_roam_send_hlp_cmd(void *wmi_hdl, 1899 struct hlp_params *req_buf); 1900 #endif 1901 1902 /** 1903 * wmi_unified_send_request_get_rcpi_cmd() - command to request rcpi value 1904 * @wmi_hdl: wma handle 1905 * @get_rcpi_param: rcpi params 1906 * 1907 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 1908 */ 1909 QDF_STATUS wmi_unified_send_request_get_rcpi_cmd(void *wmi_hdl, 1910 struct rcpi_req *get_rcpi_param); 1911 1912 /** 1913 * wmi_extract_rcpi_response_event - api to extract RCPI event params 1914 * @wmi_handle: wma handle 1915 * @evt_buf: pointer to event buffer 1916 * @res: pointer to hold rcpi response from firmware 1917 * 1918 * Return: QDF_STATUS_SUCCESS for successful event parse 1919 * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE 1920 */ 1921 QDF_STATUS wmi_extract_rcpi_response_event(void *wmi_hdl, void *evt_buf, 1922 struct rcpi_res *res); 1923 1924 #ifdef WMI_INTERFACE_EVENT_LOGGING 1925 void wmi_print_cmd_log(wmi_unified_t wmi, uint32_t count, 1926 qdf_abstract_print *print, void *print_priv); 1927 1928 void wmi_print_cmd_tx_cmp_log(wmi_unified_t wmi, uint32_t count, 1929 qdf_abstract_print *print, void *print_priv); 1930 1931 void wmi_print_mgmt_cmd_log(wmi_unified_t wmi, uint32_t count, 1932 qdf_abstract_print *print, void *print_priv); 1933 1934 void wmi_print_mgmt_cmd_tx_cmp_log(wmi_unified_t wmi, uint32_t count, 1935 qdf_abstract_print *print, void *print_priv); 1936 1937 void wmi_print_event_log(wmi_unified_t wmi, uint32_t count, 1938 qdf_abstract_print *print, void *print_priv); 1939 1940 void wmi_print_rx_event_log(wmi_unified_t wmi, uint32_t count, 1941 qdf_abstract_print *print, void *print_priv); 1942 1943 void wmi_print_mgmt_event_log(wmi_unified_t wmi, uint32_t count, 1944 qdf_abstract_print *print, void *print_priv); 1945 1946 #endif /* WMI_INTERFACE_EVENT_LOGGING */ 1947 1948 QDF_STATUS wmi_unified_send_dbs_scan_sel_params_cmd(void *wmi_hdl, 1949 struct wmi_dbs_scan_sel_params *wmi_param); 1950 1951 QDF_STATUS wmi_unified_send_limit_off_chan_cmd(void *wmi_hdl, 1952 struct wmi_limit_off_chan_param *wmi_param); 1953 QDF_STATUS wmi_unified_set_arp_stats_req(void *wmi_hdl, 1954 struct set_arp_stats *req_buf); 1955 QDF_STATUS wmi_unified_get_arp_stats_req(void *wmi_hdl, 1956 struct get_arp_stats *req_buf); 1957 1958 /** 1959 * wmi_send_bcn_offload_control_cmd - send beacon ofload control cmd to fw 1960 * @wmi_hdl: wmi handle 1961 * @bcn_ctrl_param: pointer to bcn_offload_control param 1962 * 1963 * Return: QDF_STATUS_SUCCESS for success or error code 1964 */ 1965 QDF_STATUS wmi_send_bcn_offload_control_cmd(void *wmi_hdl, 1966 struct bcn_offload_control *bcn_ctrl_param); 1967 /** 1968 * wmi_unified_send_wds_entry_list_cmd() - WMI function to get list of 1969 * wds entries from FW 1970 * @wmi_hdl: wmi handle 1971 * 1972 * Send WMI_PDEV_WDS_ENTRY_LIST_CMDID parameters to fw. 1973 * 1974 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 1975 */ 1976 1977 QDF_STATUS wmi_unified_send_dump_wds_table_cmd(void *wmi_hdl); 1978 1979 /** 1980 * wmi_extract_wds_entry - api to extract wds entry 1981 * @wmi_hdl: wmi handle 1982 * @evt_buf: pointer to event buffer 1983 * @wds_entry: wds entry 1984 * @idx: index to point wds entry in event buffer 1985 * 1986 * Return: QDF_STATUS_SUCCESS for successful event parse 1987 * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE 1988 */ 1989 1990 QDF_STATUS wmi_extract_wds_entry(void *wmi_hdl, uint8_t *evt_buf, 1991 struct wdsentry *wds_entry, u_int32_t idx); 1992 1993 #ifdef WLAN_FEATURE_NAN_CONVERGENCE 1994 /** 1995 * wmi_unified_ndp_initiator_req_cmd_send - api to send initiator request to FW 1996 * @wmi_hdl: wma handle 1997 * @req: pointer to request buffer 1998 * 1999 * Return: status of operation 2000 */ 2001 QDF_STATUS wmi_unified_ndp_initiator_req_cmd_send(void *wmi_hdl, 2002 struct nan_datapath_initiator_req *req); 2003 2004 /** 2005 * wmi_unified_ndp_responder_req_cmd_send - api to send responder request to FW 2006 * @wmi_hdl: wma handle 2007 * @req: pointer to request buffer 2008 * 2009 * Return: status of operation 2010 */ 2011 QDF_STATUS wmi_unified_ndp_responder_req_cmd_send(void *wmi_hdl, 2012 struct nan_datapath_responder_req *req); 2013 2014 /** 2015 * wmi_unified_ndp_end_req_cmd_send - api to send end request to FW 2016 * @wmi_hdl: wma handle 2017 * @req: pointer to request buffer 2018 * 2019 * Return: status of operation 2020 */ 2021 QDF_STATUS wmi_unified_ndp_end_req_cmd_send(void *wmi_hdl, 2022 struct nan_datapath_end_req *req); 2023 2024 /** 2025 * wmi_extract_ndp_initiator_rsp - api to extract initiator rsp from even buffer 2026 * @wmi_hdl: wma handle 2027 * @data: event buffer 2028 * @rsp: buffer to populate 2029 * 2030 * Return: status of operation 2031 */ 2032 QDF_STATUS wmi_extract_ndp_initiator_rsp(wmi_unified_t wmi_handle, 2033 uint8_t *data, struct nan_datapath_initiator_rsp *rsp); 2034 2035 /** 2036 * wmi_extract_ndp_ind - api to extract ndp indication struct from even buffer 2037 * @wmi_hdl: wma handle 2038 * @data: event buffer 2039 * @ind: buffer to populate 2040 * 2041 * Return: status of operation 2042 */ 2043 QDF_STATUS wmi_extract_ndp_ind(wmi_unified_t wmi_handle, uint8_t *data, 2044 struct nan_datapath_indication_event *ind); 2045 2046 /** 2047 * wmi_extract_ndp_confirm - api to extract ndp confim struct from even buffer 2048 * @wmi_hdl: wma handle 2049 * @data: event buffer 2050 * @ev: buffer to populate 2051 * 2052 * Return: status of operation 2053 */ 2054 QDF_STATUS wmi_extract_ndp_confirm(wmi_unified_t wmi_handle, uint8_t *data, 2055 struct nan_datapath_confirm_event *ev); 2056 2057 /** 2058 * wmi_extract_ndp_responder_rsp - api to extract responder rsp from even buffer 2059 * @wmi_hdl: wma handle 2060 * @data: event buffer 2061 * @rsp: buffer to populate 2062 * 2063 * Return: status of operation 2064 */ 2065 QDF_STATUS wmi_extract_ndp_responder_rsp(wmi_unified_t wmi_handle, 2066 uint8_t *data, struct nan_datapath_responder_rsp *rsp); 2067 2068 /** 2069 * wmi_extract_ndp_end_rsp - api to extract ndp end rsp from even buffer 2070 * @wmi_hdl: wma handle 2071 * @data: event buffer 2072 * @rsp: buffer to populate 2073 * 2074 * Return: status of operation 2075 */ 2076 QDF_STATUS wmi_extract_ndp_end_rsp(wmi_unified_t wmi_handle, uint8_t *data, 2077 struct nan_datapath_end_rsp_event *rsp); 2078 2079 /** 2080 * wmi_extract_ndp_end_ind - api to extract ndp end indication from even buffer 2081 * @wmi_hdl: wma handle 2082 * @data: event buffer 2083 * @ind: buffer to populate 2084 * 2085 * Return: status of operation 2086 */ 2087 QDF_STATUS wmi_extract_ndp_end_ind(wmi_unified_t wmi_handle, uint8_t *data, 2088 struct nan_datapath_end_indication_event **ind); 2089 #endif 2090 2091 /** 2092 * wmi_unified_send_btm_config() - Send BTM config to fw 2093 * @wmi_hdl: wmi handle 2094 * @params: pointer to wmi_btm_config 2095 * 2096 * Return: QDF_STATUS 2097 */ 2098 QDF_STATUS wmi_unified_send_btm_config(void *wmi_hdl, 2099 struct wmi_btm_config *params); 2100 2101 /** 2102 * wmi_unified_send_obss_detection_cfg_cmd() - WMI function to send obss 2103 * detection configuration to FW. 2104 * @wmi_hdl: wmi handle 2105 * @cfg: obss detection configuration 2106 * 2107 * Send WMI_SAP_OBSS_DETECTION_CFG_CMDID parameters to fw. 2108 * 2109 * Return: QDF_STATUS 2110 */ 2111 2112 QDF_STATUS wmi_unified_send_obss_detection_cfg_cmd(void *wmi_hdl, 2113 struct wmi_obss_detection_cfg_param *cfg); 2114 2115 /** 2116 * wmi_unified_extract_obss_detection_info() - WMI function to extract obss 2117 * detection info from FW. 2118 * @wmi_hdl: wmi handle 2119 * @data: event data from firmware 2120 * @info: Pointer to hold obss detection info 2121 * 2122 * This function is used to extract obss info from firmware. 2123 * 2124 * Return: QDF_STATUS 2125 */ 2126 2127 QDF_STATUS wmi_unified_extract_obss_detection_info(void *wmi_hdl, 2128 uint8_t *data, 2129 struct wmi_obss_detect_info 2130 *info); 2131 /** 2132 * wmi_unified_send_bss_color_change_enable_cmd() - WMI function to send bss 2133 * color change enable to FW. 2134 * @wmi_hdl: wmi handle 2135 * @vdev_id: vdev ID 2136 * @enable: enable or disable color change handeling within firmware 2137 * 2138 * Send WMI_BSS_COLOR_CHANGE_ENABLE_CMDID parameters to fw, 2139 * thereby firmware updates bss color when AP announces bss color change. 2140 * 2141 * Return: QDF_STATUS 2142 */ 2143 2144 QDF_STATUS wmi_unified_send_bss_color_change_enable_cmd(void *wmi_hdl, 2145 uint32_t vdev_id, 2146 bool enable); 2147 2148 /** 2149 * wmi_unified_send_obss_color_collision_cfg_cmd() - WMI function to send bss 2150 * color collision detection configuration to FW. 2151 * @wmi_hdl: wmi handle 2152 * @cfg: obss color collision detection configuration 2153 * 2154 * Send WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID parameters to fw. 2155 * 2156 * Return: QDF_STATUS 2157 */ 2158 2159 QDF_STATUS wmi_unified_send_obss_color_collision_cfg_cmd(void *wmi_hdl, 2160 struct wmi_obss_color_collision_cfg_param *cfg); 2161 2162 /** 2163 * wmi_unified_extract_obss_color_collision_info() - WMI function to extract 2164 * obss color collision info from FW. 2165 * @wmi_hdl: wmi handle 2166 * @data: event data from firmware 2167 * @info: Pointer to hold bss color collision info 2168 * 2169 * This function is used to extract bss collision info from firmware. 2170 * 2171 * Return: QDF_STATUS 2172 */ 2173 2174 QDF_STATUS wmi_unified_extract_obss_color_collision_info(void *wmi_hdl, 2175 uint8_t *data, struct wmi_obss_color_collision_info *info); 2176 2177 #ifdef WLAN_SUPPORT_GREEN_AP 2178 QDF_STATUS wmi_extract_green_ap_egap_status_info( 2179 void *wmi_hdl, uint8_t *evt_buf, 2180 struct wlan_green_ap_egap_status_info *egap_status_info_params); 2181 #endif 2182 2183 #ifdef WLAN_SUPPORT_FILS 2184 /** 2185 * wmi_unified_fils_vdev_config_send_cmd() - send FILS config cmd to fw 2186 * @wmi_hdl: wmi handle 2187 * @param: fils config params 2188 * 2189 * Return: QDF_STATUS_SUCCESS for success or error code 2190 */ 2191 QDF_STATUS 2192 wmi_unified_fils_vdev_config_send_cmd(void *wmi_hdl, 2193 struct config_fils_params *param); 2194 2195 /** 2196 * wmi_extract_swfda_vdev_id() - api to extract vdev id 2197 * @wmi_hdl: wmi handle 2198 * @evt_buf: pointer to event buffer 2199 * @vdev_id: pointer to vdev id 2200 * 2201 * Return: QDF_STATUS_SUCCESS for success or error code 2202 */ 2203 QDF_STATUS wmi_extract_swfda_vdev_id(void *wmi_hdl, void *evt_buf, 2204 uint32_t *vdev_id); 2205 2206 /** 2207 * wmi_unified_fils_discovery_send_cmd() - send FILS discovery cmd to fw 2208 * @wmi_hdl: wmi handle 2209 * @param: fils discovery params 2210 * 2211 * Return: QDF_STATUS_SUCCESS for success or error code 2212 */ 2213 QDF_STATUS wmi_unified_fils_discovery_send_cmd(void *wmi_hdl, 2214 struct fd_params *param); 2215 #endif /* WLAN_SUPPORT_FILS */ 2216 2217 /** 2218 * wmi_unified_offload_11k_cmd() - send 11k offload command 2219 * @wmi_hdl: wmi handle 2220 * @params: 11k offload params 2221 * 2222 * This function passes the 11k offload command params to FW 2223 * 2224 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 2225 */ 2226 QDF_STATUS wmi_unified_offload_11k_cmd(void *wmi_hdl, 2227 struct wmi_11k_offload_params *params); 2228 /** 2229 * wmi_unified_invoke_neighbor_report_cmd() - send invoke neighbor report cmd 2230 * @wmi_hdl: wmi handle 2231 * @params: invoke neighbor report params 2232 * 2233 * This function passes the invoke neighbor report command to fw 2234 * 2235 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 2236 */ 2237 QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(void *wmi_hdl, 2238 struct wmi_invoke_neighbor_report_params *params); 2239 2240 /* wmi_get_ch_width_from_phy_mode() - convert phy mode to channel width 2241 * @wmi_hdl: wmi handle 2242 * @phymode: phy mode 2243 * 2244 * Return: wmi channel width 2245 */ 2246 wmi_host_channel_width wmi_get_ch_width_from_phy_mode(void *wmi_hdl, 2247 WMI_HOST_WLAN_PHY_MODE phymode); 2248 2249 #ifdef QCA_SUPPORT_CP_STATS 2250 /** 2251 * wmi_extract_cca_stats() - api to extract congestion stats from event buffer 2252 * @wmi_handle: wma handle 2253 * @evt_buf: event buffer 2254 * @datalen: length of buffer 2255 * @stats: buffer to populated after stats extraction 2256 * 2257 * Return: status of operation 2258 */ 2259 QDF_STATUS wmi_extract_cca_stats(wmi_unified_t wmi_handle, void *evt_buf, 2260 struct wmi_host_congestion_stats *stats); 2261 #endif /* QCA_SUPPORT_CP_STATS */ 2262 2263 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) 2264 /** 2265 * wmi_unified_dfs_send_avg_params_cmd() - send average radar parameters cmd. 2266 * @wmi_hdl: wmi handle 2267 * @params: radar found params 2268 * 2269 * This function passes the average radar parameters to fw 2270 * 2271 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 2272 */ 2273 QDF_STATUS 2274 wmi_unified_dfs_send_avg_params_cmd(void *wmi_hdl, 2275 struct dfs_radar_found_params *params); 2276 2277 /** 2278 * wmi_extract_dfs_status_from_fw() - extract host dfs status from fw. 2279 * @wmi_hdl: wmi handle 2280 * @evt_buf: pointer to event buffer 2281 * @dfs_status_check: pointer to the host dfs status 2282 * 2283 * This function extracts the result of host dfs from fw 2284 * 2285 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 2286 */ 2287 QDF_STATUS wmi_extract_dfs_status_from_fw(void *wmi_hdl, void *evt_buf, 2288 uint32_t *dfs_status_check); 2289 #endif 2290 #endif /* _WMI_UNIFIED_API_H_ */ 2291