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 APIs of EXTSCAN component 21 */ 22 23 #ifndef _WLAN_EXTSCAN_API_H_ 24 #define _WLAN_EXTSCAN_API_H_ 25 26 #include <wlan_objmgr_psoc_obj.h> 27 #include <wlan_objmgr_pdev_obj.h> 28 #include <wlan_objmgr_vdev_obj.h> 29 #include "../../core/src/wlan_scan_main.h" 30 31 #ifdef FEATURE_WLAN_EXTSCAN 32 33 /** 34 * 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 bool extscan_get_enable(struct wlan_objmgr_psoc *psoc); 40 41 /** 42 * extscan_get_passive_max_time() - API to get passive 43 * max channel time 44 * @psoc: pointer to psoc object 45 * @passive_max_chn_time: extscan passive max channel time 46 * 47 * Return: none 48 */ 49 void extscan_get_passive_max_time(struct wlan_objmgr_psoc *psoc, 50 uint32_t *passive_max_chn_time); 51 52 /** 53 * extscan_get_active_max_time() - API to get active 54 * max channel time 55 * @psoc: pointer to psoc object 56 * @active_max_chn_time: extscan active max channel time 57 * 58 * Return: none 59 */ 60 void extscan_get_active_max_time(struct wlan_objmgr_psoc *psoc, 61 uint32_t *active_max_chn_time); 62 63 /** 64 * extscan_get_active_min_time() - API to set active 65 * min channel time 66 * @psoc: pointer to psoc object 67 * @active_min_chn_time: extscan active min channel time 68 * 69 * Return: none 70 */ 71 void extscan_get_active_min_time(struct wlan_objmgr_psoc *psoc, 72 uint32_t *active_min_chn_time); 73 74 /** 75 * wlan_extscan_global_init() - Initialize extscan 76 * @psoc: pointer to psoc object 77 * @scan_obj: pointer to scan object 78 * 79 * Return: QDF_STATUS 80 */ 81 QDF_STATUS 82 wlan_extscan_global_init(struct wlan_objmgr_psoc *psoc, 83 struct wlan_scan_obj *scan_obj); 84 85 /** 86 * wlan_extscan_global_deinit() - Deinitialize extscan 87 * @psoc: pointer to psoc object 88 * @scan_obj: pointer to scan object 89 * 90 * Return: QDF_STATUS 91 */ 92 QDF_STATUS 93 wlan_extscan_global_deinit(void); 94 95 #else 96 97 static inline 98 bool cfg_extscan_get_enable(struct wlan_objmgr_psoc *psoc) 99 { 100 return false; 101 } 102 103 static inline 104 void cfg_extscan_get_passive_max_time(struct wlan_objmgr_psoc *psoc, 105 uint32_t *passive_max_chn_time) 106 { 107 } 108 109 static inline 110 void cfg_extscan_get_active_max_time(struct wlan_objmgr_psoc *psoc, 111 uint32_t *active_max_chn_time) 112 { 113 } 114 115 static inline 116 void cfg_extscan_get_active_min_time(struct wlan_objmgr_psoc *psoc, 117 uint32_t *active_min_chn_time) 118 { 119 } 120 121 static inline QDF_STATUS 122 wlan_extscan_global_init(struct wlan_objmgr_psoc *psoc, 123 struct wlan_scan_obj *scan_obj) 124 { 125 return QDF_STATUS_SUCCESS; 126 } 127 128 static inline QDF_STATUS wlan_extscan_global_deinit(void) 129 { 130 return QDF_STATUS_SUCCESS; 131 } 132 133 #endif 134 #endif 135