linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: always set in_reconfig=false on wakeup
@ 2012-07-02 12:08 Eliad Peller
  2012-07-02 12:19 ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Eliad Peller @ 2012-07-02 12:08 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

If the interfaces were removed just before a restart
work was started, open_count will be 0, and most of
the reconfig work will be skipped, including the
resetting of local->in_reconfig to false.

Leaving local->inconfig = true will result in
dropping any incoming packet.

Fix it by always setting local->in_reconfig = false
(even if there are no active interfaces).

Signed-off-by: Eliad Peller <eliad@wizery.com>
---
this should go to 3.5

 net/mac80211/util.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 242ecde..e1b7c63 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1411,10 +1411,10 @@ int ieee80211_reconfig(struct ieee80211_local *local)
 		if (ieee80211_sdata_running(sdata))
 			ieee80211_enable_keys(sdata);
 
+ wake_up:
 	local->in_reconfig = false;
 	barrier();
 
- wake_up:
 	/*
 	 * Clear the WLAN_STA_BLOCK_BA flag so new aggregation
 	 * sessions can be established after a resume.
-- 
1.7.6.401.g6a319


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

* Re: [PATCH] mac80211: always set in_reconfig=false on wakeup
  2012-07-02 12:08 [PATCH] mac80211: always set in_reconfig=false on wakeup Eliad Peller
@ 2012-07-02 12:19 ` Johannes Berg
  2012-07-02 18:17   ` John W. Linville
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2012-07-02 12:19 UTC (permalink / raw)
  To: Eliad Peller, John Linville; +Cc: linux-wireless

On Mon, 2012-07-02 at 15:08 +0300, Eliad Peller wrote:
> If the interfaces were removed just before a restart
> work was started, open_count will be 0, and most of
> the reconfig work will be skipped, including the
> resetting of local->in_reconfig to false.
> 
> Leaving local->inconfig = true will result in
> dropping any incoming packet.
> 
> Fix it by always setting local->in_reconfig = false
> (even if there are no active interfaces).
> 
> Signed-off-by: Eliad Peller <eliad@wizery.com>
> ---
> this should go to 3.5

Also looks good, thanks

Reviewed-by: Johannes Berg <johannes@sipsolutions.net>

John, could you also pick this up?

johannes


>  net/mac80211/util.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/mac80211/util.c b/net/mac80211/util.c
> index 242ecde..e1b7c63 100644
> --- a/net/mac80211/util.c
> +++ b/net/mac80211/util.c
> @@ -1411,10 +1411,10 @@ int ieee80211_reconfig(struct ieee80211_local *local)
>  		if (ieee80211_sdata_running(sdata))
>  			ieee80211_enable_keys(sdata);
>  
> + wake_up:
>  	local->in_reconfig = false;
>  	barrier();
>  
> - wake_up:
>  	/*
>  	 * Clear the WLAN_STA_BLOCK_BA flag so new aggregation
>  	 * sessions can be established after a resume.



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

* Re: [PATCH] mac80211: always set in_reconfig=false on wakeup
  2012-07-02 12:19 ` Johannes Berg
@ 2012-07-02 18:17   ` John W. Linville
  2012-07-05 15:01     ` Eliad Peller
  0 siblings, 1 reply; 5+ messages in thread
From: John W. Linville @ 2012-07-02 18:17 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Eliad Peller, linux-wireless

On Mon, Jul 02, 2012 at 02:19:01PM +0200, Johannes Berg wrote:
> On Mon, 2012-07-02 at 15:08 +0300, Eliad Peller wrote:
> > If the interfaces were removed just before a restart
> > work was started, open_count will be 0, and most of
> > the reconfig work will be skipped, including the
> > resetting of local->in_reconfig to false.
> > 
> > Leaving local->inconfig = true will result in
> > dropping any incoming packet.
> > 
> > Fix it by always setting local->in_reconfig = false
> > (even if there are no active interfaces).
> > 
> > Signed-off-by: Eliad Peller <eliad@wizery.com>
> > ---
> > this should go to 3.5
> 
> Also looks good, thanks
> 
> Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
> 
> John, could you also pick this up?
> 
> johannes
> 
> 
> >  net/mac80211/util.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/net/mac80211/util.c b/net/mac80211/util.c
> > index 242ecde..e1b7c63 100644
> > --- a/net/mac80211/util.c
> > +++ b/net/mac80211/util.c
> > @@ -1411,10 +1411,10 @@ int ieee80211_reconfig(struct ieee80211_local *local)
> >  		if (ieee80211_sdata_running(sdata))
> >  			ieee80211_enable_keys(sdata);
> >  
> > + wake_up:
> >  	local->in_reconfig = false;
> >  	barrier();
> >  
> > - wake_up:
> >  	/*
> >  	 * Clear the WLAN_STA_BLOCK_BA flag so new aggregation
> >  	 * sessions can be established after a resume.

This doesn't apply to 3.5 -- the "local->in_reconfig = false" bit isn't there.

John
-- 
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: always set in_reconfig=false on wakeup
  2012-07-02 18:17   ` John W. Linville
@ 2012-07-05 15:01     ` Eliad Peller
  2012-07-05 15:09       ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Eliad Peller @ 2012-07-05 15:01 UTC (permalink / raw)
  To: John W. Linville; +Cc: Johannes Berg, linux-wireless

On Mon, Jul 2, 2012 at 9:17 PM, John W. Linville <linville@tuxdriver.com> wrote:
> On Mon, Jul 02, 2012 at 02:19:01PM +0200, Johannes Berg wrote:
>> On Mon, 2012-07-02 at 15:08 +0300, Eliad Peller wrote:
>> > If the interfaces were removed just before a restart
>> > work was started, open_count will be 0, and most of
>> > the reconfig work will be skipped, including the
>> > resetting of local->in_reconfig to false.
>> >
>> > Leaving local->inconfig = true will result in
>> > dropping any incoming packet.
>> >
>> > Fix it by always setting local->in_reconfig = false
>> > (even if there are no active interfaces).
>> >
>> > Signed-off-by: Eliad Peller <eliad@wizery.com>
>> > ---
>> > this should go to 3.5
>>
>> Also looks good, thanks
>>
>> Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
>>
>> John, could you also pick this up?
>>
>> johannes
>>
>>
>> >  net/mac80211/util.c |    2 +-
>> >  1 files changed, 1 insertions(+), 1 deletions(-)
>> >
>> > diff --git a/net/mac80211/util.c b/net/mac80211/util.c
>> > index 242ecde..e1b7c63 100644
>> > --- a/net/mac80211/util.c
>> > +++ b/net/mac80211/util.c
>> > @@ -1411,10 +1411,10 @@ int ieee80211_reconfig(struct ieee80211_local *local)
>> >             if (ieee80211_sdata_running(sdata))
>> >                     ieee80211_enable_keys(sdata);
>> >
>> > + wake_up:
>> >     local->in_reconfig = false;
>> >     barrier();
>> >
>> > - wake_up:
>> >     /*
>> >      * Clear the WLAN_STA_BLOCK_BA flag so new aggregation
>> >      * sessions can be established after a resume.
>
> This doesn't apply to 3.5 -- the "local->in_reconfig = false" bit isn't there.
>
err... my mistake. this only applies on wireless-next.
sorry for the hassle.

Eliad.

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

* Re: [PATCH] mac80211: always set in_reconfig=false on wakeup
  2012-07-05 15:01     ` Eliad Peller
@ 2012-07-05 15:09       ` Johannes Berg
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2012-07-05 15:09 UTC (permalink / raw)
  To: Eliad Peller; +Cc: John W. Linville, linux-wireless

On Thu, 2012-07-05 at 18:01 +0300, Eliad Peller wrote:

> >> > diff --git a/net/mac80211/util.c b/net/mac80211/util.c
> >> > index 242ecde..e1b7c63 100644
> >> > --- a/net/mac80211/util.c
> >> > +++ b/net/mac80211/util.c
> >> > @@ -1411,10 +1411,10 @@ int ieee80211_reconfig(struct ieee80211_local *local)
> >> >             if (ieee80211_sdata_running(sdata))
> >> >                     ieee80211_enable_keys(sdata);
> >> >
> >> > + wake_up:
> >> >     local->in_reconfig = false;
> >> >     barrier();
> >> >
> >> > - wake_up:
> >> >     /*
> >> >      * Clear the WLAN_STA_BLOCK_BA flag so new aggregation
> >> >      * sessions can be established after a resume.
> >
> > This doesn't apply to 3.5 -- the "local->in_reconfig = false" bit isn't there.
> >
> err... my mistake. this only applies on wireless-next.
> sorry for the hassle.

I'll pick it up

johannes


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

end of thread, other threads:[~2012-07-05 15:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-02 12:08 [PATCH] mac80211: always set in_reconfig=false on wakeup Eliad Peller
2012-07-02 12:19 ` Johannes Berg
2012-07-02 18:17   ` John W. Linville
2012-07-05 15:01     ` Eliad Peller
2012-07-05 15:09       ` Johannes Berg

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