Link to, and adjust types for, the PCSC framework included with OSX
[mech_eap.git] / wpa_supplicant / sme.c
index 2fbb2c6..61fd3b2 100644 (file)
@@ -455,6 +455,11 @@ static void sme_send_authentication(struct wpa_supplicant *wpa_s,
        }
 #endif /* CONFIG_MBO */
 
+       if (params.p2p)
+               wpa_drv_get_ext_capa(wpa_s, WPA_IF_P2P_CLIENT);
+       else
+               wpa_drv_get_ext_capa(wpa_s, WPA_IF_STATION);
+
        ext_capab_len = wpas_build_ext_capab(wpa_s, ext_capab,
                                             sizeof(ext_capab));
        if (ext_capab_len > 0) {
@@ -1580,8 +1585,10 @@ static void sme_sa_query_timer(void *eloop_ctx, void *timeout_ctx)
        nbuf = os_realloc_array(wpa_s->sme.sa_query_trans_id,
                                wpa_s->sme.sa_query_count + 1,
                                WLAN_SA_QUERY_TR_ID_LEN);
-       if (nbuf == NULL)
+       if (nbuf == NULL) {
+               sme_stop_sa_query(wpa_s);
                return;
+       }
        if (wpa_s->sme.sa_query_count == 0) {
                /* Starting a new SA Query procedure */
                os_get_reltime(&wpa_s->sme.sa_query_start);
@@ -1592,6 +1599,7 @@ static void sme_sa_query_timer(void *eloop_ctx, void *timeout_ctx)
 
        if (os_get_random(trans_id, WLAN_SA_QUERY_TR_ID_LEN) < 0) {
                wpa_printf(MSG_DEBUG, "Could not generate SA Query ID");
+               sme_stop_sa_query(wpa_s);
                return;
        }