blob: bf92b98c0135ef37bf19a5387f05e102d7b2b455 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001/*
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
12struct wpa_supplicant;
13struct wpa_global;
14
15#include "wps_supplicant.h"
16
17#ifdef UBUS_SUPPORT
18#include <libubus.h>
19
20struct wpas_ubus_bss {
21 struct ubus_object obj;
22};
23
24void wpas_ubus_add_bss(struct wpa_supplicant *wpa_s);
25void wpas_ubus_free_bss(struct wpa_supplicant *wpa_s);
26
27void wpas_ubus_add(struct wpa_global *global);
28void wpas_ubus_free(struct wpa_global *global);
29
30#ifdef CONFIG_WPS
31void wpas_ubus_notify(struct wpa_supplicant *wpa_s, const struct wps_credential *cred);
32#endif
33
34#else
35struct wpas_ubus_bss {};
36
37static inline void wpas_ubus_add_iface(struct wpa_supplicant *wpa_s)
38{
39}
40
41static inline void wpas_ubus_free_iface(struct wpa_supplicant *wpa_s)
42{
43}
44
45static inline void wpas_ubus_add_bss(struct wpa_supplicant *wpa_s)
46{
47}
48
49static inline void wpas_ubus_free_bss(struct wpa_supplicant *wpa_s)
50{
51}
52
53static inline void wpas_ubus_notify(struct wpa_supplicant *wpa_s, struct wps_credential *cred)
54{
55}
56
57static inline void wpas_ubus_add(struct wpa_global *global)
58{
59}
60
61static inline void wpas_ubus_free(struct wpa_global *global)
62{
63}
64#endif
65
66#endif