hostapd: add ubus reload
[openwrt/staging/mkresin.git] / package / network / services / hostapd / src / wpa_supplicant / ubus.h
1 /*
2 * wpa_supplicant / ubus support
3 * Copyright (c) 2018, Daniel Golle <daniel@makrotopia.org>
4 * Copyright (c) 2013, Felix Fietkau <nbd@nbd.name>
5 *
6 * This software may be distributed under the terms of the BSD license.
7 * See README for more details.
8 */
9 #ifndef __WPAS_UBUS_H
10 #define __WPAS_UBUS_H
11
12 struct wpa_supplicant;
13 struct wpa_global;
14
15 #include "wps_supplicant.h"
16
17 #ifdef UBUS_SUPPORT
18 #include <libubus.h>
19
20 struct wpas_ubus_bss {
21 struct ubus_object obj;
22 };
23
24 void wpas_ubus_add_bss(struct wpa_supplicant *wpa_s);
25 void wpas_ubus_free_bss(struct wpa_supplicant *wpa_s);
26
27 void wpas_ubus_add(struct wpa_global *global);
28 void wpas_ubus_free(struct wpa_global *global);
29
30 #ifdef CONFIG_WPS
31 void wpas_ubus_notify(struct wpa_supplicant *wpa_s, const struct wps_credential *cred);
32 #endif
33
34 #else
35 struct wpas_ubus_bss {};
36
37 static inline void wpas_ubus_add_iface(struct wpa_supplicant *wpa_s)
38 {
39 }
40
41 static inline void wpas_ubus_free_iface(struct wpa_supplicant *wpa_s)
42 {
43 }
44
45 static inline void wpas_ubus_add_bss(struct wpa_supplicant *wpa_s)
46 {
47 }
48
49 static inline void wpas_ubus_free_bss(struct wpa_supplicant *wpa_s)
50 {
51 }
52
53 static inline void wpas_ubus_notify(struct wpa_supplicant *wpa_s, struct wps_credential *cred)
54 {
55 }
56
57 static inline void wpas_ubus_add(struct wpa_global *global)
58 {
59 }
60
61 static inline void wpas_ubus_free(struct wpa_global *global)
62 {
63 }
64 #endif
65
66 #endif