diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2012-06-29 12:47:08 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-06-29 13:39:19 +0200 |
commit | e4e32459c2daea59516da59999706b357e6eb480 (patch) | |
tree | 110014ac72ebcf7aed16caa0fa83da75e319fa86 /net/wireless/ibss.c | |
parent | d4e50c5917e110451ced8f8de594cea858791f37 (diff) | |
download | op-kernel-dev-e4e32459c2daea59516da59999706b357e6eb480.zip op-kernel-dev-e4e32459c2daea59516da59999706b357e6eb480.tar.gz |
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/ibss.c')
-rw-r--r-- | net/wireless/ibss.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c index b90fd86..ca5672f 100644 --- a/net/wireless/ibss.c +++ b/net/wireless/ibss.c @@ -118,6 +118,16 @@ int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev, wdev->wext.ibss.channel = params->channel; #endif wdev->sme_state = CFG80211_SME_CONNECTING; + + err = cfg80211_can_use_chan(rdev, wdev, params->channel, + params->channel_fixed + ? CHAN_MODE_SHARED + : CHAN_MODE_EXCLUSIVE); + if (err) { + wdev->connect_keys = NULL; + return err; + } + err = rdev->ops->join_ibss(&rdev->wiphy, dev, params); if (err) { wdev->connect_keys = NULL; |