linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Arik Nemtsov <arik@wizery.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC 20/20] mac80211: use channel contexts
Date: Mon, 06 Aug 2012 17:26:08 +0200	[thread overview]
Message-ID: <1344266768.4807.6.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <CA+XVXfc2QZTrWnp07oQdfNi4LwyT76ibEYDycpL8Sj5aR=_odA@mail.gmail.com> (sfid-20120806_172217_281524_60D3C550)

On Mon, 2012-08-06 at 18:21 +0300, Arik Nemtsov wrote:

> >  static int ieee80211_set_monitor_channel(struct wiphy *wiphy,
> >                                          struct ieee80211_channel *chan,
> >                                          enum nl80211_channel_type channel_type)
> >  {
> > -       return ieee80211_set_channel(wiphy, NULL, chan, channel_type);
> > +       return 0;
> > +//return ieee80211_set_channel(wiphy, NULL, chan, channel_type);
> 
> typo?
> 
> [...]

More "todo", but this was indeed missing. I have addressed it in my new
versions in the mac80211-next/wip branch.

> > @@ -1278,11 +1271,6 @@ int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,
> >         if (type == ieee80211_vif_type_p2p(&sdata->vif))
> >                 return 0;
> >
> > -       /* Setting ad-hoc mode on non-IBSS channel is not supported. */
> > -       if (sdata->local->oper_channel->flags & IEEE80211_CHAN_NO_IBSS &&
> > -           type == NL80211_IFTYPE_ADHOC)
> > -               return -EOPNOTSUPP;
> > -
> >         if (ieee80211_sdata_running(sdata)) {
> >                 ret = ieee80211_runtime_change_iftype(sdata, type);
> >                 if (ret)
> > @@ -1294,9 +1282,6 @@ int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,
> >         }
> >
> >         /* reset some values that shouldn't be kept across type changes */
> > -       sdata->vif.bss_conf.basic_rates =
> > -               ieee80211_mandatory_rates(sdata->local,
> > -                       sdata->local->oper_channel->band);
> 
> was this a bug? shouldn't be updated to use the channel context?

Well, the first was a leftover from before we even had an explicit IBSS
join operation -- now the (default) channel is just checked when you try
to join an IBSS, so the code in the first hunk has truly been
unnecessary for quite a while.

The second hunk ... similar story, it should be set whenever we first
use the interface by starting AP, joining IBSS or connecting to an AP or
mesh or whatever else could happen. So I think it should be safe.

johannes


  reply	other threads:[~2012-08-06 15:26 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-27 11:16 [RFC 00/20] mac80211: multi-channel work Johannes Berg
2012-07-27 11:16 ` [RFC 01/20] mac80211: introduce channel context skeleton code Johannes Berg
2012-07-27 11:16 ` [RFC 02/20] mac80211: introduce new ieee80211_ops Johannes Berg
2012-07-27 11:16 ` [RFC 03/20] mac80211: add drv_* wrappers for channel contexts Johannes Berg
2012-07-27 18:08   ` Joe Perches
2012-07-27 21:03     ` Johannes Berg
2012-07-27 11:16 ` [RFC 04/20] mac80211: add chanctx tracing Johannes Berg
2012-07-27 11:16 ` [RFC 05/20] mac80211: use channel context notifications Johannes Berg
2012-07-27 11:16 ` [RFC 06/20] mac80211: refactor set_channel_type Johannes Berg
2012-07-29  9:03   ` Eliad Peller
2012-07-27 11:16 ` [RFC 07/20] mac80211: reuse channels for channel contexts Johannes Berg
2012-07-27 11:16 ` [RFC 08/20] mac80211: mesh: don't use global channel type Johannes Berg
2012-07-27 11:16 ` [RFC 09/20] mac80211: remove almost unused local variable Johannes Berg
2012-07-27 11:16 ` [RFC 10/20] mac80211: remove freq/chantype from debugfs Johannes Berg
2012-07-27 11:16 ` [RFC 11/20] mac80211: use oper_channel in rate init Johannes Berg
2012-07-27 11:16 ` [RFC 12/20] mac80211: don't assume channel is set in tracing Johannes Berg
2012-07-27 11:16 ` [RFC 13/20] mac80211: use RX status band instead of current band Johannes Berg
2012-07-27 11:16 ` [RFC 14/20] mac80211: check operating channel in scan Johannes Berg
2012-07-27 11:16 ` [RFC 15/20] mac80211: convert ops checks to WARN_ON Johannes Berg
2012-07-27 11:16 ` [RFC 16/20] mac80211: check channel context methods Johannes Berg
2012-07-27 11:16 ` [RFC 17/20] mac80211: track whether to use channel contexts Johannes Berg
2012-07-27 11:16 ` [RFC 18/20] mac80211: allow drv_add_chanctx to fail Johannes Berg
2012-07-27 11:42   ` Michal Kazior
2012-07-27 11:42     ` Johannes Berg
2012-07-27 11:45       ` Michal Kazior
2012-07-27 11:16 ` [RFC 19/20] mac80211: return error code from ieee80211_vif_use_channel Johannes Berg
2012-07-27 11:16 ` [RFC 20/20] mac80211: use channel contexts Johannes Berg
2012-07-27 11:46   ` Michal Kazior
2012-07-27 11:55     ` Johannes Berg
2012-08-06 15:21   ` Arik Nemtsov
2012-08-06 15:26     ` Johannes Berg [this message]
2012-07-27 12:31 ` [RFC 00/20] mac80211: multi-channel work Johannes Berg
2012-08-24  9:29 ` Johannes Berg
2012-08-26  7:58   ` Eliad Peller
2012-08-26  8:10     ` Johannes Berg
2012-08-26  8:28       ` Eliad Peller
2012-08-26  8:30         ` Johannes Berg
2012-08-26  8:36           ` Eliad Peller
2012-09-05 14:03             ` 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=1344266768.4807.6.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=arik@wizery.com \
    --cc=linux-wireless@vger.kernel.org \
    /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).