]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Check P2P 6 GHz capability to start P2P GO
authorShivani Baranwal <quic_shivbara@quicinc.com>
Tue, 10 Dec 2024 09:51:37 +0000 (15:21 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 19 Dec 2024 15:38:41 +0000 (17:38 +0200)
Currently, when no forced channel frequency is included with the start
an autonomous P2P GO command, a 6 GHz channel might get selected if it
is a shared radio frequency irrespective of P2P 6 GHz capability. In
these cases we need to check whether P2P 6 GHz capability is supported
before proceeding with P2P GO start on a 6 GHz channel.

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

index a6edbae96cc38f819656ba21e40dc6d5b329097a..0329a5f49548bb47b54f5f85aef685b2a885a63d 100644 (file)
@@ -7246,6 +7246,10 @@ static int wpas_p2p_supported_freq_go(struct wpa_supplicant *wpa_s,
                                      const struct p2p_channels *channels,
                                      int freq)
 {
+       if (is_6ghz_freq(freq) &&
+           !is_p2p_6ghz_capable(wpa_s->global->p2p))
+               return 0;
+
        if (!wpas_p2p_disallowed_freq(wpa_s->global, freq) &&
            p2p_supported_freq_go(wpa_s->global->p2p, freq) &&
            freq_included(wpa_s, channels, freq))