From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: Kalle Valo <kalle.valo@iki.fi>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] mac80211: fix PS vs. scan race
Date: Wed, 22 Apr 2009 23:02:51 +0200 [thread overview]
Message-ID: <1240434171.30082.21.camel@johannes.local> (raw)
When somebody changes the PS parameters while scanning
is in progress, we enable PS -- during the scan. This
is clearly not desirable, and we can just abort enabling
PS when scanning since when the scan finishes it will
be taken care of.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/mlme.c | 7 +++++++
1 file changed, 7 insertions(+)
--- wireless-testing.orig/net/mac80211/mlme.c 2009-04-22 22:57:45.000000000 +0200
+++ wireless-testing/net/mac80211/mlme.c 2009-04-22 22:58:56.000000000 +0200
@@ -487,6 +487,13 @@ static void ieee80211_enable_ps(struct i
{
struct ieee80211_conf *conf = &local->hw.conf;
+ /*
+ * If we are scanning right now then the parameters will
+ * take effect when scan finishes.
+ */
+ if (local->hw_scanning || local->sw_scanning)
+ return;
+
if (conf->dynamic_ps_timeout > 0 &&
!(local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_PS)) {
mod_timer(&local->dynamic_ps_timer, jiffies +
next reply other threads:[~2009-04-22 21:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-22 21:02 Johannes Berg [this message]
2009-04-23 7:57 ` [PATCH] mac80211: fix PS vs. scan race Kalle Valo
2009-04-30 21:27 ` Johannes Berg
2009-04-30 22:30 ` John W. Linville
2009-04-30 22:59 ` 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=1240434171.30082.21.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=kalle.valo@iki.fi \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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