diff options
author | Jouni Malinen <j@w1.fi> | 2010-09-04 13:56:12 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2010-09-04 13:56:12 +0300 |
commit | 0c80427d773faae883414d132e6f8196b9f4f904 (patch) | |
tree | 1ed61dc85558bb9ca21e7e714625e9bf023bc1c0 /wpa_supplicant/wpa_supplicant.c | |
parent | 687179edb59c3fac156c9ef0bd43226866f92f19 (diff) | |
download | external_wpa_supplicant_8_ti-0c80427d773faae883414d132e6f8196b9f4f904.zip external_wpa_supplicant_8_ti-0c80427d773faae883414d132e6f8196b9f4f904.tar.gz external_wpa_supplicant_8_ti-0c80427d773faae883414d132e6f8196b9f4f904.tar.bz2 |
NDIS: Fix association for WPS provisioning with protected AP
Some NDIS drivers require a workaround to allow them to associate
with a WPS AP that is already using protection (Privacy field = 1).
Let driver_ndis.c know if the AP is already using Privacy and if so,
configure a dummy WEP key to force the driver to associate.
Diffstat (limited to 'wpa_supplicant/wpa_supplicant.c')
-rw-r--r-- | wpa_supplicant/wpa_supplicant.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index bb7c913..69c926a 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -1024,6 +1024,7 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s, return; } + os_memset(¶ms, 0, sizeof(params)); wpa_s->reassociate = 0; if (bss) { #ifdef CONFIG_IEEE80211R @@ -1131,6 +1132,10 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s, wpa_ie_len = 0; wpabuf_free(wps_ie); wpa_supplicant_set_non_wpa_policy(wpa_s, ssid); + if (!bss || (bss->caps & IEEE80211_CAP_PRIVACY)) + params.wps = WPS_MODE_PRIVACY; + else + params.wps = WPS_MODE_OPEN; #endif /* CONFIG_WPS */ } else { wpa_supplicant_set_non_wpa_policy(wpa_s, ssid); @@ -1175,7 +1180,6 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s, } wpa_supplicant_set_state(wpa_s, WPA_ASSOCIATING); - os_memset(¶ms, 0, sizeof(params)); if (bss) { params.bssid = bss->bssid; params.ssid = bss->ssid; |