linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Andrei Otcheretianski <andrei.otc@gmail.com>
Cc: linux-wireless@vger.kernel.org, emmanuel.grumbach@intel.com,
	Andrei Otcheretianski <andrei.otcheretianski@intel.com>,
	Luciano Coelho <luciano.coelho@intel.com>
Subject: Re: [PATCH v2 5/7] mac80211: Adjust chan_ctx when assigning reserved vif
Date: Wed, 06 May 2015 14:50:30 +0200	[thread overview]
Message-ID: <1430916630.1954.2.camel@sipsolutions.net> (raw)
In-Reply-To: <CAKk+41n4qfmxVZrS03=1qas1FmEc4nmVjLEJ9LDuNCw+sVoffQ@mail.gmail.com> (sfid-20150426_101336_836315_A82B3342)

On Sun, 2015-04-26 at 11:13 +0300, Andrei Otcheretianski wrote:

> sdata->reserved_chandef  is passed to
> ieee80211_chanctx_non_reserved_chandef, so it takes the reservation
> into account when the required chandef is recalculated.
> This is what I tried to say here. I'll rephrase to make it more clear.

Ok, thanks.

> > > Not doing so would result in using chanctx with narrower width than actually
> > > required. Fix this by calling ieee80211_change_chanctx with the widest common
> > > chandef. This both changes the chanctx's width and recalcs min_def.
> >
> > This seems possible, yeah.
> >
> >
> > >         chandef = ieee80211_chanctx_non_reserved_chandef(local, new_ctx,
> > >                                 &sdata->reserved_chandef);
> >
> > >       if (WARN_ON(!chandef))
> > >               return -EINVAL;
> > >
> > > +     ieee80211_change_chanctx(local, new_ctx, chandef);
> > > +
> > >       vif_chsw[0].vif = &sdata->vif;
> > >       vif_chsw[0].old_ctx = &old_ctx->conf;
> > >       vif_chsw[0].new_ctx = &new_ctx->conf;
> > [...]
> > >       ieee80211_vif_update_chandef(sdata, &sdata->reserved_chandef);
> >
> > Hmm. (added more context)
> >
> > The code here seems to be wrong though. It shouldn't overwrite
> > reserved_chandef, or it shouldn't call ieee80211_vif_update_chandef()
> > with it, as the vif's bss_conf.chandef should represent what *this* vif
> > wants/needs, while you're now putting there what the *combination*
> > requires in the chandef.
> >
> > That's clearly wrong - please submit a new patch that fixes all the
> > issues in these functions.
> 
> I don't see any issue here.  sdata->reserved_chandef isn't overwritten
> and it is what sdata really needs.

Yes, good point, sorry. I confused the pointer assignments with struct
assignments.

johannes


  reply	other threads:[~2015-05-06 12:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-12  6:53 [PATCH 1/7] mac80211: allow to get wireless_dev structure from ieee80211_vif Emmanuel Grumbach
2015-03-12  6:53 ` [PATCH 2/7] mac80211: refactor drop connection/unlock in CSA processing Emmanuel Grumbach
2015-03-12  6:53 ` [PATCH 3/7] mac80211: ignore CSA to same channel Emmanuel Grumbach
2015-03-12  6:53 ` [PATCH 4/7] nl80211: ignore HT/VHT capabilities without QoS/WMM Emmanuel Grumbach
2015-03-12  6:53 ` [PATCH 5/7] mac80211: Adjust chan_ctx when assigning reserved vif Emmanuel Grumbach
2015-03-16  8:33   ` Johannes Berg
2015-04-21  8:53   ` [PATCH v2 " andrei.otc
2015-04-24 10:41     ` Johannes Berg
2015-04-26  8:13       ` Andrei Otcheretianski
2015-05-06 12:50         ` Johannes Berg [this message]
2015-05-06 15:30           ` [PATCH v3 5/7] mac80211: Adjust reserved chan_ctx when assigned to vif andrei.otc
2015-05-07 12:25             ` Johannes Berg
2015-03-12  6:53 ` [PATCH 6/7] mac80211: ask for ECSA IE to be considered for beacon parse CRC Emmanuel Grumbach
2015-03-12  6:53 ` [PATCH 7/7] mac80211: Count correctly interface types Emmanuel Grumbach
2015-04-01  6:06   ` Janusz Dziedzic
2015-04-01  7:12     ` Johannes Berg
2015-04-01  8:36       ` Arend van Spriel
2015-04-01  8:44         ` Johannes Berg
2015-04-01  9:15           ` Arend van Spriel
2015-04-01  9:50             ` Peer, Ilan

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=1430916630.1954.2.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=andrei.otc@gmail.com \
    --cc=andrei.otcheretianski@intel.com \
    --cc=emmanuel.grumbach@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@intel.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).