linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: don't start the dynamic ps timer if not associated
@ 2011-05-03 18:40 Luciano Coelho
  2011-05-04 20:08 ` Luciano Coelho
  0 siblings, 1 reply; 2+ messages in thread
From: Luciano Coelho @ 2011-05-03 18:40 UTC (permalink / raw)
  To: linville; +Cc: johannes, linux-wireless, ido

When we are disconnecting, we set PS off, but this happens before we
send the deauth/disassoc request.  When the deauth/disassoc frames are
sent, we trigger the dynamic ps timer, which then times out and turns
PS back on.  Thus, PS remains on after disconnecting, causing problems
when associating again.

This can be fixed by preventing the timer to start when we're not
associated anymore.

Signed-off-by: Luciano Coelho <coelho@ti.com>
---
 net/mac80211/tx.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index e3e3aa1..21accf8 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -237,6 +237,10 @@ ieee80211_tx_h_dynamic_ps(struct ieee80211_tx_data *tx)
 				     &local->dynamic_ps_disable_work);
 	}
 
+	/* Don't restart the timer if we're not disassociated */
+	if (!ifmgd->associated)
+		return TX_CONTINUE;
+
 	mod_timer(&local->dynamic_ps_timer, jiffies +
 		  msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout));
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mac80211: don't start the dynamic ps timer if not associated
  2011-05-03 18:40 [PATCH] mac80211: don't start the dynamic ps timer if not associated Luciano Coelho
@ 2011-05-04 20:08 ` Luciano Coelho
  0 siblings, 0 replies; 2+ messages in thread
From: Luciano Coelho @ 2011-05-04 20:08 UTC (permalink / raw)
  To: linville; +Cc: johannes, linux-wireless, ido

On Tue, 2011-05-03 at 21:40 +0300, Luciano Coelho wrote:
> When we are disconnecting, we set PS off, but this happens before we
> send the deauth/disassoc request.  When the deauth/disassoc frames are
> sent, we trigger the dynamic ps timer, which then times out and turns
> PS back on.  Thus, PS remains on after disconnecting, causing problems
> when associating again.
> 
> This can be fixed by preventing the timer to start when we're not
> associated anymore.
> 
> Signed-off-by: Luciano Coelho <coelho@ti.com>
> ---
>  net/mac80211/tx.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
> index e3e3aa1..21accf8 100644
> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -237,6 +237,10 @@ ieee80211_tx_h_dynamic_ps(struct ieee80211_tx_data *tx)
>  				     &local->dynamic_ps_disable_work);
>  	}
>  
> +	/* Don't restart the timer if we're not disassociated */
> +	if (!ifmgd->associated)
> +		return TX_CONTINUE;
> +
>  	mod_timer(&local->dynamic_ps_timer, jiffies +
>  		  msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout));
>  

Do you people think this should go into 2.6.39?

-- 
Cheers,
Luca.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-04 20:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-03 18:40 [PATCH] mac80211: don't start the dynamic ps timer if not associated Luciano Coelho
2011-05-04 20:08 ` Luciano Coelho

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).