Patchwork [07/10] nl80211_driver: add support for P2P device in add interface

login
register
mail settings
Submitter dvdspndl@gmail.com
Date Feb. 18, 2013, 8:30 p.m.
Message ID <1361219436-5840-7-git-send-email-dvdspndl@gmail.com>
Download mbox | patch
Permalink /patch/221489/
State Superseded
Headers show

Comments

dvdspndl@gmail.com - Feb. 18, 2013, 8:30 p.m.
From: David Spinadel <david.spinadel@intel.com>

Don't try to assign ifindex for P2P device interface.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
---
 src/drivers/driver_nl80211.c |    7 +++++++
 1 file changed, 7 insertions(+)

Patch

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 0446f33..bf53ce4 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -6037,6 +6037,13 @@  static int nl80211_create_iface_once(struct wpa_driver_nl80211_data *drv,
 		return ret;
 	}
 
+	if (iftype == NL80211_IFTYPE_P2P_DEVICE) {
+		wpa_printf(MSG_DEBUG,
+			   "nl80211 New P2P device interface %s created",
+			   ifname);
+		return 0;
+	}
+
 	ifidx = if_nametoindex(ifname);
 	wpa_printf(MSG_DEBUG, "nl80211: New interface %s created: ifindex=%d",
 		   ifname, ifidx);