From 82a982e0b80aa90ccfbb953aedc44fdc24de02ba Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 10 Oct 2012 13:08:23 +0300 Subject: P2P: Allow P2P functionality to be disabled per interface By default, P2P is enabled globally for all virtual interfaces and this makes wpa_supplicant include WSC and P2P IEs in Probe Request frames for all scans even if this is for a non-P2P station connection to speed up device discovery. If an interface is dedicated for non-P2P station mode operations, it is now possible to disable addition of WSC and P2P IEs into Probe Request frames with a per-interface p2p_disabled parameter. This can be set either in the configuration file (p2p_disabled=1) or at run time ("wpa_cli -i wlan0 set p2p_disabled 1"). Unlike the previous mechanism ("wpa_cli p2p_set disabled 1"), the new parameter changes the behavior only for the specified interface while other interfaces continue to follow the global P2P enabled/disabled state. Signed-hostap: Jouni Malinen Signed-off-by: Eyal Shapira --- wpa_supplicant/scan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'wpa_supplicant/scan.c') diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index 2b468fb..66fd60d 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -66,7 +66,8 @@ static int wpas_wps_in_use(struct wpa_supplicant *wpa_s, } #ifdef CONFIG_P2P - if (!wpa_s->global->p2p_disabled && wpa_s->global->p2p) { + if (!wpa_s->global->p2p_disabled && wpa_s->global->p2p && + !wpa_s->conf->p2p_disabled) { wpa_s->wps->dev.p2p = 1; if (!wps) { wps = 1; -- cgit v1.1