AP: Allow both WPA passphrase and PSK to be configured
[libeap.git] / hostapd / vlan_init.c
index 6de54ea..5a33399 100644 (file)
@@ -680,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));
@@ -705,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));
                }
@@ -743,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)
@@ -788,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;
        }
@@ -820,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;
 }