From: Johannes Berg <johannes@sipsolutions.net>
To: Eliad Peller <eliad@wizery.com>
Cc: linux-wireless@vger.kernel.org,
Michal Kazior <michal.kazior@tieto.com>,
Arend van Spriel <arend@broadcom.com>
Subject: Re: [PATCH 01/10] mac80211: introduce channel context skeleton code
Date: Mon, 17 Sep 2012 16:54:27 +0200 [thread overview]
Message-ID: <1347893667.4975.1.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <CAB3XZEdAX8=BU5QQaQpS=OF-5XXDH=k3rO7C2z2F+sZpaCNK1Q@mail.gmail.com> (sfid-20120915_234241_109266_3C0AE5C7)
On Sun, 2012-09-16 at 00:42 +0300, Eliad Peller wrote:
> > + ctx = ieee80211_find_chanctx(local, channel, channel_type, mode);
> since you might use an existing ctx here...
>
> > + if (!ctx)
> > + ctx = ieee80211_new_chanctx(local, channel, channel_type, mode);
> > + if (IS_ERR(ctx)) {
> > + ret = PTR_ERR(ctx);
> > + goto out;
> > + }
> > +
> > + ret = ieee80211_assign_vif_chanctx(sdata, ctx);
> > + if (ret) {
> > + ieee80211_free_chanctx(local, ctx);
> i think you should check ctx->refcount before freeing it.
Oops, good catch! I think I'll just add a test here rather than Arend's
suggestion because nothing it's called _free_chanctx(), and it's already
very indirectly used via the vif. Not that it's a bad suggestion, it
just doesn't seem to fit with the code as it is now.
Thanks guys!
johannes
next prev parent reply other threads:[~2012-09-17 14:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-14 12:37 [PATCH 00/10] mac80211 multi-channel work (final?) Johannes Berg
2012-09-14 12:37 ` [PATCH 01/10] mac80211: introduce channel context skeleton code Johannes Berg
2012-09-15 21:42 ` Eliad Peller
2012-09-16 16:32 ` Arend van Spriel
2012-09-17 14:54 ` Johannes Berg [this message]
2012-09-14 12:37 ` [PATCH 02/10] mac80211: introduce new ieee80211_ops Johannes Berg
2012-09-14 12:37 ` [PATCH 03/10] mac80211: use channel context notifications Johannes Berg
2012-09-14 12:37 ` [PATCH 04/10] mac80211: reuse channels for channel contexts Johannes Berg
2012-09-14 12:37 ` [PATCH 05/10] mac80211: check channel context methods Johannes Berg
2012-09-14 12:37 ` [PATCH 06/10] mac80211: track whether to use channel contexts Johannes Berg
2012-09-14 12:37 ` [PATCH 07/10] mac80211: " Johannes Berg
2012-09-14 12:37 ` [PATCH 08/10] mac80211: track needed RX chains for " Johannes Berg
2012-09-14 12:37 ` [PATCH 09/10] mac80211: add channel context iterator Johannes Berg
2012-09-14 12:37 ` [PATCH 10/10] mac80211_hwsim: use channel contexts Johannes Berg
2012-10-01 7:28 ` [PATCH 00/10] mac80211 multi-channel work (final?) 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=1347893667.4975.1.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=arend@broadcom.com \
--cc=eliad@wizery.com \
--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).