hostapd_cli: Use os_program_{init,deinit}
[libeap.git] / hostapd / vlan_init.c
index 7e25815..5a33399 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "includes.h"
 
+#include "common.h"
 #include "hostapd.h"
 #include "driver_i.h"
 #include "vlan_init.h"
@@ -28,7 +29,7 @@
 #include <linux/if_vlan.h>
 #include <linux/if_bridge.h>
 
-#include "priv_netlink.h"
+#include "drivers/priv_netlink.h"
 #include "eloop.h"
 
 
@@ -679,8 +680,8 @@ static int vlan_dynamic_add(struct hostapd_data *hapd,
 {
        while (vlan) {
                if (vlan->vlan_id != VLAN_ID_WILDCARD &&
-                   hostapd_if_add(hapd, HOSTAPD_IF_VLAN, vlan->ifname, NULL))
-               {
+                   hostapd_if_add(hapd, WPA_IF_AP_VLAN, vlan->ifname, NULL,
+                                  NULL)) {
                        if (errno != EEXIST) {
                                printf("Could not add VLAN iface: %s: %s\n",
                                       vlan->ifname, strerror(errno));
@@ -704,8 +705,7 @@ static void vlan_dynamic_remove(struct hostapd_data *hapd,
                next = vlan->next;
 
                if (vlan->vlan_id != VLAN_ID_WILDCARD &&
-                   hostapd_if_remove(hapd, HOSTAPD_IF_VLAN, vlan->ifname,
-                                     NULL)) {
+                   hostapd_if_remove(hapd, WPA_IF_AP_VLAN, vlan->ifname)) {
                        printf("Could not remove VLAN iface: %s: %s\n",
                               vlan->ifname, strerror(errno));
                }
@@ -742,17 +742,6 @@ void vlan_deinit(struct hostapd_data *hapd)
 }
 
 
-int vlan_reconfig(struct hostapd_data *hapd, struct hostapd_config *oldconf,
-                 struct hostapd_bss_config *oldbss)
-{
-       vlan_dynamic_remove(hapd, oldbss->vlan);
-       if (vlan_dynamic_add(hapd, hapd->conf->vlan))
-               return -1;
-
-       return 0;
-}
-
-
 struct hostapd_vlan * vlan_add_dynamic(struct hostapd_data *hapd,
                                       struct hostapd_vlan *vlan,
                                       int vlan_id)
@@ -787,7 +776,7 @@ struct hostapd_vlan * vlan_add_dynamic(struct hostapd_data *hapd,
                    pos);
        os_free(ifname);
 
-       if (hostapd_if_add(hapd, HOSTAPD_IF_VLAN, n->ifname, NULL)) {
+       if (hostapd_if_add(hapd, WPA_IF_AP_VLAN, n->ifname, NULL, NULL)) {
                os_free(n);
                return NULL;
        }
@@ -819,7 +808,7 @@ int vlan_remove_dynamic(struct hostapd_data *hapd, int vlan_id)
                return 1;
 
        if (vlan->dynamic_vlan == 0)
-               hostapd_if_remove(hapd, HOSTAPD_IF_VLAN, vlan->ifname, NULL);
+               hostapd_if_remove(hapd, WPA_IF_AP_VLAN, vlan->ifname);
 
        return 0;
 }