linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 07/10] mac80211: disable beacon monitor while going offchannel
@ 2010-09-14 14:20 Luis R. Rodriguez
  2010-09-14 14:29 ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Luis R. Rodriguez @ 2010-09-14 14:20 UTC (permalink / raw)
  To: linville
  Cc: linux-wireless, Luis R. Rodriguez, stable, Paul Stewart,
	Amod Bodas

The beacon monitor should be disabled when going off channel
to prevent spurious warnings and triggering connection
deterioration work such as sending probe requests. Re-enable
the beacon monitor once we come back to the home channel.

This patch has fixes for stable kernels [2.6.34+]

Cc: stable@kernel.org
Cc: Paul Stewart <pstew@google.com>
Cc: Amod Bodas <amod.bodas@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
 net/mac80211/offchannel.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index 8b58626..b199136 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -22,12 +22,14 @@
 static void ieee80211_offchannel_ps_enable(struct ieee80211_sub_if_data *sdata)
 {
 	struct ieee80211_local *local = sdata->local;
+	struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
 
 	local->offchannel_ps_enabled = false;
 
 	/* FIXME: what to do when local->pspolling is true? */
 
 	del_timer_sync(&local->dynamic_ps_timer);
+	del_timer_sync(&ifmgd->bcn_mon_timer);
 	del_timer_sync(&sdata->u.mgd.conn_mon_timer);
 
 	cancel_work_sync(&local->dynamic_ps_enable_work);
@@ -88,6 +90,7 @@ static void ieee80211_offchannel_ps_disable(struct ieee80211_sub_if_data *sdata)
 			  msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout));
 	}
 
+	ieee80211_sta_reset_beacon_monitor(sdata);
 	ieee80211_sta_reset_conn_monitor(sdata);
 }
 
-- 
1.7.0.4


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

* Re: [PATCH 07/10] mac80211: disable beacon monitor while going offchannel
  2010-09-14 14:20 [PATCH 07/10] mac80211: disable beacon monitor while going offchannel Luis R. Rodriguez
@ 2010-09-14 14:29 ` Johannes Berg
  2010-09-14 14:35   ` Luis R. Rodriguez
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2010-09-14 14:29 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: linville, linux-wireless, stable, Paul Stewart, Amod Bodas

On Tue, 2010-09-14 at 10:20 -0400, Luis R. Rodriguez wrote:

> +	del_timer_sync(&ifmgd->bcn_mon_timer);
>  	del_timer_sync(&sdata->u.mgd.conn_mon_timer);

This is kinda inconsistent now ... and you added both these lines in
your patch set :-)

johannes


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

* Re: [PATCH 07/10] mac80211: disable beacon monitor while going offchannel
  2010-09-14 14:29 ` Johannes Berg
@ 2010-09-14 14:35   ` Luis R. Rodriguez
  2010-09-14 14:38     ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Luis R. Rodriguez @ 2010-09-14 14:35 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linville, linux-wireless, stable, Paul Stewart, Amod Bodas

On Tue, Sep 14, 2010 at 7:29 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Tue, 2010-09-14 at 10:20 -0400, Luis R. Rodriguez wrote:
>
>> +     del_timer_sync(&ifmgd->bcn_mon_timer);
>>       del_timer_sync(&sdata->u.mgd.conn_mon_timer);
>
> This is kinda inconsistent now ... and you added both these lines in
> your patch set :-)

Sorry, I do not follow, can you elaborate?

  Luis

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

* Re: [PATCH 07/10] mac80211: disable beacon monitor while going offchannel
  2010-09-14 14:35   ` Luis R. Rodriguez
@ 2010-09-14 14:38     ` Johannes Berg
  2010-09-14 14:43       ` Luis R. Rodriguez
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2010-09-14 14:38 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: linville, linux-wireless, stable, Paul Stewart, Amod Bodas

On Tue, 2010-09-14 at 07:35 -0700, Luis R. Rodriguez wrote:
> On Tue, Sep 14, 2010 at 7:29 AM, Johannes Berg
> <johannes@sipsolutions.net> wrote:
> > On Tue, 2010-09-14 at 10:20 -0400, Luis R. Rodriguez wrote:
> >
> >> +     del_timer_sync(&ifmgd->bcn_mon_timer);
> >>       del_timer_sync(&sdata->u.mgd.conn_mon_timer);
> >
> > This is kinda inconsistent now ... and you added both these lines in
> > your patch set :-)
> 
> Sorry, I do not follow, can you elaborate?

You use "ifmgd->", but also "sdata->u.mgd." when both should be one of
those.

johannes


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

* Re: [PATCH 07/10] mac80211: disable beacon monitor while going offchannel
  2010-09-14 14:38     ` Johannes Berg
@ 2010-09-14 14:43       ` Luis R. Rodriguez
  0 siblings, 0 replies; 5+ messages in thread
From: Luis R. Rodriguez @ 2010-09-14 14:43 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linville, linux-wireless, stable, Paul Stewart, Amod Bodas

On Tue, Sep 14, 2010 at 7:38 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Tue, 2010-09-14 at 07:35 -0700, Luis R. Rodriguez wrote:
>> On Tue, Sep 14, 2010 at 7:29 AM, Johannes Berg
>> <johannes@sipsolutions.net> wrote:
>> > On Tue, 2010-09-14 at 10:20 -0400, Luis R. Rodriguez wrote:
>> >
>> >> +     del_timer_sync(&ifmgd->bcn_mon_timer);
>> >>       del_timer_sync(&sdata->u.mgd.conn_mon_timer);
>> >
>> > This is kinda inconsistent now ... and you added both these lines in
>> > your patch set :-)
>>
>> Sorry, I do not follow, can you elaborate?
>
> You use "ifmgd->", but also "sdata->u.mgd." when both should be one of
> those.

Ah heh yeah, good catch, will resend.

  Luis

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

end of thread, other threads:[~2010-09-14 14:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-14 14:20 [PATCH 07/10] mac80211: disable beacon monitor while going offchannel Luis R. Rodriguez
2010-09-14 14:29 ` Johannes Berg
2010-09-14 14:35   ` Luis R. Rodriguez
2010-09-14 14:38     ` Johannes Berg
2010-09-14 14:43       ` Luis R. Rodriguez

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