From: Antonio Quartulli <ordex@autistici.org>
To: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
Cc: linux-wireless@vger.kernel.org, zefir.kurtisi@neratec.com,
mathias.kretschmer@fokus.fraunhofer.de,
Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Subject: Re: [PATCHv3] mac80211: fix recalc_radar hwconf sync problem
Date: Mon, 8 Apr 2013 19:53:52 +0200 [thread overview]
Message-ID: <20130408175352.GC5938@ritirata.org> (raw)
In-Reply-To: <1365440698-16678-1-git-send-email-siwu@hrz.tu-chemnitz.de>
[-- Attachment #1: Type: text/plain, Size: 1362 bytes --]
On Mon, Apr 08, 2013 at 07:04:58PM +0200, Simon Wunderlich wrote:
[...]
> @@ -108,6 +128,13 @@ static void ieee80211_free_chanctx(struct ieee80211_local *local,
> chandef->width = NL80211_CHAN_WIDTH_20_NOHT;
> chandef->center_freq1 = chandef->chan->center_freq;
> chandef->center_freq2 = 0;
> +
> + /* NOTE: Disabling radar he is only valid here for
typo? ^^
> + * single channel context. To be sure, check it ... */
> + if (local->hw.conf.radar_enabled)
> + check_single_channel = true;
> + local->hw.conf.radar_enabled = false;
> +
> ieee80211_hw_config(local, 0);
> } else {
> drv_remove_chanctx(local, ctx);
> @@ -116,6 +143,10 @@ static void ieee80211_free_chanctx(struct ieee80211_local *local,
> list_del_rcu(&ctx->list);
> kfree_rcu(ctx, rcu_head);
>
> + /* throw a warning if this wasn't the only channel context. */
> + if (check_single_channel)
> + WARN_ON(!list_empty(&local->chanctx_list));
> +
Why not using
WARN_ON(check_single_channel && !list_empty(&local->chanctx_list));
? Moving the entire condition in the WARN_ON will optimise it all for being 'unlikely'.
But Johannes can simply destroy my comment if he thinks it is wrong :)
Cheers,
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-04-08 18:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-02 16:39 [PATCH] mac80211: fix recalc_radar hwconf sync problem Simon Wunderlich
2013-04-03 12:46 ` Johannes Berg
2013-04-04 13:38 ` Zefir Kurtisi
2013-04-04 18:22 ` Simon Wunderlich
2013-04-05 10:08 ` Zefir Kurtisi
2013-04-05 10:11 ` Zefir Kurtisi
2013-04-05 11:29 ` Simon Wunderlich
2013-04-05 12:11 ` Zefir Kurtisi
2013-04-05 11:22 ` Johannes Berg
2013-04-05 12:16 ` Simon Wunderlich
2013-04-05 12:36 ` Johannes Berg
2013-04-08 11:51 ` Simon Wunderlich
2013-04-08 12:09 ` [PATCHv2] " Simon Wunderlich
2013-04-08 14:17 ` Zefir Kurtisi
2013-04-08 14:29 ` Johannes Berg
2013-04-08 17:04 ` [PATCHv3] " Simon Wunderlich
2013-04-08 17:53 ` Antonio Quartulli [this message]
2013-04-08 20:43 ` [PATCHv4] " Simon Wunderlich
2013-04-09 9:50 ` 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=20130408175352.GC5938@ritirata.org \
--to=ordex@autistici.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mathias.kretschmer@fokus.fraunhofer.de \
--cc=simon.wunderlich@s2003.tu-chemnitz.de \
--cc=siwu@hrz.tu-chemnitz.de \
--cc=zefir.kurtisi@neratec.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).