public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
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: Re: [PATCH] mac80211: fix PS vs. scan race
Date: Thu, 30 Apr 2009 23:27:44 +0200	[thread overview]
Message-ID: <1241126864.12388.0.camel@johannes.local> (raw)
In-Reply-To: <1240434171.30082.21.camel@johannes.local> (sfid-20090422_230332_838939_0838D463)

[-- 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 --]

  parent reply	other threads:[~2009-04-30 21:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=1241126864.12388.0.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