linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Kazior <michal.kazior@tieto.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Luca Coelho <luca@coelho.fi>
Subject: Re: [PATCH v6 2/6] mac80211: implement multi-vif in-place reservations
Date: Fri, 23 May 2014 08:16:10 +0200	[thread overview]
Message-ID: <CA+BoTQk3stQoK34q6VcXhHm8+9Rh67UF4TTfgy5P1JY1o1dTFA@mail.gmail.com> (raw)
In-Reply-To: <1400770304.4174.34.camel@jlt4.sipsolutions.net>

On 22 May 2014 16:51, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Thu, 2014-05-22 at 16:07 +0200, Michal Kazior wrote:
>
>> This introduces a special hook
>> ieee80211_vif_chanctx_reservation_complete(). This
>> is currently an empty stub and will be filled in
>> by AP/STA CSA code. This is required to implement
>> 2-step CSA finalization.
>
> I really don't see any value in this - just put it into the patch
> implementing it?

Okay, I'll move it to the AP CSA patch then.


>> + *   The callback is optional for channel context based drivers but is
>> + *   required to support channel switching. The callback and can sleep.
>
> That probably belongs to the previous patch, but isn't even true there
> or here afaict.

Ah, rebasing..


>> +static int
>> +ieee80211_vif_use_reserved_incompat(struct ieee80211_local *local,
>> +                                 struct ieee80211_chanctx *ctx,
>> +                                 const struct cfg80211_chan_def *chandef)
>> +{
>> +     struct ieee80211_sub_if_data *sdata, *tmp;
>> +     struct ieee80211_chanctx *new_ctx;
>> +     u32 changed = 0;
>> +     int err;
>> +
>> +     lockdep_assert_held(&local->mtx);
>> +     lockdep_assert_held(&local->chanctx_mtx);
>> +
>> +     if (!ieee80211_chanctx_all_reserved_vifs_ready(local, ctx))
>> +             return 0;
>> +
>> +     if (ieee80211_chanctx_num_assigned(local, ctx) !=
>> +         ieee80211_chanctx_num_reserved(local, ctx)) {
>> +             wiphy_info(local->hw.wiphy,
>> +                        "channel context reservation cannot be finalized because some interfaces aren't switching\n");
>> +             err = -EBUSY;
>> +             goto err;
>>       }
>
> I don't think I understand that condition, it's it possible to switch
> from two vifs using two channels to both using a single third one?

I assume you have a case where max number of different channels is
degraded (e.g. non-radar -> more restrictive radar combination) in
mind, right? In that case this won't work with this code. Now that I
think about it it also won't work with cross-swapping (2 chanctx are
being swapped and some vifs try to interchange between).

I'll have to re-think this a bit more.


>> +     ieee80211_recalc_chanctx_chantype(local, new_ctx);
>> +     ieee80211_recalc_smps_chanctx(local, new_ctx);
>> +     ieee80211_recalc_chanctx_min_def(local, new_ctx);
>
> vs.
>
>> -     ieee80211_recalc_chanctx_chantype(local, ctx);
>> -     ieee80211_recalc_smps_chanctx(local, ctx);
>> -     ieee80211_recalc_radar_chanctx(local, ctx);
>> -     ieee80211_recalc_chanctx_min_def(local, ctx);
>
> Did I miss something? Maybe it would be good to squeeze in that patch
> that made a recalc_all() function to call all of these.

The radar is now calculated in the _incompat manually because it
should be saying "radar" before you call into
switch_vif_chanctx/create new chanctx. I mean, you could initially
bind a chanctx with ch52 without radar flag and then update it right
away but it didn't sit right with me.


Michał

  reply	other threads:[~2014-05-23  6:16 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-22 14:07 [PATCH v6 0/6] cfg/mac80211: implement multi-vif csa Michal Kazior
2014-05-22 14:07 ` [PATCH v6 1/6] mac80211: introduce switch_vif_chanctx op Michal Kazior
2014-05-22 14:45   ` Johannes Berg
2014-05-23  2:38     ` [PATCH] mac80211: add a single-transaction driver op to switch contexts Luca Coelho
2014-05-23  2:49       ` Luca Coelho
2014-05-23  7:51         ` Michal Kazior
2014-05-23  8:01       ` Michal Kazior
2014-05-23  8:58         ` Johannes Berg
2014-05-23  9:14           ` Luca Coelho
2014-05-23  9:30             ` Johannes Berg
2014-05-23  9:52               ` Johannes Berg
2014-05-23 11:33                 ` [PATCH 1/2] " Luca Coelho
2014-05-23 11:33                   ` [PATCH 2/2] mac80211: use switch_vif_chanctx to change a running chanctx Luca Coelho
2014-05-23 11:35                     ` Luca Coelho
2014-05-23 13:28                     ` Johannes Berg
2014-05-23 13:31                       ` Luca Coelho
2014-05-23 13:24                   ` [PATCH 1/2] mac80211: add a single-transaction driver op to switch contexts Johannes Berg
2014-05-23 13:30                     ` Luca Coelho
2014-05-23  9:16           ` [PATCH] " Michal Kazior
2014-05-23  9:26             ` Johannes Berg
2014-05-23  6:09     ` [PATCH v6 1/6] mac80211: introduce switch_vif_chanctx op Michal Kazior
2014-05-23  8:51       ` Johannes Berg
2014-05-23  9:10         ` Michal Kazior
2014-05-23  9:31           ` Johannes Berg
2014-05-22 14:07 ` [PATCH v6 2/6] mac80211: implement multi-vif in-place reservations Michal Kazior
2014-05-22 14:51   ` Johannes Berg
2014-05-23  6:16     ` Michal Kazior [this message]
2014-05-23 12:23       ` Michal Kazior
2014-05-23 13:14         ` Johannes Berg
2014-05-22 14:07 ` [PATCH v6 3/6] mac80211: make check_combinations() aware of chanctx reservation Michal Kazior
2014-05-22 14:07 ` [PATCH v6 4/6] mac80211: use chanctx reservation for AP CSA Michal Kazior
2014-05-22 14:54   ` Johannes Berg
2014-05-23  6:49     ` Michal Kazior
2014-05-23  8:44       ` Johannes Berg
2014-05-23  8:58         ` Michal Kazior
2014-05-23  9:07           ` Johannes Berg
2014-05-23  9:35             ` Michal Kazior
2014-05-23  9:53               ` Johannes Berg
2014-05-22 14:07 ` [PATCH v6 5/6] mac80211: use chanctx reservation for STA CSA Michal Kazior
2014-05-22 14:07 ` [PATCH v6 6/6] cfg80211: remove channel_switch combination check Michal Kazior
2014-05-22 14:57   ` Johannes Berg
2014-05-23  7:04     ` Michal Kazior
2014-05-23  8:53       ` Johannes Berg
2014-05-23  9:11         ` Michal Kazior

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=CA+BoTQk3stQoK34q6VcXhHm8+9Rh67UF4TTfgy5P1JY1o1dTFA@mail.gmail.com \
    --to=michal.kazior@tieto.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luca@coelho.fi \
    /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).