From: Larry Finger <Larry.Finger@lwfinger.net>
To: alupu@verizon.net
Cc: linux-wireless@vger.kernel.org
Subject: Re: r8712u staging in kernel 3.2.9
Date: Mon, 05 Mar 2012 13:10:36 -0600 [thread overview]
Message-ID: <4F550FAC.2060805@lwfinger.net> (raw)
In-Reply-To: <5847319.2627837.1330967243216.JavaMail.root@vznit170080>
[-- Attachment #1: Type: text/plain, Size: 813 bytes --]
On 03/05/2012 11:07 AM, alupu@verizon.net wrote:
> Hello Larry,
>
> System: (B)LFS i686-pc-linux-gnu, 3.2.9
> Rosewill Wireless Adapter: RNX-N180UBE
>
> I compiled (as part of kernel 3.2.9) the r8712u module.
> Comes up OK but cannot take an essid nor a key.
>
>
> Example:
> iwconfig wlan0 essid<ESSID> key restricted<Encryption key>
>
>
> Fails quietly:
> iwconfig wlan0
>
> wlan0 unassociated Nickname:"rtl_wifi"
> Mode:Managed Access Point: Not-Associated Sensitivity:0/0
> Retry:off RTS thr:off Fragment thr:off
> Encryption key:off
> ...
>
> FWIW, it does take a mode ("managed", as shown above - default was Auto)
There are a couple of bugs in 3.2.6+. I don't think they have been fixed by
3.2.9. Check dmesg for a "Badfw size" message. If you see that, the two attached
patches will fix that.
Larry
[-- Attachment #2: r8712u_patch1 --]
[-- Type: text/plain, Size: 2236 bytes --]
commit 9f4bc8cf3fe750ed093856a5f5d41c11cc12ad22
Author: Larry Finger <Larry.Finger@lwfinger.net>
Date: Sat Feb 25 18:10:20 2012 -0600
staging: r8712u: Fix regression introduced by commit a5ee652
In commit a5ee652 "staging: r8712u: Interface-state not fully tracked",
the private boolean "bup" was set false when the interface was brought down,
as that seemed appropriate. This change has not caused any problems when
using NetworkManager or manual control of the device; however, when wicd
control is used, there is a locking problem in wpa_supplicant, as shown in
https://bugzilla.kernel.org/show_bug.cgi?id=42818.
This fix reverts the only code change in commit a5ee652. My
analysis is that "bup" is badly named. In its present form, it
seems to indicate the up/down state of the device, but its usage
is more consistent with an initialized/uninitialized state. That
problem will be addressed in a later patch.
Note: Commit 8c213fa, which introdued asynchronous firmware loading
for this driver, exposed this bug to a greater extent. That bug
is addressed in the next patch in this series.
This bug is also responsible for the bug in
https://bugzilla.kernel.org/show_bug.cgi?id=42815. and this bug is
also part of the problems discussed at https://bugs.archlinux.org/task/27996#comment89950.
Tested-by: Alberto Lago Ballesteros <saniukeokusainaya@gmail.com>
Tested-by: Adrian <agib@gmx.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> [3.2+]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c
index b22fea5..4cf175f 100644
--- a/drivers/staging/rtl8712/os_intfs.c
+++ b/drivers/staging/rtl8712/os_intfs.c
@@ -475,8 +475,6 @@ static int netdev_close(struct net_device *pnetdev)
r8712_free_assoc_resources(padapter);
/*s2-4.*/
r8712_free_network_queue(padapter);
- /* The interface is no longer Up: */
- padapter->bup = false;
release_firmware(padapter->fw);
/* never exit with a firmware callback pending */
wait_for_completion(&padapter->rtl8712_fw_ready);
[-- Attachment #3: r8712u_patch2 --]
[-- Type: text/plain, Size: 2217 bytes --]
commit 2080913e017ab9f88379d93fd09546ad95faf87b
Author: Larry Finger <Larry.Finger@lwfinger.net>
Date: Sat Feb 25 18:10:21 2012 -0600
staging: r8712u: Fix regression caused by commit 8c213fa
In commit 8c213fa "staging: r8712u: Use asynchronous firmware loading",
the command to release the firmware was placed in the wrong routine.
In combination with the bug introduced in commit a5ee652 "staging: r8712u:
Interface-state not fully tracked", the driver attempts to upload firmware
that had already been released. This bug is the source of one of the
problems in https://bugs.archlinux.org/task/27996#comment89833.
Tested-by: Alberto Lago Ballesteros <saniukeokusainaya@gmail.com>
Tested-by: Adrian <agib@gmx.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c
index 4cf175f..7bbd53a 100644
--- a/drivers/staging/rtl8712/os_intfs.c
+++ b/drivers/staging/rtl8712/os_intfs.c
@@ -475,9 +475,6 @@ static int netdev_close(struct net_device *pnetdev)
r8712_free_assoc_resources(padapter);
/*s2-4.*/
r8712_free_network_queue(padapter);
- release_firmware(padapter->fw);
- /* never exit with a firmware callback pending */
- wait_for_completion(&padapter->rtl8712_fw_ready);
return 0;
}
diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c
index fe0e2ff..e01fe14 100644
--- a/drivers/staging/rtl8712/usb_intf.c
+++ b/drivers/staging/rtl8712/usb_intf.c
@@ -30,6 +30,7 @@
#include <linux/usb.h>
#include <linux/module.h>
+#include <linux/firmware.h>
#include "osdep_service.h"
#include "drv_types.h"
@@ -620,6 +621,10 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf)
struct _adapter *padapter = netdev_priv(pnetdev);
struct usb_device *udev = interface_to_usbdev(pusb_intf);
+ if (padapter->fw_found)
+ release_firmware(padapter->fw);
+ /* never exit with a firmware callback pending */
+ wait_for_completion(&padapter->rtl8712_fw_ready);
usb_set_intfdata(pusb_intf, NULL);
if (padapter) {
if (drvpriv.drv_registered == true)
next prev parent reply other threads:[~2012-03-05 19:10 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-05 17:07 r8712u staging in kernel 3.2.9 alupu
2012-03-05 19:10 ` Larry Finger [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-03-06 2:22 alupu
2012-03-06 20:21 ` Larry Finger
2012-03-07 1:44 alupu
[not found] <31991817.2926129.1331079358141.JavaMail.root@vznit170116>
2012-03-07 3:22 ` Larry Finger
2012-03-07 5:31 alupu
2012-03-07 16:15 ` Larry Finger
2012-03-09 19:06 alupu
2012-03-10 2:17 ` Larry Finger
2012-03-10 4:53 alupu
2012-03-10 18:10 alupu
2012-03-11 4:23 ` Larry Finger
2012-03-11 19:57 alupu
2012-03-11 19:57 alupu
2012-03-11 22:36 alupu
2012-03-12 0:19 ` Larry Finger
2012-03-12 1:46 alupu
2012-03-12 2:54 ` Larry Finger
2012-03-12 23:02 alupu
2012-03-13 0:54 ` Larry Finger
2012-03-13 4:13 alupu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F550FAC.2060805@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=alupu@verizon.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).