Patchwork [V2,05/23] nl80211: Add support for P2P Device in add interface

login
register
mail settings
Submitter Arend van Spriel
Date May 29, 2013, 9:07 a.m.
Message ID <1369818491-7274-6-git-send-email-arend@broadcom.com>
Download mbox | patch
Permalink /patch/247199/
State Accepted
Headers show

Comments

Arend van Spriel - May 29, 2013, 9:07 a.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 77a8ff9..708b83f 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -6480,6 +6480,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);