xref: /wlan-driver/qca-wifi-host-cmn/umac/scan/dispatcher/inc/wlan_extscan_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name  *
5*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
6*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
7*5113495bSYour Name  * above copyright notice and this permission notice appear in all
8*5113495bSYour Name  * copies.
9*5113495bSYour Name  *
10*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
18*5113495bSYour Name  */
19*5113495bSYour Name 
20*5113495bSYour Name /**
21*5113495bSYour Name  * DOC: This file contains APIs of EXTSCAN component
22*5113495bSYour Name  */
23*5113495bSYour Name 
24*5113495bSYour Name #ifndef _WLAN_EXTSCAN_API_H_
25*5113495bSYour Name #define _WLAN_EXTSCAN_API_H_
26*5113495bSYour Name 
27*5113495bSYour Name #include <wlan_objmgr_psoc_obj.h>
28*5113495bSYour Name #include <wlan_objmgr_pdev_obj.h>
29*5113495bSYour Name #include <wlan_objmgr_vdev_obj.h>
30*5113495bSYour Name #include "../../core/src/wlan_scan_main.h"
31*5113495bSYour Name 
32*5113495bSYour Name #ifdef FEATURE_WLAN_EXTSCAN
33*5113495bSYour Name 
34*5113495bSYour Name /**
35*5113495bSYour Name  * extscan_get_enable() - API to get extscan enable value
36*5113495bSYour Name  * @psoc: pointer to psoc object
37*5113495bSYour Name  *
38*5113495bSYour Name  * Return: true if enabled else false.
39*5113495bSYour Name  */
40*5113495bSYour Name bool extscan_get_enable(struct wlan_objmgr_psoc *psoc);
41*5113495bSYour Name 
42*5113495bSYour Name /**
43*5113495bSYour Name  * extscan_get_passive_max_time() - API to get passive
44*5113495bSYour Name  *					max channel time
45*5113495bSYour Name  * @psoc: pointer to psoc object
46*5113495bSYour Name  * @passive_max_chn_time: extscan passive max channel time
47*5113495bSYour Name  *
48*5113495bSYour Name  * Return: none
49*5113495bSYour Name  */
50*5113495bSYour Name void extscan_get_passive_max_time(struct wlan_objmgr_psoc *psoc,
51*5113495bSYour Name 				  uint32_t *passive_max_chn_time);
52*5113495bSYour Name 
53*5113495bSYour Name /**
54*5113495bSYour Name  * extscan_get_active_max_time() - API to get active
55*5113495bSYour Name  *					max channel time
56*5113495bSYour Name  * @psoc: pointer to psoc object
57*5113495bSYour Name  * @active_max_chn_time: extscan active max channel time
58*5113495bSYour Name  *
59*5113495bSYour Name  * Return: none
60*5113495bSYour Name  */
61*5113495bSYour Name void extscan_get_active_max_time(struct wlan_objmgr_psoc *psoc,
62*5113495bSYour Name 				 uint32_t *active_max_chn_time);
63*5113495bSYour Name 
64*5113495bSYour Name /**
65*5113495bSYour Name  * extscan_get_active_min_time() - API to set active
66*5113495bSYour Name  *					min channel time
67*5113495bSYour Name  * @psoc: pointer to psoc object
68*5113495bSYour Name  * @active_min_chn_time: extscan active min channel time
69*5113495bSYour Name  *
70*5113495bSYour Name  * Return: none
71*5113495bSYour Name  */
72*5113495bSYour Name void extscan_get_active_min_time(struct wlan_objmgr_psoc *psoc,
73*5113495bSYour Name 				 uint32_t *active_min_chn_time);
74*5113495bSYour Name 
75*5113495bSYour Name /**
76*5113495bSYour Name  * wlan_extscan_global_init() - Initialize extscan
77*5113495bSYour Name  * @psoc: pointer to psoc object
78*5113495bSYour Name  * @scan_obj: pointer to scan object
79*5113495bSYour Name  *
80*5113495bSYour Name  * Return: QDF_STATUS
81*5113495bSYour Name  */
82*5113495bSYour Name QDF_STATUS
83*5113495bSYour Name wlan_extscan_global_init(struct wlan_objmgr_psoc *psoc,
84*5113495bSYour Name 			 struct wlan_scan_obj *scan_obj);
85*5113495bSYour Name 
86*5113495bSYour Name /**
87*5113495bSYour Name  * wlan_extscan_global_deinit() - Deinitialize extscan
88*5113495bSYour Name  *
89*5113495bSYour Name  * Return: QDF_STATUS
90*5113495bSYour Name  */
91*5113495bSYour Name QDF_STATUS
92*5113495bSYour Name wlan_extscan_global_deinit(void);
93*5113495bSYour Name 
94*5113495bSYour Name #else
95*5113495bSYour Name 
96*5113495bSYour Name static inline
cfg_extscan_get_enable(struct wlan_objmgr_psoc * psoc)97*5113495bSYour Name bool cfg_extscan_get_enable(struct wlan_objmgr_psoc *psoc)
98*5113495bSYour Name {
99*5113495bSYour Name 	return false;
100*5113495bSYour Name }
101*5113495bSYour Name 
102*5113495bSYour Name static inline
cfg_extscan_get_passive_max_time(struct wlan_objmgr_psoc * psoc,uint32_t * passive_max_chn_time)103*5113495bSYour Name void cfg_extscan_get_passive_max_time(struct wlan_objmgr_psoc *psoc,
104*5113495bSYour Name 				      uint32_t *passive_max_chn_time)
105*5113495bSYour Name {
106*5113495bSYour Name }
107*5113495bSYour Name 
108*5113495bSYour Name static inline
cfg_extscan_get_active_max_time(struct wlan_objmgr_psoc * psoc,uint32_t * active_max_chn_time)109*5113495bSYour Name void cfg_extscan_get_active_max_time(struct wlan_objmgr_psoc *psoc,
110*5113495bSYour Name 				     uint32_t *active_max_chn_time)
111*5113495bSYour Name {
112*5113495bSYour Name }
113*5113495bSYour Name 
114*5113495bSYour Name static inline
cfg_extscan_get_active_min_time(struct wlan_objmgr_psoc * psoc,uint32_t * active_min_chn_time)115*5113495bSYour Name void cfg_extscan_get_active_min_time(struct wlan_objmgr_psoc *psoc,
116*5113495bSYour Name 				     uint32_t *active_min_chn_time)
117*5113495bSYour Name {
118*5113495bSYour Name }
119*5113495bSYour Name 
120*5113495bSYour Name static inline QDF_STATUS
wlan_extscan_global_init(struct wlan_objmgr_psoc * psoc,struct wlan_scan_obj * scan_obj)121*5113495bSYour Name wlan_extscan_global_init(struct wlan_objmgr_psoc *psoc,
122*5113495bSYour Name 			 struct wlan_scan_obj *scan_obj)
123*5113495bSYour Name {
124*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
125*5113495bSYour Name }
126*5113495bSYour Name 
wlan_extscan_global_deinit(void)127*5113495bSYour Name static inline QDF_STATUS wlan_extscan_global_deinit(void)
128*5113495bSYour Name {
129*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
130*5113495bSYour Name }
131*5113495bSYour Name 
132*5113495bSYour Name #endif
133*5113495bSYour Name #endif
134