xref: /wlan-driver/qca-wifi-host-cmn/umac/regulatory/dispatcher/src/wlan_reg_ucfg_api.c (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name  *
5*5113495bSYour Name  *
6*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
7*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
8*5113495bSYour Name  * above copyright notice and this permission notice appear in all
9*5113495bSYour Name  * copies.
10*5113495bSYour Name  *
11*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
12*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
13*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
14*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
15*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
16*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
17*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
18*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
19*5113495bSYour Name  */
20*5113495bSYour Name 
21*5113495bSYour Name /**
22*5113495bSYour Name  * DOC: wlan_req_ucfg_api.c
23*5113495bSYour Name  *      contains regulatory user config interface definitions
24*5113495bSYour Name  */
25*5113495bSYour Name 
26*5113495bSYour Name #include <wlan_objmgr_vdev_obj.h>
27*5113495bSYour Name #include <wlan_reg_ucfg_api.h>
28*5113495bSYour Name #include <wlan_objmgr_psoc_obj.h>
29*5113495bSYour Name #include <../../core/src/reg_priv_objs.h>
30*5113495bSYour Name #include <../../core/src/reg_utils.h>
31*5113495bSYour Name #include <../../core/src/reg_services_common.h>
32*5113495bSYour Name #include <../../core/src/reg_opclass.h>
33*5113495bSYour Name #include <../../core/src/reg_lte.h>
34*5113495bSYour Name #include <../../core/src/reg_offload_11d_scan.h>
35*5113495bSYour Name #include <../../core/src/reg_build_chan_list.h>
36*5113495bSYour Name #include <../../core/src/reg_callbacks.h>
37*5113495bSYour Name #include <qdf_module.h>
38*5113495bSYour Name 
ucfg_reg_register_event_handler(uint8_t vdev_id,reg_event_cb cb,void * arg)39*5113495bSYour Name QDF_STATUS ucfg_reg_register_event_handler(uint8_t vdev_id, reg_event_cb cb,
40*5113495bSYour Name 		void *arg)
41*5113495bSYour Name {
42*5113495bSYour Name 	/* Register a event cb handler */
43*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
44*5113495bSYour Name }
45*5113495bSYour Name 
ucfg_reg_unregister_event_handler(uint8_t vdev_id,reg_event_cb cb,void * arg)46*5113495bSYour Name QDF_STATUS ucfg_reg_unregister_event_handler(uint8_t vdev_id, reg_event_cb cb,
47*5113495bSYour Name 		void *arg)
48*5113495bSYour Name {
49*5113495bSYour Name 	/* unregister a event cb handler */
50*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
51*5113495bSYour Name }
52*5113495bSYour Name 
ucfg_reg_init_handler(uint8_t pdev_id)53*5113495bSYour Name QDF_STATUS ucfg_reg_init_handler(uint8_t pdev_id)
54*5113495bSYour Name {
55*5113495bSYour Name 	/* regulatory initialization handler */
56*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
57*5113495bSYour Name }
58*5113495bSYour Name 
ucfg_reg_get_current_chan_list(struct wlan_objmgr_pdev * pdev,struct regulatory_channel * chan_list)59*5113495bSYour Name QDF_STATUS ucfg_reg_get_current_chan_list(struct wlan_objmgr_pdev *pdev,
60*5113495bSYour Name 					  struct regulatory_channel *chan_list)
61*5113495bSYour Name {
62*5113495bSYour Name 	return reg_get_current_chan_list(pdev, chan_list);
63*5113495bSYour Name }
64*5113495bSYour Name 
65*5113495bSYour Name qdf_export_symbol(ucfg_reg_get_current_chan_list);
66*5113495bSYour Name 
ucfg_reg_modify_chan_144(struct wlan_objmgr_pdev * pdev,bool enable_ch_144)67*5113495bSYour Name QDF_STATUS ucfg_reg_modify_chan_144(struct wlan_objmgr_pdev *pdev,
68*5113495bSYour Name 				    bool enable_ch_144)
69*5113495bSYour Name {
70*5113495bSYour Name 	return reg_modify_chan_144(pdev, enable_ch_144);
71*5113495bSYour Name }
72*5113495bSYour Name 
ucfg_reg_get_en_chan_144(struct wlan_objmgr_pdev * pdev)73*5113495bSYour Name bool ucfg_reg_get_en_chan_144(struct wlan_objmgr_pdev *pdev)
74*5113495bSYour Name {
75*5113495bSYour Name 	return reg_get_en_chan_144(pdev);
76*5113495bSYour Name }
77*5113495bSYour Name 
ucfg_reg_set_config_vars(struct wlan_objmgr_psoc * psoc,struct reg_config_vars config_vars)78*5113495bSYour Name QDF_STATUS ucfg_reg_set_config_vars(struct wlan_objmgr_psoc *psoc,
79*5113495bSYour Name 				 struct reg_config_vars config_vars)
80*5113495bSYour Name {
81*5113495bSYour Name 	return reg_set_config_vars(psoc, config_vars);
82*5113495bSYour Name }
83*5113495bSYour Name 
ucfg_reg_is_regdb_offloaded(struct wlan_objmgr_psoc * psoc)84*5113495bSYour Name bool ucfg_reg_is_regdb_offloaded(struct wlan_objmgr_psoc *psoc)
85*5113495bSYour Name {
86*5113495bSYour Name 	return reg_is_regdb_offloaded(psoc);
87*5113495bSYour Name }
88*5113495bSYour Name 
ucfg_reg_program_mas_chan_list(struct wlan_objmgr_psoc * psoc,struct regulatory_channel * reg_channels,uint8_t * alpha2,enum dfs_reg dfs_region)89*5113495bSYour Name void ucfg_reg_program_mas_chan_list(struct wlan_objmgr_psoc *psoc,
90*5113495bSYour Name 				    struct regulatory_channel *reg_channels,
91*5113495bSYour Name 				    uint8_t *alpha2,
92*5113495bSYour Name 				    enum dfs_reg dfs_region)
93*5113495bSYour Name {
94*5113495bSYour Name 	reg_program_mas_chan_list(psoc, reg_channels, alpha2, dfs_region);
95*5113495bSYour Name }
96*5113495bSYour Name 
ucfg_reg_get_regd_rules(struct wlan_objmgr_pdev * pdev,struct reg_rule_info * reg_rules)97*5113495bSYour Name QDF_STATUS ucfg_reg_get_regd_rules(struct wlan_objmgr_pdev *pdev,
98*5113495bSYour Name 				   struct reg_rule_info *reg_rules)
99*5113495bSYour Name {
100*5113495bSYour Name 	return reg_get_regd_rules(pdev, reg_rules);
101*5113495bSYour Name }
102*5113495bSYour Name 
103*5113495bSYour Name #ifdef WLAN_REG_PARTIAL_OFFLOAD
ucfg_reg_program_default_cc(struct wlan_objmgr_pdev * pdev,uint16_t regdmn)104*5113495bSYour Name QDF_STATUS ucfg_reg_program_default_cc(struct wlan_objmgr_pdev *pdev,
105*5113495bSYour Name 				       uint16_t regdmn)
106*5113495bSYour Name {
107*5113495bSYour Name 	return reg_program_default_cc(pdev, regdmn);
108*5113495bSYour Name }
109*5113495bSYour Name #endif
110*5113495bSYour Name 
ucfg_reg_program_cc(struct wlan_objmgr_pdev * pdev,struct cc_regdmn_s * rd)111*5113495bSYour Name QDF_STATUS ucfg_reg_program_cc(struct wlan_objmgr_pdev *pdev,
112*5113495bSYour Name 			       struct cc_regdmn_s *rd)
113*5113495bSYour Name {
114*5113495bSYour Name 	return reg_program_chan_list(pdev, rd);
115*5113495bSYour Name }
116*5113495bSYour Name 
ucfg_reg_get_current_cc(struct wlan_objmgr_pdev * pdev,struct cc_regdmn_s * rd)117*5113495bSYour Name QDF_STATUS ucfg_reg_get_current_cc(struct wlan_objmgr_pdev *pdev,
118*5113495bSYour Name 				   struct cc_regdmn_s *rd)
119*5113495bSYour Name {
120*5113495bSYour Name 	return reg_get_current_cc(pdev, rd);
121*5113495bSYour Name }
122*5113495bSYour Name 
123*5113495bSYour Name #ifdef CONFIG_REG_CLIENT
124*5113495bSYour Name 
ucfg_reg_set_band(struct wlan_objmgr_pdev * pdev,uint32_t band_bitmap)125*5113495bSYour Name QDF_STATUS ucfg_reg_set_band(struct wlan_objmgr_pdev *pdev,
126*5113495bSYour Name 			     uint32_t band_bitmap)
127*5113495bSYour Name {
128*5113495bSYour Name 	return reg_set_band(pdev, band_bitmap);
129*5113495bSYour Name }
130*5113495bSYour Name 
ucfg_reg_get_band(struct wlan_objmgr_pdev * pdev,uint32_t * band_bitmap)131*5113495bSYour Name QDF_STATUS ucfg_reg_get_band(struct wlan_objmgr_pdev *pdev,
132*5113495bSYour Name 			     uint32_t *band_bitmap)
133*5113495bSYour Name {
134*5113495bSYour Name 	return reg_get_band(pdev, band_bitmap);
135*5113495bSYour Name }
136*5113495bSYour Name 
ucfg_reg_notify_sap_event(struct wlan_objmgr_pdev * pdev,bool sap_state)137*5113495bSYour Name QDF_STATUS ucfg_reg_notify_sap_event(struct wlan_objmgr_pdev *pdev,
138*5113495bSYour Name 				     bool sap_state)
139*5113495bSYour Name {
140*5113495bSYour Name 	return reg_notify_sap_event(pdev, sap_state);
141*5113495bSYour Name }
142*5113495bSYour Name 
ucfg_reg_set_fcc_constraint(struct wlan_objmgr_pdev * pdev,bool fcc_constraint)143*5113495bSYour Name QDF_STATUS ucfg_reg_set_fcc_constraint(struct wlan_objmgr_pdev *pdev,
144*5113495bSYour Name 				       bool fcc_constraint)
145*5113495bSYour Name {
146*5113495bSYour Name 	return reg_set_fcc_constraint(pdev, fcc_constraint);
147*5113495bSYour Name }
148*5113495bSYour Name 
ucfg_reg_get_current_country(struct wlan_objmgr_psoc * psoc,uint8_t * country_code)149*5113495bSYour Name QDF_STATUS ucfg_reg_get_current_country(struct wlan_objmgr_psoc *psoc,
150*5113495bSYour Name 					       uint8_t *country_code)
151*5113495bSYour Name {
152*5113495bSYour Name 	return reg_read_current_country(psoc, country_code);
153*5113495bSYour Name }
154*5113495bSYour Name 
ucfg_reg_set_default_country(struct wlan_objmgr_psoc * psoc,uint8_t * country)155*5113495bSYour Name QDF_STATUS ucfg_reg_set_default_country(struct wlan_objmgr_psoc *psoc,
156*5113495bSYour Name 					uint8_t *country)
157*5113495bSYour Name {
158*5113495bSYour Name 	return reg_set_default_country(psoc, country);
159*5113495bSYour Name }
160*5113495bSYour Name 
ucfg_reg_get_keep_6ghz_sta_cli_connection(struct wlan_objmgr_pdev * pdev)161*5113495bSYour Name bool ucfg_reg_get_keep_6ghz_sta_cli_connection(
162*5113495bSYour Name 					struct wlan_objmgr_pdev *pdev)
163*5113495bSYour Name {
164*5113495bSYour Name 	return reg_get_keep_6ghz_sta_cli_connection(pdev);
165*5113495bSYour Name }
166*5113495bSYour Name 
ucfg_reg_set_keep_6ghz_sta_cli_connection(struct wlan_objmgr_pdev * pdev,bool keep_6ghz_sta_cli_connection)167*5113495bSYour Name QDF_STATUS ucfg_reg_set_keep_6ghz_sta_cli_connection(
168*5113495bSYour Name 					struct wlan_objmgr_pdev *pdev,
169*5113495bSYour Name 					bool keep_6ghz_sta_cli_connection)
170*5113495bSYour Name {
171*5113495bSYour Name 	return reg_set_keep_6ghz_sta_cli_connection(pdev,
172*5113495bSYour Name 						keep_6ghz_sta_cli_connection);
173*5113495bSYour Name }
174*5113495bSYour Name 
ucfg_reg_is_user_country_set_allowed(struct wlan_objmgr_psoc * psoc)175*5113495bSYour Name bool ucfg_reg_is_user_country_set_allowed(struct wlan_objmgr_psoc *psoc)
176*5113495bSYour Name {
177*5113495bSYour Name 	return reg_is_user_country_set_allowed(psoc);
178*5113495bSYour Name }
179*5113495bSYour Name 
ucfg_reg_is_fcc_constraint_set(struct wlan_objmgr_pdev * pdev)180*5113495bSYour Name bool ucfg_reg_is_fcc_constraint_set(struct wlan_objmgr_pdev *pdev)
181*5113495bSYour Name {
182*5113495bSYour Name 	return reg_is_fcc_constraint_set(pdev);
183*5113495bSYour Name }
184*5113495bSYour Name #endif
185*5113495bSYour Name 
ucfg_reg_get_default_country(struct wlan_objmgr_psoc * psoc,uint8_t * country_code)186*5113495bSYour Name QDF_STATUS ucfg_reg_get_default_country(struct wlan_objmgr_psoc *psoc,
187*5113495bSYour Name 					uint8_t *country_code)
188*5113495bSYour Name {
189*5113495bSYour Name 	return reg_read_default_country(psoc, country_code);
190*5113495bSYour Name }
191*5113495bSYour Name 
ucfg_reg_set_country(struct wlan_objmgr_pdev * pdev,uint8_t * country)192*5113495bSYour Name QDF_STATUS ucfg_reg_set_country(struct wlan_objmgr_pdev *pdev,
193*5113495bSYour Name 				uint8_t *country)
194*5113495bSYour Name {
195*5113495bSYour Name 	return reg_set_country(pdev, country);
196*5113495bSYour Name }
197*5113495bSYour Name 
ucfg_reg_reset_country(struct wlan_objmgr_psoc * psoc)198*5113495bSYour Name QDF_STATUS ucfg_reg_reset_country(struct wlan_objmgr_psoc *psoc)
199*5113495bSYour Name {
200*5113495bSYour Name 	return reg_reset_country(psoc);
201*5113495bSYour Name }
202*5113495bSYour Name 
ucfg_reg_enable_dfs_channels(struct wlan_objmgr_pdev * pdev,bool dfs_enable)203*5113495bSYour Name QDF_STATUS ucfg_reg_enable_dfs_channels(struct wlan_objmgr_pdev *pdev,
204*5113495bSYour Name 					bool dfs_enable)
205*5113495bSYour Name {
206*5113495bSYour Name 	return reg_enable_dfs_channels(pdev, dfs_enable);
207*5113495bSYour Name }
208*5113495bSYour Name 
ucfg_reg_register_chan_change_callback(struct wlan_objmgr_psoc * psoc,void * cbk,void * arg)209*5113495bSYour Name void ucfg_reg_register_chan_change_callback(struct wlan_objmgr_psoc *psoc,
210*5113495bSYour Name 					    void *cbk, void *arg)
211*5113495bSYour Name {
212*5113495bSYour Name 	reg_register_chan_change_callback(psoc, (reg_chan_change_callback)cbk,
213*5113495bSYour Name 					  arg);
214*5113495bSYour Name }
215*5113495bSYour Name 
ucfg_reg_unregister_chan_change_callback(struct wlan_objmgr_psoc * psoc,void * cbk)216*5113495bSYour Name void ucfg_reg_unregister_chan_change_callback(struct wlan_objmgr_psoc *psoc,
217*5113495bSYour Name 					      void *cbk)
218*5113495bSYour Name {
219*5113495bSYour Name 	reg_unregister_chan_change_callback(psoc,
220*5113495bSYour Name 					    (reg_chan_change_callback)cbk);
221*5113495bSYour Name }
222*5113495bSYour Name 
223*5113495bSYour Name #ifdef CONFIG_AFC_SUPPORT
ucfg_reg_register_afc_req_rx_callback(struct wlan_objmgr_pdev * pdev,afc_req_rx_evt_handler cbf,void * arg)224*5113495bSYour Name QDF_STATUS ucfg_reg_register_afc_req_rx_callback(struct wlan_objmgr_pdev *pdev,
225*5113495bSYour Name 						 afc_req_rx_evt_handler cbf,
226*5113495bSYour Name 						 void *arg)
227*5113495bSYour Name {
228*5113495bSYour Name 	return reg_register_afc_req_rx_callback(pdev, cbf, arg);
229*5113495bSYour Name }
230*5113495bSYour Name 
231*5113495bSYour Name qdf_export_symbol(ucfg_reg_register_afc_req_rx_callback);
232*5113495bSYour Name 
ucfg_reg_unregister_afc_req_rx_callback(struct wlan_objmgr_pdev * pdev,afc_req_rx_evt_handler cbf)233*5113495bSYour Name QDF_STATUS ucfg_reg_unregister_afc_req_rx_callback(struct wlan_objmgr_pdev *pdev,
234*5113495bSYour Name 						   afc_req_rx_evt_handler cbf)
235*5113495bSYour Name {
236*5113495bSYour Name 	return reg_unregister_afc_req_rx_callback(pdev, cbf);
237*5113495bSYour Name }
238*5113495bSYour Name 
239*5113495bSYour Name QDF_STATUS
ucfg_reg_register_afc_power_event_callback(struct wlan_objmgr_pdev * pdev,afc_power_tx_evt_handler cbf,void * arg)240*5113495bSYour Name ucfg_reg_register_afc_power_event_callback(struct wlan_objmgr_pdev *pdev,
241*5113495bSYour Name 					   afc_power_tx_evt_handler cbf,
242*5113495bSYour Name 					   void *arg)
243*5113495bSYour Name {
244*5113495bSYour Name 	return reg_register_afc_power_event_callback(pdev, cbf, arg);
245*5113495bSYour Name }
246*5113495bSYour Name 
247*5113495bSYour Name qdf_export_symbol(ucfg_reg_register_afc_power_event_callback);
248*5113495bSYour Name 
249*5113495bSYour Name QDF_STATUS
ucfg_reg_unregister_afc_power_event_callback(struct wlan_objmgr_pdev * pdev,afc_power_tx_evt_handler cbf)250*5113495bSYour Name ucfg_reg_unregister_afc_power_event_callback(struct wlan_objmgr_pdev *pdev,
251*5113495bSYour Name 					     afc_power_tx_evt_handler cbf)
252*5113495bSYour Name {
253*5113495bSYour Name 	return reg_unregister_afc_power_event_callback(pdev, cbf);
254*5113495bSYour Name }
255*5113495bSYour Name 
256*5113495bSYour Name QDF_STATUS
ucfg_reg_register_afc_payload_reset_event_callback(struct wlan_objmgr_pdev * pdev,afc_payload_reset_tx_evt_handler cbf,void * arg)257*5113495bSYour Name ucfg_reg_register_afc_payload_reset_event_callback(
258*5113495bSYour Name 		struct wlan_objmgr_pdev *pdev,
259*5113495bSYour Name 		afc_payload_reset_tx_evt_handler cbf,
260*5113495bSYour Name 		void *arg) {
261*5113495bSYour Name 	return reg_register_afc_payload_reset_event_callback(pdev, cbf, arg);
262*5113495bSYour Name }
263*5113495bSYour Name 
264*5113495bSYour Name qdf_export_symbol(ucfg_reg_register_afc_payload_reset_event_callback);
265*5113495bSYour Name 
ucfg_reg_unregister_afc_payload_reset_event_callback(struct wlan_objmgr_pdev * pdev,afc_payload_reset_tx_evt_handler cbf)266*5113495bSYour Name QDF_STATUS ucfg_reg_unregister_afc_payload_reset_event_callback(
267*5113495bSYour Name 		struct wlan_objmgr_pdev *pdev,
268*5113495bSYour Name 		afc_payload_reset_tx_evt_handler cbf)
269*5113495bSYour Name {
270*5113495bSYour Name 	return reg_unregister_afc_payload_reset_event_callback(pdev, cbf);
271*5113495bSYour Name }
272*5113495bSYour Name 
ucfg_reg_get_afc_req_info(struct wlan_objmgr_pdev * pdev,struct wlan_afc_host_request ** afc_req,uint64_t req_id)273*5113495bSYour Name QDF_STATUS ucfg_reg_get_afc_req_info(struct wlan_objmgr_pdev *pdev,
274*5113495bSYour Name 				     struct wlan_afc_host_request **afc_req,
275*5113495bSYour Name 				     uint64_t req_id)
276*5113495bSYour Name {
277*5113495bSYour Name 	QDF_STATUS status;
278*5113495bSYour Name 
279*5113495bSYour Name 	status = reg_get_afc_req_info(pdev, afc_req);
280*5113495bSYour Name 
281*5113495bSYour Name 	if (status == QDF_STATUS_SUCCESS)
282*5113495bSYour Name 		reg_dmn_set_afc_req_id(*afc_req, req_id);
283*5113495bSYour Name 
284*5113495bSYour Name 	return status;
285*5113495bSYour Name }
286*5113495bSYour Name 
287*5113495bSYour Name void
ucfg_reg_free_afc_req(struct wlan_objmgr_pdev * pdev,struct wlan_afc_host_request * afc_req)288*5113495bSYour Name ucfg_reg_free_afc_req(struct wlan_objmgr_pdev *pdev,
289*5113495bSYour Name 		      struct wlan_afc_host_request *afc_req)
290*5113495bSYour Name {
291*5113495bSYour Name 	reg_free_afc_req(pdev, afc_req);
292*5113495bSYour Name }
293*5113495bSYour Name #endif
294*5113495bSYour Name 
ucfg_reg_get_cc_and_src(struct wlan_objmgr_psoc * psoc,uint8_t * alpha2)295*5113495bSYour Name enum country_src ucfg_reg_get_cc_and_src(struct wlan_objmgr_psoc *psoc,
296*5113495bSYour Name 					 uint8_t *alpha2)
297*5113495bSYour Name {
298*5113495bSYour Name 	return reg_get_cc_and_src(psoc, alpha2);
299*5113495bSYour Name }
300*5113495bSYour Name 
ucfg_reg_unit_simulate_ch_avoid(struct wlan_objmgr_psoc * psoc,struct ch_avoid_ind_type * ch_avoid)301*5113495bSYour Name void ucfg_reg_unit_simulate_ch_avoid(struct wlan_objmgr_psoc *psoc,
302*5113495bSYour Name 	struct ch_avoid_ind_type *ch_avoid)
303*5113495bSYour Name {
304*5113495bSYour Name 	reg_process_ch_avoid_event(psoc, ch_avoid);
305*5113495bSYour Name }
306*5113495bSYour Name 
ucfg_reg_ch_avoid(struct wlan_objmgr_psoc * psoc,struct ch_avoid_ind_type * ch_avoid)307*5113495bSYour Name void ucfg_reg_ch_avoid(struct wlan_objmgr_psoc *psoc,
308*5113495bSYour Name 		       struct ch_avoid_ind_type *ch_avoid)
309*5113495bSYour Name {
310*5113495bSYour Name 	reg_process_ch_avoid_event(psoc, ch_avoid);
311*5113495bSYour Name }
312*5113495bSYour Name 
313*5113495bSYour Name #ifdef FEATURE_WLAN_CH_AVOID_EXT
ucfg_reg_ch_avoid_ext(struct wlan_objmgr_psoc * psoc,struct ch_avoid_ind_type * ch_avoid)314*5113495bSYour Name void ucfg_reg_ch_avoid_ext(struct wlan_objmgr_psoc *psoc,
315*5113495bSYour Name 			   struct ch_avoid_ind_type *ch_avoid)
316*5113495bSYour Name {
317*5113495bSYour Name 	reg_process_ch_avoid_ext_event(psoc, ch_avoid);
318*5113495bSYour Name }
319*5113495bSYour Name #endif
320*5113495bSYour Name 
321*5113495bSYour Name #ifdef TARGET_11D_SCAN
ucfg_reg_11d_vdev_delete_update(struct wlan_objmgr_psoc * psoc,enum QDF_OPMODE op_mode,uint32_t vdev_id)322*5113495bSYour Name QDF_STATUS ucfg_reg_11d_vdev_delete_update(struct wlan_objmgr_psoc *psoc,
323*5113495bSYour Name 					   enum QDF_OPMODE op_mode,
324*5113495bSYour Name 					   uint32_t vdev_id)
325*5113495bSYour Name {
326*5113495bSYour Name 	return reg_11d_vdev_delete_update(psoc, op_mode, vdev_id);
327*5113495bSYour Name }
328*5113495bSYour Name 
ucfg_reg_11d_vdev_created_update(struct wlan_objmgr_vdev * vdev)329*5113495bSYour Name QDF_STATUS ucfg_reg_11d_vdev_created_update(struct wlan_objmgr_vdev *vdev)
330*5113495bSYour Name {
331*5113495bSYour Name 	return reg_11d_vdev_created_update(vdev);
332*5113495bSYour Name }
333*5113495bSYour Name #endif
334*5113495bSYour Name 
ucfg_reg_update_hal_cap_wireless_modes(struct wlan_objmgr_psoc * psoc,uint64_t modes,uint8_t phy_id)335*5113495bSYour Name QDF_STATUS ucfg_reg_update_hal_cap_wireless_modes(struct wlan_objmgr_psoc *psoc,
336*5113495bSYour Name 					       uint64_t modes, uint8_t phy_id)
337*5113495bSYour Name {
338*5113495bSYour Name 	return reg_update_hal_cap_wireless_modes(psoc, modes, phy_id);
339*5113495bSYour Name }
340*5113495bSYour Name 
341*5113495bSYour Name qdf_export_symbol(ucfg_reg_update_hal_cap_wireless_modes);
342*5113495bSYour Name 
ucfg_reg_get_hal_reg_cap(struct wlan_objmgr_psoc * psoc)343*5113495bSYour Name struct wlan_psoc_host_hal_reg_capabilities_ext *ucfg_reg_get_hal_reg_cap(
344*5113495bSYour Name 				struct wlan_objmgr_psoc *psoc)
345*5113495bSYour Name {
346*5113495bSYour Name 	return reg_get_hal_reg_cap(psoc);
347*5113495bSYour Name }
348*5113495bSYour Name qdf_export_symbol(ucfg_reg_get_hal_reg_cap);
349*5113495bSYour Name 
ucfg_reg_set_hal_reg_cap(struct wlan_objmgr_psoc * psoc,struct wlan_psoc_host_hal_reg_capabilities_ext * hal_reg_cap,uint16_t phy_cnt)350*5113495bSYour Name QDF_STATUS ucfg_reg_set_hal_reg_cap(struct wlan_objmgr_psoc *psoc,
351*5113495bSYour Name 		struct wlan_psoc_host_hal_reg_capabilities_ext *hal_reg_cap,
352*5113495bSYour Name 		uint16_t phy_cnt)
353*5113495bSYour Name 
354*5113495bSYour Name {
355*5113495bSYour Name 	return reg_set_hal_reg_cap(psoc, hal_reg_cap, phy_cnt);
356*5113495bSYour Name }
357*5113495bSYour Name qdf_export_symbol(ucfg_reg_set_hal_reg_cap);
358*5113495bSYour Name 
ucfg_reg_update_hal_reg_range_caps(struct wlan_objmgr_psoc * psoc,uint32_t low_2g_chan,uint32_t high_2g_chan,uint32_t low_5g_chan,uint32_t high_5g_chan,uint8_t phy_id)359*5113495bSYour Name QDF_STATUS ucfg_reg_update_hal_reg_range_caps(struct wlan_objmgr_psoc *psoc,
360*5113495bSYour Name 					      uint32_t low_2g_chan,
361*5113495bSYour Name 					      uint32_t high_2g_chan,
362*5113495bSYour Name 					      uint32_t low_5g_chan,
363*5113495bSYour Name 					      uint32_t high_5g_chan,
364*5113495bSYour Name 					      uint8_t phy_id)
365*5113495bSYour Name {
366*5113495bSYour Name 	return reg_update_hal_reg_range_caps(psoc, low_2g_chan,
367*5113495bSYour Name 				      high_2g_chan, low_5g_chan, high_5g_chan,
368*5113495bSYour Name 				      phy_id);
369*5113495bSYour Name }
370*5113495bSYour Name 
371*5113495bSYour Name qdf_export_symbol(ucfg_reg_update_hal_reg_range_caps);
372*5113495bSYour Name 
373*5113495bSYour Name #ifdef DISABLE_CHANNEL_LIST
374*5113495bSYour Name #ifdef CONFIG_CHAN_FREQ_API
ucfg_reg_cache_channel_freq_state(struct wlan_objmgr_pdev * pdev,uint32_t * channel_list,uint32_t num_channels)375*5113495bSYour Name void ucfg_reg_cache_channel_freq_state(struct wlan_objmgr_pdev *pdev,
376*5113495bSYour Name 				       uint32_t *channel_list,
377*5113495bSYour Name 				       uint32_t num_channels)
378*5113495bSYour Name {
379*5113495bSYour Name 	reg_cache_channel_freq_state(pdev, channel_list, num_channels);
380*5113495bSYour Name }
381*5113495bSYour Name #endif /* CONFIG_CHAN_FREQ_API */
382*5113495bSYour Name 
ucfg_reg_restore_cached_channels(struct wlan_objmgr_pdev * pdev)383*5113495bSYour Name void ucfg_reg_restore_cached_channels(struct wlan_objmgr_pdev *pdev)
384*5113495bSYour Name {
385*5113495bSYour Name 	reg_restore_cached_channels(pdev);
386*5113495bSYour Name }
387*5113495bSYour Name 
ucfg_reg_disable_cached_channels(struct wlan_objmgr_pdev * pdev)388*5113495bSYour Name void ucfg_reg_disable_cached_channels(struct wlan_objmgr_pdev *pdev)
389*5113495bSYour Name {
390*5113495bSYour Name 	reg_disable_cached_channels(pdev);
391*5113495bSYour Name }
392*5113495bSYour Name 
393*5113495bSYour Name #endif
394*5113495bSYour Name 
ucfg_set_ignore_fw_reg_offload_ind(struct wlan_objmgr_psoc * psoc)395*5113495bSYour Name QDF_STATUS ucfg_set_ignore_fw_reg_offload_ind(struct wlan_objmgr_psoc *psoc)
396*5113495bSYour Name {
397*5113495bSYour Name 	return reg_set_ignore_fw_reg_offload_ind(psoc);
398*5113495bSYour Name }
399*5113495bSYour Name 
400*5113495bSYour Name #ifdef DISABLE_UNII_SHARED_BANDS
401*5113495bSYour Name QDF_STATUS
ucfg_reg_get_unii_5g_bitmap(struct wlan_objmgr_pdev * pdev,uint8_t * bitmap)402*5113495bSYour Name ucfg_reg_get_unii_5g_bitmap(struct wlan_objmgr_pdev *pdev, uint8_t *bitmap)
403*5113495bSYour Name {
404*5113495bSYour Name 	return reg_get_unii_5g_bitmap(pdev, bitmap);
405*5113495bSYour Name }
406*5113495bSYour Name #endif
407*5113495bSYour Name 
408*5113495bSYour Name #if defined(CONFIG_BAND_6GHZ)
409*5113495bSYour Name QDF_STATUS
ucfg_reg_set_cur_6g_ap_pwr_type(struct wlan_objmgr_pdev * pdev,enum reg_6g_ap_type reg_cur_6g_ap_pwr_type)410*5113495bSYour Name ucfg_reg_set_cur_6g_ap_pwr_type(struct wlan_objmgr_pdev *pdev,
411*5113495bSYour Name 				enum reg_6g_ap_type reg_cur_6g_ap_pwr_type)
412*5113495bSYour Name {
413*5113495bSYour Name 	return reg_set_cur_6g_ap_pwr_type(pdev, reg_cur_6g_ap_pwr_type);
414*5113495bSYour Name }
415*5113495bSYour Name 
416*5113495bSYour Name QDF_STATUS
ucfg_reg_get_cur_6g_ap_pwr_type(struct wlan_objmgr_pdev * pdev,enum reg_6g_ap_type * reg_cur_6g_ap_pwr_type)417*5113495bSYour Name ucfg_reg_get_cur_6g_ap_pwr_type(struct wlan_objmgr_pdev *pdev,
418*5113495bSYour Name 				enum reg_6g_ap_type *reg_cur_6g_ap_pwr_type)
419*5113495bSYour Name {
420*5113495bSYour Name 	return reg_get_cur_6g_ap_pwr_type(pdev, reg_cur_6g_ap_pwr_type);
421*5113495bSYour Name }
422*5113495bSYour Name 
423*5113495bSYour Name qdf_export_symbol(ucfg_reg_get_cur_6g_ap_pwr_type);
424*5113495bSYour Name #endif
425*5113495bSYour Name 
426*5113495bSYour Name #if defined(CONFIG_AFC_SUPPORT) && defined(CONFIG_BAND_6GHZ)
ucfg_reg_get_enable_6ghz_sp_mode_support(struct wlan_objmgr_psoc * psoc)427*5113495bSYour Name bool ucfg_reg_get_enable_6ghz_sp_mode_support(struct wlan_objmgr_psoc *psoc)
428*5113495bSYour Name {
429*5113495bSYour Name 	return reg_get_enable_6ghz_sp_mode_support(psoc);
430*5113495bSYour Name }
431*5113495bSYour Name 
432*5113495bSYour Name qdf_export_symbol(ucfg_reg_get_enable_6ghz_sp_mode_support);
433*5113495bSYour Name 
ucfg_reg_set_enable_6ghz_sp_mode_support(struct wlan_objmgr_psoc * psoc,bool value)434*5113495bSYour Name void ucfg_reg_set_enable_6ghz_sp_mode_support(struct wlan_objmgr_psoc *psoc,
435*5113495bSYour Name 					      bool value)
436*5113495bSYour Name {
437*5113495bSYour Name 	reg_set_enable_6ghz_sp_mode_support(psoc, value);
438*5113495bSYour Name }
439*5113495bSYour Name 
440*5113495bSYour Name qdf_export_symbol(ucfg_reg_set_enable_6ghz_sp_mode_support);
441*5113495bSYour Name 
ucfg_reg_get_afc_disable_timer_check(struct wlan_objmgr_psoc * psoc)442*5113495bSYour Name bool ucfg_reg_get_afc_disable_timer_check(struct wlan_objmgr_psoc *psoc)
443*5113495bSYour Name {
444*5113495bSYour Name 	return reg_get_afc_disable_timer_check(psoc);
445*5113495bSYour Name }
446*5113495bSYour Name 
447*5113495bSYour Name qdf_export_symbol(ucfg_reg_get_afc_disable_timer_check);
448*5113495bSYour Name 
ucfg_reg_set_afc_disable_timer_check(struct wlan_objmgr_psoc * psoc,bool value)449*5113495bSYour Name void ucfg_reg_set_afc_disable_timer_check(struct wlan_objmgr_psoc *psoc,
450*5113495bSYour Name 					  bool value)
451*5113495bSYour Name {
452*5113495bSYour Name 	reg_set_afc_disable_timer_check(psoc, value);
453*5113495bSYour Name }
454*5113495bSYour Name 
455*5113495bSYour Name qdf_export_symbol(ucfg_reg_set_afc_disable_timer_check);
456*5113495bSYour Name 
ucfg_reg_get_afc_disable_request_id_check(struct wlan_objmgr_psoc * psoc)457*5113495bSYour Name bool ucfg_reg_get_afc_disable_request_id_check(struct wlan_objmgr_psoc *psoc)
458*5113495bSYour Name {
459*5113495bSYour Name 	return reg_get_afc_disable_request_id_check(psoc);
460*5113495bSYour Name }
461*5113495bSYour Name 
462*5113495bSYour Name qdf_export_symbol(ucfg_reg_get_afc_disable_request_id_check);
463*5113495bSYour Name 
ucfg_reg_set_afc_disable_request_id_check(struct wlan_objmgr_psoc * psoc,bool value)464*5113495bSYour Name void ucfg_reg_set_afc_disable_request_id_check(struct wlan_objmgr_psoc *psoc,
465*5113495bSYour Name 					       bool value)
466*5113495bSYour Name {
467*5113495bSYour Name 	reg_set_afc_disable_request_id_check(psoc, value);
468*5113495bSYour Name }
469*5113495bSYour Name 
470*5113495bSYour Name qdf_export_symbol(ucfg_reg_set_afc_disable_request_id_check);
471*5113495bSYour Name 
ucfg_reg_get_afc_no_action(struct wlan_objmgr_psoc * psoc)472*5113495bSYour Name bool ucfg_reg_get_afc_no_action(struct wlan_objmgr_psoc *psoc)
473*5113495bSYour Name {
474*5113495bSYour Name 	return reg_get_afc_noaction(psoc);
475*5113495bSYour Name }
476*5113495bSYour Name 
477*5113495bSYour Name qdf_export_symbol(ucfg_reg_get_afc_no_action);
478*5113495bSYour Name 
ucfg_reg_set_afc_no_action(struct wlan_objmgr_psoc * psoc,bool value)479*5113495bSYour Name void ucfg_reg_set_afc_no_action(struct wlan_objmgr_psoc *psoc, bool value)
480*5113495bSYour Name {
481*5113495bSYour Name 	reg_set_afc_noaction(psoc, value);
482*5113495bSYour Name }
483*5113495bSYour Name 
484*5113495bSYour Name qdf_export_symbol(ucfg_reg_set_afc_no_action);
485*5113495bSYour Name #endif
486*5113495bSYour Name 
487*5113495bSYour Name #if defined(CONFIG_AFC_SUPPORT) && defined(CONFIG_BAND_6GHZ)
488*5113495bSYour Name QDF_STATUS
ucfg_reg_send_afc_resp_rx_ind(struct wlan_objmgr_pdev * pdev,struct reg_afc_resp_rx_ind_info * afc_ind_obj)489*5113495bSYour Name ucfg_reg_send_afc_resp_rx_ind(struct wlan_objmgr_pdev *pdev,
490*5113495bSYour Name 			      struct reg_afc_resp_rx_ind_info *afc_ind_obj)
491*5113495bSYour Name {
492*5113495bSYour Name 	return reg_send_afc_cmd(pdev, afc_ind_obj);
493*5113495bSYour Name }
494*5113495bSYour Name 
495*5113495bSYour Name QDF_STATUS
ucfg_reg_afc_start(struct wlan_objmgr_pdev * pdev,uint64_t req_id)496*5113495bSYour Name ucfg_reg_afc_start(struct wlan_objmgr_pdev *pdev, uint64_t req_id)
497*5113495bSYour Name {
498*5113495bSYour Name 	return reg_afc_start(pdev, req_id);
499*5113495bSYour Name }
500*5113495bSYour Name #endif
501*5113495bSYour Name 
502*5113495bSYour Name #ifndef CONFIG_REG_CLIENT
ucfg_reg_enable_disable_opclass_chans(struct wlan_objmgr_pdev * pdev,bool is_disable,uint8_t opclass,uint8_t * ieee_chan_list,uint8_t chan_list_size,bool global_tbl_lookup)503*5113495bSYour Name QDF_STATUS ucfg_reg_enable_disable_opclass_chans(struct wlan_objmgr_pdev *pdev,
504*5113495bSYour Name 						 bool is_disable,
505*5113495bSYour Name 						 uint8_t opclass,
506*5113495bSYour Name 						 uint8_t *ieee_chan_list,
507*5113495bSYour Name 						 uint8_t chan_list_size,
508*5113495bSYour Name 						 bool global_tbl_lookup)
509*5113495bSYour Name {
510*5113495bSYour Name 	return reg_enable_disable_opclass_chans(pdev, is_disable, opclass,
511*5113495bSYour Name 						ieee_chan_list, chan_list_size,
512*5113495bSYour Name 						global_tbl_lookup);
513*5113495bSYour Name }
514*5113495bSYour Name #endif
515