diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2012-06-29 06:47:08 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-06-29 07:39:19 -0400 |
commit | e4e32459c2daea59516da59999706b357e6eb480 (patch) | |
tree | 110014ac72ebcf7aed16caa0fa83da75e319fa86 /net/wireless/nl80211.c | |
parent | d4e50c5917e110451ced8f8de594cea858791f37 (diff) |
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/nl80211.c')
-rw-r--r-- | net/wireless/nl80211.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 5d29ed1f7c62..77102e66f1ea 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -2478,6 +2478,14 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info) | |||
2478 | params.channel_type)) | 2478 | params.channel_type)) |
2479 | return -EINVAL; | 2479 | return -EINVAL; |
2480 | 2480 | ||
2481 | mutex_lock(&rdev->devlist_mtx); | ||
2482 | err = cfg80211_can_use_chan(rdev, wdev, params.channel, | ||
2483 | CHAN_MODE_SHARED); | ||
2484 | mutex_unlock(&rdev->devlist_mtx); | ||
2485 | |||
2486 | if (err) | ||
2487 | return err; | ||
2488 | |||
2481 | err = rdev->ops->start_ap(&rdev->wiphy, dev, ¶ms); | 2489 | err = rdev->ops->start_ap(&rdev->wiphy, dev, ¶ms); |
2482 | if (!err) { | 2490 | if (!err) { |
2483 | wdev->preset_chan = params.channel; | 2491 | wdev->preset_chan = params.channel; |