aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_atheros.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-05-28 18:51:31 (GMT)
committerJouni Malinen <j@w1.fi>2010-05-28 18:51:31 (GMT)
commit8b0ea5a07ebfbf561634030a2354ac7c504e7481 (patch)
tree9f31f616f5dc63072375b097df19a2ebba262e8e /src/drivers/driver_atheros.c
parent7d6640a62cbb63a95bce60f4bae493dc40ca21d1 (diff)
downloadhostap-8b0ea5a07ebfbf561634030a2354ac7c504e7481.zip
hostap-8b0ea5a07ebfbf561634030a2354ac7c504e7481.tar.gz
hostap-8b0ea5a07ebfbf561634030a2354ac7c504e7481.tar.bz2
atheros: Fix WPA/802.1X disabling to clear Privacy flag
Setting IEEE80211_PARAM_AUTHMODE to IEEE80211_AUTH_AUTO ends up enabling Privacy mode in the driver. We need to clear that to allow hostapd to be reconfigured into open mode.
Diffstat (limited to 'src/drivers/driver_atheros.c')
-rw-r--r--src/drivers/driver_atheros.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/drivers/driver_atheros.c b/src/drivers/driver_atheros.c
index ad78c2a..a146114 100644
--- a/src/drivers/driver_atheros.c
+++ b/src/drivers/driver_atheros.c
@@ -74,6 +74,7 @@ struct madwifi_driver_data {
static int madwifi_sta_deauth(void *priv, const u8 *own_addr, const u8 *addr,
int reason_code);
+static int madwifi_set_privacy(void *priv, int enabled);
static const char * athr_get_ioctl_name(int op)
{
@@ -343,8 +344,11 @@ madwifi_set_ieee8021x(void *priv, struct wpa_bss_params *params)
if (!params->enabled) {
/* XXX restore state */
- return set80211param(priv, IEEE80211_PARAM_AUTHMODE,
- IEEE80211_AUTH_AUTO);
+ if (set80211param(priv, IEEE80211_PARAM_AUTHMODE,
+ IEEE80211_AUTH_AUTO) < 0)
+ return -1;
+ /* IEEE80211_AUTH_AUTO ends up enabling Privacy; clear that */
+ return madwifi_set_privacy(drv, 0);
}
if (!params->wpa && !params->ieee802_1x) {
hostapd_logger(drv->hapd, NULL, HOSTAPD_MODULE_DRIVER,