xref: /wlan-dirver/qca-wifi-host-cmn/umac/dfs/core/src/dfs_filter_init.h (revision 2f4b444fb7e689b83a4ab0e7b3b38f0bf4def8e0)
1 /*
2  * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
3  *
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /**
21  * DOC: umac/dfs/core/src/dfs_filter_init.h
22  * This file contains dfs interfaces
23  */
24 
25 #ifndef _DFS_FILTER_INIT_H_
26 #define _DFS_FILTER_INIT_H_
27 
28 /**
29  * dfs_main_attach() - Allocates memory for wlan_dfs members.
30  * @dfs: Pointer to wlan_dfs structure.
31  */
32 #if defined(WLAN_DFS_PARTIAL_OFFLOAD)
33 int dfs_main_attach(struct wlan_dfs *dfs);
34 #else
35 static inline int dfs_main_attach(struct wlan_dfs *dfs)
36 {
37 	return 0;
38 }
39 #endif
40 
41 /**
42  * dfs_main_detach() - Free dfs variables.
43  * @dfs: Pointer to wlan_dfs structure.
44  */
45 #if defined(WLAN_DFS_PARTIAL_OFFLOAD)
46 void dfs_main_detach(struct wlan_dfs *dfs);
47 #else
48 static inline void dfs_main_detach(struct wlan_dfs *dfs)
49 {
50 }
51 #endif
52 
53 /**
54  * dfs_main_timer_reset() - Stop dfs timers.
55  * @dfs: Pointer to wlan_dfs structure.
56  */
57 #if defined(WLAN_DFS_PARTIAL_OFFLOAD)
58 void dfs_main_timer_reset(struct wlan_dfs *dfs);
59 #else
60 static inline void dfs_main_timer_reset(struct wlan_dfs *dfs)
61 {
62 }
63 #endif
64 
65 /**
66  * dfs_main_timer_detach() - Free dfs timers.
67  * @dfs: Pointer to wlan_dfs structure.
68  */
69 #if defined(WLAN_DFS_PARTIAL_OFFLOAD)
70 void dfs_main_timer_detach(struct wlan_dfs *dfs);
71 #else
72 static inline void dfs_main_timer_detach(struct wlan_dfs *dfs)
73 {
74 }
75 #endif
76 
77 #endif /* _DFS_FILTER_INIT_H_ */
78