]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P2: Set p2p_mode to WPA_P2P_MODE_WFD_R2 upon receiving PASN Auth
authorShivani Baranwal <quic_shivbara@quicinc.com>
Tue, 20 May 2025 09:36:56 +0000 (15:06 +0530)
committerJouni Malinen <j@w1.fi>
Tue, 27 May 2025 20:52:56 +0000 (23:52 +0300)
This is required during P2P2 verification on the responder side where
p2p_mode may not be initialized to WFD_R2 by default. Ensure the mode is
set correctly when PASN Auth RX is received to support P2P2 operation.

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

index c2dc02c98e07e57060893b1ac87bcaeef842c803..a101f70911f1aecd20e40f2efa0d6ab1956db9db 100644 (file)
@@ -11595,6 +11595,8 @@ int wpas_p2p_pasn_auth_rx(struct wpa_supplicant *wpa_s,
                return -2;
 
        wpa_s->p2p2 = true;
+       if (wpa_s->p2p_mode == WPA_P2P_MODE_WFD_R1)
+               wpa_s->p2p_mode = WPA_P2P_MODE_WFD_R2;
        return p2p_pasn_auth_rx(p2p, mgmt, len, freq);
 }