1 /* 2 * Copyright (c) 2017-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 * DOC: This file contains the API definitions for the Unified Wireless Module 20 * Interface (WMI) which are specific to Regulatory module. 21 */ 22 23 #ifndef _WMI_UNIFIED_REG_API_H_ 24 #define _WMI_UNIFIED_REG_API_H_ 25 26 #include "reg_services_public_struct.h" 27 /** 28 * reg_chan_list_update_handler() - function to update channel list 29 * @wmi_handle: wmi handle 30 * @event_buf: event buffer 31 * @reg_info regulatory info 32 * @len: length of buffer 33 * 34 * Return: 0 for success or error code 35 */ 36 QDF_STATUS wmi_extract_reg_chan_list_update_event( 37 wmi_unified_t wmi_handle, 38 uint8_t *evt_buf, 39 struct cur_regulatory_info *reg_info, 40 uint32_t len); 41 42 /* 43 * wmi_unified_send_stop_11d_scan_cmd() - stop 11d scan 44 * @wmi_handle: wmi handle 45 * @stop_11d_scan: pointer to 11d scan stop req. 46 * 47 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 48 */ 49 QDF_STATUS wmi_unified_send_stop_11d_scan_cmd(wmi_unified_t wmi_handle, 50 struct reg_stop_11d_scan_req *stop_11d_scan); 51 52 /* 53 * wmi_unified_send_start_11d_scan_cmd() - start 11d scan 54 * @wmi_handle: wmi handle 55 * @start_11d_scan: pointer to 11d scan start req. 56 * 57 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 58 */ 59 QDF_STATUS wmi_unified_send_start_11d_scan_cmd(wmi_unified_t wmi_handle, 60 struct reg_start_11d_scan_req *start_11d_scan); 61 62 /** 63 * wmi_extract_reg_11d_new_cc_event() - function to extract the 11d new country 64 * @wmi_handle: wmi handle 65 * @evt_buf: event buffer 66 * @reg_11d_new_cc: pointer to new 11d country info 67 * @len: length of buffer 68 * 69 * Return: 0 for success or error code 70 */ 71 QDF_STATUS wmi_extract_reg_11d_new_cc_event( 72 wmi_unified_t wmi_handle, 73 uint8_t *evt_buf, 74 struct reg_11d_new_country *reg_11d_new_cc, 75 uint32_t len); 76 77 /** 78 * wmi_unified_set_user_country_code_cmd_send() - WMI set country function 79 * @wmi_handle: wmi handle. 80 * @pdev_id: Pdev id 81 * @rd: User country code or regdomain 82 * 83 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 84 */ 85 QDF_STATUS wmi_unified_set_user_country_code_cmd_send( 86 wmi_unified_t wmi_handle, 87 uint8_t pdev_id, struct cc_regdmn_s *rd); 88 89 /** 90 * wmi_extract_reg_ch_avoid_event() - process freq avoid event 91 * @wmi_handle: wmi handle. 92 * @evt_buf: event buffer 93 * @ch_avoid_ind: buffer pointer to save the event processed data 94 * @len: length of buffer 95 * 96 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 97 */ 98 QDF_STATUS wmi_extract_reg_ch_avoid_event( 99 wmi_unified_t wmi_handle, 100 uint8_t *evt_buf, 101 struct ch_avoid_ind_type *ch_avoid_ind, 102 uint32_t len); 103 104 #endif /* _WMI_UNIFIED_REG_API_H_ */ 105