Patchwork [V2,23/23] P2P: ignore p2p_no_group_iface when driver advertizes P2P_DEVICE support

login
register
mail settings
Submitter Arend van Spriel
Date May 29, 2013, 9:08 a.m.
Message ID <1369818491-7274-24-git-send-email-arend@broadcom.com>
Download mbox | patch
Permalink /patch/247185/
State Accepted
Headers show

Comments

Arend van Spriel - May 29, 2013, 9:08 a.m.
Setting p2p_no_group_iface means 'use P2P management interface as P2P
connection interface' because it attempts to change the interface type.
The P2P_DEVICE is a dedicated interface and can not be changed. As
such ignore the configuration option.

Signed-hostap: Arend van Spriel <arend@broadcom.com>
---
 wpa_supplicant/p2p_supplicant.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 43de018..7a5d49f 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -3279,7 +3279,8 @@  void wpas_p2p_deinit_global(struct wpa_global *global)
 
 static int wpas_p2p_create_iface(struct wpa_supplicant *wpa_s)
 {
-	if (wpa_s->conf->p2p_no_group_iface)
+	if (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_DEDICATED_P2P_DEVICE) &&
+	    wpa_s->conf->p2p_no_group_iface)
 		return 0; /* separate interface disabled per configuration */
 	if (wpa_s->drv_flags &
 	    (WPA_DRIVER_FLAGS_P2P_DEDICATED_INTERFACE |