hostap/wpa_supplicant/autoscan.h
Tomasz Bursztyka 7c865c6853 Add automatic scanning support
Like bgscan, autoscan is an optional module based feature to automate
scanning but while disconnected or inactive.

Instead of requesting directly a scan, it only sets the scan_interval
and the sched_scan_interval. So, if the driver supports sched_scan,
autoscan will be able to tweak its interval. Otherwise, the tweaked
scan_interval will be used. If scan parameters needs to be tweaked, an
autoscan_params pointer in wpa_s will provide those. So req_scan /
req_sched_scan will not set the scan parameters as they usually do, but
instead will use this pointer.

Modules will not have to request a scan directly, like bgscan does.
Instead, it will need to return the interval it wants after each
notification.

Signed-hostap: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2012-06-26 18:55:41 +03:00

49 lines
1 KiB
C

/*
* WPA Supplicant - auto scan
* Copyright (c) 2012, Intel Corporation. All rights reserved.
*
* This software may be distributed under the terms of the BSD license.
* See README for more details.
*/
#ifndef AUTOSCAN_H
#define AUTOSCAN_H
struct wpa_supplicant;
struct autoscan_ops {
const char *name;
void * (*init)(struct wpa_supplicant *wpa_s, const char *params);
void (*deinit)(void *priv);
int (*notify_scan)(void *priv, struct wpa_scan_results *scan_res);
};
#ifdef CONFIG_AUTOSCAN
int autoscan_init(struct wpa_supplicant *wpa_s);
void autoscan_deinit(struct wpa_supplicant *wpa_s);
int autoscan_notify_scan(struct wpa_supplicant *wpa_s,
struct wpa_scan_results *scan_res);
#else /* CONFIG_AUTOSCAN */
static inline int autoscan_init(struct wpa_supplicant *wpa_s)
{
return 0;
}
static inline void autoscan_deinit(struct wpa_supplicant *wpa_s)
{
}
static inline int autoscan_notify_scan(struct wpa_supplicant *wpa_s,
struct wpa_scan_results *scan_res)
{
return 0;
}
#endif /* CONFIG_AUTOSCAN */
#endif /* AUTOSCAN_H */