]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Use specified frequency for group client in P2P_GROUP_ADD command
authorJintao Lin <jintaolin@chromium.org>
Wed, 31 Jul 2024 18:50:01 +0000 (18:50 +0000)
committerJouni Malinen <j@w1.fi>
Sat, 3 Aug 2024 08:49:24 +0000 (11:49 +0300)
In P2P_GROUP_ADD command and GroupAdd dbus method, frequency is passed
in as a parameter when restarting a persistent group. This is the group
operating frequency determined out of band. Use this pre-determined
frequency in P2P client as well to expedite the P2P scan.

Signed-off-by: Jintao Lin <jintaolin@chromium.org>
wpa_supplicant/ctrl_iface.c
wpa_supplicant/dbus/dbus_new_handlers_p2p.c

index 0f00eb2e527e3e8d1e03af5f1b4fe48a59f35a76..96e0740fbded3595aff3d9d3a806c1221ed33bf0 100644 (file)
@@ -7172,7 +7172,7 @@ static int p2p_ctrl_group_add_persistent(struct wpa_supplicant *wpa_s,
                return -1;
        }
 
-       return wpas_p2p_group_add_persistent(wpa_s, ssid, 0, freq, 0,
+       return wpas_p2p_group_add_persistent(wpa_s, ssid, 0, freq, freq,
                                             vht_center_freq2, ht40, vht,
                                             vht_chwidth, he, edmg,
                                             NULL, 0, 0, allow_6ghz, 0,
index 418a8fd4292e3ef8916d7c5b26dc3da4a13cdcce..3de6ed89fa399ec87131b590c6cbe8b654aa1750 100644 (file)
@@ -473,7 +473,7 @@ DBusMessage * wpas_dbus_handler_p2p_group_add(DBusMessage *message,
                if (ssid == NULL || ssid->disabled != 2)
                        goto inv_args;
 
-               if (wpas_p2p_group_add_persistent(wpa_s, ssid, 0, freq, 0,
+               if (wpas_p2p_group_add_persistent(wpa_s, ssid, 0, freq, freq,
                                                  freq2, ht40, vht,
                                                  max_oper_chwidth, he, edmg,
                                                  NULL, 0, 0, allow_6ghz,