From: Johannes Berg <johannes@sipsolutions.net>
To: Arik Nemtsov <arik@wizery.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: stop Rx during HW reconfig
Date: Mon, 04 Jun 2012 08:16:37 +0200 [thread overview]
Message-ID: <1338790597.4512.3.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1338755422-13220-1-git-send-email-arik@wizery.com> (sfid-20120603_223057_537536_88947913)
On Sun, 2012-06-03 at 23:30 +0300, Arik Nemtsov wrote:
> +++ b/net/mac80211/rx.c
> @@ -3023,6 +3023,9 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb)
> if (WARN_ON(!sband))
> goto drop;
>
> + /* make sure we get the latest values for the next variable checks */
> + smp_rmb();
> +
That doesn't make a lot of sense I think? This entire thing is
inherently racy, you could be processing RX already even while just
setting the variable in the other code. I'm not really sure what the
effect of this here is, but it's certainly a hot-path.
> + /*
> + * Stop all Rx during the reconfig. We don't want state changes
> + * or driver callbacks while this is in progress.
> + */
> + local->in_reconfig = true;
> + smp_wmb();
If anything, you should probably put this right into
ieee80211_restart_hw() rather than the reconfig function? It's not
needed for suspend/resume anyway since we check that separately.
johannes
next prev parent reply other threads:[~2012-06-04 6:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-03 20:30 [PATCH] mac80211: stop Rx during HW reconfig Arik Nemtsov
2012-06-04 6:16 ` Johannes Berg [this message]
2012-06-04 6:29 ` Arik Nemtsov
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=1338790597.4512.3.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=arik@wizery.com \
--cc=linux-wireless@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.