xref: /wlan-dirver/qca-wifi-host-cmn/umac/regulatory/dispatcher/inc/wlan_reg_ucfg_api.h (revision 70a19e16789e308182f63b15c75decec7bf0b342)
1 /*
2  * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  *
6  * Permission to use, copy, modify, and/or distribute this software for
7  * any purpose with or without fee is hereby granted, provided that the
8  * above copyright notice and this permission notice appear in all
9  * copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
12  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
13  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
14  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
15  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
16  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
17  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
18  * PERFORMANCE OF THIS SOFTWARE.
19  */
20 
21 /**
22  * DOC: wlan_reg_ucfg_api.h
23  * This file provides prototypes of the regulatory component user
24  * config interface routines
25  */
26 
27 #ifndef __WLAN_REG_UCFG_API_H
28 #define __WLAN_REG_UCFG_API_H
29 
30 #ifdef CONFIG_AFC_SUPPORT
31 #include <wlan_reg_afc.h>
32 #endif
33 #include <reg_services_public_struct.h>
34 
35 typedef QDF_STATUS (*reg_event_cb)(void *status_struct);
36 
37 /**
38  * ucfg_reg_set_band() - Sets the band information for the PDEV
39  * @pdev: The physical pdev to set the band for
40  * @band_bitmap: The band bitmap parameter (over reg_wifi_band) to configure
41  *	for the physical device
42  *
43  * Return: QDF_STATUS
44  */
45 QDF_STATUS ucfg_reg_set_band(struct wlan_objmgr_pdev *pdev,
46 			     uint32_t band_bitmap);
47 
48 /**
49  * ucfg_reg_get_band() - Gets the band information for the PDEV
50  * @pdev: The physical pdev to get the band for
51  * @band_bitmap: The band parameter of the physical device
52  *
53  * Return: QDF_STATUS
54  */
55 QDF_STATUS ucfg_reg_get_band(struct wlan_objmgr_pdev *pdev,
56 			     uint32_t *band_bitmap);
57 
58 /**
59  * ucfg_reg_notify_sap_event() - Notify regulatory domain for sap event
60  * @pdev: The physical dev to set the band for
61  * @sap_state: true for sap start else false
62  *
63  * Return: QDF_STATUS
64  */
65 QDF_STATUS ucfg_reg_notify_sap_event(struct wlan_objmgr_pdev *pdev,
66 			bool sap_state);
67 
68 /**
69  * ucfg_reg_cache_channel_freq_state() - Cache the current state of the
70  * channels based on the channel center frequency.
71  * @pdev: Pointer to pdev.
72  * @channel_list: List of the channels for which states need to be cached.
73  * @num_channels: Number of channels in the list.
74  *
75  * Return: QDF_STATUS
76  */
77 #if defined(DISABLE_CHANNEL_LIST) && defined(CONFIG_CHAN_FREQ_API)
78 void ucfg_reg_cache_channel_freq_state(struct wlan_objmgr_pdev *pdev,
79 				       uint32_t *channel_list,
80 				       uint32_t num_channels);
81 #else
82 static inline
83 void ucfg_reg_cache_channel_freq_state(struct wlan_objmgr_pdev *pdev,
84 				       uint32_t *channel_list,
85 				       uint32_t num_channels)
86 {
87 }
88 #endif /* CONFIG_CHAN_FREQ_API */
89 
90 #ifdef DISABLE_CHANNEL_LIST
91 /**
92  * ucfg_reg_disable_cached_channels() - Disable cached channels
93  * @pdev: The physical dev to cache the channels for
94  *
95  * Return: Void
96  */
97 void ucfg_reg_disable_cached_channels(struct wlan_objmgr_pdev *pdev);
98 
99 /**
100  * ucfg_reg_restore_cached_channels() - Restore disabled cached channels
101  * @pdev: The physical dev to cache the channels for
102  *
103  * Return: Void
104  */
105 void ucfg_reg_restore_cached_channels(struct wlan_objmgr_pdev *pdev);
106 #else
107 static inline
108 void ucfg_reg_disable_cached_channels(struct wlan_objmgr_pdev *pdev)
109 {
110 }
111 
112 static inline
113 void ucfg_reg_restore_cached_channels(struct wlan_objmgr_pdev *pdev)
114 {
115 }
116 #endif
117 
118 /**
119  * ucfg_reg_set_fcc_constraint() - apply fcc constraints on channels 12/13
120  * @pdev: The physical pdev to reduce tx power for
121  *
122  * This function adjusts the transmit power on channels 12 and 13, to comply
123  * with FCC regulations in the USA.
124  *
125  * Return: QDF_STATUS
126  */
127 QDF_STATUS ucfg_reg_set_fcc_constraint(struct wlan_objmgr_pdev *pdev,
128 		bool fcc_constraint);
129 
130 /**
131  * ucfg_reg_get_default_country() - Get the default regulatory country
132  * @psoc: The physical SoC to get default country from
133  * @country_code: the buffer to populate the country code into
134  *
135  * Return: QDF_STATUS
136  */
137 QDF_STATUS ucfg_reg_get_default_country(struct wlan_objmgr_psoc *psoc,
138 					       uint8_t *country_code);
139 
140 /**
141  * ucfg_reg_get_current_country() - Get the current regulatory country
142  * @psoc: The physical SoC to get current country from
143  * @country_code: the buffer to populate the country code into
144  *
145  * Return: QDF_STATUS
146  */
147 QDF_STATUS ucfg_reg_get_current_country(struct wlan_objmgr_psoc *psoc,
148 					       uint8_t *country_code);
149 /**
150  * ucfg_reg_set_default_country() - Set the default regulatory country
151  * @psoc: The physical SoC to set default country for
152  * @country_code: The country information to configure
153  *
154  * Return: QDF_STATUS
155  */
156 QDF_STATUS ucfg_reg_set_default_country(struct wlan_objmgr_psoc *psoc,
157 					       uint8_t *country_code);
158 
159 /**
160  * ucfg_reg_set_country() - Set the current regulatory country
161  * @pdev: The physical dev to set current country for
162  * @country_code: The country information to configure
163  *
164  * Return: QDF_STATUS
165  */
166 QDF_STATUS ucfg_reg_set_country(struct wlan_objmgr_pdev *dev,
167 				uint8_t *country_code);
168 
169 /**
170  * ucfg_reg_reset_country() - Reset the regulatory country to default
171  * @psoc: The physical SoC to reset country for
172  *
173  * Return: QDF_STATUS
174  */
175 QDF_STATUS ucfg_reg_reset_country(struct wlan_objmgr_psoc *psoc);
176 
177 /**
178  * ucfg_reg_enable_dfs_channels() - Enable the use of DFS channels
179  * @pdev: The physical dev to enable DFS channels for
180  *
181  * Return: QDF_STATUS
182  */
183 QDF_STATUS ucfg_reg_enable_dfs_channels(struct wlan_objmgr_pdev *pdev,
184 		bool dfs_enable);
185 
186 QDF_STATUS ucfg_reg_register_event_handler(uint8_t vdev_id, reg_event_cb cb,
187 		void *arg);
188 QDF_STATUS ucfg_reg_unregister_event_handler(uint8_t vdev_id, reg_event_cb cb,
189 		void *arg);
190 QDF_STATUS ucfg_reg_init_handler(uint8_t pdev_id);
191 
192 #ifdef WLAN_REG_PARTIAL_OFFLOAD
193 /**
194  * ucfg_reg_program_default_cc() - Program default country code
195  * @pdev: Pdev pointer
196  * @regdmn: Regdomain value
197  *
198  * Return: QDF_STATUS
199  */
200 QDF_STATUS ucfg_reg_program_default_cc(struct wlan_objmgr_pdev *pdev,
201 				       uint16_t regdmn);
202 #endif
203 
204 /**
205  * ucfg_reg_program_cc() - Program user country code or regdomain
206  * @pdev: The physical dev to program country code or regdomain
207  * @rd: User country code or regdomain
208  *
209  * Return: QDF_STATUS
210  */
211 QDF_STATUS ucfg_reg_program_cc(struct wlan_objmgr_pdev *pdev,
212 			       struct cc_regdmn_s *rd);
213 
214 /**
215  * ucfg_reg_get_current_cc() - get current country code or regdomain
216  * @pdev: The physical dev to program country code or regdomain
217  * @rd: Pointer to country code or regdomain
218  *
219  * Return: QDF_STATUS
220  */
221 QDF_STATUS ucfg_reg_get_current_cc(struct wlan_objmgr_pdev *pdev,
222 				   struct cc_regdmn_s *rd);
223 
224 /**
225  * ucfg_reg_set_config_vars () - Set the config vars in reg component
226  * @psoc: psoc ptr
227  * @config_vars: config variables structure
228  *
229  * Return: QDF_STATUS
230  */
231 QDF_STATUS ucfg_reg_set_config_vars(struct wlan_objmgr_psoc *psoc,
232 				    struct reg_config_vars config_vars);
233 
234 /**
235  * ucfg_reg_get_current_chan_list () - get current channel list
236  * @pdev: pdev ptr
237  * @chan_list: channel list
238  *
239  * Return: QDF_STATUS
240  */
241 QDF_STATUS ucfg_reg_get_current_chan_list(struct wlan_objmgr_pdev *pdev,
242 				    struct regulatory_channel *chan_list);
243 
244 /**
245  * ucfg_reg_modify_chan_144() - Enable/Disable channel 144
246  * @pdev: pdev pointer
247  * @enable_chan_144: flag to disable/enable channel 144
248  *
249  * Return: Success or Failure
250  */
251 QDF_STATUS ucfg_reg_modify_chan_144(struct wlan_objmgr_pdev *pdev,
252 				    bool enable_ch_144);
253 
254 /**
255  * ucfg_reg_get_en_chan_144() - get en_chan_144 flag value
256  * @pdev: pdev pointer
257  *
258  * Return: en_chan_144 flag value
259  */
260 bool ucfg_reg_get_en_chan_144(struct wlan_objmgr_pdev *pdev);
261 
262 /**
263  * ucfg_reg_is_regdb_offloaded () - is regulatory database offloaded
264  * @psoc: psoc ptr
265  *
266  * Return: bool
267  */
268 bool ucfg_reg_is_regdb_offloaded(struct wlan_objmgr_psoc *psoc);
269 
270 /**
271  * ucfg_reg_program_mas_chan_list () - program master channel list
272  * @psoc: psoc ptr
273  * @reg_channels: regulatory channels
274  * @alpha2: country code
275  * @dfs_region: dfs region
276  *
277  * Return: void
278  */
279 void ucfg_reg_program_mas_chan_list(struct wlan_objmgr_psoc *psoc,
280 				    struct regulatory_channel *reg_channels,
281 				    uint8_t *alpha2,
282 				    enum dfs_reg dfs_region);
283 
284 /**
285  * ucfg_reg_get_regd_rules() - provides the reg domain rules info pointer
286  * @pdev: pdev ptr
287  * @reg_rules: regulatory rules
288  *
289  * Return: QDF_STATUS
290  */
291 QDF_STATUS ucfg_reg_get_regd_rules(struct wlan_objmgr_pdev *pdev,
292 				   struct reg_rule_info *reg_rules);
293 
294 /**
295  * ucfg_reg_register_chan_change_callback () - add chan change cbk
296  * @psoc: psoc ptr
297  * @cbk: callback
298  * @arg: argument
299  *
300  * Return: void
301  */
302 void ucfg_reg_register_chan_change_callback(struct wlan_objmgr_psoc *psoc,
303 					    void *cbk, void *arg);
304 
305 /**
306  * ucfg_reg_unregister_chan_change_callback () - remove chan change cbk
307  * @psoc: psoc ptr
308  * @cbk: callback
309  *
310  * Return: void
311  */
312 void ucfg_reg_unregister_chan_change_callback(struct wlan_objmgr_psoc *psoc,
313 					      void *cbk);
314 
315 #ifdef CONFIG_AFC_SUPPORT
316 /**
317  * ucfg_reg_register_afc_req_rx_callback () - add AFC request received callback
318  * @pdev: Pointer to pdev
319  * @cbf: Pointer to callback function
320  * @arg: Pointer to opaque argument
321  *
322  * Return: QDF_STATUS
323  */
324 QDF_STATUS ucfg_reg_register_afc_req_rx_callback(struct wlan_objmgr_pdev *pdev,
325 						 afc_req_rx_evt_handler cbf,
326 						 void *arg);
327 
328 /**
329  * ucfg_reg_unregister_afc_req_rx_callback () - remove AFC request received
330  * callback
331  * @pdev: Pointer to pdev
332  * @cbf: Pointer to callback function
333  *
334  * Return: QDF_STATUS
335  */
336 QDF_STATUS ucfg_reg_unregister_afc_req_rx_callback(struct wlan_objmgr_pdev *pdev,
337 						   afc_req_rx_evt_handler cbf);
338 
339 /**
340  * ucfg_reg_get_partial_afc_req_info() - Get the the frequency ranges and
341  * opclass + channel ranges. This is partial because in the AFC request there
342  * are a few more parameters: Longitude, Latitude a few other information
343  * @pdev: Pointer to PDEV object.
344  * @afc_req: Address of AFC request pointer.
345  * @req_id: AFC request ID.
346  *
347  * Return: QDF_STATUS_E_INVAL if unable to set and QDF_STATUS_SUCCESS is set.
348  */
349 QDF_STATUS ucfg_reg_get_partial_afc_req_info(
350 		struct wlan_objmgr_pdev *pdev,
351 		struct wlan_afc_host_partial_request **afc_req,
352 		uint64_t req_id);
353 
354 /**
355  * ucfg_reg_register_afc_power_event_callback() - add AFC power event received
356  * @pdev: Pointer to pdev
357  * @cbf: Pointer to callback function
358  * @arg: Pointer to opaque argument
359  *
360  * Return: QDF_STATUS
361  */
362 QDF_STATUS
363 ucfg_reg_register_afc_power_event_callback(struct wlan_objmgr_pdev *pdev,
364 					   afc_power_tx_evt_handler cbf,
365 					   void *arg);
366 
367 /**
368  * ucfg_reg_unregister_afc_power_event_callback() - remove AFC power event
369  * received callback
370  * @pdev: Pointer to pdev
371  * @cbf: Pointer to callback function
372  *
373  * Return: QDF_STATUS
374  */
375 QDF_STATUS
376 ucfg_reg_unregister_afc_power_event_callback(struct wlan_objmgr_pdev *pdev,
377 					     afc_power_tx_evt_handler cbf);
378 #endif
379 
380 /**
381  * ucfg_reg_get_cc_and_src () - get country code and src
382  * @psoc: psoc ptr
383  * @alpha2: country code alpha2
384  *
385  * Return: void
386  */
387 enum country_src ucfg_reg_get_cc_and_src(struct wlan_objmgr_psoc *psoc,
388 					 uint8_t *alpha2);
389 
390 /**
391  * ucfg_reg_unit_simulate_ch_avoid () - fake a ch avoid event
392  * @psoc: psoc ptr
393  * @ch_avoid: ch_avoid_ind_type ranges
394  *
395  * This function inject a ch_avoid event for unit test sap chan switch.
396  *
397  * Return: void
398  */
399 void ucfg_reg_unit_simulate_ch_avoid(struct wlan_objmgr_psoc *psoc,
400 	struct ch_avoid_ind_type *ch_avoid);
401 
402 /**
403  * ucfg_reg_ch_avoid () - Send channel avoid cmd to regulatory
404  * @psoc: psoc ptr
405  * @ch_avoid: ch_avoid_ind_type ranges
406  *
407  * This function send channel avoid cmd to regulatory from os_if/upper layer
408  *
409  * Return: void
410  */
411 void ucfg_reg_ch_avoid(struct wlan_objmgr_psoc *psoc,
412 		       struct ch_avoid_ind_type *ch_avoid);
413 
414 #ifdef FEATURE_WLAN_CH_AVOID_EXT
415 /**
416  * ucfg_reg_ch_avoid_ext () - Send channel avoid extend cmd to regulatory
417  * @psoc: psoc ptr
418  * @ch_avoid: ch_avoid_ind_type ranges
419  *
420  * This function send channel avoid extend cmd to regulatory from
421  * os_if/upper layer
422  *
423  * Return: void
424  */
425 void ucfg_reg_ch_avoid_ext(struct wlan_objmgr_psoc *psoc,
426 			   struct ch_avoid_ind_type *ch_avoid);
427 #endif
428 
429 #if defined(CONFIG_BAND_6GHZ) && defined(CONFIG_AFC_SUPPORT)
430 /**
431  * ucfg_reg_get_enable_6ghz_sp_mode_support() - Get enable 6 GHz SP mode support
432  * @psoc: psoc ptr
433  *
434  * Return: enable 6 GHz SP mode support flag
435  */
436 bool ucfg_reg_get_enable_6ghz_sp_mode_support(struct wlan_objmgr_psoc *psoc);
437 
438 /**
439  * ucfg_reg_set_enable_6ghz_sp_mode_support() - Set enable 6 GHz SP mode support
440  * @psoc: psoc ptr
441  * @value: value to be set
442  *
443  * Return: None
444  */
445 void ucfg_reg_set_enable_6ghz_sp_mode_support(struct wlan_objmgr_psoc *psoc,
446 					      bool value);
447 
448 /**
449  * ucfg_reg_get_afc_disable_timer_check() - Get AFC timer check disable flag
450  * @psoc: psoc ptr
451  *
452  * Return: AFC timer check disable flag
453  */
454 bool ucfg_reg_get_afc_disable_timer_check(struct wlan_objmgr_psoc *psoc);
455 
456 /**
457  * ucfg_reg_set_afc_disable_timer_check() - Set AFC timer check disable flag
458  * @psoc: psoc ptr
459  * @value: value to be set
460  *
461  * Return: None
462  */
463 void ucfg_reg_set_afc_disable_timer_check(struct wlan_objmgr_psoc *psoc,
464 					  bool value);
465 
466 /**
467  * ucfg_reg_get_afc_disable_request_id_check() - Get AFC request id check flag
468  * @psoc: psoc ptr
469  *
470  * Return: AFC request id check disable flag
471  */
472 bool ucfg_reg_get_afc_disable_request_id_check(struct wlan_objmgr_psoc *psoc);
473 
474 /**
475  * ucfg_reg_set_afc_disable_request_id_check() - Set AFC request id check flag
476  * @psoc: psoc ptr
477  * @value: value to be set
478  *
479  * Return: None
480  */
481 void ucfg_reg_set_afc_disable_request_id_check(struct wlan_objmgr_psoc *psoc,
482 					       bool value);
483 
484 /**
485  * ucfg_reg_get_afc_no_action() - Get AFC no action flag
486  * @psoc: psoc ptr
487  *
488  * Return: AFC no action flag
489  */
490 bool ucfg_reg_get_afc_no_action(struct wlan_objmgr_psoc *psoc);
491 
492 /**
493  * ucfg_reg_set_afc_no_action() - Set AFC no action flag
494  * @psoc: psoc ptr
495  * @value: value to be set
496  *
497  * Return: None
498  */
499 void ucfg_reg_set_afc_no_action(struct wlan_objmgr_psoc *psoc, bool value);
500 #else
501 static inline
502 bool ucfg_reg_get_enable_6ghz_sp_mode_support(struct wlan_objmgr_psoc *psoc)
503 {
504 	return false;
505 }
506 
507 static inline
508 void ucfg_reg_set_enable_6ghz_sp_mode_support(struct wlan_objmgr_psoc *psoc,
509 					      bool value)
510 {
511 }
512 
513 static inline
514 bool ucfg_reg_get_afc_disable_timer_check(struct wlan_objmgr_psoc *psoc)
515 {
516 	return false;
517 }
518 
519 static inline
520 void ucfg_reg_set_afc_disable_timer_check(struct wlan_objmgr_psoc *psoc,
521 					  bool value)
522 {
523 }
524 
525 static inline
526 bool ucfg_reg_get_afc_disable_request_id_check(struct wlan_objmgr_psoc *psoc)
527 {
528 	return false;
529 }
530 
531 static inline
532 void ucfg_reg_set_afc_disable_request_id_check(struct wlan_objmgr_psoc *psoc,
533 					       bool value)
534 {
535 }
536 
537 static inline
538 bool ucfg_reg_get_afc_no_action(struct wlan_objmgr_psoc *psoc)
539 {
540 	return false;
541 }
542 
543 static inline
544 void ucfg_reg_set_afc_no_action(struct wlan_objmgr_psoc *psoc, bool value)
545 {
546 }
547 #endif
548 
549 /**
550  * ucfg_reg_11d_vdev_delete_update() - update vdev delete to regulatory
551  * @vdev: vdev ptr
552  *
553  * Return: QDF_STATUS
554  */
555 QDF_STATUS ucfg_reg_11d_vdev_delete_update(struct wlan_objmgr_vdev *vdev);
556 
557 /**
558  * ucfg_reg_11d_vdev_created_update() - update vdev create to regulatory
559  * @vdev: vdev ptr
560  *
561  * Return: QDF_STATUS
562  */
563 QDF_STATUS ucfg_reg_11d_vdev_created_update(struct wlan_objmgr_vdev *vdev);
564 
565 /**
566  * ucfg_reg_get_hal_reg_cap() - return hal reg cap
567  * @psoc: psoc ptr
568  *
569  * Return: ptr to  wlan_psoc_host_hal_reg_capabilities_ext
570  */
571 struct wlan_psoc_host_hal_reg_capabilities_ext *ucfg_reg_get_hal_reg_cap(
572 				struct wlan_objmgr_psoc *psoc);
573 
574 /**
575  * ucfg_reg_set_hal_reg_cap() - update hal reg cap
576  * @psoc: psoc ptr
577  * @reg_cap: Regulatory cap array
578  * @phy_cnt: Number of phy
579  *
580  * Return: QDF_STATUS
581  */
582 QDF_STATUS ucfg_reg_set_hal_reg_cap(struct wlan_objmgr_psoc *psoc,
583 			struct wlan_psoc_host_hal_reg_capabilities_ext *reg_cap,
584 			uint16_t phy_cnt);
585 
586 /**
587  * ucfg_reg_update_hal_reg_cap() - update hal reg cap
588  * @psoc: psoc ptr
589  * @wireless_modes: 11AX wireless modes
590  * @phy_id: phy id
591  *
592  * Return: QDF_STATUS
593  */
594 QDF_STATUS ucfg_reg_update_hal_reg_cap(struct wlan_objmgr_psoc *psoc,
595 				       uint64_t wireless_modes, uint8_t phy_id);
596 
597 /**
598  * ucfg_set_ignore_fw_reg_offload_ind() - API to set ignore regdb offload ind
599  * @psoc: psoc ptr
600  *
601  * Return: QDF_STATUS
602  */
603 QDF_STATUS ucfg_set_ignore_fw_reg_offload_ind(struct wlan_objmgr_psoc *psoc);
604 
605 /**
606  * ucfg_reg_get_unii_5g_bitmap() - get unii_5g_bitmap value
607  * @pdev: pdev pointer
608  * @bitmap: Pointer to retrieve unii_5g_bitmap of enum reg_unii_band.
609  *
610  * Return: QDF_STATUS
611  */
612 #ifdef DISABLE_UNII_SHARED_BANDS
613 QDF_STATUS
614 ucfg_reg_get_unii_5g_bitmap(struct wlan_objmgr_pdev *pdev, uint8_t *bitmap);
615 #else
616 static inline QDF_STATUS
617 ucfg_reg_get_unii_5g_bitmap(struct wlan_objmgr_pdev *pdev, uint8_t *bitmap)
618 {
619 	*bitmap = 0;
620 	return QDF_STATUS_SUCCESS;
621 }
622 #endif
623 
624 #if defined(CONFIG_BAND_6GHZ)
625 /**
626  * ucfg_reg_get_cur_6g_ap_pwr_type() - Get the current 6G regulatory AP power
627  * type.
628  * @pdev: Pointer to PDEV object.
629  * @reg_6g_ap_pwr_type: The current regulatory 6G AP type ie VLPI/LPI/SP.
630  *
631  * Return: QDF_STATUS.
632  */
633 QDF_STATUS
634 ucfg_reg_get_cur_6g_ap_pwr_type(struct wlan_objmgr_pdev *pdev,
635 				enum reg_6g_ap_type *reg_cur_6g_ap_pwr_type);
636 
637 /**
638  * ucfg_reg_set_cur_6g_ap_pwr_type() - Set the current 6G regulatory AP power
639  * type.
640  * @pdev: Pointer to PDEV object.
641  * @reg_6g_ap_pwr_type: Regulatory 6G AP type ie VLPI/LPI/SP.
642  *
643  * Return: QDF_STATUS_E_INVAL if unable to set and QDF_STATUS_SUCCESS is set.
644  */
645 QDF_STATUS
646 ucfg_reg_set_cur_6g_ap_pwr_type(struct wlan_objmgr_pdev *pdev,
647 				enum reg_6g_ap_type reg_cur_6g_ap_type);
648 #else
649 static inline QDF_STATUS
650 ucfg_reg_get_cur_6g_ap_pwr_type(struct wlan_objmgr_pdev *pdev,
651 				enum reg_6g_ap_type *reg_cur_6g_ap_pwr_type)
652 {
653 	*reg_cur_6g_ap_pwr_type = REG_INDOOR_AP;
654 	return QDF_STATUS_E_NOSUPPORT;
655 }
656 
657 static inline QDF_STATUS
658 ucfg_reg_set_cur_6g_ap_pwr_type(struct wlan_objmgr_pdev *pdev,
659 				enum reg_6g_ap_type reg_cur_6g_ap_type)
660 {
661 	return QDF_STATUS_E_NOSUPPORT;
662 }
663 #endif
664 
665 #if defined(CONFIG_AFC_SUPPORT) && defined(CONFIG_BAND_6GHZ)
666 /**
667  * ucfg_reg_send_afc_resp_rx_ind() - Send AFC response received indication to
668  * the FW.
669  * @pdev: pdev ptr
670  * @afc_ind_obj: Pointer to hold AFC indication
671  *
672  * Return: QDF_STATUS_SUCCESS if the WMI command is sent or QDF_STATUS_E_FAILURE
673  * otherwise
674  */
675 QDF_STATUS
676 ucfg_reg_send_afc_resp_rx_ind(struct wlan_objmgr_pdev *pdev,
677 			      struct reg_afc_resp_rx_ind_info *afc_ind_obj);
678 
679 /**
680  * ucfg_reg_afc_start() - Start the AFC request from regulatory. This finally
681  *                   sends the request to registered callbacks
682  * @pdev: Pointer to pdev
683  * @req_id: The AFC request ID
684  *
685  * Return: QDF_STATUS
686  */
687 QDF_STATUS ucfg_reg_afc_start(struct wlan_objmgr_pdev *pdev, uint64_t req_id);
688 #endif
689 #endif
690