xref: /freebsd/contrib/wpa/src/ap/acs.h (revision a90b9d0159070121c221b966469c3e36d912bf82)
15b9c547cSRui Paulo /*
25b9c547cSRui Paulo  * ACS - Automatic Channel Selection module
35b9c547cSRui Paulo  * Copyright (c) 2011, Atheros Communications
45b9c547cSRui Paulo  * Copyright (c) 2013, Qualcomm Atheros, Inc.
55b9c547cSRui Paulo  *
65b9c547cSRui Paulo  * This software may be distributed under the terms of the BSD license.
75b9c547cSRui Paulo  * See README for more details.
85b9c547cSRui Paulo  */
95b9c547cSRui Paulo 
105b9c547cSRui Paulo #ifndef ACS_H
115b9c547cSRui Paulo #define ACS_H
125b9c547cSRui Paulo 
135b9c547cSRui Paulo #ifdef CONFIG_ACS
145b9c547cSRui Paulo 
155b9c547cSRui Paulo enum hostapd_chan_status acs_init(struct hostapd_iface *iface);
1685732ac8SCy Schubert void acs_cleanup(struct hostapd_iface *iface);
175b9c547cSRui Paulo 
18*a90b9d01SCy Schubert #define ACS_SCAN_RETRY_MAX_COUNT	15
19*a90b9d01SCy Schubert #define ACS_SCAN_RETRY_INTERVAL		5
20*a90b9d01SCy Schubert 
215b9c547cSRui Paulo #else /* CONFIG_ACS */
225b9c547cSRui Paulo 
acs_init(struct hostapd_iface * iface)235b9c547cSRui Paulo static inline enum hostapd_chan_status acs_init(struct hostapd_iface *iface)
245b9c547cSRui Paulo {
255b9c547cSRui Paulo 	wpa_printf(MSG_ERROR, "ACS was disabled on your build, rebuild hostapd with CONFIG_ACS=y or set channel");
265b9c547cSRui Paulo 	return HOSTAPD_CHAN_INVALID;
275b9c547cSRui Paulo }
285b9c547cSRui Paulo 
acs_cleanup(struct hostapd_iface * iface)2985732ac8SCy Schubert static inline void acs_cleanup(struct hostapd_iface *iface)
3085732ac8SCy Schubert {
3185732ac8SCy Schubert }
3285732ac8SCy Schubert 
335b9c547cSRui Paulo #endif /* CONFIG_ACS */
345b9c547cSRui Paulo 
355b9c547cSRui Paulo #endif /* ACS_H */
36