Search Linux Wireless

Re: r8712u staging in kernel 3.2.9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/05/2012 11:07 AM, alupu@xxxxxxxxxxx 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

commit 9f4bc8cf3fe750ed093856a5f5d41c11cc12ad22
Author: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
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@xxxxxxxxx>
    Tested-by: Adrian <agib@xxxxxx>
    Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
    Cc: Stable <stable@xxxxxxxxxxxxxxx> [3.2+]
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

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);
commit 2080913e017ab9f88379d93fd09546ad95faf87b
Author: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
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@xxxxxxxxx>
    Tested-by: Adrian <agib@xxxxxx>
    Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

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)

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux