1 /*
2  * Copyright (c) 2012-2018 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: This file contains UCFG APIs of EXTSCAN component
21  */
22 
23 #ifndef _WLAN_EXTSCAN_UCFG_API_H_
24 #define _WLAN_EXTSCAN_UCFG_API_H_
25 
26 #include "wlan_extscan_api.h"
27 #include <wlan_objmgr_psoc_obj.h>
28 #include <wlan_objmgr_pdev_obj.h>
29 #include <wlan_objmgr_vdev_obj.h>
30 
31 #ifdef FEATURE_WLAN_EXTSCAN
32 
33 /**
34  * ucfg_extscan_get_enable() - API to get extscan enable value
35  * @psoc: pointer to psoc object
36  *
37  * Return: true if enabled else false.
38  */
39 static inline
ucfg_extscan_get_enable(struct wlan_objmgr_psoc * psoc)40 bool ucfg_extscan_get_enable(struct wlan_objmgr_psoc *psoc)
41 {
42 	return extscan_get_enable(psoc);
43 }
44 
45 /**
46  * ucfg_extscan_get_passive_max_time() - API to get passive
47  *					 max channel time
48  * @psoc: pointer to psoc object
49  * @passive_max_chn_time: extscan passive max channel time
50  *
51  * Return: none
52  */
53 static inline
ucfg_extscan_get_passive_max_time(struct wlan_objmgr_psoc * psoc,uint32_t * passive_max_chn_time)54 void ucfg_extscan_get_passive_max_time(struct wlan_objmgr_psoc *psoc,
55 				       uint32_t *passive_max_chn_time)
56 {
57 	extscan_get_passive_max_time(psoc,
58 				     passive_max_chn_time);
59 }
60 
61 /**
62  * ucfg_extscan_get_active_max_time() - API to get active
63  *					max channel time
64  * @psoc: pointer to psoc object
65  * @active_max_chn_time: extscan active max channel time
66  *
67  * Return: none
68  */
69 static inline
ucfg_extscan_get_active_max_time(struct wlan_objmgr_psoc * psoc,uint32_t * active_max_chn_time)70 void ucfg_extscan_get_active_max_time(struct wlan_objmgr_psoc *psoc,
71 				      uint32_t *active_max_chn_time)
72 {
73 	extscan_get_active_max_time(psoc,
74 				    active_max_chn_time);
75 }
76 
77 /**
78  * ucfg_extscan_get_active_min_time() - API to set active
79  *					min channel time
80  * @psoc: pointer to psoc object
81  * @active_min_chn_time: extscan active min channel time
82  *
83  * Return: none
84  */
85 static inline
ucfg_extscan_get_active_min_time(struct wlan_objmgr_psoc * psoc,uint32_t * active_min_chn_time)86 void ucfg_extscan_get_active_min_time(struct wlan_objmgr_psoc *psoc,
87 				      uint32_t *active_min_chn_time)
88 {
89 	extscan_get_active_min_time(psoc,
90 				    active_min_chn_time);
91 }
92 
93 #else
94 
95 static inline
ucfg_extscan_get_enable(struct wlan_objmgr_psoc * psoc)96 bool ucfg_extscan_get_enable(struct wlan_objmgr_psoc *psoc)
97 {
98 	return false;
99 }
100 
101 #endif
102 #endif
103