1 /* 2 * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. 3 * 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 /** 21 * DOC: target_if_reg.h 22 * This file contains regulatory target interfaces. 23 */ 24 #ifndef __TARGET_IF_REG_H__ 25 #define __TARGET_IF_REG_H__ 26 27 /** 28 * tgt_if_regulatory_modify_freq_range() - Modify low and high freq ranges based 29 * on wireless mode. 30 * @psoc: psoc pointer 31 * 32 * Return: Success or Failure 33 */ 34 QDF_STATUS tgt_if_regulatory_modify_freq_range(struct wlan_objmgr_psoc *psoc); 35 36 /** 37 * target_if_register_regulatory_tx_ops() - register regulatory tx ops 38 * 39 * @tx_ops: tx_ops pointer 40 * Return: Success or Failure 41 */ 42 QDF_STATUS target_if_register_regulatory_tx_ops( 43 struct wlan_lmac_if_tx_ops *tx_ops); 44 45 /** 46 * target_if_reg_set_offloaded_info() - populate regulatory offloaded info 47 * 48 * @psoc: psoc pointer 49 * Return: Success or Failure 50 */ 51 QDF_STATUS target_if_reg_set_offloaded_info(struct wlan_objmgr_psoc *psoc); 52 53 /** 54 * target_if_reg_set_6ghz_info() - populate 6ghz enablement info 55 * @psoc: psoc pointer 56 * Return: Success or Failure 57 */ 58 QDF_STATUS target_if_reg_set_6ghz_info(struct wlan_objmgr_psoc *psoc); 59 60 /** 61 * target_if_reg_set_5dot9_ghz_info() - populate 5.9ghz enablement info 62 * @psoc: psoc pointer 63 * Return: Success or Failure 64 */ 65 QDF_STATUS target_if_reg_set_5dot9_ghz_info(struct wlan_objmgr_psoc *psoc); 66 67 /** 68 * target_if_reg_is_reg_cc_ext_event_host_supported() - Populate if reg_cc_ext 69 * event is supported by host. 70 * @psoc: psoc pointer 71 * 72 * Return: True if host supports, false otherwise. 73 */ 74 bool 75 target_if_reg_is_reg_cc_ext_event_host_supported(struct wlan_objmgr_psoc *psoc); 76 77 /** 78 * target_if_regulatory_get_rx_ops() - Get regdb rx ops 79 * @psoc: pointer to psoc object 80 * 81 * Return: Reg rx_ops 82 */ 83 struct wlan_lmac_if_reg_rx_ops * 84 target_if_regulatory_get_rx_ops(struct wlan_objmgr_psoc *psoc); 85 86 /** 87 * target_if_regulatory_set_ext_tpc() - populate FW support of new WMI command 88 * for TPC 89 * @psoc: psoc pointer 90 * 91 * Return: Success or Failure 92 */ 93 QDF_STATUS target_if_regulatory_set_ext_tpc(struct wlan_objmgr_psoc *psoc); 94 95 /** 96 * target_if_regulatory_get_tx_ops() - Get regdb tx ops 97 * @psoc: pointer to psoc object 98 * 99 * Return: Reg tx_ops 100 */ 101 struct wlan_lmac_if_reg_tx_ops * 102 target_if_regulatory_get_tx_ops(struct wlan_objmgr_psoc *psoc); 103 104 #if defined(CONFIG_BAND_6GHZ) 105 /** 106 * target_if_reg_set_lower_6g_edge_ch_info() - populate lower 6ghz edge channel 107 * enablement info 108 * @psoc: psoc pointer 109 * Return: Success or Failure 110 */ 111 QDF_STATUS 112 target_if_reg_set_lower_6g_edge_ch_info(struct wlan_objmgr_psoc *psoc); 113 114 /** 115 * target_if_reg_set_disable_upper_6g_edge_ch_info() - populate upper 6ghz 116 * edge channel disablement info 117 * @psoc: psoc pointer 118 * Return: Success or Failure 119 */ 120 QDF_STATUS 121 target_if_reg_set_disable_upper_6g_edge_ch_info(struct wlan_objmgr_psoc *psoc); 122 #else 123 static inline QDF_STATUS 124 target_if_reg_set_lower_6g_edge_ch_info(struct wlan_objmgr_psoc *psoc) 125 { 126 return QDF_STATUS_E_FAILURE; 127 } 128 129 static inline QDF_STATUS 130 target_if_reg_set_disable_upper_6g_edge_ch_info(struct wlan_objmgr_psoc *psoc) 131 { 132 return QDF_STATUS_E_FAILURE; 133 } 134 #endif 135 #endif /* __TARGET_IF_REG_H__ */ 136