linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] b43/b43legacy: Wake queues in wireless_core_start
@ 2010-02-03 19:33 Larry Finger
  2010-02-03 19:47 ` Michael Buesch
  0 siblings, 1 reply; 2+ messages in thread
From: Larry Finger @ 2010-02-03 19:33 UTC (permalink / raw)
  To: John W Linville, Michael Buesch; +Cc: bcm43xx-dev, linux-wireless

If b43 or b43legacy are deauthenticated or disconnected, there is a
possibility that a reconnection is tried with the queues stopped in
mac80211. To prevent this, start the queues before setting
STAT_INITIALIZED.

In b43, a similar change has been in place (twice) in the
wireless_core_init() routine. Remove the duplicate and add similar
code to b43legacy.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org>   [2.6.32]
---

John,

The b43 patch to wireless_core_start() seems to help a regression
between 2.6.31 and 2.6.32. Accordingly, these changes should be
applied to 2.6.33 with the automatic backport to 2.6.32.

Larry
---

Index: wireless-testing/drivers/net/wireless/b43/main.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43/main.c
+++ wireless-testing/drivers/net/wireless/b43/main.c
@@ -3980,6 +3980,7 @@ static int b43_wireless_core_start(struc
 	}
 
 	/* We are ready to run. */
+	ieee80211_wake_queues(dev->wl->hw);
 	b43_set_status(dev, B43_STAT_STARTED);
 
 	/* Start data flow (TX/RX). */
@@ -4389,8 +4390,6 @@ static int b43_wireless_core_init(struct
 
 	ieee80211_wake_queues(dev->wl->hw);
 
-	ieee80211_wake_queues(dev->wl->hw);
-
 	b43_set_status(dev, B43_STAT_INITIALIZED);
 
 out:
Index: wireless-testing/drivers/net/wireless/b43legacy/main.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43legacy/main.c
+++ wireless-testing/drivers/net/wireless/b43legacy/main.c
@@ -2923,6 +2923,7 @@ static int b43legacy_wireless_core_start
 		goto out;
 	}
 	/* We are ready to run. */
+	ieee80211_wake_queues(dev->wl->hw);
 	b43legacy_set_status(dev, B43legacy_STAT_STARTED);
 
 	/* Start data flow (TX/RX) */
@@ -3343,6 +3344,7 @@ static int b43legacy_wireless_core_init(
 	b43legacy_security_init(dev);
 	b43legacy_rng_init(wl);
 
+	ieee80211_wake_queues(dev->wl->hw);
 	b43legacy_set_status(dev, B43legacy_STAT_INITIALIZED);
 
 	b43legacy_leds_init(dev);

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

* Re: [PATCH] b43/b43legacy: Wake queues in wireless_core_start
  2010-02-03 19:33 [PATCH] b43/b43legacy: Wake queues in wireless_core_start Larry Finger
@ 2010-02-03 19:47 ` Michael Buesch
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Buesch @ 2010-02-03 19:47 UTC (permalink / raw)
  To: Larry Finger; +Cc: John W Linville, bcm43xx-dev, linux-wireless

On Wednesday 03 February 2010 20:33:44 Larry Finger wrote:
> If b43 or b43legacy are deauthenticated or disconnected, there is a
> possibility that a reconnection is tried with the queues stopped in
> mac80211. To prevent this, start the queues before setting
> STAT_INITIALIZED.
> 
> In b43, a similar change has been in place (twice) in the
> wireless_core_init() routine. Remove the duplicate and add similar
> code to b43legacy.
> 
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> Cc: Stable <stable@kernel.org>   [2.6.32]
> ---
> 
> John,
> 
> The b43 patch to wireless_core_start() seems to help a regression
> between 2.6.31 and 2.6.32. Accordingly, these changes should be
> applied to 2.6.33 with the automatic backport to 2.6.32.
> 
> Larry
> ---
> 
> Index: wireless-testing/drivers/net/wireless/b43/main.c
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/b43/main.c
> +++ wireless-testing/drivers/net/wireless/b43/main.c
> @@ -3980,6 +3980,7 @@ static int b43_wireless_core_start(struc
>  	}
>  
>  	/* We are ready to run. */
> +	ieee80211_wake_queues(dev->wl->hw);
>  	b43_set_status(dev, B43_STAT_STARTED);
>  
>  	/* Start data flow (TX/RX). */
> @@ -4389,8 +4390,6 @@ static int b43_wireless_core_init(struct
>  
>  	ieee80211_wake_queues(dev->wl->hw);
>  
> -	ieee80211_wake_queues(dev->wl->hw);
> -
>  	b43_set_status(dev, B43_STAT_INITIALIZED);

Well, I wonder why it makes a difference.
I think we only call core_start() right after core_init() calls.

Anyway, I think wake_queues should both be removed from core_init()
and queues should only be woken in core_start.

-- 
Greetings, Michael.

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

end of thread, other threads:[~2010-02-03 19:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-03 19:33 [PATCH] b43/b43legacy: Wake queues in wireless_core_start Larry Finger
2010-02-03 19:47 ` Michael Buesch

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