aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-04-04 13:58:16 (GMT)
committerJouni Malinen <j@w1.fi>2009-04-04 13:58:16 (GMT)
commita0b2f99bd7f608236e8a2e650655a79280248740 (patch)
tree7802d03b16e34313faca00c1c0c3880aca9f9af7 /wpa_supplicant
parentacae30ed7bb112af024f3eea07fb14f68cc353e2 (diff)
downloadhostap-a0b2f99bd7f608236e8a2e650655a79280248740.zip
hostap-a0b2f99bd7f608236e8a2e650655a79280248740.tar.gz
hostap-a0b2f99bd7f608236e8a2e650655a79280248740.tar.bz2
nl80211: Fix static WEP key configuration when using SME
Need to set WEP keys before requesting authentication in order to get Shared Key authentication working. Previously, the WEP keys were not set at all when using SME in wpa_supplicant.
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/sme.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 97a5f80..87b6b95 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -35,6 +35,7 @@ void sme_authenticate(struct wpa_supplicant *wpa_s,
#ifdef CONFIG_IEEE80211R
const u8 *md = NULL;
#endif /* CONFIG_IEEE80211R */
+ int i;
if (bss == NULL) {
wpa_printf(MSG_ERROR, "SME: No scan result available for the "
@@ -84,6 +85,13 @@ void sme_authenticate(struct wpa_supplicant *wpa_s,
params.auth_alg);
}
+ for (i = 0; i < NUM_WEP_KEYS; i++) {
+ if (ssid->wep_key_len[i])
+ params.wep_key[i] = ssid->wep_key[i];
+ params.wep_key_len[i] = ssid->wep_key_len[i];
+ }
+ params.wep_tx_keyidx = ssid->wep_tx_keyidx;
+
os_memset(wpa_s->bssid, 0, ETH_ALEN);
os_memcpy(wpa_s->pending_bssid, bss->bssid, ETH_ALEN);