]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Allow cross connection on the parent interface
authorJouni Malinen <j@w1.fi>
Tue, 9 Dec 2014 23:54:27 +0000 (01:54 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 9 Dec 2014 23:54:27 +0000 (01:54 +0200)
Previously, any P2P capable interface was skipped in cross connection
uplink consideration. However, this ends up skipping more or less all
nl80211-based driver cases now since they mark the main interface P2P
capable. Relax this rule to allow the parent interface to be used as the
non-P2P station interface for cross connection purposes.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/p2p_supplicant.c

index 267b59ba6dd69c301c4faa19496ee3595f0372a8..4c63b1f8a774dcc724d05578673cd20cc1316fac 100644 (file)
@@ -6734,7 +6734,8 @@ static void wpas_p2p_cross_connect_setup(struct wpa_supplicant *wpa_s)
                if (iface->drv_flags &
                    WPA_DRIVER_FLAGS_P2P_DEDICATED_INTERFACE)
                        continue;
-               if (iface->drv_flags & WPA_DRIVER_FLAGS_P2P_CAPABLE)
+               if ((iface->drv_flags & WPA_DRIVER_FLAGS_P2P_CAPABLE) &&
+                   iface != wpa_s->parent)
                        continue;
 
                wpa_s->cross_connect_enabled = 1;