In commit 8c213fa, the command to release the firmware was placed in the wrong routine. With NetworkManager, problems were rare, but when using wicd as the network control, there is a problem as shown in https://bugs.archlinux.org/task/27996#comment89833. Signed-off-by: Larry Finger --- Index: wireless-testing-new/drivers/staging/rtl8712/os_intfs.c =================================================================== --- wireless-testing-new.orig/drivers/staging/rtl8712/os_intfs.c +++ wireless-testing-new/drivers/staging/rtl8712/os_intfs.c @@ -477,9 +477,6 @@ static int netdev_close(struct net_devic 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); return 0; } Index: wireless-testing-new/drivers/staging/rtl8712/usb_intf.c =================================================================== --- wireless-testing-new.orig/drivers/staging/rtl8712/usb_intf.c +++ wireless-testing-new/drivers/staging/rtl8712/usb_intf.c @@ -30,6 +30,7 @@ #include #include +#include #include "osdep_service.h" #include "drv_types.h" @@ -620,6 +621,9 @@ static void r871xu_dev_remove(struct usb struct _adapter *padapter = netdev_priv(pnetdev); struct usb_device *udev = interface_to_usbdev(pusb_intf); + 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)