Mark STA authorized if IEEE 802.1X and WPA is not used
[wpasupplicant] / hostapd / vlan_init.h
1 /*
2  * hostapd / VLAN initialization
3  * Copyright 2003, Instant802 Networks, Inc.
4  * Copyright 2005, Devicescape Software, Inc.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * Alternatively, this software may be distributed under the terms of BSD
11  * license.
12  *
13  * See README and COPYING for more details.
14  */
15
16 #ifndef VLAN_INIT_H
17 #define VLAN_INIT_H
18
19 #ifndef CONFIG_NO_VLAN
20 int vlan_init(struct hostapd_data *hapd);
21 void vlan_deinit(struct hostapd_data *hapd);
22 int vlan_reconfig(struct hostapd_data *hapd, struct hostapd_config *oldconf,
23                   struct hostapd_bss_config *oldbss);
24 struct hostapd_vlan * vlan_add_dynamic(struct hostapd_data *hapd,
25                                        struct hostapd_vlan *vlan,
26                                        int vlan_id);
27 int vlan_remove_dynamic(struct hostapd_data *hapd, int vlan_id);
28 int vlan_setup_encryption_dyn(struct hostapd_data *hapd,
29                               struct hostapd_ssid *mssid,
30                               const char *dyn_vlan);
31 #else /* CONFIG_NO_VLAN */
32 static inline int vlan_init(struct hostapd_data *hapd)
33 {
34         return 0;
35 }
36
37 static inline void vlan_deinit(struct hostapd_data *hapd)
38 {
39 }
40
41 static inline struct hostapd_vlan * vlan_add_dynamic(struct hostapd_data *hapd,
42                                                      struct hostapd_vlan *vlan,
43                                                      int vlan_id)
44 {
45         return NULL;
46 }
47
48 static inline int vlan_remove_dynamic(struct hostapd_data *hapd, int vlan_id)
49 {
50         return -1;
51 }
52
53 static inline int vlan_setup_encryption_dyn(struct hostapd_data *hapd,
54                                             struct hostapd_ssid *mssid,
55                                             const char *dyn_vlan)
56 {
57         return -1;
58 }
59 #endif /* CONFIG_NO_VLAN */
60
61 #endif /* VLAN_INIT_H */