2008-11-28 18:46:22 +01:00
|
|
|
/*
|
|
|
|
* wpa_supplicant / WPS integration
|
|
|
|
* Copyright (c) 2008, Jouni Malinen <j@w1.fi>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* Alternatively, this software may be distributed under the terms of BSD
|
|
|
|
* license.
|
|
|
|
*
|
|
|
|
* See README and COPYING for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef WPS_SUPPLICANT_H
|
|
|
|
#define WPS_SUPPLICANT_H
|
|
|
|
|
|
|
|
#ifdef CONFIG_WPS
|
|
|
|
|
2009-01-03 18:50:49 +01:00
|
|
|
#include "wps/wps.h"
|
|
|
|
#include "wps/wps_defs.h"
|
|
|
|
|
2008-11-28 19:32:13 +01:00
|
|
|
int wpas_wps_init(struct wpa_supplicant *wpa_s);
|
|
|
|
void wpas_wps_deinit(struct wpa_supplicant *wpa_s);
|
2008-11-28 18:46:22 +01:00
|
|
|
int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s);
|
2009-01-03 18:50:49 +01:00
|
|
|
enum wps_request_type wpas_wps_get_req_type(struct wpa_ssid *ssid);
|
2008-11-29 19:59:45 +01:00
|
|
|
int wpas_wps_start_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid);
|
|
|
|
int wpas_wps_start_pin(struct wpa_supplicant *wpa_s, const u8 *bssid,
|
|
|
|
const char *pin);
|
2009-02-26 20:57:38 +01:00
|
|
|
int wpas_wps_start_oob(struct wpa_supplicant *wpa_s, char *device_type,
|
|
|
|
char *path, char *method);
|
2008-11-29 19:59:45 +01:00
|
|
|
int wpas_wps_start_reg(struct wpa_supplicant *wpa_s, const u8 *bssid,
|
|
|
|
const char *pin);
|
2009-01-23 12:10:58 +01:00
|
|
|
int wpas_wps_ssid_bss_match(struct wpa_supplicant *wpa_s,
|
|
|
|
struct wpa_ssid *ssid, struct wpa_scan_res *bss);
|
|
|
|
int wpas_wps_ssid_wildcard_ok(struct wpa_supplicant *wpa_s,
|
|
|
|
struct wpa_ssid *ssid, struct wpa_scan_res *bss);
|
2008-11-29 21:06:34 +01:00
|
|
|
int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
|
|
|
|
struct wpa_scan_res *selected,
|
|
|
|
struct wpa_ssid *ssid);
|
2008-12-15 19:09:57 +01:00
|
|
|
void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s);
|
2008-12-20 21:55:02 +01:00
|
|
|
int wpas_wps_searching(struct wpa_supplicant *wpa_s);
|
2008-11-28 18:46:22 +01:00
|
|
|
|
|
|
|
#else /* CONFIG_WPS */
|
|
|
|
|
2008-11-28 19:32:13 +01:00
|
|
|
static inline int wpas_wps_init(struct wpa_supplicant *wpa_s)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void wpas_wps_deinit(struct wpa_supplicant *wpa_s)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-11-28 18:46:22 +01:00
|
|
|
static inline int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-11-29 21:06:34 +01:00
|
|
|
static inline u8 wpas_wps_get_req_type(struct wpa_ssid *ssid)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2009-01-23 12:10:58 +01:00
|
|
|
static inline int wpas_wps_ssid_bss_match(struct wpa_supplicant *wpa_s,
|
|
|
|
struct wpa_ssid *ssid,
|
2008-11-29 21:06:34 +01:00
|
|
|
struct wpa_scan_res *bss)
|
|
|
|
{
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2009-01-23 12:10:58 +01:00
|
|
|
static inline int wpas_wps_ssid_wildcard_ok(struct wpa_supplicant *wpa_s,
|
|
|
|
struct wpa_ssid *ssid,
|
2008-11-29 21:06:34 +01:00
|
|
|
struct wpa_scan_res *bss)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
|
|
|
|
struct wpa_scan_res *selected,
|
|
|
|
struct wpa_ssid *ssid)
|
2008-11-28 18:46:22 +01:00
|
|
|
{
|
2008-11-29 12:38:03 +01:00
|
|
|
return 0;
|
2008-11-28 18:46:22 +01:00
|
|
|
}
|
|
|
|
|
2008-12-15 19:09:57 +01:00
|
|
|
static inline void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-12-20 21:55:02 +01:00
|
|
|
static inline int wpas_wps_searching(struct wpa_supplicant *wpa_s)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-11-28 18:46:22 +01:00
|
|
|
#endif /* CONFIG_WPS */
|
|
|
|
|
|
|
|
#endif /* WPS_SUPPLICANT_H */
|