From: Johannes Berg <johannes@sipsolutions.net>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [RFC 1/2] mac80211: move ieee80211_set_channel function
Date: Fri, 11 May 2012 08:39:55 +0200 [thread overview]
Message-ID: <1336718395.4310.3.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <4FACB379.2000001@tieto.com>
On Fri, 2012-05-11 at 08:36 +0200, Michal Kazior wrote:
> Johannes Berg wrote:
> > +static int ieee80211_set_channel(struct wiphy *wiphy,
> > + struct net_device *netdev,
> > + struct ieee80211_channel *chan,
> > + enum nl80211_channel_type channel_type)
> > +{
> > + struct ieee80211_local *local = wiphy_priv(wiphy);
> > + struct ieee80211_sub_if_data *sdata = NULL;
> > +
> > + if (netdev)
> > + sdata = IEEE80211_DEV_TO_SUB_IF(netdev);
> > +
> > + switch (ieee80211_get_channel_mode(local, NULL)) {
> > + case CHAN_MODE_HOPPING:
> > + return -EBUSY;
> > + case CHAN_MODE_FIXED:
> > + if (local->oper_channel != chan)
> > + return -EBUSY;
>
>
> > + if (!sdata&& local->_oper_channel_type == channel_type)
> > + return 0;
>
> Do we need to keep this part? If not we could remove it in your:
> [RFC] mac80211: clean up ieee80211_set_channel
I think we do need to keep it.
> I think we could even remove the whole `ieee80211_get_channel_mode`
> thing now since we enforce interface combinations, right? We just need
> to adjust the interface combinations verification to refuse mixing ibss
> with anything else for the moment. That shouldn't be bad, or is it?
Somebody is going to complain if we never allow IBSS+anything any more
because IBSS has a fixed-channel mode in mac80211 which can cooperate
better.
johannes
next prev parent reply other threads:[~2012-05-11 6:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-10 20:30 [RFC 0/2] simplify AP channel setting Johannes Berg
2012-05-10 20:30 ` [RFC 1/2] mac80211: move ieee80211_set_channel function Johannes Berg
2012-05-11 6:36 ` Michal Kazior
2012-05-11 6:39 ` Johannes Berg [this message]
2012-05-10 20:30 ` [RFC 2/2] cfg80211: provide channel to start_ap function Johannes Berg
2012-05-11 9:51 ` Avinash Patil
2012-05-11 9:55 ` Johannes Berg
2012-05-11 9:56 ` Johannes Berg
2012-05-11 10:03 ` Avinash Patil
2012-05-11 10:12 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1336718395.4310.3.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=michal.kazior@tieto.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).