2010-02-03 19:33:48

by Larry Finger

[permalink] [raw]
Subject: [PATCH] b43/b43legacy: Wake queues in wireless_core_start

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 <[email protected]>
Cc: Stable <[email protected]> [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);


2010-02-03 19:47:47

by Michael Büsch

[permalink] [raw]
Subject: Re: [PATCH] b43/b43legacy: Wake queues in wireless_core_start

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 <[email protected]>
> Cc: Stable <[email protected]> [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.