diff options
author | bschmidt <bschmidt@FreeBSD.org> | 2010-12-18 20:17:10 +0000 |
---|---|---|
committer | bschmidt <bschmidt@FreeBSD.org> | 2010-12-18 20:17:10 +0000 |
commit | 428cbdd8724c7f5adeb0de9d8e0d65e809ce6433 (patch) | |
tree | fdf9a74495d1b042c17b28e487b78dd1e255ed97 /usr.sbin/wpa | |
parent | d18aa716c5a5e629f60f642f9828c3f8add2aef9 (diff) | |
download | FreeBSD-src-428cbdd8724c7f5adeb0de9d8e0d65e809ce6433.zip FreeBSD-src-428cbdd8724c7f5adeb0de9d8e0d65e809ce6433.tar.gz |
Import bsd_configure_wpa() to sync with upstream code.
Diffstat (limited to 'usr.sbin/wpa')
-rw-r--r-- | usr.sbin/wpa/hostapd/driver_freebsd.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.sbin/wpa/hostapd/driver_freebsd.c b/usr.sbin/wpa/hostapd/driver_freebsd.c index 89312bc..860eb8c 100644 --- a/usr.sbin/wpa/hostapd/driver_freebsd.c +++ b/usr.sbin/wpa/hostapd/driver_freebsd.c @@ -264,6 +264,17 @@ bsd_set_key(const char *ifname, void *priv, enum wpa_alg alg, } static int +bsd_configure_wpa(void *priv, struct wpa_bss_params *params) +{ + wpa_printf(MSG_DEBUG, "%s: enable WPA= 0x%x", __func__, params->wpa); + if (set80211param(priv, IEEE80211_IOC_WPA, params->wpa)) { + printf("Unable to set WPA to %u\n", params->wpa); + return -1; + } + return 0; +} + +static int bsd_set_ieee8021x(void *priv, struct wpa_bss_params *params) { wpa_printf(MSG_DEBUG, "%s: enabled=%d", __func__, params->enabled); @@ -278,7 +289,7 @@ bsd_set_ieee8021x(void *priv, struct wpa_bss_params *params) __func__); return -1; } - if (params->wpa && set80211param(priv,IEEE80211_IOC_WPA, params->wpa)) { + if (params->wpa && bsd_configure_wpa(priv, params) != 0) { wpa_printf(MSG_ERROR, "%s: Failed to configure WPA state", __func__); return -1; |