xref: /wlan-dirver/qca-wifi-host-cmn/target_if/regulatory/inc/target_if_reg_11d.h (revision 901120c066e139c7f8a2c8e4820561fdd83c67ef)
1 /*
2  * Copyright (c) 2017-2019 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: target_if_reg_11d.h
23  * This file contains regulatory target 11d scan interface.
24  */
25 
26 #ifndef __TARGET_IF_REG_11D_H__
27 #define __TARGET_IF_REG_11D_H__
28 
29 #include "qdf_types.h"
30 #include "target_if.h"
31 #include <wlan_objmgr_psoc_obj.h>
32 #include "target_if_reg.h"
33 #include "wmi_unified_api.h"
34 #include "wmi_unified_reg_api.h"
35 
36 #ifdef TARGET_11D_SCAN
37 /**
38  * tgt_if_regulatory_is_11d_offloaded() - Check if reg 11d is offloaded.
39  * @psoc: psoc pointer
40  *
41  * Return: true if 11d is offloaded, else false.
42  */
43 bool tgt_if_regulatory_is_11d_offloaded(struct wlan_objmgr_psoc *psoc);
44 
45 /**
46  * tgt_if_regulatory_register_11d_new_cc_handler() - Register for 11d country
47  * code event ID.
48  * @psoc: psoc pointer
49  * @args: Pointer to args.
50  *
51  * Return: QDF_STATUS
52  */
53 QDF_STATUS tgt_if_regulatory_register_11d_new_cc_handler(
54 		struct wlan_objmgr_psoc *psoc, void *arg);
55 
56 /**
57  * tgt_if_regulatory_unregister_11d_new_cc_handler() - Unregister 11d country
58  * code event ID.
59  * @psoc: psoc pointer
60  * @args: Pointer to args.
61  *
62  * Return: QDF_STATUS
63  */
64 QDF_STATUS tgt_if_regulatory_unregister_11d_new_cc_handler(
65 		struct wlan_objmgr_psoc *psoc, void *arg);
66 
67 /**
68  * tgt_if_regulatory_start_11d_scan() - Start 11d scan.
69  * @psoc: psoc pointer
70  * @reg_start_11d_scan_req: Pointer to 11d scan start request.
71  *
72  * Return: QDF_STATUS
73  */
74 QDF_STATUS tgt_if_regulatory_start_11d_scan(
75 		struct wlan_objmgr_psoc *psoc,
76 		struct reg_start_11d_scan_req *reg_start_11d_scan_req);
77 
78 /**
79  * tgt_if_regulatory_stop_11d_scan() - Stop 11d scan.
80  * @psoc: psoc pointer
81  * @reg_stop_11d_scan_req: Pointer to 11d scan stop request.
82  *
83  * Return: QDF_STATUS
84  */
85 QDF_STATUS tgt_if_regulatory_stop_11d_scan(
86 		struct wlan_objmgr_psoc *psoc,
87 		struct reg_stop_11d_scan_req *reg_stop_11d_scan_req);
88 
89 #else
90 
91 static inline bool
92 tgt_if_regulatory_is_11d_offloaded(struct wlan_objmgr_psoc *psoc)
93 {
94 	return false;
95 }
96 
97 static inline QDF_STATUS
98 tgt_if_regulatory_register_11d_new_cc_handler(struct wlan_objmgr_psoc *psoc,
99 					      void *arg)
100 {
101 	return QDF_STATUS_SUCCESS;
102 }
103 
104 static inline QDF_STATUS
105 tgt_if_regulatory_unregister_11d_new_cc_handler(struct wlan_objmgr_psoc *psoc,
106 						void *arg)
107 {
108 	return QDF_STATUS_SUCCESS;
109 }
110 
111 static inline QDF_STATUS tgt_if_regulatory_start_11d_scan(
112 	struct wlan_objmgr_psoc *psoc,
113 	struct reg_start_11d_scan_req *reg_start_11d_scan_req)
114 {
115 	return QDF_STATUS_SUCCESS;
116 }
117 
118 static inline QDF_STATUS tgt_if_regulatory_stop_11d_scan(
119 		struct wlan_objmgr_psoc *psoc,
120 		struct reg_stop_11d_scan_req *reg_stop_11d_scan_req)
121 {
122 	return QDF_STATUS_SUCCESS;
123 }
124 #endif
125 #endif
126