2008-11-23 12:34:26 -05:00
|
|
|
/*
|
|
|
|
* hostapd / WPS integration
|
2010-08-24 09:35:37 -04:00
|
|
|
* Copyright (c) 2008-2010, Jouni Malinen <j@w1.fi>
|
2008-11-23 12:34:26 -05:00
|
|
|
*
|
|
|
|
* 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_HOSTAPD_H
|
|
|
|
#define WPS_HOSTAPD_H
|
|
|
|
|
|
|
|
#ifdef CONFIG_WPS
|
|
|
|
|
|
|
|
int hostapd_init_wps(struct hostapd_data *hapd,
|
|
|
|
struct hostapd_bss_config *conf);
|
|
|
|
void hostapd_deinit_wps(struct hostapd_data *hapd);
|
2010-05-02 04:21:19 -04:00
|
|
|
void hostapd_update_wps(struct hostapd_data *hapd);
|
2009-12-12 09:40:10 -05:00
|
|
|
int hostapd_wps_add_pin(struct hostapd_data *hapd, const u8 *addr,
|
|
|
|
const char *uuid, const char *pin, int timeout);
|
2011-02-07 11:28:36 -05:00
|
|
|
int hostapd_wps_button_pushed(struct hostapd_data *hapd,
|
|
|
|
const u8 *p2p_dev_addr);
|
2009-02-26 14:57:38 -05:00
|
|
|
int hostapd_wps_start_oob(struct hostapd_data *hapd, char *device_type,
|
2009-03-06 09:16:22 -05:00
|
|
|
char *path, char *method, char *name);
|
2009-09-07 15:09:13 -04:00
|
|
|
int hostapd_wps_get_mib_sta(struct hostapd_data *hapd, const u8 *addr,
|
|
|
|
char *buf, size_t buflen);
|
2010-08-24 09:35:37 -04:00
|
|
|
void hostapd_wps_ap_pin_disable(struct hostapd_data *hapd);
|
|
|
|
const char * hostapd_wps_ap_pin_random(struct hostapd_data *hapd, int timeout);
|
|
|
|
const char * hostapd_wps_ap_pin_get(struct hostapd_data *hapd);
|
|
|
|
int hostapd_wps_ap_pin_set(struct hostapd_data *hapd, const char *pin,
|
|
|
|
int timeout);
|
2010-10-19 12:57:01 -04:00
|
|
|
void hostapd_wps_update_ie(struct hostapd_data *hapd);
|
2010-10-21 09:49:41 -04:00
|
|
|
int hostapd_wps_config_ap(struct hostapd_data *hapd, const char *ssid,
|
|
|
|
const char *auth, const char *encr, const char *key);
|
2008-11-23 12:34:26 -05:00
|
|
|
|
|
|
|
#else /* CONFIG_WPS */
|
|
|
|
|
|
|
|
static inline int hostapd_init_wps(struct hostapd_data *hapd,
|
|
|
|
struct hostapd_bss_config *conf)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hostapd_deinit_wps(struct hostapd_data *hapd)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2010-05-02 04:21:19 -04:00
|
|
|
static inline void hostapd_update_wps(struct hostapd_data *hapd)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2009-09-07 15:09:13 -04:00
|
|
|
static inline int hostapd_wps_get_mib_sta(struct hostapd_data *hapd,
|
|
|
|
const u8 *addr,
|
|
|
|
char *buf, size_t buflen)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2011-02-07 11:28:36 -05:00
|
|
|
static inline int hostapd_wps_button_pushed(struct hostapd_data *hapd,
|
|
|
|
const u8 *p2p_dev_addr)
|
2009-12-03 17:29:10 -05:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-11-23 12:34:26 -05:00
|
|
|
#endif /* CONFIG_WPS */
|
|
|
|
|
|
|
|
#endif /* WPS_HOSTAPD_H */
|