diff options
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 398756c226c3..95882a788b5b 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -10821,21 +10821,18 @@ void cfg80211_ch_switch_notify(struct net_device *dev, | |||
10821 | struct wiphy *wiphy = wdev->wiphy; | 10821 | struct wiphy *wiphy = wdev->wiphy; |
10822 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 10822 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
10823 | 10823 | ||
10824 | trace_cfg80211_ch_switch_notify(dev, chandef); | 10824 | ASSERT_WDEV_LOCK(wdev); |
10825 | 10825 | ||
10826 | wdev_lock(wdev); | 10826 | trace_cfg80211_ch_switch_notify(dev, chandef); |
10827 | 10827 | ||
10828 | if (WARN_ON(wdev->iftype != NL80211_IFTYPE_AP && | 10828 | if (WARN_ON(wdev->iftype != NL80211_IFTYPE_AP && |
10829 | wdev->iftype != NL80211_IFTYPE_P2P_GO && | 10829 | wdev->iftype != NL80211_IFTYPE_P2P_GO && |
10830 | wdev->iftype != NL80211_IFTYPE_ADHOC && | 10830 | wdev->iftype != NL80211_IFTYPE_ADHOC && |
10831 | wdev->iftype != NL80211_IFTYPE_MESH_POINT)) | 10831 | wdev->iftype != NL80211_IFTYPE_MESH_POINT)) |
10832 | goto out; | 10832 | return; |
10833 | 10833 | ||
10834 | wdev->channel = chandef->chan; | 10834 | wdev->channel = chandef->chan; |
10835 | nl80211_ch_switch_notify(rdev, dev, chandef, GFP_KERNEL); | 10835 | nl80211_ch_switch_notify(rdev, dev, chandef, GFP_KERNEL); |
10836 | out: | ||
10837 | wdev_unlock(wdev); | ||
10838 | return; | ||
10839 | } | 10836 | } |
10840 | EXPORT_SYMBOL(cfg80211_ch_switch_notify); | 10837 | EXPORT_SYMBOL(cfg80211_ch_switch_notify); |
10841 | 10838 | ||