Browse Source

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.
Edward Lu 13 years ago
parent
commit
cf546f1a03
1 changed files with 2 additions and 0 deletions
  1. 2 0
      wpa_supplicant/wpa_supplicant.c

+ 2 - 0
wpa_supplicant/wpa_supplicant.c

@@ -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