}
+static int hostapd_set_drv_ieee8021x(struct hostapd_data *hapd,
+ const char *ifname, int enabled)
+{
+ struct wpa_bss_params params;
+ os_memset(¶ms, 0, sizeof(params));
+ params.ifname = ifname;
+ params.enabled = enabled;
+ if (enabled) {
+ params.wpa = hapd->conf->wpa;
+ params.ieee802_1x = hapd->conf->ieee802_1x;
+ params.wpa_group = hapd->conf->wpa_group;
+ params.wpa_pairwise = hapd->conf->wpa_pairwise;
+ params.wpa_key_mgmt = hapd->conf->wpa_key_mgmt;
+ params.rsn_preauth = hapd->conf->rsn_preauth;
+ }
+ return hostapd_set_ieee8021x(hapd, ¶ms);
+}
+
+
void hostapd_set_driver_ops(struct hostapd_driver_ops *ops)
{
ops->set_ap_wps_ie = hostapd_set_ap_wps_ie;
ops->read_sta_data = hostapd_read_sta_data;
ops->sta_clear_stats = hostapd_sta_clear_stats;
ops->set_sta_flags = hostapd_set_sta_flags;
+ ops->set_drv_ieee8021x = hostapd_set_drv_ieee8021x;
}
}
if (hapd->conf->ieee802_1x || hapd->conf->wpa)
- hostapd_set_drv_ieee8021x(hapd, hapd->conf->iface, 1);
+ hapd->drv.set_drv_ieee8021x(hapd, hapd->conf->iface, 1);
else
- hostapd_set_drv_ieee8021x(hapd, hapd->conf->iface, 0);
+ hapd->drv.set_drv_ieee8021x(hapd, hapd->conf->iface, 0);
hostapd_config_free(oldconf);
return 0;
}
-
-
-int hostapd_set_drv_ieee8021x(struct hostapd_data *hapd, const char *ifname,
- int enabled)
-{
- struct wpa_bss_params params;
- os_memset(¶ms, 0, sizeof(params));
- params.ifname = ifname;
- params.enabled = enabled;
- if (enabled) {
- params.wpa = hapd->conf->wpa;
- params.ieee802_1x = hapd->conf->ieee802_1x;
- params.wpa_group = hapd->conf->wpa_group;
- params.wpa_pairwise = hapd->conf->wpa_pairwise;
- params.wpa_key_mgmt = hapd->conf->wpa_key_mgmt;
- params.rsn_preauth = hapd->conf->rsn_preauth;
- }
- return hostapd_set_ieee8021x(hapd, ¶ms);
-}
const u8 *addr);
int (*sta_clear_stats)(struct hostapd_data *hapd, const u8 *addr);
int (*set_sta_flags)(struct hostapd_data *hapd, struct sta_info *sta);
+ int (*set_drv_ieee8021x)(struct hostapd_data *hapd, const char *ifname,
+ int enabled);
};
/**
void (*cb)(void *ctx, const u8 *sa,
const u8 *ie, size_t ie_len),
void *ctx);
-int hostapd_set_drv_ieee8021x(struct hostapd_data *hapd, const char *ifname,
- int enabled);
int eap_server_register_methods(void);
void hostapd_set_driver_ops(struct hostapd_driver_ops *ops);
NULL, 0, key->key[key->idx], key->len[key->idx]))
printf("Could not set dynamic VLAN WEP encryption key.\n");
- hostapd_set_drv_ieee8021x(hapd, ifname, 1);
+ hapd->drv.set_drv_ieee8021x(hapd, ifname, 1);
return key;
}
return -1;
if ((hapd->conf->ieee802_1x || hapd->conf->wpa) &&
- hostapd_set_drv_ieee8021x(hapd, hapd->conf->iface, 1))
+ hapd->drv.set_drv_ieee8021x(hapd, hapd->conf->iface, 1))
return -1;
#ifndef CONFIG_NO_RADIUS
if (hapd->driver != NULL &&
(hapd->conf->ieee802_1x || hapd->conf->wpa))
- hostapd_set_drv_ieee8021x(hapd, hapd->conf->iface, 0);
+ hapd->drv.set_drv_ieee8021x(hapd, hapd->conf->iface, 0);
eapol_auth_deinit(hapd->eapol_auth);
hapd->eapol_auth = NULL;