blob: d17c82c326ab6c6003a94599dd5603f156658f29 [file] [log] [blame]
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07001/*
2 * hostapd / VLAN initialization
3 * Copyright 2003, Instant802 Networks, Inc.
4 * Copyright 2005, Devicescape Software, Inc.
5 *
Dmitry Shmidtfb79edc2014-01-10 10:45:54 -08006 * This software may be distributed under the terms of the BSD license.
7 * See README for more details.
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07008 */
9
10#ifndef VLAN_INIT_H
11#define VLAN_INIT_H
12
13#ifndef CONFIG_NO_VLAN
14int vlan_init(struct hostapd_data *hapd);
15void vlan_deinit(struct hostapd_data *hapd);
16struct hostapd_vlan * vlan_add_dynamic(struct hostapd_data *hapd,
17 struct hostapd_vlan *vlan,
Dmitry Shmidt57c2d392016-02-23 13:40:19 -080018 int vlan_id,
19 struct vlan_description *vlan_desc);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070020int vlan_remove_dynamic(struct hostapd_data *hapd, int vlan_id);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070021#else /* CONFIG_NO_VLAN */
22static inline int vlan_init(struct hostapd_data *hapd)
23{
24 return 0;
25}
26
27static inline void vlan_deinit(struct hostapd_data *hapd)
28{
29}
30
Dmitry Shmidt57c2d392016-02-23 13:40:19 -080031static inline struct hostapd_vlan *
32vlan_add_dynamic(struct hostapd_data *hapd, struct hostapd_vlan *vlan,
33 int vlan_id, struct vlan_description *vlan_desc)
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070034{
35 return NULL;
36}
37
38static inline int vlan_remove_dynamic(struct hostapd_data *hapd, int vlan_id)
39{
40 return -1;
41}
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070042#endif /* CONFIG_NO_VLAN */
43
44#endif /* VLAN_INIT_H */