Make sure wpa_proto gets cleared for WPS and non-WPA connections

This is needed to fix the wpa_proto association parameter for drivers
that select AP based on security parameters internally.
This commit is contained in:
Edward Lu 2011-09-08 17:51:08 +03:00 committed by Jouni Malinen
parent 25e5d5bc08
commit cf546f1a03

View File

@ -1224,10 +1224,12 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
params.wps = WPS_MODE_PRIVACY;
else
params.wps = WPS_MODE_OPEN;
wpa_s->wpa_proto = 0;
#endif /* CONFIG_WPS */
} else {
wpa_supplicant_set_non_wpa_policy(wpa_s, ssid);
wpa_ie_len = 0;
wpa_s->wpa_proto = 0;
}
#ifdef CONFIG_P2P