1 /* 2 * Copyright (c) 2017-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 * 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 * @handle: wma handle 30 * @event_buf: event buffer 31 * @len: length of buffer 32 * 33 * Return: 0 for success or error code 34 */ 35 QDF_STATUS wmi_extract_reg_chan_list_update_event(void *wmi_hdl, 36 uint8_t *evt_buf, 37 struct cur_regulatory_info 38 *reg_info, 39 uint32_t len); 40 41 /* 42 * wmi_unified_send_stop_11d_scan_cmd() - stop 11d scan 43 * @wmi_handle: wmi handle 44 * @stop_11d_scan: pointer to 11d scan stop req. 45 * 46 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 47 */ 48 QDF_STATUS wmi_unified_send_stop_11d_scan_cmd(wmi_unified_t wmi_handle, 49 struct reg_stop_11d_scan_req *stop_11d_scan); 50 51 /* 52 * wmi_unified_send_start_11d_scan_cmd() - start 11d scan 53 * @wmi_handle: wmi handle 54 * @start_11d_scan: pointer to 11d scan start req. 55 * 56 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 57 */ 58 QDF_STATUS wmi_unified_send_start_11d_scan_cmd(wmi_unified_t wmi_handle, 59 struct reg_start_11d_scan_req *start_11d_scan); 60 61 /** 62 * wmi_extract_reg_11d_new_cc_event() - function to extract the 11d new country 63 * @wmi_hdl: wmi handle 64 * @evt_buf: event buffer 65 * @reg_11d_new_cc: pointer to new 11d country info 66 * @len: length of buffer 67 * 68 * Return: 0 for success or error code 69 */ 70 QDF_STATUS wmi_extract_reg_11d_new_cc_event(void *wmi_hdl, 71 uint8_t *evt_buf, 72 struct reg_11d_new_country *reg_11d_new_cc, 73 uint32_t len); 74 75 /** 76 * wmi_unified_set_user_country_code_cmd_send() - WMI set country function 77 * @wmi_handle: wmi handle. 78 * @pdev_id: Pdev id 79 * @rd: User country code or regdomain 80 * 81 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 82 */ 83 QDF_STATUS wmi_unified_set_user_country_code_cmd_send(void *wmi_hdl, 84 uint8_t pdev_id, struct cc_regdmn_s *rd); 85 86 /** 87 * wmi_extract_reg_ch_avoid_event() - process freq avoid event 88 * @wmi_hdl: wmi handle. 89 * @evt_buf: event buffer 90 * @ch_avoid_ind: buffer pointer to save the event processed data 91 * @len: length of buffer 92 * 93 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 94 */ 95 QDF_STATUS wmi_extract_reg_ch_avoid_event(void *wmi_hdl, 96 uint8_t *evt_buf, 97 struct ch_avoid_ind_type *ch_avoid_ind, 98 uint32_t len); 99 100 #endif /* _WMI_UNIFIED_REG_API_H_ */ 101