[PATCH 6/9] P2P: Relax the conditions that allow cross-connection

Ilan Peer ilan.peer at intel.com
Wed Jun 17 09:18:18 EDT 2015


Change the conditions that allow a cross connection to allow
all the interface shared by the same radio, and not only the parent
interface.

This is mostly needed for devices that support a dedicated P2P Device
interface, as in such a case no cross connection is really possible.

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 wpa_supplicant/p2p_supplicant.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index fa91001..e309c11 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -6729,14 +6729,16 @@ static void wpas_p2p_cross_connect_setup(struct wpa_supplicant *wpa_s)
 	if (!wpa_s->global->cross_connection)
 		return;
 
-	for (iface = wpa_s->global->ifaces; iface; iface = iface->next) {
+	dl_list_for_each(iface, &wpa_s->radio->ifaces, struct wpa_supplicant,
+			 radio_list) {
 		if (iface == wpa_s)
 			continue;
+
 		if (iface->drv_flags &
 		    WPA_DRIVER_FLAGS_P2P_DEDICATED_INTERFACE)
 			continue;
-		if ((iface->drv_flags & WPA_DRIVER_FLAGS_P2P_CAPABLE) &&
-		    iface != wpa_s->parent)
+
+		if (iface->p2p_mgmt)
 			continue;
 
 		wpa_s->cross_connect_enabled = 1;
-- 
1.9.1



More information about the HostAP mailing list