FT: Do not call wpa_ft_prepare_auth_request() if FT is not used
authorJouni Malinen <jouni.malinen@atheros.com>
Mon, 29 Sep 2008 14:28:10 +0000 (17:28 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 29 Sep 2008 14:28:10 +0000 (17:28 +0300)
This saves some extra processing for the non-FT case if FT is built in, but
not used for the association.

wpa_supplicant/wpa_supplicant.c

index a36c65b..59024d8 100644 (file)
@@ -923,8 +923,10 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
                if (ie && ie[1] >= MOBILITY_DOMAIN_ID_LEN)
                        md = ie + 2;
                wpa_sm_set_ft_params(wpa_s->wpa, md, NULL, 0, NULL);
-               /* Prepare for the next transition */
-               wpa_ft_prepare_auth_request(wpa_s->wpa);
+               if (md) {
+                       /* Prepare for the next transition */
+                       wpa_ft_prepare_auth_request(wpa_s->wpa);
+               }
 #endif /* CONFIG_IEEE80211R */
        } else {
                wpa_msg(wpa_s, MSG_INFO, "Trying to associate with SSID '%s'",