* [PATCH] mac80211: fix PS vs. scan race
@ 2009-04-22 21:02 Johannes Berg
2009-04-23 7:57 ` Kalle Valo
2009-04-30 21:27 ` Johannes Berg
0 siblings, 2 replies; 5+ messages in thread
From: Johannes Berg @ 2009-04-22 21:02 UTC (permalink / raw)
To: John Linville; +Cc: Kalle Valo, linux-wireless
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 +
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mac80211: fix PS vs. scan race
2009-04-22 21:02 [PATCH] mac80211: fix PS vs. scan race Johannes Berg
@ 2009-04-23 7:57 ` Kalle Valo
2009-04-30 21:27 ` Johannes Berg
1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2009-04-23 7:57 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, linux-wireless
Johannes Berg <johannes@sipsolutions.net> writes:
> 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>
Reviewed-by: Kalle Valo <kalle.valo@iki.fi>
--
Kalle Valo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mac80211: fix PS vs. scan race
2009-04-22 21:02 [PATCH] mac80211: fix PS vs. scan race Johannes Berg
2009-04-23 7:57 ` Kalle Valo
@ 2009-04-30 21:27 ` Johannes Berg
2009-04-30 22:30 ` John W. Linville
1 sibling, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2009-04-30 21:27 UTC (permalink / raw)
To: John Linville; +Cc: Kalle Valo, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1431 bytes --]
On Wed, 2009-04-22 at 23:02 +0200, Johannes Berg wrote:
> 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.
John, did this fall through the cracks? I see you included a patch from
today but not this :)
johannes
> 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 +
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mac80211: fix PS vs. scan race
2009-04-30 21:27 ` Johannes Berg
@ 2009-04-30 22:30 ` John W. Linville
2009-04-30 22:59 ` Johannes Berg
0 siblings, 1 reply; 5+ messages in thread
From: John W. Linville @ 2009-04-30 22:30 UTC (permalink / raw)
To: Johannes Berg; +Cc: Kalle Valo, linux-wireless
On Thu, Apr 30, 2009 at 11:27:44PM +0200, Johannes Berg wrote:
> On Wed, 2009-04-22 at 23:02 +0200, Johannes Berg wrote:
> > 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.
>
> John, did this fall through the cracks? I see you included a patch from
> today but not this :)
Looks like this one (on wireless-testing#master)?
commit da6cbb045d04706157d3117153b275ed9126bd1d
Author: Johannes Berg <johannes@sipsolutions.net>
Date: Wed Apr 22 23:02:51 2009 +0200
mac80211: fix PS vs. scan race
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>
Reviewed-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mac80211: fix PS vs. scan race
2009-04-30 22:30 ` John W. Linville
@ 2009-04-30 22:59 ` Johannes Berg
0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2009-04-30 22:59 UTC (permalink / raw)
To: John W. Linville; +Cc: Kalle Valo, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 435 bytes --]
On Thu, 2009-04-30 at 18:30 -0400, John W. Linville wrote:
> Looks like this one (on wireless-testing#master)?
>
> commit da6cbb045d04706157d3117153b275ed9126bd1d
> Author: Johannes Berg <johannes@sipsolutions.net>
> Date: Wed Apr 22 23:02:51 2009 +0200
>
> mac80211: fix PS vs. scan race
Sorry, looks like I never learn... The patch still applied (probably
with some fuzz) so I figured it wasn't in.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-04-30 23:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-22 21:02 [PATCH] mac80211: fix PS vs. scan race Johannes Berg
2009-04-23 7:57 ` Kalle Valo
2009-04-30 21:27 ` Johannes Berg
2009-04-30 22:30 ` John W. Linville
2009-04-30 22:59 ` Johannes Berg
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.