]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Use nl80211_set_iface_id() to get hw features data
authorIlan Peer <ilan.peer@intel.com>
Thu, 13 Feb 2014 09:24:01 +0000 (11:24 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 14 Feb 2014 17:30:27 +0000 (19:30 +0200)
Use nl80211_set_iface_id() in wpa_driver_nl80211_get_hw_feature_data(),
as otherwise the function fails for a P2P Device interface (which does
not have a netdev associated with it).

Signed-hostap: Ilan Peer <ilan.peer@intel.com>

src/drivers/driver_nl80211.c

index e96c0c22a6a68a18f4def9fde6ba22912286f86e..32a371d16d1d94d192100f7d2f61f409bcb6d449 100644 (file)
@@ -6723,7 +6723,8 @@ wpa_driver_nl80211_get_hw_feature_data(void *priv, u16 *num_modes, u16 *flags)
                nl80211_cmd(drv, msg, 0, NL80211_CMD_GET_WIPHY);
 
        NLA_PUT_FLAG(msg, NL80211_ATTR_SPLIT_WIPHY_DUMP);
-       NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
+       if (nl80211_set_iface_id(msg, bss) < 0)
+               goto nla_put_failure;
 
        if (send_and_recv_msgs(drv, msg, phy_info_handler, &result) == 0) {
                nl80211_set_regulatory_flags(drv, &result);