}
+static int hostapd_vlan_if_add(struct hostapd_data *hapd, const char *ifname)
+{
+ return hostapd_if_add(hapd, WPA_IF_AP_VLAN, ifname, NULL, NULL);
+}
+
+static int hostapd_vlan_if_remove(struct hostapd_data *hapd,
+ const char *ifname)
+{
+ return hostapd_if_remove(hapd, WPA_IF_AP_VLAN, ifname);
+}
+
+
void hostapd_set_driver_ops(struct hostapd_driver_ops *ops)
{
ops->set_ap_wps_ie = hostapd_set_ap_wps_ie;
ops->set_radius_acl_expire = hostapd_set_radius_acl_expire;
ops->set_bss_params = hostapd_set_bss_params;
ops->set_beacon = hostapd_set_beacon;
+ ops->vlan_if_add = hostapd_vlan_if_add;
+ ops->vlan_if_remove = hostapd_vlan_if_remove;
}
const u8 *head, size_t head_len,
const u8 *tail, size_t tail_len, int dtim_period,
int beacon_int);
+ int (*vlan_if_add)(struct hostapd_data *hapd, const char *ifname);
+ int (*vlan_if_remove)(struct hostapd_data *hapd, const char *ifname);
};
/**
* hostapd / VLAN initialization
* Copyright 2003, Instant802 Networks, Inc.
* Copyright 2005-2006, Devicescape Software, Inc.
+ * Copyright (c) 2009, Jouni Malinen <j@w1.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
#include "common.h"
#include "hostapd.h"
-#include "driver_i.h"
+#include "config.h"
#include "vlan_init.h"
{
while (vlan) {
if (vlan->vlan_id != VLAN_ID_WILDCARD &&
- hostapd_if_add(hapd, WPA_IF_AP_VLAN, vlan->ifname, NULL,
- NULL)) {
+ hapd->drv.vlan_if_add(hapd, vlan->ifname)) {
if (errno != EEXIST) {
printf("Could not add VLAN iface: %s: %s\n",
vlan->ifname, strerror(errno));
next = vlan->next;
if (vlan->vlan_id != VLAN_ID_WILDCARD &&
- hostapd_if_remove(hapd, WPA_IF_AP_VLAN, vlan->ifname)) {
+ hapd->drv.vlan_if_remove(hapd, vlan->ifname)) {
printf("Could not remove VLAN iface: %s: %s\n",
vlan->ifname, strerror(errno));
}
pos);
os_free(ifname);
- if (hostapd_if_add(hapd, WPA_IF_AP_VLAN, n->ifname, NULL, NULL)) {
+ if (hapd->drv.vlan_if_add(hapd, n->ifname)) {
os_free(n);
return NULL;
}
return 1;
if (vlan->dynamic_vlan == 0)
- hostapd_if_remove(hapd, WPA_IF_AP_VLAN, vlan->ifname);
+ hapd->drv.vlan_if_remove(hapd, vlan->ifname);
return 0;
}