From: Johannes Berg <johannes@sipsolutions.net>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC v2 1/7] mac80211: introduce channel contexts skeleton code
Date: Thu, 21 Jun 2012 15:24:24 +0200 [thread overview]
Message-ID: <1340285064.4489.24.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1340280216-18807-2-git-send-email-michal.kazior@tieto.com>
On Thu, 2012-06-21 at 14:03 +0200, Michal Kazior wrote:
> +++ b/include/net/mac80211.h
> @@ -143,6 +143,41 @@ struct ieee80211_low_level_stats {
> unsigned int dot11RTSSuccessCount;
> };
>
> +
> +/**
> + * enum ieee80211_chanctx_mode - channel context configuration mode
> + *
> + * @IEEE80211_CHANCTX_SHARED: channel context may be used by
> + * multiple interfaces
> + * @IEEE80211_CHANCTX_EXCLUSIVE: channel context can be used
> + * only by a single interface. This can be used for example for
> + * non-fixed channel IBSS.
> + */
> +enum ieee80211_chanctx_mode {
> + IEEE80211_CHANCTX_SHARED,
> + IEEE80211_CHANCTX_EXCLUSIVE
> +};
Does the driver ever care about this? It seems mostly internal to
determine what's going on?
> + * @chanctx_conf: channel context vif is bound to, may be NULL
Maybe say "will be %NULL before the interface is assigned to a channel
context" or so?
> + INIT_LIST_HEAD(&ctx->interfaces);
Is there really a need for this list? It seems only moderately less
efficient to iterate all interfaces and filter by channel context, and
that's probably easier to maintain?
> +static void
> +__ieee80211_vif_release_channel(struct ieee80211_sub_if_data *sdata)
> +{
> + struct ieee80211_chanctx_conf *conf = sdata->vif.chanctx_conf;
> + struct ieee80211_chanctx *ctx =
> + container_of(conf, struct ieee80211_chanctx, conf);
> +
> + if (!conf)
> + return;
> +
> + ieee80211_unassign_vif_chanctx(sdata, ctx);
> + if (list_empty(&ctx->interfaces))
> + ieee80211_free_chanctx(ctx);
> +}
Ah, ok. So I guess there's a good use for the list at least here.
johannes
next prev parent reply other threads:[~2012-06-21 13:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-21 12:03 [RFC v2] initial channel context implementation Michal Kazior
2012-06-21 12:03 ` [RFC v2 1/7] mac80211: introduce channel contexts skeleton code Michal Kazior
2012-06-21 13:24 ` Johannes Berg [this message]
2012-06-25 6:52 ` Michal Kazior
2012-06-21 12:03 ` [RFC v2 2/7] mac80211: introduce new ieee80211_ops Michal Kazior
2012-06-21 12:03 ` [RFC v2 3/7] mac80211: add drv_* wrappers for channel contexts Michal Kazior
2012-06-21 12:03 ` [RFC v2 4/7] mac80211: add chanctx tracing Michal Kazior
2012-06-21 12:03 ` [RFC v2 5/7] mac80211: use channel context notifications Michal Kazior
2012-06-21 12:03 ` [RFC v2 6/7] mac80211: refactor set_channel_type Michal Kazior
2012-06-21 12:03 ` [RFC v2 7/7] mac80211: reuse channels for channel context Michal Kazior
2012-06-21 13:26 ` Johannes Berg
2012-06-25 6:54 ` Michal Kazior
2012-06-21 13:19 ` [RFC v2] initial channel context implementation 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=1340285064.4489.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).