All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3.5] mac80211: stop polling in disassociation
@ 2012-06-13  6:51 Johannes Berg
  2012-06-13  8:00 ` Eliad Peller
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2012-06-13  6:51 UTC (permalink / raw)
  To: linux-wireless

From: David Spinadel <david.spinadel@intel.com>

Stop connection monitor poll during disassociation.
This clears the polling flags and if a scan was
deferred it will be run.

Without this fix, if a scan was deferred due to
connection monitoring while disassociation happens,
this scan blocks further scan requests until interface
down/up which causes problems connecting to another AP.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
Will apply this soon to fix the bug.

 net/mac80211/mlme.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 0f45d02..9aefcc3 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1329,6 +1329,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
 	u32 changed = 0;
 	u8 bssid[ETH_ALEN];
 
+	ieee80211_stop_poll(sdata);
+
 	ASSERT_MGD_MTX(ifmgd);
 
 	if (WARN_ON_ONCE(tx && !frame_buf))
@@ -2592,8 +2594,6 @@ static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata,
 	struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
 	u8 frame_buf[DEAUTH_DISASSOC_LEN];
 
-	ieee80211_stop_poll(sdata);
-
 	ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, reason,
 			       false, frame_buf);
 	mutex_unlock(&ifmgd->mtx);
-- 
1.7.10




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

* Re: [PATCH 3.5] mac80211: stop polling in disassociation
  2012-06-13  6:51 [PATCH 3.5] mac80211: stop polling in disassociation Johannes Berg
@ 2012-06-13  8:00 ` Eliad Peller
  2012-06-13  8:08   ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Eliad Peller @ 2012-06-13  8:00 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On Wed, Jun 13, 2012 at 9:51 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> From: David Spinadel <david.spinadel@intel.com>
>
> Stop connection monitor poll during disassociation.
> This clears the polling flags and if a scan was
> deferred it will be run.
>
> Without this fix, if a scan was deferred due to
> connection monitoring while disassociation happens,
> this scan blocks further scan requests until interface
> down/up which causes problems connecting to another AP.
>
> Signed-off-by: David Spinadel <david.spinadel@intel.com>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
[...]

> @@ -1329,6 +1329,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
>        u32 changed = 0;
>        u8 bssid[ETH_ALEN];
>
> +       ieee80211_stop_poll(sdata);
> +
>        ASSERT_MGD_MTX(ifmgd);

it doesn't matter much, but maybe better add the call after the
function "prologue" (lockdep, WARN_ONs, ...)?

Eliad.

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

* Re: [PATCH 3.5] mac80211: stop polling in disassociation
  2012-06-13  8:00 ` Eliad Peller
@ 2012-06-13  8:08   ` Johannes Berg
  2012-06-13  8:09     ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2012-06-13  8:08 UTC (permalink / raw)
  To: Eliad Peller; +Cc: linux-wireless, david.spinadel

On Wed, 2012-06-13 at 11:00 +0300, Eliad Peller wrote:

> > @@ -1329,6 +1329,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
> >        u32 changed = 0;
> >        u8 bssid[ETH_ALEN];
> >
> > +       ieee80211_stop_poll(sdata);
> > +
> >        ASSERT_MGD_MTX(ifmgd);
> 
> it doesn't matter much, but maybe better add the call after the
> function "prologue" (lockdep, WARN_ONs, ...)?

I think we shouldn't do it after the warnings since those affect the
control flow. OTOH, they should never happen ...

johannes


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

* Re: [PATCH 3.5] mac80211: stop polling in disassociation
  2012-06-13  8:08   ` Johannes Berg
@ 2012-06-13  8:09     ` Johannes Berg
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2012-06-13  8:09 UTC (permalink / raw)
  To: Eliad Peller; +Cc: linux-wireless, david.spinadel

On Wed, 2012-06-13 at 10:08 +0200, Johannes Berg wrote:
> On Wed, 2012-06-13 at 11:00 +0300, Eliad Peller wrote:
> 
> > > @@ -1329,6 +1329,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
> > >        u32 changed = 0;
> > >        u8 bssid[ETH_ALEN];
> > >
> > > +       ieee80211_stop_poll(sdata);
> > > +
> > >        ASSERT_MGD_MTX(ifmgd);
> > 
> > it doesn't matter much, but maybe better add the call after the
> > function "prologue" (lockdep, WARN_ONs, ...)?
> 
> I think we shouldn't do it after the warnings since those affect the
> control flow. OTOH, they should never happen ...

I'll change it, makes it look better :-)

johannes


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

end of thread, other threads:[~2012-06-13  8:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-13  6:51 [PATCH 3.5] mac80211: stop polling in disassociation Johannes Berg
2012-06-13  8:00 ` Eliad Peller
2012-06-13  8:08   ` Johannes Berg
2012-06-13  8:09     ` 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.