public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Johannes Berg <johannes@sipsolutions.net>,
	"sw@simonwunderlich.de" <sw@simonwunderlich.de>,
	"Otcheretianski, Andrei" <andrei.otcheretianski@intel.com>
Subject: Re: [PATCH v9 3/4] mac80211: implement chanctx reservation
Date: Tue, 18 Mar 2014 16:48:07 +0200	[thread overview]
Message-ID: <1395154087.15856.45.camel@dubbel> (raw)
In-Reply-To: <CA+BoTQkpjC+LeWfNvaNXTwTsHgWAg7-umDnq4CjWk1oBvvo+9g@mail.gmail.com>

On Tue, 2014-03-18 at 15:10 +0100, Michal Kazior wrote:
> On 13 March 2014 14:33, Luciano Coelho <luciano.coelho@intel.com> wrote:
> 
> [...]
> 
> > +       ret = ieee80211_assign_vif_chanctx(sdata, ctx);
> > +       if (old_ctx->refcount == 0)
> > +               ieee80211_free_chanctx(local, old_ctx);
> > +       if (ret) {
> > +               /* if assign fails refcount stays the same */
> > +               if (ctx->refcount == 0)
> > +                       ieee80211_free_chanctx(local, ctx);
> > +               goto out;
> > +       }
> > +
> > +       __ieee80211_vif_copy_chanctx_to_vlans(sdata, false);
> 
> I'm sorry I didn't notice that this earlier :-( but this should be
> guarded by if (sdata->vif.type == NL80211_IFTYPE_AP). Otherwise you
> hit WARN_ON for non-AP (e.g. STA) chanctx reservation.

Yeah, how didn't I notice that? Though this WARN_ON is unnecessary in my
opinion, because what happens now is that we have to check for the same
thing (ie. sdata->vif.type) twice.

Thanks for catching it! I'll fix.

--
Luca.


  reply	other threads:[~2014-03-18 14:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-13 13:33 [PATCH v9 0/4] mac802111: channel context reservation Luciano Coelho
2014-03-13 13:33 ` [PATCH v9 1/4] mac80211: split ieee80211_vif_change_channel in two Luciano Coelho
2014-03-13 13:33 ` [PATCH v9 2/4] mac80211: refactor ieee80211_assign/unassign_vif_chanctx into one Luciano Coelho
2014-03-13 13:33 ` [PATCH v9 3/4] mac80211: implement chanctx reservation Luciano Coelho
2014-03-18 14:10   ` Michal Kazior
2014-03-18 14:48     ` Luca Coelho [this message]
2014-03-13 13:33 ` [PATCH v9 4/4] mac80211: allow reservation of a running chanctx Luciano Coelho

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=1395154087.15856.45.camel@dubbel \
    --to=luca@coelho.fi \
    --cc=andrei.otcheretianski@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=michal.kazior@tieto.com \
    --cc=sw@simonwunderlich.de \
    /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