aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-05-07 15:14:56 (GMT)
committerJouni Malinen <j@w1.fi>2013-05-07 15:14:56 (GMT)
commit6ea1f4135b72199988393f34dd7f5ad8040b7a42 (patch)
tree52cf8852c55bfb29df7d0d7d8c398193c15a0dd4 /wpa_supplicant/events.c
parent66562e9c7530f85ee9970da10ef5ae96be4f1b10 (diff)
downloadhostap-6ea1f4135b72199988393f34dd7f5ad8040b7a42.zip
hostap-6ea1f4135b72199988393f34dd7f5ad8040b7a42.tar.gz
hostap-6ea1f4135b72199988393f34dd7f5ad8040b7a42.tar.bz2
Try to set WPA-None key after IBSS-joined event
cfg80211 rejects the set_key operations before the IBSS network has been fully formed, so add one more attempt to set the key for WPA-None at IBSS joined driver event. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index f0f5d1c..98ef1bf 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1777,6 +1777,16 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
wpa_s->key_mgmt == WPA_KEY_MGMT_WPA_NONE ||
(wpa_s->current_ssid &&
wpa_s->current_ssid->mode == IEEE80211_MODE_IBSS)) {
+ if (wpa_s->key_mgmt == WPA_KEY_MGMT_WPA_NONE &&
+ (wpa_s->drv_flags &
+ WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE)) {
+ /*
+ * Set the key after having received joined-IBSS event
+ * from the driver.
+ */
+ wpa_supplicant_set_wpa_none_key(wpa_s,
+ wpa_s->current_ssid);
+ }
wpa_supplicant_cancel_auth_timeout(wpa_s);
wpa_supplicant_set_state(wpa_s, WPA_COMPLETED);
} else if (!ft_completed) {