xref: /freebsd/sys/net80211/ieee80211_scan_sw.h (revision bc96366c864c07ef352edb92017357917c75b36c)
1 /*-
2  * Copyright (c) 2015 Adrian Chadd <adrian@FreeBSD.org>
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24  *
25  * $FreeBSD$
26  */
27 #ifndef	__NET80211_IEEE80211_SCAN_SW_H__
28 #define	__NET80211_IEEE80211_SCAN_SW_H__
29 
30 extern	void ieee80211_swscan_attach(struct ieee80211com *ic);
31 extern	void ieee80211_swscan_detach(struct ieee80211com *ic);
32 
33 extern	void ieee80211_swscan_vattach(struct ieee80211vap *vap);
34 extern	void ieee80211_swscan_vdetach(struct ieee80211vap *vap);
35 
36 extern	int ieee80211_swscan_start_scan(const struct ieee80211_scanner *scan,
37 	    struct ieee80211vap *vap, int flags,
38 	    u_int duration, u_int mindwell, u_int maxdwell,
39 	    u_int nssid, const struct ieee80211_scan_ssid ssids[]);
40 extern	void ieee80211_swscan_set_scan_duration(struct ieee80211vap *vap,
41 	    u_int duration);
42 extern	void ieee80211_swscan_run_scan_task(struct ieee80211vap *vap);
43 extern	int ieee80211_swscan_check_scan(const struct ieee80211_scanner *scan,
44 	    struct ieee80211vap *vap, int flags,
45 	    u_int duration, u_int mindwell, u_int maxdwell,
46 	    u_int nssid, const struct ieee80211_scan_ssid ssids[]);
47 extern	int ieee80211_swscan_bg_scan(const struct ieee80211_scanner *scan,
48 	    struct ieee80211vap *vap, int flags);
49 extern	void ieee80211_swscan_cancel_scan(struct ieee80211vap *vap);
50 extern	void ieee80211_swscan_cancel_anyscan(struct ieee80211vap *vap);
51 extern	void ieee80211_swscan_scan_next(struct ieee80211vap *vap);
52 extern	void ieee80211_swscan_scan_done(struct ieee80211vap *vap);
53 extern	void ieee80211_swscan_probe_curchan(struct ieee80211vap *vap,
54 	    int force);
55 extern	void ieee80211_swscan_add_scan(struct ieee80211vap *vap,
56 	    const struct ieee80211_scanparams *sp,
57 	    const struct ieee80211_frame *wh,
58 	    int subtype, int rssi, int noise);
59 
60 #endif	/* __NET80211_IEEE80211_SCAN_SW_H__ */
61