d00b787169d10483397328ae7f08be220f88c6a2
[openwrt/staging/nbd.git] / package / network / services / hostapd / src / src / ap / ucode.h
1 #ifndef __HOSTAPD_AP_UCODE_H
2 #define __HOSTAPD_AP_UCODE_H
3
4 #include "utils/ucode.h"
5
6 struct hostapd_data;
7
8 struct hostapd_ucode_bss {
9 #ifdef UCODE_SUPPORT
10 int idx;
11 #endif
12 };
13
14 struct hostapd_ucode_iface {
15 #ifdef UCODE_SUPPORT
16 int idx;
17 #endif
18 };
19
20 #ifdef UCODE_SUPPORT
21
22 int hostapd_ucode_init(struct hapd_interfaces *ifaces);
23
24 void hostapd_ucode_free(void);
25 void hostapd_ucode_free_iface(struct hostapd_iface *iface);
26 void hostapd_ucode_add_bss(struct hostapd_data *hapd);
27 void hostapd_ucode_free_bss(struct hostapd_data *hapd);
28 void hostapd_ucode_reload_bss(struct hostapd_data *hapd);
29
30 #else
31
32 static inline int hostapd_ucode_init(struct hapd_interfaces *ifaces)
33 {
34 return -EINVAL;
35 }
36 static inline void hostapd_ucode_free(void)
37 {
38 }
39 static inline void hostapd_ucode_free_iface(struct hostapd_iface *iface)
40 {
41 }
42 static inline void hostapd_ucode_reload_bss(struct hostapd_data *hapd)
43 {
44 }
45 static inline void hostapd_ucode_add_bss(struct hostapd_data *hapd)
46 {
47 }
48 static inline void hostapd_ucode_free_bss(struct hostapd_data *hapd)
49 {
50 }
51
52 #endif
53
54 #endif