]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Make sure wpa_proto gets cleared for WPS and non-WPA connections
authorEdward Lu <shaol@qca.qualcomm.com>
Thu, 8 Sep 2011 14:51:08 +0000 (17:51 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 8 Sep 2011 14:51:08 +0000 (17:51 +0300)
This is needed to fix the wpa_proto association parameter for drivers
that select AP based on security parameters internally.

wpa_supplicant/wpa_supplicant.c

index e50c8399aa38cb5c2b51a4d9c0261f71e809bf2a..646a9260649d0e9f8b462a1ef98caca41d76369c 100644 (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