Cumulative patch from commit c16a7590cfe76d5895ac70ef711e5b0b384f7aa6
c16a759 wpa_supplicant: Add a configuration file for the P2P_DEVICE parameters
185677b Disable interface if ACS fails
8f05577 Configure beacon interval for IBSS command
95faa36 HS 2.0R2: Check for OSEN when determining whether to authorize STA
113318a Set the station to authorized on assoc event for open authentication
Change-Id: Id8111b6475bf93a0600a431708cb16120d380e24
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index b878198..09f98a3 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -3680,7 +3680,20 @@
iface.ifname = wpa_s->pending_interface_name;
iface.driver = wpa_s->driver->name;
iface.driver_param = wpa_s->conf->driver_param;
- iface.confname = wpa_s->confname;
+
+ /*
+ * If a P2P Device configuration file was given, use it as the interface
+ * configuration file (instead of using parent's configuration file.
+ */
+ if (wpa_s->conf_p2p_dev) {
+ iface.confname = wpa_s->conf_p2p_dev;
+ iface.ctrl_interface = NULL;
+ } else {
+ iface.confname = wpa_s->confname;
+ iface.ctrl_interface = wpa_s->conf->ctrl_interface;
+ }
+ iface.conf_p2p_dev = NULL;
+
p2pdev_wpa_s = wpa_supplicant_add_iface(wpa_s->global, &iface);
if (!p2pdev_wpa_s) {
wpa_printf(MSG_DEBUG, "P2P: Failed to add P2P Device interface");