1 /* 2 * WPA Supplicant - auto scan 3 * Copyright (c) 2012, Intel Corporation. All rights reserved. 4 * 5 * This software may be distributed under the terms of the BSD license. 6 * See README for more details. 7 */ 8 9 #ifndef AUTOSCAN_H 10 #define AUTOSCAN_H 11 12 struct wpa_supplicant; 13 14 struct autoscan_ops { 15 const char *name; 16 17 void * (*init)(struct wpa_supplicant *wpa_s, const char *params); 18 void (*deinit)(void *priv); 19 20 int (*notify_scan)(void *priv, struct wpa_scan_results *scan_res); 21 }; 22 23 #ifdef CONFIG_AUTOSCAN 24 25 int autoscan_init(struct wpa_supplicant *wpa_s, int req_scan); 26 void autoscan_deinit(struct wpa_supplicant *wpa_s); 27 int autoscan_notify_scan(struct wpa_supplicant *wpa_s, 28 struct wpa_scan_results *scan_res); 29 30 /* Available autoscan modules */ 31 32 #ifdef CONFIG_AUTOSCAN_EXPONENTIAL 33 extern const struct autoscan_ops autoscan_exponential_ops; 34 #endif /* CONFIG_AUTOSCAN_EXPONENTIAL */ 35 36 #ifdef CONFIG_AUTOSCAN_PERIODIC 37 extern const struct autoscan_ops autoscan_periodic_ops; 38 #endif /* CONFIG_AUTOSCAN_PERIODIC */ 39 40 #else /* CONFIG_AUTOSCAN */ 41 42 static inline int autoscan_init(struct wpa_supplicant *wpa_s, int req_scan) 43 { 44 return 0; 45 } 46 47 static inline void autoscan_deinit(struct wpa_supplicant *wpa_s) 48 { 49 } 50 51 static inline int autoscan_notify_scan(struct wpa_supplicant *wpa_s, 52 struct wpa_scan_results *scan_res) 53 { 54 return 0; 55 } 56 57 #endif /* CONFIG_AUTOSCAN */ 58 59 #endif /* AUTOSCAN_H */ 60