On Wed, Jan 16, 2013 at 11:35:59PM +0100, Johannes Berg wrote: > On Tue, 2013-01-08 at 14:04 +0100, Simon Wunderlich wrote: > > IBSS should also consider interface combinations. > > > > Signed-off-by: Simon Wunderlich <siwu@xxxxxxxxxxxxxxxxxx> > > --- > > net/wireless/nl80211.c | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c > > index 9bd8340..62e98f5 100644 > > --- a/net/wireless/nl80211.c > > +++ b/net/wireless/nl80211.c > > @@ -5463,6 +5463,7 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info) > > { > > struct cfg80211_registered_device *rdev = info->user_ptr[0]; > > struct net_device *dev = info->user_ptr[1]; > > + struct wireless_dev *wdev = dev->ieee80211_ptr; > > struct cfg80211_ibss_params ibss; > > struct wiphy *wiphy; > > struct cfg80211_cached_keys *connkeys = NULL; > > @@ -5524,6 +5525,15 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info) > > ibss.channel_fixed = !!info->attrs[NL80211_ATTR_FREQ_FIXED]; > > ibss.privacy = !!info->attrs[NL80211_ATTR_PRIVACY]; > > > > + mutex_lock(&rdev->devlist_mtx); > > + err = cfg80211_can_use_chan(rdev, wdev, ibss.chandef.chan, > > + ibss.channel_fixed ? CHAN_MODE_SHARED : > > + CHAN_MODE_EXCLUSIVE); > > + mutex_unlock(&rdev->devlist_mtx); > > + > > + if (err) > > + return -EINVAL; > > + > > This is already in __cfg80211_join_ibss() Whoops, missed that, sorry. Then we can skip this patch. Cheers, Simon
Attachment:
signature.asc
Description: Digital signature