aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 2f449ddcbc7..c04df6a6af7 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2752,6 +2752,9 @@ static int nl80211_authenticate(struct sk_buff *skb, struct genl_info *info)
2752 if (!info->attrs[NL80211_ATTR_MAC]) 2752 if (!info->attrs[NL80211_ATTR_MAC])
2753 return -EINVAL; 2753 return -EINVAL;
2754 2754
2755 if (!info->attrs[NL80211_ATTR_AUTH_TYPE])
2756 return -EINVAL;
2757
2755 rtnl_lock(); 2758 rtnl_lock();
2756 2759
2757 err = get_drv_dev_by_info_ifindex(info->attrs, &drv, &dev); 2760 err = get_drv_dev_by_info_ifindex(info->attrs, &drv, &dev);
@@ -2798,13 +2801,10 @@ static int nl80211_authenticate(struct sk_buff *skb, struct genl_info *info)
2798 req.ie_len = nla_len(info->attrs[NL80211_ATTR_IE]); 2801 req.ie_len = nla_len(info->attrs[NL80211_ATTR_IE]);
2799 } 2802 }
2800 2803
2801 if (info->attrs[NL80211_ATTR_AUTH_TYPE]) { 2804 req.auth_type = nla_get_u32(info->attrs[NL80211_ATTR_AUTH_TYPE]);
2802 req.auth_type = 2805 if (!nl80211_valid_auth_type(req.auth_type)) {
2803 nla_get_u32(info->attrs[NL80211_ATTR_AUTH_TYPE]); 2806 err = -EINVAL;
2804 if (!nl80211_valid_auth_type(req.auth_type)) { 2807 goto out;
2805 err = -EINVAL;
2806 goto out;
2807 }
2808 } 2808 }
2809 2809
2810 err = drv->ops->auth(&drv->wiphy, dev, &req); 2810 err = drv->ops->auth(&drv->wiphy, dev, &req);