aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/hostapd/src/wpa_supplicant/ubus.h
blob: bf92b98c0135ef37bf19a5387f05e102d7b2b455 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
 * 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;
struct wpa_global;

#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);

void wpas_ubus_add(struct wpa_global *global);
void wpas_ubus_free(struct wpa_global *global);

#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)
{
}

static inline void wpas_ubus_add(struct wpa_global *global)
{
}

static inline void wpas_ubus_free(struct wpa_global *global)
{
}
#endif

#endif