aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_atheros.c
diff options
context:
space:
mode:
authorKen Zhu <Ken.Zhu@Atheros.com>2011-05-20 15:27:53 (GMT)
committerJouni Malinen <j@w1.fi>2011-05-20 15:27:53 (GMT)
commit41fd1d9e9a58ccd2b102270fc70b97aa73965494 (patch)
tree8e672e427917e00bc99982767ba224ff1869f648 /src/drivers/driver_atheros.c
parent6d28fb9627155929012cda944aacd5a52ce7051a (diff)
downloadhostap-41fd1d9e9a58ccd2b102270fc70b97aa73965494.zip
hostap-41fd1d9e9a58ccd2b102270fc70b97aa73965494.tar.gz
hostap-41fd1d9e9a58ccd2b102270fc70b97aa73965494.tar.bz2
atheros: Fix auth_alg configuration for static WEP
When IEEE 802.1X is not enabled, driver_atheros.c needs to know how to set authentication algorithms for static WEP.
Diffstat (limited to 'src/drivers/driver_atheros.c')
-rw-r--r--src/drivers/driver_atheros.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/drivers/driver_atheros.c b/src/drivers/driver_atheros.c
index 6ac1cea..96ef8bb 100644
--- a/src/drivers/driver_atheros.c
+++ b/src/drivers/driver_atheros.c
@@ -1357,6 +1357,23 @@ atheros_commit(void *priv)
return linux_set_iface_flags(drv->ioctl_sock, drv->iface, 1);
}
+static int atheros_set_authmode(void *priv, int auth_algs)
+{
+ int authmode;
+
+ if ((auth_algs & WPA_AUTH_ALG_OPEN) &&
+ (auth_algs & WPA_AUTH_ALG_SHARED))
+ authmode = IEEE80211_AUTH_AUTO;
+ else if (auth_algs & WPA_AUTH_ALG_OPEN)
+ authmode = IEEE80211_AUTH_OPEN;
+ else if (auth_algs & WPA_AUTH_ALG_SHARED)
+ authmode = IEEE80211_AUTH_SHARED;
+ else
+ return -1;
+
+ return set80211param(priv, IEEE80211_PARAM_AUTHMODE, authmode);
+}
+
const struct wpa_driver_ops wpa_driver_atheros_ops = {
.name = "atheros",
.hapd_init = atheros_init,
@@ -1378,4 +1395,5 @@ const struct wpa_driver_ops wpa_driver_atheros_ops = {
.sta_clear_stats = atheros_sta_clear_stats,
.commit = atheros_commit,
.set_ap_wps_ie = atheros_set_ap_wps_ie,
+ .set_authmode = atheros_set_authmode,
};