1 /* 2 * Copyright (c) 2017-2021 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 * wmi_extract_reg_chan_list_update_event() - 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: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 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 #ifdef CONFIG_BAND_6GHZ 43 /** 44 * wmi_extract_reg_chan_list_ext_update_event() - function to update the 45 * extended channel list 46 * @wmi_handle: wmi handle 47 * @evt_buf: event buffer 48 * @reg_info: regulatory info 49 * @len: length of buffer 50 * 51 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 52 */ 53 QDF_STATUS wmi_extract_reg_chan_list_ext_update_event(wmi_unified_t wmi_handle, 54 uint8_t *evt_buf, 55 struct cur_regulatory_info *reg_info, 56 uint32_t len); 57 #endif 58 59 /* 60 * wmi_unified_send_stop_11d_scan_cmd() - stop 11d scan 61 * @wmi_handle: wmi handle 62 * @stop_11d_scan: pointer to 11d scan stop req. 63 * 64 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 65 */ 66 QDF_STATUS wmi_unified_send_stop_11d_scan_cmd(wmi_unified_t wmi_handle, 67 struct reg_stop_11d_scan_req *stop_11d_scan); 68 69 /* 70 * wmi_unified_send_start_11d_scan_cmd() - start 11d scan 71 * @wmi_handle: wmi handle 72 * @start_11d_scan: pointer to 11d scan start req. 73 * 74 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 75 */ 76 QDF_STATUS wmi_unified_send_start_11d_scan_cmd(wmi_unified_t wmi_handle, 77 struct reg_start_11d_scan_req *start_11d_scan); 78 79 /** 80 * wmi_extract_reg_11d_new_cc_event() - function to extract the 11d new country 81 * @wmi_handle: wmi handle 82 * @evt_buf: event buffer 83 * @reg_11d_new_cc: pointer to new 11d country info 84 * @len: length of buffer 85 * 86 * Return: 0 for success or error code 87 */ 88 QDF_STATUS wmi_extract_reg_11d_new_cc_event( 89 wmi_unified_t wmi_handle, 90 uint8_t *evt_buf, 91 struct reg_11d_new_country *reg_11d_new_cc, 92 uint32_t len); 93 94 /** 95 * wmi_unified_set_user_country_code_cmd_send() - WMI set country function 96 * @wmi_handle: wmi handle. 97 * @pdev_id: Pdev id 98 * @rd: User country code or regdomain 99 * 100 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 101 */ 102 QDF_STATUS wmi_unified_set_user_country_code_cmd_send( 103 wmi_unified_t wmi_handle, 104 uint8_t pdev_id, struct cc_regdmn_s *rd); 105 106 /** 107 * wmi_extract_reg_ch_avoid_event() - process freq avoid event 108 * @wmi_handle: wmi handle. 109 * @evt_buf: event buffer 110 * @ch_avoid_ind: buffer pointer to save the event processed data 111 * @len: length of buffer 112 * 113 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure 114 */ 115 QDF_STATUS wmi_extract_reg_ch_avoid_event( 116 wmi_unified_t wmi_handle, 117 uint8_t *evt_buf, 118 struct ch_avoid_ind_type *ch_avoid_ind, 119 uint32_t len); 120 121 #endif /* _WMI_UNIFIED_REG_API_H_ */ 122