From 21efc940f6e7f07b84b7e5c5867f3d81594c4fb0 Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Thu, 23 Oct 2014 11:31:19 +0300 Subject: [PATCH] wpa_supplicant: Do not register a P2P management interface on DBus 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 --- wpa_supplicant/wpa_supplicant.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 353a54dde..db10d96ee 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -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;