diff mbox

P2P: Do not create a P2P Device interface is P2P is disabled

Message ID 1429697598-15986-1-git-send-email-ilan.peer@intel.com
State Accepted
Headers show

Commit Message

Peer, Ilan April 22, 2015, 10:13 a.m. UTC
Do not add the dedicated P2P Device interface in case that
P2P is disabled in the configuration file or globally.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
---
 wpa_supplicant/wpa_supplicant.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jouni Malinen April 23, 2015, 10:37 p.m. UTC | #1
On Wed, Apr 22, 2015 at 01:13:18PM +0300, Ilan Peer wrote:
> Do not add the dedicated P2P Device interface in case that
> P2P is disabled in the configuration file or globally.

Thanks, applied.
diff mbox

Patch

diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 2ba9c38..6cb0b70 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -4386,6 +4386,7 @@  struct wpa_supplicant * wpa_supplicant_add_iface(struct wpa_global *global,
 
 #ifdef CONFIG_P2P
 	if (wpa_s->global->p2p == NULL &&
+	    !wpa_s->global->p2p_disabled && !wpa_s->conf->p2p_disabled &&
 	    (wpa_s->drv_flags & WPA_DRIVER_FLAGS_DEDICATED_P2P_DEVICE) &&
 	    wpas_p2p_add_p2pdev_interface(wpa_s, iface->conf_p2p_dev) < 0) {
 		wpa_printf(MSG_INFO,