]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Allow P2P functionality to be disabled per interface
authorSreenath Sharma <sreenats@broadcom.com>
Sat, 31 Aug 2013 08:59:05 +0000 (11:59 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 31 Aug 2013 08:59:05 +0000 (11:59 +0300)
By default, P2P is initialized for all driver interfaces and this makes
P2P getting initialized for non-P2P station interface if the supplicant
is started first on this interface. If an interface is dedicated for
non-P2P station mode, it is now possible to disable P2P initialization
by adding 'p2p_disabled=1' in the configuration file of non-P2P station
interface, irrespective of the order in which supplicant is started.

Signed-hostap: Sreenath Sharma <sreenats@broadcom.com>

wpa_supplicant/p2p_supplicant.c

index aad12bb3f52b76d72e0ee2a5c23de87b5681da57..4b0e0eeb24da3e64867fb6768f9876cb86b554bd 100644 (file)
@@ -3114,6 +3114,9 @@ int wpas_p2p_init(struct wpa_global *global, struct wpa_supplicant *wpa_s)
        unsigned int r;
        int i;
 
+       if (wpa_s->conf->p2p_disabled)
+               return 0;
+
        if (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_P2P_CAPABLE))
                return 0;