diff options
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r-- | net/wireless/nl80211.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 596bf189549..356a84a5dae 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -151,6 +151,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = { | |||
151 | [NL80211_ATTR_FRAME_MATCH] = { .type = NLA_BINARY, }, | 151 | [NL80211_ATTR_FRAME_MATCH] = { .type = NLA_BINARY, }, |
152 | [NL80211_ATTR_PS_STATE] = { .type = NLA_U32 }, | 152 | [NL80211_ATTR_PS_STATE] = { .type = NLA_U32 }, |
153 | [NL80211_ATTR_CQM] = { .type = NLA_NESTED, }, | 153 | [NL80211_ATTR_CQM] = { .type = NLA_NESTED, }, |
154 | [NL80211_ATTR_LOCAL_STATE_CHANGE] = { .type = NLA_FLAG }, | ||
154 | }; | 155 | }; |
155 | 156 | ||
156 | /* policy for the attributes */ | 157 | /* policy for the attributes */ |
@@ -2097,7 +2098,8 @@ static int nl80211_del_station(struct sk_buff *skb, struct genl_info *info) | |||
2097 | goto out_rtnl; | 2098 | goto out_rtnl; |
2098 | 2099 | ||
2099 | if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP && | 2100 | if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP && |
2100 | dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP_VLAN) { | 2101 | dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP_VLAN && |
2102 | dev->ieee80211_ptr->iftype != NL80211_IFTYPE_MESH_POINT) { | ||
2101 | err = -EINVAL; | 2103 | err = -EINVAL; |
2102 | goto out; | 2104 | goto out; |
2103 | } | 2105 | } |
@@ -3393,6 +3395,7 @@ static int nl80211_authenticate(struct sk_buff *skb, struct genl_info *info) | |||
3393 | int err, ssid_len, ie_len = 0; | 3395 | int err, ssid_len, ie_len = 0; |
3394 | enum nl80211_auth_type auth_type; | 3396 | enum nl80211_auth_type auth_type; |
3395 | struct key_parse key; | 3397 | struct key_parse key; |
3398 | bool local_state_change; | ||
3396 | 3399 | ||
3397 | if (!is_valid_ie_attr(info->attrs[NL80211_ATTR_IE])) | 3400 | if (!is_valid_ie_attr(info->attrs[NL80211_ATTR_IE])) |
3398 | return -EINVAL; | 3401 | return -EINVAL; |
@@ -3471,9 +3474,12 @@ static int nl80211_authenticate(struct sk_buff *skb, struct genl_info *info) | |||
3471 | goto out; | 3474 | goto out; |
3472 | } | 3475 | } |
3473 | 3476 | ||
3477 | local_state_change = !!info->attrs[NL80211_ATTR_LOCAL_STATE_CHANGE]; | ||
3478 | |||
3474 | err = cfg80211_mlme_auth(rdev, dev, chan, auth_type, bssid, | 3479 | err = cfg80211_mlme_auth(rdev, dev, chan, auth_type, bssid, |
3475 | ssid, ssid_len, ie, ie_len, | 3480 | ssid, ssid_len, ie, ie_len, |
3476 | key.p.key, key.p.key_len, key.idx); | 3481 | key.p.key, key.p.key_len, key.idx, |
3482 | local_state_change); | ||
3477 | 3483 | ||
3478 | out: | 3484 | out: |
3479 | cfg80211_unlock_rdev(rdev); | 3485 | cfg80211_unlock_rdev(rdev); |
@@ -3650,6 +3656,7 @@ static int nl80211_deauthenticate(struct sk_buff *skb, struct genl_info *info) | |||
3650 | const u8 *ie = NULL, *bssid; | 3656 | const u8 *ie = NULL, *bssid; |
3651 | int err, ie_len = 0; | 3657 | int err, ie_len = 0; |
3652 | u16 reason_code; | 3658 | u16 reason_code; |
3659 | bool local_state_change; | ||
3653 | 3660 | ||
3654 | if (!is_valid_ie_attr(info->attrs[NL80211_ATTR_IE])) | 3661 | if (!is_valid_ie_attr(info->attrs[NL80211_ATTR_IE])) |
3655 | return -EINVAL; | 3662 | return -EINVAL; |
@@ -3695,7 +3702,10 @@ static int nl80211_deauthenticate(struct sk_buff *skb, struct genl_info *info) | |||
3695 | ie_len = nla_len(info->attrs[NL80211_ATTR_IE]); | 3702 | ie_len = nla_len(info->attrs[NL80211_ATTR_IE]); |
3696 | } | 3703 | } |
3697 | 3704 | ||
3698 | err = cfg80211_mlme_deauth(rdev, dev, bssid, ie, ie_len, reason_code); | 3705 | local_state_change = !!info->attrs[NL80211_ATTR_LOCAL_STATE_CHANGE]; |
3706 | |||
3707 | err = cfg80211_mlme_deauth(rdev, dev, bssid, ie, ie_len, reason_code, | ||
3708 | local_state_change); | ||
3699 | 3709 | ||
3700 | out: | 3710 | out: |
3701 | cfg80211_unlock_rdev(rdev); | 3711 | cfg80211_unlock_rdev(rdev); |
@@ -3712,6 +3722,7 @@ static int nl80211_disassociate(struct sk_buff *skb, struct genl_info *info) | |||
3712 | const u8 *ie = NULL, *bssid; | 3722 | const u8 *ie = NULL, *bssid; |
3713 | int err, ie_len = 0; | 3723 | int err, ie_len = 0; |
3714 | u16 reason_code; | 3724 | u16 reason_code; |
3725 | bool local_state_change; | ||
3715 | 3726 | ||
3716 | if (!is_valid_ie_attr(info->attrs[NL80211_ATTR_IE])) | 3727 | if (!is_valid_ie_attr(info->attrs[NL80211_ATTR_IE])) |
3717 | return -EINVAL; | 3728 | return -EINVAL; |
@@ -3757,7 +3768,10 @@ static int nl80211_disassociate(struct sk_buff *skb, struct genl_info *info) | |||
3757 | ie_len = nla_len(info->attrs[NL80211_ATTR_IE]); | 3768 | ie_len = nla_len(info->attrs[NL80211_ATTR_IE]); |
3758 | } | 3769 | } |
3759 | 3770 | ||
3760 | err = cfg80211_mlme_disassoc(rdev, dev, bssid, ie, ie_len, reason_code); | 3771 | local_state_change = !!info->attrs[NL80211_ATTR_LOCAL_STATE_CHANGE]; |
3772 | |||
3773 | err = cfg80211_mlme_disassoc(rdev, dev, bssid, ie, ie_len, reason_code, | ||
3774 | local_state_change); | ||
3761 | 3775 | ||
3762 | out: | 3776 | out: |
3763 | cfg80211_unlock_rdev(rdev); | 3777 | cfg80211_unlock_rdev(rdev); |