diff options
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r-- | net/wireless/core.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index 7f7b9409bf4c..d25c82bc1bbe 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -3,6 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net> | 4 | * Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net> |
5 | * Copyright 2013-2014 Intel Mobile Communications GmbH | 5 | * Copyright 2013-2014 Intel Mobile Communications GmbH |
6 | * Copyright 2015 Intel Deutschland GmbH | ||
6 | */ | 7 | */ |
7 | 8 | ||
8 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 9 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
@@ -157,7 +158,7 @@ int cfg80211_switch_netns(struct cfg80211_registered_device *rdev, | |||
157 | if (!(rdev->wiphy.flags & WIPHY_FLAG_NETNS_OK)) | 158 | if (!(rdev->wiphy.flags & WIPHY_FLAG_NETNS_OK)) |
158 | return -EOPNOTSUPP; | 159 | return -EOPNOTSUPP; |
159 | 160 | ||
160 | list_for_each_entry(wdev, &rdev->wdev_list, list) { | 161 | list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) { |
161 | if (!wdev->netdev) | 162 | if (!wdev->netdev) |
162 | continue; | 163 | continue; |
163 | wdev->netdev->features &= ~NETIF_F_NETNS_LOCAL; | 164 | wdev->netdev->features &= ~NETIF_F_NETNS_LOCAL; |
@@ -171,7 +172,8 @@ int cfg80211_switch_netns(struct cfg80211_registered_device *rdev, | |||
171 | /* failed -- clean up to old netns */ | 172 | /* failed -- clean up to old netns */ |
172 | net = wiphy_net(&rdev->wiphy); | 173 | net = wiphy_net(&rdev->wiphy); |
173 | 174 | ||
174 | list_for_each_entry_continue_reverse(wdev, &rdev->wdev_list, | 175 | list_for_each_entry_continue_reverse(wdev, |
176 | &rdev->wiphy.wdev_list, | ||
175 | list) { | 177 | list) { |
176 | if (!wdev->netdev) | 178 | if (!wdev->netdev) |
177 | continue; | 179 | continue; |
@@ -230,7 +232,7 @@ void cfg80211_shutdown_all_interfaces(struct wiphy *wiphy) | |||
230 | 232 | ||
231 | ASSERT_RTNL(); | 233 | ASSERT_RTNL(); |
232 | 234 | ||
233 | list_for_each_entry(wdev, &rdev->wdev_list, list) { | 235 | list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) { |
234 | if (wdev->netdev) { | 236 | if (wdev->netdev) { |
235 | dev_close(wdev->netdev); | 237 | dev_close(wdev->netdev); |
236 | continue; | 238 | continue; |
@@ -298,7 +300,8 @@ void cfg80211_destroy_ifaces(struct cfg80211_registered_device *rdev) | |||
298 | kfree(item); | 300 | kfree(item); |
299 | spin_unlock_irq(&rdev->destroy_list_lock); | 301 | spin_unlock_irq(&rdev->destroy_list_lock); |
300 | 302 | ||
301 | list_for_each_entry_safe(wdev, tmp, &rdev->wdev_list, list) { | 303 | list_for_each_entry_safe(wdev, tmp, |
304 | &rdev->wiphy.wdev_list, list) { | ||
302 | if (nlportid == wdev->owner_nlportid) | 305 | if (nlportid == wdev->owner_nlportid) |
303 | rdev_del_virtual_intf(rdev, wdev); | 306 | rdev_del_virtual_intf(rdev, wdev); |
304 | } | 307 | } |
@@ -410,7 +413,7 @@ use_default_name: | |||
410 | dev_set_name(&rdev->wiphy.dev, PHY_NAME "%d", rdev->wiphy_idx); | 413 | dev_set_name(&rdev->wiphy.dev, PHY_NAME "%d", rdev->wiphy_idx); |
411 | } | 414 | } |
412 | 415 | ||
413 | INIT_LIST_HEAD(&rdev->wdev_list); | 416 | INIT_LIST_HEAD(&rdev->wiphy.wdev_list); |
414 | INIT_LIST_HEAD(&rdev->beacon_registrations); | 417 | INIT_LIST_HEAD(&rdev->beacon_registrations); |
415 | spin_lock_init(&rdev->beacon_registrations_lock); | 418 | spin_lock_init(&rdev->beacon_registrations_lock); |
416 | spin_lock_init(&rdev->bss_lock); | 419 | spin_lock_init(&rdev->bss_lock); |
@@ -799,7 +802,7 @@ void wiphy_unregister(struct wiphy *wiphy) | |||
799 | nl80211_notify_wiphy(rdev, NL80211_CMD_DEL_WIPHY); | 802 | nl80211_notify_wiphy(rdev, NL80211_CMD_DEL_WIPHY); |
800 | rdev->wiphy.registered = false; | 803 | rdev->wiphy.registered = false; |
801 | 804 | ||
802 | WARN_ON(!list_empty(&rdev->wdev_list)); | 805 | WARN_ON(!list_empty(&rdev->wiphy.wdev_list)); |
803 | 806 | ||
804 | /* | 807 | /* |
805 | * First remove the hardware from everywhere, this makes | 808 | * First remove the hardware from everywhere, this makes |
@@ -1021,7 +1024,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb, | |||
1021 | spin_lock_init(&wdev->mgmt_registrations_lock); | 1024 | spin_lock_init(&wdev->mgmt_registrations_lock); |
1022 | 1025 | ||
1023 | wdev->identifier = ++rdev->wdev_id; | 1026 | wdev->identifier = ++rdev->wdev_id; |
1024 | list_add_rcu(&wdev->list, &rdev->wdev_list); | 1027 | list_add_rcu(&wdev->list, &rdev->wiphy.wdev_list); |
1025 | rdev->devlist_generation++; | 1028 | rdev->devlist_generation++; |
1026 | /* can only change netns with wiphy */ | 1029 | /* can only change netns with wiphy */ |
1027 | dev->features |= NETIF_F_NETNS_LOCAL; | 1030 | dev->features |= NETIF_F_NETNS_LOCAL; |