xref: /wlan-dirver/qca-wifi-host-cmn/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h (revision dd4dc88b837a295134aa9869114a2efee0f4894b)
1 /*
2  * Copyright (c) 2017-2019 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 /**
20  * DOC: wlan_reg_services_api.h
21  * This file provides prototypes of the routines needed for the
22  * external components to utilize the services provided by the
23  * regulatory component.
24  */
25 
26 #ifndef __WLAN_REG_SERVICES_API_H
27 #define __WLAN_REG_SERVICES_API_H
28 
29 /**
30  * wlan_reg_min_24ghz_ch_num() - Get minimum 2.4GHz channel number
31  *
32  * Return: Minimum 2.4GHz channel number
33  */
34 #define WLAN_REG_MIN_24GHZ_CH_NUM wlan_reg_min_24ghz_ch_num()
35 uint32_t wlan_reg_min_24ghz_ch_num(void);
36 
37 /**
38  * wlan_reg_max_24ghz_ch_num() - Get maximum 2.4GHz channel number
39  *
40  * Return: Maximum 2.4GHz channel number
41  */
42 #define WLAN_REG_MAX_24GHZ_CH_NUM wlan_reg_max_24ghz_ch_num()
43 uint32_t wlan_reg_max_24ghz_ch_num(void);
44 
45 /**
46  * wlan_reg_min_5ghz_ch_num() - Get minimum 5GHz channel number
47  *
48  * Return: Minimum 5GHz channel number
49  */
50 #define WLAN_REG_MIN_5GHZ_CH_NUM wlan_reg_min_5ghz_ch_num()
51 uint32_t wlan_reg_min_5ghz_ch_num(void);
52 
53 /**
54  * wlan_reg_max_5ghz_ch_num() - Get maximum 5GHz channel number
55  *
56  * Return: Maximum 5GHz channel number
57  */
58 #define WLAN_REG_MAX_5GHZ_CH_NUM wlan_reg_max_5ghz_ch_num()
59 uint32_t wlan_reg_max_5ghz_ch_num(void);
60 
61 /**
62  * wlan_reg_is_24ghz_ch() - Check if the given channel number is 2.4GHz
63  * @chan: Channel number
64  *
65  * Return: true if channel number is 2.4GHz, else false
66  */
67 #define WLAN_REG_IS_24GHZ_CH(chan) wlan_reg_is_24ghz_ch(chan)
68 bool wlan_reg_is_24ghz_ch(uint32_t chan);
69 
70 /**
71  * wlan_reg_is_5ghz_ch() - Check if the given channel number is 5GHz
72  * @chan: Channel number
73  *
74  * Return: true if channel number is 5GHz, else false
75  */
76 #define WLAN_REG_IS_5GHZ_CH(chan) wlan_reg_is_5ghz_ch(chan)
77 bool wlan_reg_is_5ghz_ch(uint32_t chan);
78 
79 /**
80  * wlan_reg_is_24ghz_ch_freq() - Check if the given channel frequency is 2.4GHz
81  * @freq: Channel frequency
82  *
83  * Return: true if channel frequency is 2.4GHz, else false
84  */
85 #define WLAN_REG_IS_24GHZ_CH_FREQ(freq) wlan_reg_is_24ghz_ch_freq(freq)
86 bool wlan_reg_is_24ghz_ch_freq(uint32_t freq);
87 
88 /**
89  * wlan_reg_is_5ghz_ch_freq() - Check if the given channel frequency is 5GHz
90  * @freq: Channel frequency
91  *
92  * Return: true if channel frequency is 5GHz, else false
93  */
94 #define WLAN_REG_IS_5GHZ_CH_FREQ(freq) wlan_reg_is_5ghz_ch_freq(freq)
95 bool wlan_reg_is_5ghz_ch_freq(uint32_t freq);
96 
97 #ifndef CONFIG_LEGACY_CHAN_ENUM
98 /**
99  * wlan_reg_is_49ghz_freq() - Check if the given channel frequency is 4.9GHz
100  * @freq: Channel frequency
101  *
102  * Return: true if channel frequency is 4.9GHz, else false
103  */
104 #define WLAN_REG_IS_49GHZ_FREQ(freq) wlan_reg_is_49ghz_freq(freq)
105 bool wlan_reg_is_49ghz_freq(uint32_t freq);
106 #endif
107 
108 /**
109  * wlan_reg_ch_num() - Get channel number from channel enum
110  * @ch_enum: Channel enum
111  *
112  * Return: channel number
113  */
114 #define WLAN_REG_CH_NUM(ch_enum) wlan_reg_ch_num(ch_enum)
115 uint32_t wlan_reg_ch_num(uint32_t ch_enum);
116 
117 /**
118  * wlan_reg_ch_to_freq() - Get channel frequency from channel enum
119  * @ch_enum: Channel enum
120  *
121  * Return: channel frequency
122  */
123 #define WLAN_REG_CH_TO_FREQ(ch_enum) wlan_reg_ch_to_freq(ch_enum)
124 uint32_t wlan_reg_ch_to_freq(uint32_t ch_enum);
125 
126 /**
127  * wlan_reg_is_same_band_channels() - Check if given channel numbers have same
128  * band
129  * @chan_num1: Channel number1
130  * @chan_num2: Channel number2
131  *
132  * Return: true if both the channels has the same band.
133  */
134 #define WLAN_REG_IS_SAME_BAND_CHANNELS(chan_num1, chan_num2) \
135 	wlan_reg_is_same_band_channels(chan_num1, chan_num2)
136 bool wlan_reg_is_same_band_channels(uint32_t chan_num1, uint32_t chan_num2);
137 
138 /**
139  * wlan_reg_is_channel_valid_5g_sbs() Check if the given channel is 5G SBS.
140  * @curchan: current channel
141  * @newchan:new channel
142  *
143  * Return: true if the given channel is a valid 5G SBS
144  */
145 #define WLAN_REG_IS_CHANNEL_VALID_5G_SBS(curchan, newchan) \
146 	wlan_reg_is_channel_valid_5g_sbs(curchan, newchan)
147 bool wlan_reg_is_channel_valid_5g_sbs(uint32_t curchan, uint32_t newchan);
148 
149 #define WLAN_REG_INVALID_CHANNEL_ID
150 #define WLAN_REG_GET_24_END_CHAN_NUM 14
151 
152 /**
153  * wlan_reg_chan_to_band() - Get band from channel number
154  * @chan_num: channel number
155  *
156  * Return: band info
157  */
158 #define WLAN_REG_CHAN_TO_BAND(chan_num)  wlan_reg_chan_to_band(chan_num)
159 enum band_info wlan_reg_chan_to_band(uint32_t chan_num);
160 
161 /**
162  * wlan_reg_get_channel_list_with_power() - Provide the channel list with power
163  * @ch_list: pointer to the channel list.
164  *
165  * Return: QDF_STATUS
166  */
167 QDF_STATUS wlan_reg_get_channel_list_with_power(struct wlan_objmgr_pdev *pdev,
168 						struct channel_power *ch_list,
169 						uint8_t *num_chan);
170 
171 /**
172  * wlan_reg_read_default_country() - Read the default country for the regdomain
173  * @country: pointer to the country code.
174  *
175  * Return: QDF_STATUS
176  */
177 QDF_STATUS wlan_reg_read_default_country(struct wlan_objmgr_psoc *psoc,
178 				   uint8_t *country);
179 
180 /**
181  * wlan_reg_get_fcc_constraint() - Check FCC constraint on given frequency
182  * @pdev: physical dev to get
183  * @freq: frequency to be checked
184  *
185  * Return: If FCC constraint is on applied given frequency return true
186  *	   else return false.
187  */
188 bool wlan_reg_get_fcc_constraint(struct wlan_objmgr_pdev *pdev, uint32_t freq);
189 
190 #ifdef CONFIG_REG_CLIENT
191 /**
192  * wlan_reg_read_current_country() - Read the current country for the regdomain
193  * @country: pointer to the country code.
194  *
195  * Return: QDF_STATUS
196  */
197 QDF_STATUS wlan_reg_read_current_country(struct wlan_objmgr_psoc *psoc,
198 				   uint8_t *country);
199 
200 /**
201  * wlan_reg_chan_has_dfs_attribute() - check channel has dfs attribute flag
202  * @ch: channel number.
203  *
204  * This API get chan initial dfs attribute from regdomain
205  *
206  * Return: true if chan is dfs, otherwise false
207  */
208 bool
209 wlan_reg_chan_has_dfs_attribute(struct wlan_objmgr_pdev *pdev, uint32_t ch);
210 
211 /**
212  * wlan_reg_is_etsi13_srd_chan () - Checks if the ch is ETSI13 srd ch or not
213  * @pdev: pdev ptr
214  * @chan_num: channel
215  *
216  * Return: true or false
217  */
218 bool wlan_reg_is_etsi13_srd_chan(struct wlan_objmgr_pdev *pdev,
219 				 uint8_t chan_num);
220 
221 /**
222  * wlan_reg_is_etsi13_regdmn() - Checks if current reg domain is ETSI13 or not
223  * @pdev: pdev ptr
224  *
225  * Return: true or false
226  */
227 bool wlan_reg_is_etsi13_regdmn(struct wlan_objmgr_pdev *pdev);
228 
229 /**
230  * wlan_reg_is_etsi13_srd_chan_allowed_master_mode() - Checks if regdmn is
231  * ETSI13 and SRD channels are allowed in master mode or not.
232  *
233  * @pdev: pdev ptr
234  *
235  * Return: true or false
236  */
237 bool wlan_reg_is_etsi13_srd_chan_allowed_master_mode(struct wlan_objmgr_pdev
238 						     *pdev);
239 #endif
240 
241 /**
242  * wlan_reg_is_world() - reg is world mode
243  * @country: The country information
244  *
245  * Return: true or false
246  */
247 bool wlan_reg_is_world(uint8_t *country);
248 
249 /**
250  * wlan_reg_get_chan_enum() - Get channel enum for given channel number
251  * @chan_num: Channel number
252  *
253  * Return: Channel enum
254  */
255 enum channel_enum wlan_reg_get_chan_enum(uint32_t chan_num);
256 
257 /**
258  * wlan_reg_get_channel_state() - Get channel state from regulatory
259  * @ch: channel number.
260  *
261  * Return: channel state
262  */
263 enum channel_state wlan_reg_get_channel_state(struct wlan_objmgr_pdev *pdev,
264 					      uint32_t ch);
265 
266 /**
267  * wlan_reg_get_5g_bonded_channel_state() - Get 5G bonded channel state
268  * @pdev: The physical dev to program country code or regdomain
269  * @ch: channel number.
270  * @bw: channel band width
271  *
272  * Return: channel state
273  */
274 enum channel_state wlan_reg_get_5g_bonded_channel_state(
275 		struct wlan_objmgr_pdev *pdev, uint8_t ch,
276 		enum phy_ch_width bw);
277 
278 /**
279  * wlan_reg_get_2g_bonded_channel_state() - Get 2G bonded channel state
280  * @pdev: The physical dev to program country code or regdomain
281  * @ch: channel number.
282  * @sec_ch: Secondary channel.
283  * @bw: channel band width
284  *
285  * Return: channel state
286  */
287 enum channel_state wlan_reg_get_2g_bonded_channel_state(
288 		struct wlan_objmgr_pdev *pdev, uint8_t ch,
289 		uint8_t sec_ch, enum phy_ch_width bw);
290 
291 /**
292  * wlan_reg_set_channel_params () - Sets channel parameteres for given bandwidth
293  * @pdev: The physical dev to program country code or regdomain
294  * @ch: channel number.
295  * @sec_ch_2g: Secondary channel.
296  * @ch_params: pointer to the channel parameters.
297  *
298  * Return: None
299  */
300 void wlan_reg_set_channel_params(struct wlan_objmgr_pdev *pdev, uint8_t ch,
301 				 uint8_t sec_ch_2g,
302 				 struct ch_params *ch_params);
303 
304 /**
305  * wlan_reg_get_dfs_region () - Get the current dfs region
306  * @dfs_reg: pointer to dfs region
307  *
308  * Return: Status
309  */
310 QDF_STATUS wlan_reg_get_dfs_region(struct wlan_objmgr_pdev *pdev,
311 			     enum dfs_reg *dfs_reg);
312 
313 /**
314  * wlan_reg_get_channel_reg_power() - Provide the channel regulatory power
315  * @chan_num: chennal number
316  *
317  * Return: int
318  */
319 uint32_t wlan_reg_get_channel_reg_power(struct wlan_objmgr_pdev *pdev,
320 					uint32_t chan_num);
321 
322 /**
323  * wlan_reg_get_channel_freq() - provide the channel center freq
324  * @chan_num: chennal number
325  *
326  * Return: int
327  */
328 uint32_t wlan_reg_get_channel_freq(struct wlan_objmgr_pdev *pdev,
329 				   uint32_t chan_num);
330 
331 /**
332  * wlan_reg_get_current_chan_list() - provide the pdev current channel list
333  * @pdev: pdev pointer
334  * @chan_list: channel list pointer
335  *
336  * Return: QDF_STATUS
337  */
338 QDF_STATUS wlan_reg_get_current_chan_list(struct wlan_objmgr_pdev *pdev,
339 		struct regulatory_channel *chan_list);
340 /**
341  * wlan_reg_get_bonded_channel_state() - get bonded channel state
342  * @pdev: pdev ptr
343  * @ch: chennal number
344  * @bw: chennal number
345  * @sec_ch: secondary channel
346  *
347  * Return: enum channel_state
348  */
349 enum channel_state wlan_reg_get_bonded_channel_state(
350 	struct wlan_objmgr_pdev *pdev, uint8_t ch,
351 	enum phy_ch_width bw, uint8_t sec_ch);
352 
353 /**
354  * wlan_reg_set_dfs_region() - set the dfs region
355  * @pdev: pdev ptr
356  * @dfs_reg: dfs region
357  *
358  * Return: void
359  */
360 void wlan_reg_set_dfs_region(struct wlan_objmgr_pdev *pdev,
361 			     enum dfs_reg dfs_reg);
362 
363 /**
364  * wlan_reg_get_bw_value() - provide the channel center freq
365  * @chan_num: chennal number
366  *
367  * Return: int
368  */
369 uint16_t wlan_reg_get_bw_value(enum phy_ch_width bw);
370 
371 /**
372  * wlan_reg_get_domain_from_country_code() - provide the channel center freq
373  * @reg_domain_ptr: regulatory domain ptr
374  * @country_alpha2: country alpha2
375  * @source: alpha2 source
376  *
377  * Return: int
378  */
379 QDF_STATUS wlan_reg_get_domain_from_country_code(v_REGDOMAIN_t *reg_domain_ptr,
380 						 const uint8_t *country_alpha2,
381 						 enum country_src source);
382 
383 /**
384  * wlan_reg_dmn_get_opclass_from_channel() - provide the channel center freq
385  * @country: country alpha2
386  * @channel: channel number
387  * @offset: offset
388  *
389  * Return: int
390  */
391 uint16_t wlan_reg_dmn_get_opclass_from_channel(uint8_t *country,
392 					       uint8_t channel,
393 					       uint8_t offset);
394 /**
395  * wlan_reg_dmn_print_channels_in_opclass() - Print channels in op-class
396  * @country: country alpha2
397  * @opclass: oplcass
398  *
399  * Return: void
400  */
401 void wlan_reg_dmn_print_channels_in_opclass(uint8_t *country,
402 					    uint8_t opclass);
403 
404 
405 /**
406  * wlan_reg_dmn_get_chanwidth_from_opclass() - get channel width from
407  *                                             operating class
408  * @country: country alpha2
409  * @channel: channel number
410  * @opclass: operating class
411  *
412  * Return: int
413  */
414 uint16_t wlan_reg_dmn_get_chanwidth_from_opclass(uint8_t *country,
415 						 uint8_t channel,
416 						 uint8_t opclass);
417 /**
418  * wlan_reg_dmn_set_curr_opclasses() - set operating class
419  * @num_classes: number of classes
420  * @class: operating class
421  *
422  * Return: int
423  */
424 uint16_t wlan_reg_dmn_set_curr_opclasses(uint8_t num_classes,
425 					 uint8_t *class);
426 
427 /**
428  * wlan_reg_dmn_get_curr_opclasses() - get current oper classes
429  * @num_classes: number of classes
430  * @class: operating class
431  *
432  * Return: int
433  */
434 uint16_t wlan_reg_dmn_get_curr_opclasses(uint8_t *num_classes,
435 					 uint8_t *class);
436 
437 
438 /**
439  * wlan_regulatory_init() - init regulatory component
440  *
441  * Return: Success or Failure
442  */
443 QDF_STATUS wlan_regulatory_init(void);
444 
445 /**
446  * wlan_regulatory_deinit() - deinit regulatory component
447  *
448  * Return: Success or Failure
449  */
450 QDF_STATUS wlan_regulatory_deinit(void);
451 
452 /**
453  * regulatory_psoc_open() - open regulatory component
454  *
455  * Return: Success or Failure
456  */
457 QDF_STATUS regulatory_psoc_open(struct wlan_objmgr_psoc *psoc);
458 
459 
460 /**
461  * regulatory_psoc_close() - close regulatory component
462  *
463  * Return: Success or Failure
464  */
465 QDF_STATUS regulatory_psoc_close(struct wlan_objmgr_psoc *psoc);
466 
467 /**
468  * regulatory_pdev_open() - Open regulatory component
469  * @pdev: Pointer to pdev structure.
470  *
471  * Return: Success or Failure
472  */
473 QDF_STATUS regulatory_pdev_open(struct wlan_objmgr_pdev *pdev);
474 
475 /**
476  * regulatory_pdev_close() - Close regulatory component
477  * @pdev: Pointer to pdev structure.
478  *
479  * Return: Success or Failure
480  */
481 QDF_STATUS regulatory_pdev_close(struct wlan_objmgr_pdev *pdev);
482 
483 /**
484  * wlan_reg_update_nol_ch () - set nol channel
485  * @pdev: pdev ptr
486  * @ch_list: channel list to be returned
487  * @num_ch: number of channels
488  * @nol_ch: nol flag
489  *
490  * Return: void
491  */
492 void wlan_reg_update_nol_ch(struct wlan_objmgr_pdev *pdev,
493 			    uint8_t *ch_list,
494 			    uint8_t num_ch,
495 			    bool nol_ch);
496 
497 /**
498  * wlan_reg_is_dfs_ch () - Checks the channel state for DFS
499  * @pdev: pdev ptr
500  * @chan: channel
501  *
502  * Return: true or false
503  */
504 bool wlan_reg_is_dfs_ch(struct wlan_objmgr_pdev *pdev, uint32_t chan);
505 
506 /**
507  * wlan_reg_is_dsrc_chan () - Checks if the channel is dsrc channel or not
508  * @pdev: pdev ptr
509  * @chan_num: channel
510  *
511  * Return: true or false
512  */
513 bool wlan_reg_is_dsrc_chan(struct wlan_objmgr_pdev *pdev, uint8_t chan_num);
514 
515 /**
516  * wlan_reg_is_passive_or_disable_ch () - Checks chan state for passive
517  * and disabled
518  * @pdev: pdev ptr
519  * @chan: channel
520  *
521  * Return: true or false
522  */
523 bool wlan_reg_is_passive_or_disable_ch(struct wlan_objmgr_pdev *pdev,
524 				       uint32_t chan);
525 
526 /**
527  * wlan_reg_is_disable_ch () - Checks chan state for disabled
528  * @pdev: pdev ptr
529  * @chan: channel
530  *
531  * Return: true or false
532  */
533 bool wlan_reg_is_disable_ch(struct wlan_objmgr_pdev *pdev, uint32_t chan);
534 
535 /**
536  * wlan_reg_freq_to_chan () - convert channel freq to channel number
537  * @pdev: The physical dev to set current country for
538  * @freq: frequency
539  *
540  * Return: true or false
541  */
542 uint32_t wlan_reg_freq_to_chan(struct wlan_objmgr_pdev *pdev,
543 			       uint32_t freq);
544 
545 /**
546  * wlan_reg_chan_to_freq () - convert channel number to frequency
547  * @chan: channel number
548  *
549  * Return: true or false
550  */
551 uint32_t wlan_reg_chan_to_freq(struct wlan_objmgr_pdev *pdev,
552 			       uint32_t chan);
553 
554 /**
555  * wlan_reg_is_us() - reg is us country
556  * @country: The country information
557  *
558  * Return: true or false
559  */
560 bool wlan_reg_is_us(uint8_t *country);
561 
562 /**
563  * wlan_reg_chan_is_49ghz() - Check if the input channel number is 4.9GHz
564  * @pdev: Pdev pointer
565  * @chan_num: Input channel number
566  *
567  * Return: true if the channel is 4.9GHz else false.
568  */
569 
570 bool wlan_reg_chan_is_49ghz(struct wlan_objmgr_pdev *pdev,
571 		uint8_t chan_num);
572 
573 /**
574  * wlan_reg_set_country() - Set the current regulatory country
575  * @pdev: The physical dev to set current country for
576  * @country: The country information to configure
577  *
578  * Return: QDF_STATUS
579  */
580 QDF_STATUS wlan_reg_set_country(struct wlan_objmgr_pdev *pdev,
581 				uint8_t *country);
582 
583 /**
584  * wlan_reg_set_11d_country() - Set the 11d regulatory country
585  * @pdev: The physical dev to set current country for
586  * @country: The country information to configure
587  *
588  * Return: QDF_STATUS
589  */
590 QDF_STATUS wlan_reg_set_11d_country(struct wlan_objmgr_pdev *pdev,
591 				    uint8_t *country);
592 
593 /**
594  * wlan_reg_register_chan_change_callback () - add chan change cbk
595  * @psoc: psoc ptr
596  * @cbk: callback
597  * @arg: argument
598  *
599  * Return: true or false
600  */
601 void wlan_reg_register_chan_change_callback(struct wlan_objmgr_psoc *psoc,
602 					    void *cbk, void *arg);
603 
604 /**
605  * wlan_reg_unregister_chan_change_callback () - remove chan change cbk
606  * @psoc: psoc ptr
607  * @cbk:callback
608  *
609  * Return: true or false
610  */
611 void wlan_reg_unregister_chan_change_callback(struct wlan_objmgr_psoc *psoc,
612 					      void *cbk);
613 
614 /**
615  * wlan_reg_is_11d_offloaded() - 11d offloaded supported
616  * @psoc: psoc ptr
617  *
618  * Return: bool
619  */
620 bool wlan_reg_is_11d_offloaded(struct wlan_objmgr_psoc *psoc);
621 
622 /**
623  * wlan_reg_11d_enabled_on_host() - 11d enabled don host
624  * @psoc: psoc ptr
625  *
626  * Return: bool
627  */
628 bool wlan_reg_11d_enabled_on_host(struct wlan_objmgr_psoc *psoc);
629 
630 /**
631  * wlan_reg_get_chip_mode() - get supported chip mode
632  * @pdev: pdev pointer
633  * @chip_mode: chip mode
634  *
635  * Return: QDF STATUS
636  */
637 QDF_STATUS wlan_reg_get_chip_mode(struct wlan_objmgr_pdev *pdev,
638 		uint32_t *chip_mode);
639 
640 /**
641  * wlan_reg_is_11d_scan_inprogress() - checks 11d scan status
642  * @psoc: psoc ptr
643  *
644  * Return: bool
645  */
646 bool wlan_reg_is_11d_scan_inprogress(struct wlan_objmgr_psoc *psoc);
647 /**
648  * wlan_reg_get_freq_range() - Get 2GHz and 5GHz frequency range
649  * @pdev: pdev pointer
650  * @low_2g: low 2GHz frequency range
651  * @high_2g: high 2GHz frequency range
652  * @low_5g: low 5GHz frequency range
653  * @high_5g: high 5GHz frequency range
654  *
655  * Return: QDF status
656  */
657 QDF_STATUS wlan_reg_get_freq_range(struct wlan_objmgr_pdev *pdev,
658 		uint32_t *low_2g,
659 		uint32_t *high_2g,
660 		uint32_t *low_5g,
661 		uint32_t *high_5g);
662 /**
663  * wlan_reg_get_tx_ops () - get regulatory tx ops
664  * @psoc: psoc ptr
665  *
666  */
667 struct wlan_lmac_if_reg_tx_ops *
668 wlan_reg_get_tx_ops(struct wlan_objmgr_psoc *psoc);
669 
670 /**
671  * wlan_reg_get_curr_regdomain() - Get current regdomain in use
672  * @pdev: pdev pointer
673  * @cur_regdmn: Current regdomain info
674  *
675  * Return: QDF status
676  */
677 QDF_STATUS wlan_reg_get_curr_regdomain(struct wlan_objmgr_pdev *pdev,
678 		struct cur_regdmn_info *cur_regdmn);
679 
680 /**
681  * wlan_reg_update_nol_history_ch() - Set nol-history flag for the channels in
682  * the list.
683  *
684  * @pdev: Pdev ptr
685  * @ch_list: Input channel list.
686  * @num_ch: Number of channels.
687  * @nol_history_ch: Nol history value.
688  *
689  * Return: void
690  */
691 void wlan_reg_update_nol_history_ch(struct wlan_objmgr_pdev *pdev,
692 				    uint8_t *ch_list,
693 				    uint8_t num_ch,
694 				    bool nol_history_ch);
695 #endif
696