summaryrefslogtreecommitdiff
path: root/net/wireless/core.c
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2012-06-29 14:47:08 +0400
committerJohannes Berg <johannes.berg@intel.com>2012-06-29 15:39:19 +0400
commite4e32459c2daea59516da59999706b357e6eb480 (patch)
tree110014ac72ebcf7aed16caa0fa83da75e319fa86 /net/wireless/core.c
parentd4e50c5917e110451ced8f8de594cea858791f37 (diff)
downloadlinux-e4e32459c2daea59516da59999706b357e6eb480.tar.xz
cfg80211: respect iface combinations when starting operation
devlist_mtx locking is changed to accomodate changes. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r--net/wireless/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index b26695ad3e97..ca2b95f24846 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -990,7 +990,9 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
return notifier_from_errno(-EOPNOTSUPP);
if (rfkill_blocked(rdev->rfkill))
return notifier_from_errno(-ERFKILL);
+ mutex_lock(&rdev->devlist_mtx);
ret = cfg80211_can_add_interface(rdev, wdev->iftype);
+ mutex_unlock(&rdev->devlist_mtx);
if (ret)
return notifier_from_errno(ret);
cfg80211_lock_rdev(rdev);