summaryrefslogtreecommitdiff
path: root/net/wireless/core.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2011-09-05 12:52:08 +0900
committerPaul Mundt <lethal@linux-sh.org>2011-09-05 12:52:08 +0900
commitf5a18f932e051ff0f19dcd80a421a4dd9b11f10f (patch)
tree9189ffc9fa735e5297ed8c3678a9463e8dbb1561 /net/wireless/core.c
parentb9a3acf46afdafc601947136f63e9dd228cd86e8 (diff)
parent9e79e3e9dd9672b37ac9412e9a926714306551fe (diff)
downloadlwn-f5a18f932e051ff0f19dcd80a421a4dd9b11f10f.tar.gz
lwn-f5a18f932e051ff0f19dcd80a421a4dd9b11f10f.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into sh-latest
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r--net/wireless/core.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 645437cfc464..c14865172da7 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -616,6 +616,9 @@ int wiphy_register(struct wiphy *wiphy)
if (res)
goto out_rm_dev;
+ rtnl_lock();
+ rdev->wiphy.registered = true;
+ rtnl_unlock();
return 0;
out_rm_dev:
@@ -647,6 +650,10 @@ void wiphy_unregister(struct wiphy *wiphy)
{
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
+ rtnl_lock();
+ rdev->wiphy.registered = false;
+ rtnl_unlock();
+
rfkill_unregister(rdev->rfkill);
/* protect the device list */