Browse Source

nl80211: Add support for P2P Device in add interface

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

Signed-off-by: David Spinadel <david.spinadel@intel.com>
David Spinadel 11 years ago
parent
commit
6bae92e0f2
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/drivers/driver_nl80211.c

+ 7 - 0
src/drivers/driver_nl80211.c

@@ -6613,6 +6613,13 @@ static int nl80211_create_iface_once(struct wpa_driver_nl80211_data *drv,
 		return ret;
 		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);
 	ifidx = if_nametoindex(ifname);
 	wpa_printf(MSG_DEBUG, "nl80211: New interface %s created: ifindex=%d",
 	wpa_printf(MSG_DEBUG, "nl80211: New interface %s created: ifindex=%d",
 		   ifname, ifidx);
 		   ifname, ifidx);