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 v3] initial channel context implementation
Date: Thu, 28 Jun 2012 11:27:26 +0200 [thread overview]
Message-ID: <1340875646.4491.24.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <4FEC21DA.9040901@tieto.com>
On Thu, 2012-06-28 at 11:20 +0200, Michal Kazior wrote:
> > Yes, makes sense. I forgot all about the TX code. I'm a little wary of
> > making the contexts mutable, even in this case, because a lot of code
> > uses local->oper_channel as well, and that is expected to really be the
> > operating channel all of the time, even if we're scanning at some point
> > in time.
>
> Yeah. The other option (maintaining the immutability) is to iterate
> through all interfaces and call ieee80211_vif_use_channel when switching
> channel for single-channel operation. Or do you have something else in
> mind maybe?
I don't think we should do that, we want to maintain chanctx.channel,
what today is oper_channel. But I guess I was just expressing myself
badly, seems below you understood it better :)
> > Luckily, tx.channel isn't actually used much, only for the band. So if
> > we tag the SKBs with the band earlier (info->band), maybe we don't need
> > to use hw.conf.channel as much there for tx.channel?
> >
> > Other uses where we do need the current channel are
> > * ieee80211_build_probe_req
> > * ieee80211_add_srates_ie/ieee80211_add_ext_srates_ie
> > * __ieee80211_start_scan uses it but need not, could use oper_channel
> > instead and the code never executes for multi-channel
> > * ieee80211_set_tx_power() is interesting, may need to make it all
> > per-sdata now through nl80211 etc.
>
> What will drivers that don't support per-sdata tx_power do? Do all
> multi-vif (not multi-channel) drivers support per-interface tx power?
>
> I guess we'd have to manage:
> a) common tx power value in ieee80211_local
> b) provide a function that calculates the common value
> so drivers may use it (and avoid code duplication)
> c) ..or else drivers would need to implement the calculation on
> their own
Yeah, good question. I'm not too worried about TX power though TBH, I
think it's fair to assume that if a driver supports multi-channel, it
supports per-channel TX power as well, if it even supports TX power
adjustment at all.
> > * rate_idx_to_bitrate can use the sta's sdata's channel
> > * ieee80211_change_bss can use the sdata's channel
> > * debugfs stuff probably just moves to per-sdata files
> > * ibss code all uses sdata channel
> > * ieee80211_if_change_type ... probably just set basic_rates = 0
> > * mesh can use sdata channel
> > * mlme.c should use sdata channel, but there's the channel switch stuff
> > * rate.h should use sta->sdata channel
> >
> > Much of this is actually means we have bugs today! Whenever we use
> > hw.conf.channel and should be using sdata channel soon, we should be
> > using local->oper_channel today!
>
> Oh! Now I understand why you wanted to use channel contexts in place of
> oper_channel. This makes sense.
:-)
> > Maybe it's worth fixing that first, and getting rid of *most* instances
> > of hw.conf.channel, so we have a clearer idea of which changes in what
> > ways?
>
> Sounds like a good idea.
Do you want to take that up? I think it would be worth doing it in front
of all the other mac80211 patches (those are incomplete anyway in that
the new code doesn't get used), and then we can shake out any bugs here
before we switch over to multi-channel?
Or I can work on it too if you prefer.
johannes
next prev parent reply other threads:[~2012-06-28 9:27 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-26 12:37 [RFC v3] initial channel context implementation Michal Kazior
2012-06-26 12:37 ` [RFC v3 1/7] mac80211: introduce channel context skeleton code Michal Kazior
2012-06-26 12:37 ` [RFC v3 2/7] mac80211: introduce new ieee80211_ops Michal Kazior
2012-06-26 12:37 ` [RFC v3 3/7] mac80211: add drv_* wrappers for channel contexts Michal Kazior
2012-06-26 12:37 ` [RFC v3 4/7] mac80211: add chanctx tracing Michal Kazior
2012-06-26 12:37 ` [RFC v3 5/7] mac80211: use channel context notifications Michal Kazior
2012-06-26 13:35 ` Johannes Berg
2012-06-26 14:01 ` Michal Kazior
2012-06-26 15:34 ` Johannes Berg
2012-06-26 12:37 ` [RFC v3 6/7] mac80211: refactor set_channel_type Michal Kazior
2012-06-26 14:04 ` Eliad Peller
2012-06-26 12:37 ` [RFC v3 7/7] mac80211: reuse channels for channel contexts Michal Kazior
2012-06-26 13:41 ` Johannes Berg
2012-06-26 13:55 ` Michal Kazior
2012-06-26 15:34 ` Johannes Berg
2012-06-26 13:43 ` [RFC v3] initial channel context implementation Johannes Berg
2012-06-27 7:30 ` Michal Kazior
2012-06-27 8:10 ` Johannes Berg
2012-06-27 10:13 ` Michal Kazior
2012-06-27 11:10 ` Johannes Berg
2012-06-27 12:43 ` Michal Kazior
2012-06-27 14:02 ` Johannes Berg
2012-06-28 6:04 ` Michal Kazior
2012-06-28 7:31 ` Johannes Berg
2012-06-28 7:54 ` Michal Kazior
2012-06-28 8:13 ` Johannes Berg
2012-06-28 9:20 ` Michal Kazior
2012-06-28 9:27 ` Johannes Berg [this message]
2012-06-28 9:47 ` Michal Kazior
2012-06-28 7:01 ` Michal Kazior
2012-06-28 8:15 ` Johannes Berg
2012-06-28 8:54 ` Michal Kazior
2012-06-28 9:27 ` Johannes Berg
2012-07-25 10:22 ` 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=1340875646.4491.24.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).