[17/20] driver: nl80211: use wdev_id in nl80211_create_iface_once()

Message ID 1368710915-32176-18-git-send-email-arend@broadcom.com
State Changes Requested
Headers show

Commit Message

Arend van Spriel May 16, 2013, 1:28 p.m.
For P2P an interface may be created for the P2P client/group. The
create request is done on the P2P management interface, which may
be a P2P Device interface. In that case it needs to use the wdev_id.

Signed-hostap: Arend van Spriel <arend@broadcom.com>
 src/drivers/driver_nl80211.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 18b6b74..88583d1 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -6500,7 +6500,7 @@  static int nl80211_create_iface_once(struct wpa_driver_nl80211_data *drv,
 		return -1;
 	nl80211_cmd(drv, msg, 0, NL80211_CMD_NEW_INTERFACE);
-	NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
+	NL80211_PUT_IFACE_ID(msg, &drv->first_bss);
 	NLA_PUT_STRING(msg, NL80211_ATTR_IFNAME, ifname);
 	NLA_PUT_U32(msg, NL80211_ATTR_IFTYPE, iftype);