From: Arend van Spriel Date: Tue, 25 Jun 2013 10:51:59 +0000 (+0300) Subject: nl80211: Use wdev_id in nl80211_create_iface_once() X-Git-Tag: aosp-kk-from-upstream~163 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fa93de40594e17d23affd9ea7ae7dd913a8cf86c;p=thirdparty%2Fhostap.git nl80211: Use wdev_id in nl80211_create_iface_once() 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 --- diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 604754523..f0ae8e314 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -6750,7 +6750,8 @@ 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); + if (nl80211_set_iface_id(msg, &drv->first_bss) < 0) + goto nla_put_failure; NLA_PUT_STRING(msg, NL80211_ATTR_IFNAME, ifname); NLA_PUT_U32(msg, NL80211_ATTR_IFTYPE, iftype);