netdev
[Top] [All Lists]

[PATCH wireless-2.6 9/12] Host AP: Fix card enabling after firmware down

To: Jeff Garzik <jgarzik@xxxxxxxxx>
Subject: [PATCH wireless-2.6 9/12] Host AP: Fix card enabling after firmware download
From: Jouni Malinen <jkmaline@xxxxxxxxx>
Date: Sun, 7 Nov 2004 23:15:36 -0800
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20041108070156.GA1076@xxxxxxxxx>
References: <20041108070156.GA1076@xxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6i
Fix card enabling after firmware download in case any of the
netdevs were up when the download was started.

Signed-off-by: Jouni Malinen <jkmaline@xxxxxxxxx>


diff -Nru a/drivers/net/wireless/hostap/hostap_hw.c 
b/drivers/net/wireless/hostap/hostap_hw.c
--- a/drivers/net/wireless/hostap/hostap_hw.c   2004-11-07 22:39:00 -08:00
+++ b/drivers/net/wireless/hostap/hostap_hw.c   2004-11-07 22:39:00 -08:00
@@ -1483,7 +1483,10 @@
        if (prism2_hw_init2(dev, initial))
                return 1;
 
-       if (!local->pri_only && !initial) {
+       /* Enable firmware if secondary image is loaded and at least one of the
+        * netdevices is up. */
+       if (!local->pri_only &&
+           (initial == 0 || (initial == 2 && local->num_dev_open > 0))) {
                if (!local->dev_enabled)
                        prism2_callback(local, PRISM2_CALLBACK_ENABLE);
                local->dev_enabled = 1;


-- 
Jouni Malinen                                            PGP id EFC895FA

<Prev in Thread] Current Thread [Next in Thread>