ASoC: fsl_sai: Use devm_platform_get_and_ioremap_resource()
[linux-2.6-microblaze.git] / net / wireless / nl80211.c
index b1df42e..fc9286a 100644 (file)
@@ -313,6 +313,7 @@ nl80211_pmsr_ftm_req_attr_policy[NL80211_PMSR_FTM_REQ_ATTR_MAX + 1] = {
        [NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC] = { .type = NLA_FLAG },
        [NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED] = { .type = NLA_FLAG },
        [NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED] = { .type = NLA_FLAG },
+       [NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK] = { .type = NLA_FLAG },
 };
 
 static const struct nla_policy
@@ -411,9 +412,10 @@ static const struct nla_policy
 nl80211_fils_discovery_policy[NL80211_FILS_DISCOVERY_ATTR_MAX + 1] = {
        [NL80211_FILS_DISCOVERY_ATTR_INT_MIN] = NLA_POLICY_MAX(NLA_U32, 10000),
        [NL80211_FILS_DISCOVERY_ATTR_INT_MAX] = NLA_POLICY_MAX(NLA_U32, 10000),
-       NLA_POLICY_RANGE(NLA_BINARY,
-                        NL80211_FILS_DISCOVERY_TMPL_MIN_LEN,
-                        IEEE80211_MAX_DATA_LEN),
+       [NL80211_FILS_DISCOVERY_ATTR_TMPL] =
+                       NLA_POLICY_RANGE(NLA_BINARY,
+                                        NL80211_FILS_DISCOVERY_TMPL_MIN_LEN,
+                                        IEEE80211_MAX_DATA_LEN),
 };
 
 static const struct nla_policy
@@ -3929,7 +3931,7 @@ static int nl80211_set_interface(struct sk_buff *skb, struct genl_info *info)
        return err;
 }
 
-static int nl80211_new_interface(struct sk_buff *skb, struct genl_info *info)
+static int _nl80211_new_interface(struct sk_buff *skb, struct genl_info *info)
 {
        struct cfg80211_registered_device *rdev = info->user_ptr[0];
        struct vif_params params;
@@ -3938,9 +3940,6 @@ static int nl80211_new_interface(struct sk_buff *skb, struct genl_info *info)
        int err;
        enum nl80211_iftype type = NL80211_IFTYPE_UNSPECIFIED;
 
-       /* to avoid failing a new interface creation due to pending removal */
-       cfg80211_destroy_ifaces(rdev);
-
        memset(&params, 0, sizeof(params));
 
        if (!info->attrs[NL80211_ATTR_IFNAME])
@@ -4028,6 +4027,21 @@ static int nl80211_new_interface(struct sk_buff *skb, struct genl_info *info)
        return genlmsg_reply(msg, info);
 }
 
+static int nl80211_new_interface(struct sk_buff *skb, struct genl_info *info)
+{
+       struct cfg80211_registered_device *rdev = info->user_ptr[0];
+       int ret;
+
+       /* to avoid failing a new interface creation due to pending removal */
+       cfg80211_destroy_ifaces(rdev);
+
+       wiphy_lock(&rdev->wiphy);
+       ret = _nl80211_new_interface(skb, info);
+       wiphy_unlock(&rdev->wiphy);
+
+       return ret;
+}
+
 static int nl80211_del_interface(struct sk_buff *skb, struct genl_info *info)
 {
        struct cfg80211_registered_device *rdev = info->user_ptr[0];
@@ -15040,7 +15054,9 @@ static const struct genl_small_ops nl80211_small_ops[] = {
                .doit = nl80211_new_interface,
                .flags = GENL_UNS_ADMIN_PERM,
                .internal_flags = NL80211_FLAG_NEED_WIPHY |
-                                 NL80211_FLAG_NEED_RTNL,
+                                 NL80211_FLAG_NEED_RTNL |
+                                 /* we take the wiphy mutex later ourselves */
+                                 NL80211_FLAG_NO_WIPHY_MTX,
        },
        {
                .cmd = NL80211_CMD_DEL_INTERFACE,