diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/wireless/nl80211.c | 97 |
1 files changed, 28 insertions, 69 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index a96da47d0640..ca8d04cb172f 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -411,9 +411,6 @@ static int nl80211_key_allowed(struct wireless_dev *wdev) | |||
411 | { | 411 | { |
412 | ASSERT_WDEV_LOCK(wdev); | 412 | ASSERT_WDEV_LOCK(wdev); |
413 | 413 | ||
414 | if (!netif_running(wdev->netdev)) | ||
415 | return -ENETDOWN; | ||
416 | |||
417 | switch (wdev->iftype) { | 414 | switch (wdev->iftype) { |
418 | case NL80211_IFTYPE_AP: | 415 | case NL80211_IFTYPE_AP: |
419 | case NL80211_IFTYPE_AP_VLAN: | 416 | case NL80211_IFTYPE_AP_VLAN: |
@@ -2083,11 +2080,6 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info) | |||
2083 | goto out; | 2080 | goto out; |
2084 | } | 2081 | } |
2085 | 2082 | ||
2086 | if (!netif_running(dev)) { | ||
2087 | err = -ENETDOWN; | ||
2088 | goto out; | ||
2089 | } | ||
2090 | |||
2091 | err = rdev->ops->add_station(&rdev->wiphy, dev, mac_addr, ¶ms); | 2083 | err = rdev->ops->add_station(&rdev->wiphy, dev, mac_addr, ¶ms); |
2092 | 2084 | ||
2093 | out: | 2085 | out: |
@@ -2301,9 +2293,6 @@ static int nl80211_set_mpath(struct sk_buff *skb, struct genl_info *info) | |||
2301 | if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_MESH_POINT) | 2293 | if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_MESH_POINT) |
2302 | return -EOPNOTSUPP; | 2294 | return -EOPNOTSUPP; |
2303 | 2295 | ||
2304 | if (!netif_running(dev)) | ||
2305 | return -ENETDOWN; | ||
2306 | |||
2307 | return rdev->ops->change_mpath(&rdev->wiphy, dev, dst, next_hop); | 2296 | return rdev->ops->change_mpath(&rdev->wiphy, dev, dst, next_hop); |
2308 | } | 2297 | } |
2309 | 2298 | ||
@@ -2329,9 +2318,6 @@ static int nl80211_new_mpath(struct sk_buff *skb, struct genl_info *info) | |||
2329 | if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_MESH_POINT) | 2318 | if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_MESH_POINT) |
2330 | return -EOPNOTSUPP; | 2319 | return -EOPNOTSUPP; |
2331 | 2320 | ||
2332 | if (!netif_running(dev)) | ||
2333 | return -ENETDOWN; | ||
2334 | |||
2335 | return rdev->ops->add_mpath(&rdev->wiphy, dev, dst, next_hop); | 2321 | return rdev->ops->add_mpath(&rdev->wiphy, dev, dst, next_hop); |
2336 | } | 2322 | } |
2337 | 2323 | ||
@@ -2823,9 +2809,6 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) | |||
2823 | if (!rdev->ops->scan) | 2809 | if (!rdev->ops->scan) |
2824 | return -EOPNOTSUPP; | 2810 | return -EOPNOTSUPP; |
2825 | 2811 | ||
2826 | if (!netif_running(dev)) | ||
2827 | return -ENETDOWN; | ||
2828 | |||
2829 | if (rdev->scan_req) | 2812 | if (rdev->scan_req) |
2830 | return -EBUSY; | 2813 | return -EBUSY; |
2831 | 2814 | ||
@@ -3296,9 +3279,6 @@ static int nl80211_authenticate(struct sk_buff *skb, struct genl_info *info) | |||
3296 | dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_CLIENT) | 3279 | dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_CLIENT) |
3297 | return -EOPNOTSUPP; | 3280 | return -EOPNOTSUPP; |
3298 | 3281 | ||
3299 | if (!netif_running(dev)) | ||
3300 | return -ENETDOWN; | ||
3301 | |||
3302 | bssid = nla_data(info->attrs[NL80211_ATTR_MAC]); | 3282 | bssid = nla_data(info->attrs[NL80211_ATTR_MAC]); |
3303 | chan = ieee80211_get_channel(&rdev->wiphy, | 3283 | chan = ieee80211_get_channel(&rdev->wiphy, |
3304 | nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ])); | 3284 | nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ])); |
@@ -3429,9 +3409,6 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info) | |||
3429 | dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_CLIENT) | 3409 | dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_CLIENT) |
3430 | return -EOPNOTSUPP; | 3410 | return -EOPNOTSUPP; |
3431 | 3411 | ||
3432 | if (!netif_running(dev)) | ||
3433 | return -ENETDOWN; | ||
3434 | |||
3435 | bssid = nla_data(info->attrs[NL80211_ATTR_MAC]); | 3412 | bssid = nla_data(info->attrs[NL80211_ATTR_MAC]); |
3436 | 3413 | ||
3437 | chan = ieee80211_get_channel(&rdev->wiphy, | 3414 | chan = ieee80211_get_channel(&rdev->wiphy, |
@@ -3493,9 +3470,6 @@ static int nl80211_deauthenticate(struct sk_buff *skb, struct genl_info *info) | |||
3493 | dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_CLIENT) | 3470 | dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_CLIENT) |
3494 | return -EOPNOTSUPP; | 3471 | return -EOPNOTSUPP; |
3495 | 3472 | ||
3496 | if (!netif_running(dev)) | ||
3497 | return -ENETDOWN; | ||
3498 | |||
3499 | bssid = nla_data(info->attrs[NL80211_ATTR_MAC]); | 3473 | bssid = nla_data(info->attrs[NL80211_ATTR_MAC]); |
3500 | 3474 | ||
3501 | reason_code = nla_get_u16(info->attrs[NL80211_ATTR_REASON_CODE]); | 3475 | reason_code = nla_get_u16(info->attrs[NL80211_ATTR_REASON_CODE]); |
@@ -3540,9 +3514,6 @@ static int nl80211_disassociate(struct sk_buff *skb, struct genl_info *info) | |||
3540 | dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_CLIENT) | 3514 | dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_CLIENT) |
3541 | return -EOPNOTSUPP; | 3515 | return -EOPNOTSUPP; |
3542 | 3516 | ||
3543 | if (!netif_running(dev)) | ||
3544 | return -ENETDOWN; | ||
3545 | |||
3546 | bssid = nla_data(info->attrs[NL80211_ATTR_MAC]); | 3517 | bssid = nla_data(info->attrs[NL80211_ATTR_MAC]); |
3547 | 3518 | ||
3548 | reason_code = nla_get_u16(info->attrs[NL80211_ATTR_REASON_CODE]); | 3519 | reason_code = nla_get_u16(info->attrs[NL80211_ATTR_REASON_CODE]); |
@@ -3596,9 +3567,6 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info) | |||
3596 | if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_ADHOC) | 3567 | if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_ADHOC) |
3597 | return -EOPNOTSUPP; | 3568 | return -EOPNOTSUPP; |
3598 | 3569 | ||
3599 | if (!netif_running(dev)) | ||
3600 | return -ENETDOWN; | ||
3601 | |||
3602 | wiphy = &rdev->wiphy; | 3570 | wiphy = &rdev->wiphy; |
3603 | 3571 | ||
3604 | if (info->attrs[NL80211_ATTR_MAC]) | 3572 | if (info->attrs[NL80211_ATTR_MAC]) |
@@ -3673,9 +3641,6 @@ static int nl80211_leave_ibss(struct sk_buff *skb, struct genl_info *info) | |||
3673 | if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_ADHOC) | 3641 | if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_ADHOC) |
3674 | return -EOPNOTSUPP; | 3642 | return -EOPNOTSUPP; |
3675 | 3643 | ||
3676 | if (!netif_running(dev)) | ||
3677 | return -ENETDOWN; | ||
3678 | |||
3679 | return cfg80211_leave_ibss(rdev, dev, false); | 3644 | return cfg80211_leave_ibss(rdev, dev, false); |
3680 | } | 3645 | } |
3681 | 3646 | ||
@@ -3826,9 +3791,6 @@ static int nl80211_connect(struct sk_buff *skb, struct genl_info *info) | |||
3826 | dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_CLIENT) | 3791 | dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_CLIENT) |
3827 | return -EOPNOTSUPP; | 3792 | return -EOPNOTSUPP; |
3828 | 3793 | ||
3829 | if (!netif_running(dev)) | ||
3830 | return -ENETDOWN; | ||
3831 | |||
3832 | wiphy = &rdev->wiphy; | 3794 | wiphy = &rdev->wiphy; |
3833 | 3795 | ||
3834 | if (info->attrs[NL80211_ATTR_MAC]) | 3796 | if (info->attrs[NL80211_ATTR_MAC]) |
@@ -3881,9 +3843,6 @@ static int nl80211_disconnect(struct sk_buff *skb, struct genl_info *info) | |||
3881 | dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_CLIENT) | 3843 | dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_CLIENT) |
3882 | return -EOPNOTSUPP; | 3844 | return -EOPNOTSUPP; |
3883 | 3845 | ||
3884 | if (!netif_running(dev)) | ||
3885 | return -ENETDOWN; | ||
3886 | |||
3887 | return cfg80211_disconnect(rdev, dev, reason, true); | 3846 | return cfg80211_disconnect(rdev, dev, reason, true); |
3888 | } | 3847 | } |
3889 | 3848 | ||
@@ -3998,9 +3957,6 @@ static int nl80211_remain_on_channel(struct sk_buff *skb, | |||
3998 | if (!rdev->ops->remain_on_channel) | 3957 | if (!rdev->ops->remain_on_channel) |
3999 | return -EOPNOTSUPP; | 3958 | return -EOPNOTSUPP; |
4000 | 3959 | ||
4001 | if (!netif_running(dev)) | ||
4002 | return -ENETDOWN; | ||
4003 | |||
4004 | if (info->attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE]) { | 3960 | if (info->attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE]) { |
4005 | channel_type = nla_get_u32( | 3961 | channel_type = nla_get_u32( |
4006 | info->attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE]); | 3962 | info->attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE]); |
@@ -4060,9 +4016,6 @@ static int nl80211_cancel_remain_on_channel(struct sk_buff *skb, | |||
4060 | if (!rdev->ops->cancel_remain_on_channel) | 4016 | if (!rdev->ops->cancel_remain_on_channel) |
4061 | return -EOPNOTSUPP; | 4017 | return -EOPNOTSUPP; |
4062 | 4018 | ||
4063 | if (!netif_running(dev)) | ||
4064 | return -ENETDOWN; | ||
4065 | |||
4066 | cookie = nla_get_u64(info->attrs[NL80211_ATTR_COOKIE]); | 4019 | cookie = nla_get_u64(info->attrs[NL80211_ATTR_COOKIE]); |
4067 | 4020 | ||
4068 | return rdev->ops->cancel_remain_on_channel(&rdev->wiphy, dev, cookie); | 4021 | return rdev->ops->cancel_remain_on_channel(&rdev->wiphy, dev, cookie); |
@@ -4207,9 +4160,6 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info) | |||
4207 | dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO) | 4160 | dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO) |
4208 | return -EOPNOTSUPP; | 4161 | return -EOPNOTSUPP; |
4209 | 4162 | ||
4210 | if (!netif_running(dev)) | ||
4211 | return -ENETDOWN; | ||
4212 | |||
4213 | if (info->attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE]) { | 4163 | if (info->attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE]) { |
4214 | channel_type = nla_get_u32( | 4164 | channel_type = nla_get_u32( |
4215 | info->attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE]); | 4165 | info->attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE]); |
@@ -4398,6 +4348,9 @@ out: | |||
4398 | #define NL80211_FLAG_NEED_WIPHY 0x01 | 4348 | #define NL80211_FLAG_NEED_WIPHY 0x01 |
4399 | #define NL80211_FLAG_NEED_NETDEV 0x02 | 4349 | #define NL80211_FLAG_NEED_NETDEV 0x02 |
4400 | #define NL80211_FLAG_NEED_RTNL 0x04 | 4350 | #define NL80211_FLAG_NEED_RTNL 0x04 |
4351 | #define NL80211_FLAG_CHECK_NETDEV_UP 0x08 | ||
4352 | #define NL80211_FLAG_NEED_NETDEV_UP (NL80211_FLAG_NEED_NETDEV |\ | ||
4353 | NL80211_FLAG_CHECK_NETDEV_UP) | ||
4401 | 4354 | ||
4402 | static int nl80211_pre_doit(struct genl_ops *ops, struct sk_buff *skb, | 4355 | static int nl80211_pre_doit(struct genl_ops *ops, struct sk_buff *skb, |
4403 | struct genl_info *info) | 4356 | struct genl_info *info) |
@@ -4425,6 +4378,12 @@ static int nl80211_pre_doit(struct genl_ops *ops, struct sk_buff *skb, | |||
4425 | rtnl_unlock(); | 4378 | rtnl_unlock(); |
4426 | return err; | 4379 | return err; |
4427 | } | 4380 | } |
4381 | if (ops->internal_flags & NL80211_FLAG_CHECK_NETDEV_UP && | ||
4382 | !netif_running(dev)) { | ||
4383 | if (rtnl) | ||
4384 | rtnl_unlock(); | ||
4385 | return -ENETDOWN; | ||
4386 | } | ||
4428 | info->user_ptr[0] = rdev; | 4387 | info->user_ptr[0] = rdev; |
4429 | info->user_ptr[1] = dev; | 4388 | info->user_ptr[1] = dev; |
4430 | } | 4389 | } |
@@ -4504,7 +4463,7 @@ static struct genl_ops nl80211_ops[] = { | |||
4504 | .doit = nl80211_set_key, | 4463 | .doit = nl80211_set_key, |
4505 | .policy = nl80211_policy, | 4464 | .policy = nl80211_policy, |
4506 | .flags = GENL_ADMIN_PERM, | 4465 | .flags = GENL_ADMIN_PERM, |
4507 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 4466 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4508 | NL80211_FLAG_NEED_RTNL, | 4467 | NL80211_FLAG_NEED_RTNL, |
4509 | }, | 4468 | }, |
4510 | { | 4469 | { |
@@ -4512,7 +4471,7 @@ static struct genl_ops nl80211_ops[] = { | |||
4512 | .doit = nl80211_new_key, | 4471 | .doit = nl80211_new_key, |
4513 | .policy = nl80211_policy, | 4472 | .policy = nl80211_policy, |
4514 | .flags = GENL_ADMIN_PERM, | 4473 | .flags = GENL_ADMIN_PERM, |
4515 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 4474 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4516 | NL80211_FLAG_NEED_RTNL, | 4475 | NL80211_FLAG_NEED_RTNL, |
4517 | }, | 4476 | }, |
4518 | { | 4477 | { |
@@ -4520,7 +4479,7 @@ static struct genl_ops nl80211_ops[] = { | |||
4520 | .doit = nl80211_del_key, | 4479 | .doit = nl80211_del_key, |
4521 | .policy = nl80211_policy, | 4480 | .policy = nl80211_policy, |
4522 | .flags = GENL_ADMIN_PERM, | 4481 | .flags = GENL_ADMIN_PERM, |
4523 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 4482 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4524 | NL80211_FLAG_NEED_RTNL, | 4483 | NL80211_FLAG_NEED_RTNL, |
4525 | }, | 4484 | }, |
4526 | { | 4485 | { |
@@ -4568,7 +4527,7 @@ static struct genl_ops nl80211_ops[] = { | |||
4568 | .doit = nl80211_new_station, | 4527 | .doit = nl80211_new_station, |
4569 | .policy = nl80211_policy, | 4528 | .policy = nl80211_policy, |
4570 | .flags = GENL_ADMIN_PERM, | 4529 | .flags = GENL_ADMIN_PERM, |
4571 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 4530 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4572 | NL80211_FLAG_NEED_RTNL, | 4531 | NL80211_FLAG_NEED_RTNL, |
4573 | }, | 4532 | }, |
4574 | { | 4533 | { |
@@ -4585,7 +4544,7 @@ static struct genl_ops nl80211_ops[] = { | |||
4585 | .dumpit = nl80211_dump_mpath, | 4544 | .dumpit = nl80211_dump_mpath, |
4586 | .policy = nl80211_policy, | 4545 | .policy = nl80211_policy, |
4587 | .flags = GENL_ADMIN_PERM, | 4546 | .flags = GENL_ADMIN_PERM, |
4588 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 4547 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4589 | NL80211_FLAG_NEED_RTNL, | 4548 | NL80211_FLAG_NEED_RTNL, |
4590 | }, | 4549 | }, |
4591 | { | 4550 | { |
@@ -4593,7 +4552,7 @@ static struct genl_ops nl80211_ops[] = { | |||
4593 | .doit = nl80211_set_mpath, | 4552 | .doit = nl80211_set_mpath, |
4594 | .policy = nl80211_policy, | 4553 | .policy = nl80211_policy, |
4595 | .flags = GENL_ADMIN_PERM, | 4554 | .flags = GENL_ADMIN_PERM, |
4596 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 4555 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4597 | NL80211_FLAG_NEED_RTNL, | 4556 | NL80211_FLAG_NEED_RTNL, |
4598 | }, | 4557 | }, |
4599 | { | 4558 | { |
@@ -4601,7 +4560,7 @@ static struct genl_ops nl80211_ops[] = { | |||
4601 | .doit = nl80211_new_mpath, | 4560 | .doit = nl80211_new_mpath, |
4602 | .policy = nl80211_policy, | 4561 | .policy = nl80211_policy, |
4603 | .flags = GENL_ADMIN_PERM, | 4562 | .flags = GENL_ADMIN_PERM, |
4604 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 4563 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4605 | NL80211_FLAG_NEED_RTNL, | 4564 | NL80211_FLAG_NEED_RTNL, |
4606 | }, | 4565 | }, |
4607 | { | 4566 | { |
@@ -4659,7 +4618,7 @@ static struct genl_ops nl80211_ops[] = { | |||
4659 | .doit = nl80211_trigger_scan, | 4618 | .doit = nl80211_trigger_scan, |
4660 | .policy = nl80211_policy, | 4619 | .policy = nl80211_policy, |
4661 | .flags = GENL_ADMIN_PERM, | 4620 | .flags = GENL_ADMIN_PERM, |
4662 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 4621 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4663 | NL80211_FLAG_NEED_RTNL, | 4622 | NL80211_FLAG_NEED_RTNL, |
4664 | }, | 4623 | }, |
4665 | { | 4624 | { |
@@ -4672,7 +4631,7 @@ static struct genl_ops nl80211_ops[] = { | |||
4672 | .doit = nl80211_authenticate, | 4631 | .doit = nl80211_authenticate, |
4673 | .policy = nl80211_policy, | 4632 | .policy = nl80211_policy, |
4674 | .flags = GENL_ADMIN_PERM, | 4633 | .flags = GENL_ADMIN_PERM, |
4675 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 4634 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4676 | NL80211_FLAG_NEED_RTNL, | 4635 | NL80211_FLAG_NEED_RTNL, |
4677 | }, | 4636 | }, |
4678 | { | 4637 | { |
@@ -4680,7 +4639,7 @@ static struct genl_ops nl80211_ops[] = { | |||
4680 | .doit = nl80211_associate, | 4639 | .doit = nl80211_associate, |
4681 | .policy = nl80211_policy, | 4640 | .policy = nl80211_policy, |
4682 | .flags = GENL_ADMIN_PERM, | 4641 | .flags = GENL_ADMIN_PERM, |
4683 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 4642 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4684 | NL80211_FLAG_NEED_RTNL, | 4643 | NL80211_FLAG_NEED_RTNL, |
4685 | }, | 4644 | }, |
4686 | { | 4645 | { |
@@ -4688,7 +4647,7 @@ static struct genl_ops nl80211_ops[] = { | |||
4688 | .doit = nl80211_deauthenticate, | 4647 | .doit = nl80211_deauthenticate, |
4689 | .policy = nl80211_policy, | 4648 | .policy = nl80211_policy, |
4690 | .flags = GENL_ADMIN_PERM, | 4649 | .flags = GENL_ADMIN_PERM, |
4691 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 4650 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4692 | NL80211_FLAG_NEED_RTNL, | 4651 | NL80211_FLAG_NEED_RTNL, |
4693 | }, | 4652 | }, |
4694 | { | 4653 | { |
@@ -4696,7 +4655,7 @@ static struct genl_ops nl80211_ops[] = { | |||
4696 | .doit = nl80211_disassociate, | 4655 | .doit = nl80211_disassociate, |
4697 | .policy = nl80211_policy, | 4656 | .policy = nl80211_policy, |
4698 | .flags = GENL_ADMIN_PERM, | 4657 | .flags = GENL_ADMIN_PERM, |
4699 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 4658 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4700 | NL80211_FLAG_NEED_RTNL, | 4659 | NL80211_FLAG_NEED_RTNL, |
4701 | }, | 4660 | }, |
4702 | { | 4661 | { |
@@ -4704,7 +4663,7 @@ static struct genl_ops nl80211_ops[] = { | |||
4704 | .doit = nl80211_join_ibss, | 4663 | .doit = nl80211_join_ibss, |
4705 | .policy = nl80211_policy, | 4664 | .policy = nl80211_policy, |
4706 | .flags = GENL_ADMIN_PERM, | 4665 | .flags = GENL_ADMIN_PERM, |
4707 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 4666 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4708 | NL80211_FLAG_NEED_RTNL, | 4667 | NL80211_FLAG_NEED_RTNL, |
4709 | }, | 4668 | }, |
4710 | { | 4669 | { |
@@ -4712,7 +4671,7 @@ static struct genl_ops nl80211_ops[] = { | |||
4712 | .doit = nl80211_leave_ibss, | 4671 | .doit = nl80211_leave_ibss, |
4713 | .policy = nl80211_policy, | 4672 | .policy = nl80211_policy, |
4714 | .flags = GENL_ADMIN_PERM, | 4673 | .flags = GENL_ADMIN_PERM, |
4715 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 4674 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4716 | NL80211_FLAG_NEED_RTNL, | 4675 | NL80211_FLAG_NEED_RTNL, |
4717 | }, | 4676 | }, |
4718 | #ifdef CONFIG_NL80211_TESTMODE | 4677 | #ifdef CONFIG_NL80211_TESTMODE |
@@ -4730,7 +4689,7 @@ static struct genl_ops nl80211_ops[] = { | |||
4730 | .doit = nl80211_connect, | 4689 | .doit = nl80211_connect, |
4731 | .policy = nl80211_policy, | 4690 | .policy = nl80211_policy, |
4732 | .flags = GENL_ADMIN_PERM, | 4691 | .flags = GENL_ADMIN_PERM, |
4733 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 4692 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4734 | NL80211_FLAG_NEED_RTNL, | 4693 | NL80211_FLAG_NEED_RTNL, |
4735 | }, | 4694 | }, |
4736 | { | 4695 | { |
@@ -4738,7 +4697,7 @@ static struct genl_ops nl80211_ops[] = { | |||
4738 | .doit = nl80211_disconnect, | 4697 | .doit = nl80211_disconnect, |
4739 | .policy = nl80211_policy, | 4698 | .policy = nl80211_policy, |
4740 | .flags = GENL_ADMIN_PERM, | 4699 | .flags = GENL_ADMIN_PERM, |
4741 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 4700 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4742 | NL80211_FLAG_NEED_RTNL, | 4701 | NL80211_FLAG_NEED_RTNL, |
4743 | }, | 4702 | }, |
4744 | { | 4703 | { |
@@ -4783,7 +4742,7 @@ static struct genl_ops nl80211_ops[] = { | |||
4783 | .doit = nl80211_remain_on_channel, | 4742 | .doit = nl80211_remain_on_channel, |
4784 | .policy = nl80211_policy, | 4743 | .policy = nl80211_policy, |
4785 | .flags = GENL_ADMIN_PERM, | 4744 | .flags = GENL_ADMIN_PERM, |
4786 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 4745 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4787 | NL80211_FLAG_NEED_RTNL, | 4746 | NL80211_FLAG_NEED_RTNL, |
4788 | }, | 4747 | }, |
4789 | { | 4748 | { |
@@ -4791,7 +4750,7 @@ static struct genl_ops nl80211_ops[] = { | |||
4791 | .doit = nl80211_cancel_remain_on_channel, | 4750 | .doit = nl80211_cancel_remain_on_channel, |
4792 | .policy = nl80211_policy, | 4751 | .policy = nl80211_policy, |
4793 | .flags = GENL_ADMIN_PERM, | 4752 | .flags = GENL_ADMIN_PERM, |
4794 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 4753 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4795 | NL80211_FLAG_NEED_RTNL, | 4754 | NL80211_FLAG_NEED_RTNL, |
4796 | }, | 4755 | }, |
4797 | { | 4756 | { |
@@ -4815,7 +4774,7 @@ static struct genl_ops nl80211_ops[] = { | |||
4815 | .doit = nl80211_tx_mgmt, | 4774 | .doit = nl80211_tx_mgmt, |
4816 | .policy = nl80211_policy, | 4775 | .policy = nl80211_policy, |
4817 | .flags = GENL_ADMIN_PERM, | 4776 | .flags = GENL_ADMIN_PERM, |
4818 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 4777 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |
4819 | NL80211_FLAG_NEED_RTNL, | 4778 | NL80211_FLAG_NEED_RTNL, |
4820 | }, | 4779 | }, |
4821 | { | 4780 | { |