diff options
author | Daniel Golle <daniel@makrotopia.org> | 2018-11-22 20:53:09 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2018-12-12 09:37:23 +0100 |
commit | f5753aae233fa64b5d4784ade2cc170f7da539a4 (patch) | |
tree | fe53918ad7ed179876f1e015e655569fdf0b19c1 /package/network/services/hostapd/src/wpa_supplicant/ubus.h | |
parent | 5beedcddc3ad2c6f92c24ce2655a84524ca26594 (diff) | |
download | upstream-f5753aae233fa64b5d4784ade2cc170f7da539a4.tar.gz upstream-f5753aae233fa64b5d4784ade2cc170f7da539a4.tar.bz2 upstream-f5753aae233fa64b5d4784ade2cc170f7da539a4.zip |
hostapd: add support for WPS pushbutton station
similar to hostapd, also add a ubus interface for wpa_supplicant
which will allow handling WPS push-button just as it works for hostapd.
In order to have wpa_supplicant running without any network
configuration (so you can use it to retrieve credentials via WPS),
configure wifi-iface in /etc/config/wireless:
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'wwan'
option mode 'sta'
option encryption 'wps'
This section will automatically be edited if credentials have
successfully been acquired via WPS.
Size difference (mips_24kc): roughly +4kb for the 'full' variants of
wpa_supplicant and wpad which do support WPS.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/network/services/hostapd/src/wpa_supplicant/ubus.h')
-rw-r--r-- | package/network/services/hostapd/src/wpa_supplicant/ubus.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/package/network/services/hostapd/src/wpa_supplicant/ubus.h b/package/network/services/hostapd/src/wpa_supplicant/ubus.h new file mode 100644 index 0000000000..c37e743e73 --- /dev/null +++ b/package/network/services/hostapd/src/wpa_supplicant/ubus.h @@ -0,0 +1,53 @@ +/* + * wpa_supplicant / ubus support + * Copyright (c) 2018, Daniel Golle <daniel@makrotopia.org> + * Copyright (c) 2013, Felix Fietkau <nbd@nbd.name> + * + * This software may be distributed under the terms of the BSD license. + * See README for more details. + */ +#ifndef __WPAS_UBUS_H +#define __WPAS_UBUS_H + +struct wpa_supplicant; +#include "wps_supplicant.h" + +#ifdef UBUS_SUPPORT +#include <libubus.h> + +struct wpas_ubus_bss { + struct ubus_object obj; +}; + +void wpas_ubus_add_bss(struct wpa_supplicant *wpa_s); +void wpas_ubus_free_bss(struct wpa_supplicant *wpa_s); + +#ifdef CONFIG_WPS +void wpas_ubus_notify(struct wpa_supplicant *wpa_s, const struct wps_credential *cred); +#endif + +#else +struct wpas_ubus_bss {}; + +static inline void wpas_ubus_add_iface(struct wpa_supplicant *wpa_s) +{ +} + +static inline void wpas_ubus_free_iface(struct wpa_supplicant *wpa_s) +{ +} + +static inline void wpas_ubus_add_bss(struct wpa_supplicant *wpa_s) +{ +} + +static inline void wpas_ubus_free_bss(struct wpa_supplicant *wpa_s) +{ +} + +static inline void wpas_ubus_notify(struct wpa_supplicant *wpa_s, struct wps_credential *cred) +{ +} +#endif + +#endif |