]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_supplicant: Do not register a P2P management interface on DBus
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Thu, 23 Oct 2014 08:31:19 +0000 (11:31 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 27 Oct 2014 15:15:09 +0000 (17:15 +0200)
DBus client should always request the proper netdev interface. This will
be necessary to get a consistent behavior whatever driver is in use:
iwlwifi (which requires a P2P mgmt dev), ath9/10k (which does not),
etc...

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
wpa_supplicant/wpa_supplicant.c

index 353a54dde3edfb35cb8e1cfd4f10b2d1daff2c0e..db10d96eecf28ee4e322f780391e96d8a52322eb 100644 (file)
@@ -4030,14 +4030,16 @@ struct wpa_supplicant * wpa_supplicant_add_iface(struct wpa_global *global,
                return NULL;
        }
 
-       /* Notify the control interfaces about new iface */
-       if (wpas_notify_iface_added(wpa_s)) {
-               wpa_supplicant_deinit_iface(wpa_s, 1, 0);
-               return NULL;
-       }
+       if (iface->p2p_mgmt == 0) {
+               /* Notify the control interfaces about new iface */
+               if (wpas_notify_iface_added(wpa_s)) {
+                       wpa_supplicant_deinit_iface(wpa_s, 1, 0);
+                       return NULL;
+               }
 
-       for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next)
-               wpas_notify_network_added(wpa_s, ssid);
+               for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next)
+                       wpas_notify_network_added(wpa_s, ssid);
+       }
 
        wpa_s->next = global->ifaces;
        global->ifaces = wpa_s;