hostapd: backport from master, including ucode based reload support
[openwrt/staging/pepe2k.git] / package / network / services / hostapd / src / wpa_supplicant / ucode.h
1 #ifndef __WPAS_UCODE_H
2 #define __WPAS_UCODE_H
3
4 #include "utils/ucode.h"
5
6 struct wpa_global;
7 union wpa_event_data;
8 struct wpa_supplicant;
9
10 struct wpas_ucode_bss {
11 #ifdef UCODE_SUPPORT
12 unsigned int idx;
13 #endif
14 };
15
16 #ifdef UCODE_SUPPORT
17 int wpas_ucode_init(struct wpa_global *gl);
18 void wpas_ucode_free(void);
19 void wpas_ucode_add_bss(struct wpa_supplicant *wpa_s);
20 void wpas_ucode_free_bss(struct wpa_supplicant *wpa_s);
21 void wpas_ucode_update_state(struct wpa_supplicant *wpa_s);
22 void wpas_ucode_event(struct wpa_supplicant *wpa_s, int event, union wpa_event_data *data);
23 #else
24 static inline int wpas_ucode_init(struct wpa_global *gl)
25 {
26 return -EINVAL;
27 }
28 static inline void wpas_ucode_free(void)
29 {
30 }
31 static inline void wpas_ucode_add_bss(struct wpa_supplicant *wpa_s)
32 {
33 }
34
35 static inline void wpas_ucode_free_bss(struct wpa_supplicant *wpa_s)
36 {
37 }
38
39 static inline void wpas_ucode_update_state(struct wpa_supplicant *wpa_s)
40 {
41 }
42
43 static inline void wpas_ucode_event(struct wpa_supplicant *wpa_s, int event, union wpa_event_data *data)
44 {
45 }
46
47 #endif
48
49 #endif