aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wpa_supplicant/p2p_supplicant.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 6603091..3c650c3 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -3969,6 +3969,18 @@ static void wpas_p2p_clear_pending_action_tx(struct wpa_supplicant *wpa_s)
wpa_s->pending_action_tx = NULL;
}
+static int wpas_p2p_connected(struct wpa_supplicant *wpa_s)
+{
+ struct wpa_supplicant *iface;
+
+ for (iface = wpa_s->global->ifaces; iface; iface = iface->next) {
+ if (iface->p2p_group_interface == P2P_GROUP_INTERFACE_GO ||
+ iface->p2p_group_interface == P2P_GROUP_INTERFACE_CLIENT)
+ return 1;
+ }
+
+ return 0;
+}
int wpas_p2p_find(struct wpa_supplicant *wpa_s, unsigned int timeout,
enum p2p_discovery_type type,
@@ -3985,6 +3997,14 @@ int wpas_p2p_find(struct wpa_supplicant *wpa_s, unsigned int timeout,
wpa_s->p2p_in_provisioning)
return -1;
+
+ if (!(wpa_s->drv_flags &
+ WPA_DRIVER_FLAGS_MULTI_CHANNEL_CONCURRENT) &&
+ wpas_p2p_connected(wpa_s)) {
+ wpa_printf(MSG_DEBUG, "P2P: find blocked due to active GO/CLI");
+ return -1;
+ }
+
wpa_supplicant_cancel_sched_scan(wpa_s);
return p2p_find(wpa_s->global->p2p, timeout, type,