]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P2: Start client for join without WPS
authorShivani Baranwal <quic_shivbara@quicinc.com>
Wed, 3 Jul 2024 16:41:26 +0000 (22:11 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 31 Oct 2024 11:57:55 +0000 (13:57 +0200)
Do not use WPS enrollee for P2P2 connection.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
wpa_supplicant/p2p_supplicant.c

index 72e8dfe26c2e5ac690f0bcd36180d185cf73fba0..b60588dbe8995add01cb78906dee0f085be0b290 100644 (file)
@@ -6280,6 +6280,9 @@ static int wpas_p2p_join_start(struct wpa_supplicant *wpa_s, int freq,
        os_memcpy(res.peer_interface_addr, wpa_s->pending_join_iface_addr,
                  ETH_ALEN);
        res.wps_method = wpa_s->pending_join_wps_method;
+       res.p2p2 = wpa_s->p2p2;
+       res.cipher = WPA_CIPHER_CCMP;
+
        if (freq && ssid && ssid_len) {
                res.freq = freq;
                res.ssid_len = ssid_len;
@@ -6314,7 +6317,10 @@ static int wpas_p2p_join_start(struct wpa_supplicant *wpa_s, int freq,
                wpa_s->off_channel_freq = 0;
                wpa_s->roc_waiting_drv_freq = 0;
        }
-       wpas_start_wps_enrollee(group, &res);
+       if (res.p2p2)
+               wpas_start_gc(group, &res);
+       else
+               wpas_start_wps_enrollee(group, &res);
 
        /*
         * Allow a longer timeout for join-a-running-group than normal 15