From: Ilan Peer Date: Wed, 22 Apr 2015 10:13:18 +0000 (+0300) Subject: P2P: Do not create a P2P Device interface if P2P is disabled X-Git-Tag: hostap_2_5~811 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74802c0936a1eea08a0df988174c3e76a5c553f7;p=thirdparty%2Fhostap.git P2P: Do not create a P2P Device interface if P2P is disabled Do not add the dedicated P2P Device interface in case P2P is disabled in the configuration file or globally. Signed-off-by: Ilan Peer --- diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index b96fd8e72..950fdfa3f 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,