xref: /wlan-dirver/qca-wifi-host-cmn/umac/regulatory/core/src/reg_priv_objs.h (revision c0d6f0176e7b1b012c9eef4d3ee54c109352040e)
1 /*
2  * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
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: reg_priv_objs.h
22  * This file contains regulatory component private data structures.
23  */
24 
25 #ifndef __REG_PRIV_OBJS_H
26 #define __REG_PRIV_OBJS_H
27 
28 #include <wlan_scan_public_structs.h>
29 #ifdef CONFIG_AFC_SUPPORT
30 #include "reg_services_common.h"
31 #endif
32 #include <wlan_objmgr_psoc_obj.h>
33 
34 #define reg_alert(params...) \
35 	QDF_TRACE_FATAL(QDF_MODULE_ID_REGULATORY, params)
36 #define reg_err(params...) \
37 	QDF_TRACE_ERROR(QDF_MODULE_ID_REGULATORY, params)
38 #define reg_err_rl(params...) \
39 	QDF_TRACE_ERROR_RL(QDF_MODULE_ID_REGULATORY, params)
40 #define reg_warn(params...) \
41 	QDF_TRACE_WARN(QDF_MODULE_ID_REGULATORY, params)
42 #define reg_notice(params...) \
43 	QDF_TRACE_INFO(QDF_MODULE_ID_REGULATORY, params)
44 #define reg_info(params...) \
45 	QDF_TRACE_INFO(QDF_MODULE_ID_REGULATORY, params)
46 #define reg_debug(params...) \
47 	QDF_TRACE_DEBUG(QDF_MODULE_ID_REGULATORY, params)
48 #define reg_debug_rl(params...) \
49 	QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_REGULATORY, params)
50 
51 #define reg_nofl_alert(params...) \
52 	QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_REGULATORY, params)
53 #define reg_nofl_err(params...) \
54 	QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_REGULATORY, params)
55 #define reg_nofl_warn(params...) \
56 	QDF_TRACE_WARN_NO_FL(QDF_MODULE_ID_REGULATORY, params)
57 #define reg_nofl_info(params...) \
58 	QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_REGULATORY, params)
59 #define reg_nofl_debug(params...) \
60 	QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_REGULATORY, params)
61 
62 /**
63  * typedef reg_chan_change_callback() - Regulatory channel change callback
64  * @psoc: Pointer to psoc
65  * @pdev: Pointer to pdev
66  * @chan_list: Pointer to regulatory channel list
67  * @avoid_freq_ind: Pointer to avoid frequencies
68  * @arg: list of arguments
69  */
70 typedef void (*reg_chan_change_callback)(
71 		struct wlan_objmgr_psoc *psoc,
72 		struct wlan_objmgr_pdev *pdev,
73 		struct regulatory_channel *chan_list,
74 		struct avoid_freq_ind_data *avoid_freq_ind,
75 		void *arg);
76 
77 /**
78  * struct chan_change_cbk_entry - Channel change callback entry
79  * @cbk: Callback
80  * @arg: Arguments
81  */
82 struct chan_change_cbk_entry {
83 	reg_chan_change_callback cbk;
84 	void *arg;
85 };
86 
87 /**
88  * typedef reg_ctry_change_callback() - Regulatory country change callback
89  * @mac_ctx: Pointer to mac context
90  * @vdev_id: vdev ID
91  */
92 typedef void (*reg_ctry_change_callback)(
93 		uint8_t vdev_id);
94 
95 /**
96  * struct ctry_change_cbk_entry - Country change callback entry
97  * @cbk: Callback
98  */
99 struct ctry_change_cbk_entry {
100 	reg_ctry_change_callback cbk;
101 };
102 
103 /*
104  * typedef reg_get_connected_chan_for_mode_callback() - Regulatory callback to
105  * get connected channel in given range for specific opmode
106  * @psoc: Pointer to psoc object
107  * @opmode: vdev operating mode
108  * @start_freq: Start frequency
109  * @end_freq: End frequency
110  *
111  * Return: Return connected channel information for the given power mode and
112  * frequency range
113  */
114 typedef struct wlan_channel * (*reg_get_connected_chan_for_mode_callback)(
115 				struct wlan_objmgr_psoc *psoc,
116 				enum QDF_OPMODE opmode,
117 				qdf_freq_t start_freq,
118 				qdf_freq_t end_freq);
119 
120 /* struct get_connected_chan_for_mode_cbk_entry - Get connected channel for
121  * mode callback entry
122  *
123  * @cbk: Callback
124  */
125 struct get_connected_chan_for_mode_cbk_entry {
126 	reg_get_connected_chan_for_mode_callback cbk;
127 };
128 
129 #ifdef CONFIG_REG_CLIENT
130 #define MAX_INDOOR_LIST_SIZE 3
131 
132 /**
133  * struct indoor_concurrency_list - Active indoor station list
134  * @vdev_id: vdev ID
135  * @freq: frequency of the interface
136  * @chan_range: Range of channels based on bandwidth
137  */
138 struct indoor_concurrency_list {
139 	uint8_t vdev_id;
140 	uint32_t freq;
141 	const struct bonded_channel_freq *chan_range;
142 };
143 #endif
144 /**
145  * struct wlan_regulatory_psoc_priv_obj - wlan regulatory psoc private object
146  * @mas_chan_params: master channel parameters list
147  * @chan_list_recvd: whether channel list has been received
148  * @offload_enabled:
149  * @six_ghz_supported: whether 6ghz is supported
150  * @five_dot_nine_ghz_supported: whether 5.9ghz is supported
151  *	(service bit WMI_SERVICE_5_DOT_9GHZ_SUPPORT)
152  * @num_phy:
153  * @cur_country:
154  * @def_country:
155  * @def_country_code:
156  * @def_region_domain:
157  * @cc_src:
158  * @psoc_ptr:
159  * @new_user_ctry_pending: In this array, element[phy_id] is true if any user
160  *	country update is pending for pdev (phy_id), used in case of MCL.
161  * @new_init_ctry_pending: In this array, element[phy_id] is true if any user
162  *	country update is pending for pdev (phy_id), used in case of WIN.
163  * @new_11d_ctry_pending: In this array, element[phy_id] is true if any 11d
164  *	country update is pending for pdev (phy_id).
165  * @world_country_pending: In this array, element[phy_id] is true if any world
166  *	country update is pending for pdev (phy_id).
167  * @dfs_enabled:
168  * @band_capability: bitmap of bands enabled, using enum reg_wifi_band as the
169  *	bit position value
170  * @indoor_chan_enabled:
171  * @ignore_fw_reg_offload_ind: Ignore FW reg offload indication
172  * @enable_11d_supp_original:
173  * @enable_11d_supp:
174  * @is_11d_offloaded:
175  * @vdev_id_for_11d_scan:
176  * @vdev_cnt_11d:
177  * @scan_11d_interval:
178  * @is_host_11d_inited:
179  * @scan_req_id:
180  * @scan_id:
181  * @timer:
182  * @vdev_ids_11d:
183  * @user_ctry_priority:
184  * @user_ctry_set:
185  * @cbk_list:
186  * @num_chan_change_cbks:
187  * @cc_cbk:
188  * @conn_chan_cb:
189  * @ch_avoid_ind:
190  * @unsafe_chan_list:
191  * @avoid_freq_list:
192  * @restart_beaconing:
193  * @reg_cap:
194  * @force_ssc_disable_indoor_channel:
195  * @enable_srd_chan_in_master_mode:
196  * @enable_11d_in_world_mode:
197  * @enable_5dot9_ghz_chan_in_master_mode: 5.9 GHz channel support in
198  *	master mode (ini fcc_5dot9_ghz_chan_in_master_mode)
199  * @cbk_list_lock:
200  * @retain_nol_across_regdmn_update: Retain the NOL list across the regdomain
201  *	changes.
202  * @domain_code_6g_ap: domain code for 6G AP
203  * @domain_code_6g_client: domain code for 6G client
204  * @is_ext_tpc_supported: Whether FW supports new WMI command for TPC
205  * @is_lower_6g_edge_ch_supported: whether lower 6ghz edge channel 5935MHz is
206  * supported
207  * @is_upper_6g_edge_ch_disabled: whether upper 6ghz edge channel 7115MHz is
208  * disabled
209  * @ch_avoid_ext_ind: whether need to update extended channel frequency list
210  * @avoid_freq_ext_list: the extended avoid channel frequency list
211  * @coex_unsafe_chan_nb_user_prefer: Honor coex unsafe chan cmd from firmware or
212  * userspace
213  * @coex_unsafe_chan_reg_disable: To disable reg channels for received coex
214  * unsafe channels list
215  * @reg_afc_dev_type: AFC device deployment type from BDF
216  * @reg_is_eirp_support_preferred: Whether target prefers EIRP format for
217  * WMI Set TPC command
218  * @enable_6ghz_sp_pwrmode_supp: Whether enable target Standard Power mode
219  *	support
220  * @afc_disable_timer_check: Whether disable target AFC timer check
221  * @afc_disable_request_id_check: Whether disable target AFC request id check
222  * @is_afc_reg_noaction: Whether no action to AFC power event
223  * @sta_sap_scc_on_indoor_channel: Value of sap+sta scc on indoor support
224  * @p2p_indoor_ch_support: Allow P2P GO in indoor channels
225  * @fcc_rules_ptr: Value of fcc channel frequency and tx_power list received
226  * from firmware
227  * @set_fcc_channel: Flag to set fcc channels
228  */
229 struct wlan_regulatory_psoc_priv_obj {
230 	struct mas_chan_params mas_chan_params[PSOC_MAX_PHY_REG_CAP];
231 	bool chan_list_recvd[PSOC_MAX_PHY_REG_CAP];
232 	bool offload_enabled;
233 	bool six_ghz_supported;
234 	bool five_dot_nine_ghz_supported;
235 	uint8_t num_phy;
236 	char cur_country[REG_ALPHA2_LEN + 1];
237 	char def_country[REG_ALPHA2_LEN + 1];
238 	uint16_t def_country_code;
239 	uint16_t def_region_domain;
240 	enum country_src cc_src;
241 	struct wlan_objmgr_psoc *psoc_ptr;
242 	bool new_user_ctry_pending[PSOC_MAX_PHY_REG_CAP];
243 	bool new_init_ctry_pending[PSOC_MAX_PHY_REG_CAP];
244 	bool new_11d_ctry_pending[PSOC_MAX_PHY_REG_CAP];
245 	bool world_country_pending[PSOC_MAX_PHY_REG_CAP];
246 	bool dfs_enabled;
247 	uint32_t band_capability;
248 	bool indoor_chan_enabled;
249 	bool ignore_fw_reg_offload_ind;
250 	bool enable_11d_supp_original;
251 	bool enable_11d_supp;
252 	bool is_11d_offloaded;
253 	uint8_t vdev_id_for_11d_scan;
254 	uint8_t vdev_cnt_11d;
255 	uint32_t scan_11d_interval;
256 #ifdef HOST_11D_SCAN
257 	bool is_host_11d_inited;
258 	wlan_scan_requester scan_req_id;
259 	uint32_t scan_id;
260 	qdf_mc_timer_t timer;
261 #endif
262 	uint8_t vdev_ids_11d[MAX_STA_VDEV_CNT];
263 	bool user_ctry_priority;
264 	bool user_ctry_set;
265 	struct chan_change_cbk_entry cbk_list[REG_MAX_CHAN_CHANGE_CBKS];
266 	struct get_connected_chan_for_mode_cbk_entry conn_chan_cb;
267 	uint8_t num_chan_change_cbks;
268 	struct ctry_change_cbk_entry cc_cbk;
269 	uint8_t ch_avoid_ind;
270 	struct unsafe_ch_list unsafe_chan_list;
271 	struct ch_avoid_ind_type avoid_freq_list;
272 	enum restart_beaconing_on_ch_avoid_rule restart_beaconing;
273 	struct wlan_psoc_host_hal_reg_capabilities_ext
274 			reg_cap[PSOC_MAX_PHY_REG_CAP];
275 	bool force_ssc_disable_indoor_channel;
276 	uint8_t enable_srd_chan_in_master_mode;
277 	bool enable_11d_in_world_mode;
278 	bool enable_5dot9_ghz_chan_in_master_mode;
279 	qdf_spinlock_t cbk_list_lock;
280 	bool retain_nol_across_regdmn_update;
281 #ifdef CONFIG_BAND_6GHZ
282 	uint8_t domain_code_6g_ap[REG_CURRENT_MAX_AP_TYPE];
283 	uint8_t domain_code_6g_client[REG_CURRENT_MAX_AP_TYPE][REG_MAX_CLIENT_TYPE];
284 #endif
285 	bool is_ext_tpc_supported;
286 #if defined(CONFIG_BAND_6GHZ)
287 	bool is_lower_6g_edge_ch_supported;
288 	bool is_upper_6g_edge_ch_disabled;
289 #endif
290 #ifdef FEATURE_WLAN_CH_AVOID_EXT
291 	bool ch_avoid_ext_ind;
292 	struct ch_avoid_ind_type avoid_freq_ext_list;
293 	bool coex_unsafe_chan_nb_user_prefer;
294 	bool coex_unsafe_chan_reg_disable;
295 #endif
296 #ifdef CONFIG_AFC_SUPPORT
297 	enum reg_afc_dev_deploy_type reg_afc_dev_type;
298 	bool reg_is_eirp_support_preferred;
299 	bool enable_6ghz_sp_pwrmode_supp;
300 	bool afc_disable_timer_check;
301 	bool afc_disable_request_id_check;
302 	bool is_afc_reg_noaction;
303 #endif
304 	bool sta_sap_scc_on_indoor_channel;
305 	bool p2p_indoor_ch_support;
306 #ifdef CONFIG_REG_CLIENT
307 	struct cur_fcc_rule fcc_rules_ptr[MAX_NUM_FCC_RULES];
308 #endif
309 	bool set_fcc_channel;
310 };
311 
312 /**
313  * struct wlan_regulatory_pdev_priv_obj - wlan regulatory pdev private object
314  * @cur_chan_list: current channel list, includes 6G channels
315  * @secondary_cur_chan_list: secondary current channel list, for concurrency
316  * situations
317  * @mas_chan_list: master channel list from the firmware.
318  * @is_6g_channel_list_populated: indicates the channel lists are populated
319  * @mas_chan_list_6g_ap: master channel list for 6G AP, includes all power types
320  * @mas_chan_list_6g_client: master channel list for 6G client, includes
321  *	all power types
322  * @super_chan_list: 6G super channel list that includes the information of
323  * all 6G power modes for every 6G channel
324  * @cache_disable_chan_list:
325  * @num_cache_channels:
326  * @disable_cached_channels:
327  * @default_country:
328  * @def_region_domain:
329  * @def_country_code:
330  * @current_country:
331  * @reg_dmn_pair:
332  * @reg_6g_superid: 6Ghz super domain id
333  * @ctry_code:
334  * @unii_5g_bitmap:
335  * @dfs_region:
336  * @phybitmap:
337  * @pdev_ptr:
338  * @range_2g_low:
339  * @range_2g_high:
340  * @range_5g_low:
341  * @range_5g_high:
342  * @dfs_enabled:
343  * @set_fcc_channel:
344  * @band_capability: bitmap of bands enabled, using enum reg_wifi_band as the
345  *	bit position value
346  * @indoor_chan_enabled:
347  * @en_chan_144:
348  * @wireless_modes:
349  * @freq_avoid_list:
350  * @force_ssc_disable_indoor_channel:
351  * @sap_state:
352  * @reg_rules:
353  * @reg_rules_lock:
354  * @chan_list_recvd:
355  * @pdev_opened: whether pdev has been opened by application
356  * @reg_cur_6g_ap_pwr_type: 6G AP type ie VLP/SP/LPI.
357  * @reg_cur_6g_client_mobility_type: 6G client type ie Default/Subordinate.
358  * @reg_target_client_type: 6 GHz client type received from target. The Client
359  *	type can be Default/Subordinate.
360  * @reg_rnr_tpe_usable: Indicates whether RNR IE is applicable for current reg
361  * domain.
362  * @reg_unspecified_ap_usable: Indicates if the AP type mentioned is not part of
363  * 802.11 standard.
364  * @reg_6g_thresh_priority_freq: All frequencies greater or equal will be given
365  * priority during channel selection by upper layer
366  * @max_phymode: The maximum phymode supported by the device and regulatory.
367  * @max_chwidth: The maximum bandwidth corresponding to the maximum phymode.
368  * @avoid_chan_ext_list: the extended avoid frequency list.
369  * @afc_cb_lock: The spinlock to synchronize afc callbacks
370  * @afc_cb_obj: The object containing the callback function and opaque argument
371  * @afc_pow_evt_cb_obj: The object containing the callback function and opaque
372  * argument for the AFC power event
373  * @afc_payload_reset_evt_cb_obj: The object containing the callback function
374  * and opaque argument for the AFC payload reset event
375  * @afc_request_id: The last AFC request id received from FW/halphy
376  * @is_6g_afc_power_event_received: indicates if the AFC power event is
377  * received
378  * @is_6g_afc_expiry_event_received: indicates if the AFC exipiry event is
379  * received
380  * @afc_chan_list: Intersection of AFC master and Standard power channel list
381  * @mas_chan_list_6g_afc: AFC master channel list constructed from the AFC
382  * server response.
383  * @power_info: pointer to AFC power information received from the AFC event
384  * sent by the target
385  * @is_reg_noaction_on_afc_pwr_evt: indicates whether regulatory needs to
386  * take action when AFC Power event is received. This variable is supposed to
387  * be set in the enterprise mode where ACS is not called upon receiving AFC
388  * event.
389  * @reg_afc_dev_deployment_type: AFC device deployment type from BDF
390  * @sta_sap_scc_on_indoor_channel: Value of sap+sta scc on indoor support
391  * @p2p_indoor_ch_support: Allow P2P GO in indoor channels
392  * @fcc_rules_ptr : Value of fcc channel frequency and tx_power list received
393  * from firmware
394  * @indoor_list: List of current indoor station interfaces
395  * @keep_6ghz_sta_cli_connection: Keep current STA/P2P client connection
396  */
397 struct wlan_regulatory_pdev_priv_obj {
398 	struct regulatory_channel cur_chan_list[NUM_CHANNELS];
399 #ifdef CONFIG_REG_CLIENT
400 	struct regulatory_channel secondary_cur_chan_list[NUM_CHANNELS];
401 #endif
402 	struct regulatory_channel mas_chan_list[NUM_CHANNELS];
403 #ifdef CONFIG_BAND_6GHZ
404 	bool is_6g_channel_list_populated;
405 	struct regulatory_channel mas_chan_list_6g_ap[REG_CURRENT_MAX_AP_TYPE][NUM_6GHZ_CHANNELS];
406 	struct regulatory_channel mas_chan_list_6g_client[REG_CURRENT_MAX_AP_TYPE][REG_MAX_CLIENT_TYPE][NUM_6GHZ_CHANNELS];
407 	struct super_chan_info super_chan_list[NUM_6GHZ_CHANNELS];
408 #endif
409 #ifdef DISABLE_CHANNEL_LIST
410 	struct regulatory_channel cache_disable_chan_list[NUM_CHANNELS];
411 	uint32_t num_cache_channels;
412 	bool disable_cached_channels;
413 #endif
414 	char default_country[REG_ALPHA2_LEN + 1];
415 	uint16_t def_region_domain;
416 	uint16_t def_country_code;
417 	char current_country[REG_ALPHA2_LEN + 1];
418 	uint16_t reg_dmn_pair;
419 	uint16_t reg_6g_superid;
420 	uint16_t ctry_code;
421 #ifdef DISABLE_UNII_SHARED_BANDS
422 	uint8_t unii_5g_bitmap;
423 #endif
424 	enum dfs_reg dfs_region;
425 	uint32_t phybitmap;
426 	struct wlan_objmgr_pdev *pdev_ptr;
427 	qdf_freq_t range_2g_low;
428 	qdf_freq_t range_2g_high;
429 	qdf_freq_t range_5g_low;
430 	qdf_freq_t range_5g_high;
431 	bool dfs_enabled;
432 	bool set_fcc_channel;
433 	uint32_t band_capability;
434 	bool indoor_chan_enabled;
435 	bool en_chan_144;
436 	uint64_t wireless_modes;
437 	struct ch_avoid_ind_type freq_avoid_list;
438 	bool force_ssc_disable_indoor_channel;
439 	bool sap_state;
440 	struct reg_rule_info reg_rules;
441 	qdf_spinlock_t reg_rules_lock;
442 	bool chan_list_recvd;
443 	bool pdev_opened;
444 #if defined(CONFIG_BAND_6GHZ)
445 	enum reg_6g_ap_type reg_cur_6g_ap_pwr_type;
446 	enum reg_6g_client_type reg_cur_6g_client_mobility_type;
447 	enum reg_6g_client_type reg_target_client_type;
448 	bool reg_rnr_tpe_usable;
449 	bool reg_unspecified_ap_usable;
450 	qdf_freq_t reg_6g_thresh_priority_freq;
451 #endif
452 #ifdef CONFIG_HOST_FIND_CHAN
453 	enum reg_phymode max_phymode;
454 	enum phy_ch_width max_chwidth;
455 #endif
456 #ifdef FEATURE_WLAN_CH_AVOID_EXT
457 	avoid_ch_ext_list avoid_chan_ext_list;
458 #endif
459 #ifdef CONFIG_AFC_SUPPORT
460 	qdf_spinlock_t afc_cb_lock;
461 	struct afc_cb_handler afc_cb_obj;
462 	struct afc_pow_evt_cb_handler afc_pow_evt_cb_obj;
463 	struct afc_payload_reset_evt_cb_handler afc_payload_reset_evt_cb_obj;
464 	uint64_t afc_request_id;
465 	bool is_6g_afc_power_event_received;
466 	bool is_6g_afc_expiry_event_received;
467 	struct regulatory_channel afc_chan_list[NUM_6GHZ_CHANNELS];
468 	struct regulatory_channel mas_chan_list_6g_afc[NUM_6GHZ_CHANNELS];
469 	struct reg_fw_afc_power_event *power_info;
470 	bool is_reg_noaction_on_afc_pwr_evt;
471 	enum reg_afc_dev_deploy_type reg_afc_dev_deployment_type;
472 #endif
473 	bool sta_sap_scc_on_indoor_channel;
474 	bool p2p_indoor_ch_support;
475 #ifdef CONFIG_REG_CLIENT
476 	struct cur_fcc_rule fcc_rules_ptr[MAX_NUM_FCC_RULES];
477 	struct indoor_concurrency_list indoor_list[MAX_INDOOR_LIST_SIZE];
478 	bool keep_6ghz_sta_cli_connection;
479 #endif
480 };
481 
482 /**
483  * reg_get_psoc_obj() - Provides the reg component object pointer
484  * @psoc: pointer to psoc object.
485  *
486  * Return: reg component object pointer
487  */
488 struct wlan_regulatory_psoc_priv_obj *reg_get_psoc_obj(
489 		struct wlan_objmgr_psoc *psoc);
490 
491 /**
492  * reg_get_pdev_obj() - Provides the reg component object pointer
493  * @pdev: pointer to pdev object.
494  *
495  * Return: reg component object pointer
496  */
497 struct wlan_regulatory_pdev_priv_obj *reg_get_pdev_obj(
498 		struct wlan_objmgr_pdev *pdev);
499 
500 /**
501  * wlan_regulatory_psoc_obj_created_notification() - PSOC obj create callback
502  * @psoc: PSOC object
503  * @arg_list: Variable argument list
504  *
505  * This callback is registered with object manager during initialization to
506  * get notified when the object is created.
507  *
508  * Return: Success or Failure
509  */
510 QDF_STATUS wlan_regulatory_psoc_obj_created_notification(
511 		struct wlan_objmgr_psoc *psoc, void *arg_list);
512 
513 /**
514  * wlan_regulatory_psoc_obj_destroyed_notification() - PSOC obj delete callback
515  * @psoc: PSOC object
516  * @arg_list: Variable argument list
517  *
518  * This callback is registered with object manager during initialization to
519  * get notified when the object is deleted.
520  *
521  * Return: Success or Failure
522  */
523 QDF_STATUS wlan_regulatory_psoc_obj_destroyed_notification(
524 	struct wlan_objmgr_psoc *psoc, void *arg_list);
525 
526 /**
527  * wlan_regulatory_pdev_obj_created_notification() - PDEV obj create callback
528  * @pdev: pdev object
529  * @arg_list: Variable argument list
530  *
531  * This callback is registered with object manager during initialization to
532  * get notified when the pdev object is created.
533  *
534  * Return: Success or Failure
535  */
536 QDF_STATUS wlan_regulatory_pdev_obj_created_notification(
537 	struct wlan_objmgr_pdev *pdev, void *arg_list);
538 
539 /**
540  * wlan_regulatory_pdev_obj_destroyed_notification() - PDEV obj destroy callback
541  * @pdev: pdev object
542  * @arg_list: Variable argument list
543  *
544  * This callback is registered with object manager during initialization to
545  * get notified when the pdev object is destroyed.
546  *
547  * Return: Success or Failure
548  */
549 QDF_STATUS wlan_regulatory_pdev_obj_destroyed_notification(
550 		struct wlan_objmgr_pdev *pdev, void *arg_list);
551 
552 #ifdef CONFIG_AFC_SUPPORT
553 /**
554  * reg_free_afc_pwr_info() - Free the AFC power information object
555  * @pdev_priv_obj: Pointer to pdev_priv_obj
556  *
557  * Return: void
558  */
559 void
560 reg_free_afc_pwr_info(struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj);
561 #else
562 static inline void
563 reg_free_afc_pwr_info(struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj)
564 {
565 }
566 #endif
567 #endif
568