Staging driver fixes for 5.14-rc5
Here are a few small staging driver fixes for 5.14-rc5 to resolve some reported problems. They include: - mt7621 driver fix - rtl8723bs driver fixes - rtl8712 driver fixes. Nothing major, just small problems resolved. All have been in linux-next for a while with no reported issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCYQ+9kQ8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+ylsOwCcDMdcfuu1KI/gwuUwqvYqe+tJ8cUAn3oQSwV7 aGb+wVJbgoXM0MFknrdA =B3Gi -----END PGP SIGNATURE----- Merge tag 'staging-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fixes from Greg KH: "Here are a few small staging driver fixes for 5.14-rc5 to resolve some reported problems. They include: - mt7621 driver fix - rtl8723bs driver fixes - rtl8712 driver fixes. Nothing major, just small problems resolved. All have been in linux-next for a while with no reported issues" * tag 'staging-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: mt7621-pci: avoid to re-disable clock for those pcies not in use staging: rtl8712: error handling refactoring staging: rtl8712: get rid of flush_scheduled_work staging: rtl8723bs: select CONFIG_CRYPTO_LIB_ARC4 staging: rtl8723bs: Fix a resource leak in sd_int_dpc
This commit is contained in:
commit
911c3c5e01
|
@ -422,7 +422,6 @@ static void mt7621_pcie_init_ports(struct mt7621_pcie *pcie)
|
|||
dev_err(dev, "pcie%d no card, disable it (RST & CLK)\n",
|
||||
slot);
|
||||
mt7621_control_assert(port);
|
||||
clk_disable_unprepare(port->clk);
|
||||
port->enabled = false;
|
||||
|
||||
if (slot == 0) {
|
||||
|
|
|
@ -29,21 +29,31 @@
|
|||
#define FWBUFF_ALIGN_SZ 512
|
||||
#define MAX_DUMP_FWSZ (48 * 1024)
|
||||
|
||||
static void rtl871x_load_fw_fail(struct _adapter *adapter)
|
||||
{
|
||||
struct usb_device *udev = adapter->dvobjpriv.pusbdev;
|
||||
struct device *dev = &udev->dev;
|
||||
struct device *parent = dev->parent;
|
||||
|
||||
complete(&adapter->rtl8712_fw_ready);
|
||||
|
||||
dev_err(&udev->dev, "r8712u: Firmware request failed\n");
|
||||
|
||||
if (parent)
|
||||
device_lock(parent);
|
||||
|
||||
device_release_driver(dev);
|
||||
|
||||
if (parent)
|
||||
device_unlock(parent);
|
||||
}
|
||||
|
||||
static void rtl871x_load_fw_cb(const struct firmware *firmware, void *context)
|
||||
{
|
||||
struct _adapter *adapter = context;
|
||||
|
||||
if (!firmware) {
|
||||
struct usb_device *udev = adapter->dvobjpriv.pusbdev;
|
||||
struct usb_interface *usb_intf = adapter->pusb_intf;
|
||||
|
||||
dev_err(&udev->dev, "r8712u: Firmware request failed\n");
|
||||
usb_put_dev(udev);
|
||||
usb_set_intfdata(usb_intf, NULL);
|
||||
r8712_free_drv_sw(adapter);
|
||||
adapter->dvobj_deinit(adapter);
|
||||
complete(&adapter->rtl8712_fw_ready);
|
||||
free_netdev(adapter->pnetdev);
|
||||
rtl871x_load_fw_fail(adapter);
|
||||
return;
|
||||
}
|
||||
adapter->fw = firmware;
|
||||
|
|
|
@ -1820,3 +1820,11 @@ void LedControl871x(struct _adapter *padapter, enum LED_CTL_MODE LedAction)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void r8712_flush_led_works(struct _adapter *padapter)
|
||||
{
|
||||
struct led_priv *pledpriv = &padapter->ledpriv;
|
||||
|
||||
flush_work(&pledpriv->SwLed0.BlinkWorkItem);
|
||||
flush_work(&pledpriv->SwLed1.BlinkWorkItem);
|
||||
}
|
||||
|
|
|
@ -112,6 +112,7 @@ struct led_priv {
|
|||
void r8712_InitSwLeds(struct _adapter *padapter);
|
||||
void r8712_DeInitSwLeds(struct _adapter *padapter);
|
||||
void LedControl871x(struct _adapter *padapter, enum LED_CTL_MODE LedAction);
|
||||
void r8712_flush_led_works(struct _adapter *padapter);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -224,3 +224,11 @@ void r8712_unregister_cmd_alive(struct _adapter *padapter)
|
|||
}
|
||||
mutex_unlock(&pwrctrl->mutex_lock);
|
||||
}
|
||||
|
||||
void r8712_flush_rwctrl_works(struct _adapter *padapter)
|
||||
{
|
||||
struct pwrctrl_priv *pwrctrl = &padapter->pwrctrlpriv;
|
||||
|
||||
flush_work(&pwrctrl->SetPSModeWorkItem);
|
||||
flush_work(&pwrctrl->rpwm_workitem);
|
||||
}
|
||||
|
|
|
@ -108,5 +108,6 @@ void r8712_cpwm_int_hdl(struct _adapter *padapter,
|
|||
void r8712_set_ps_mode(struct _adapter *padapter, uint ps_mode,
|
||||
uint smart_ps);
|
||||
void r8712_set_rpwm(struct _adapter *padapter, u8 val8);
|
||||
void r8712_flush_rwctrl_works(struct _adapter *padapter);
|
||||
|
||||
#endif /* __RTL871X_PWRCTRL_H_ */
|
||||
|
|
|
@ -591,22 +591,18 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf)
|
|||
{
|
||||
struct net_device *pnetdev = usb_get_intfdata(pusb_intf);
|
||||
struct usb_device *udev = interface_to_usbdev(pusb_intf);
|
||||
|
||||
if (pnetdev) {
|
||||
struct _adapter *padapter = netdev_priv(pnetdev);
|
||||
|
||||
/* never exit with a firmware callback pending */
|
||||
wait_for_completion(&padapter->rtl8712_fw_ready);
|
||||
pnetdev = usb_get_intfdata(pusb_intf);
|
||||
usb_set_intfdata(pusb_intf, NULL);
|
||||
if (!pnetdev)
|
||||
goto firmware_load_fail;
|
||||
release_firmware(padapter->fw);
|
||||
if (drvpriv.drv_registered)
|
||||
padapter->surprise_removed = true;
|
||||
if (pnetdev->reg_state != NETREG_UNINITIALIZED)
|
||||
unregister_netdev(pnetdev); /* will call netdev_close() */
|
||||
flush_scheduled_work();
|
||||
r8712_flush_rwctrl_works(padapter);
|
||||
r8712_flush_led_works(padapter);
|
||||
udelay(1);
|
||||
/* Stop driver mlme relation timer */
|
||||
r8712_stop_drv_timers(padapter);
|
||||
|
@ -618,8 +614,7 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf)
|
|||
* when disconnect
|
||||
*/
|
||||
usb_put_dev(udev);
|
||||
}
|
||||
firmware_load_fail:
|
||||
|
||||
/* If we didn't unplug usb dongle and remove/insert module, driver
|
||||
* fails on sitesurvey for the first time when device is up.
|
||||
* Reset usb port for sitesurvey fail issue.
|
||||
|
|
|
@ -5,6 +5,7 @@ config RTL8723BS
|
|||
depends on m
|
||||
select WIRELESS_EXT
|
||||
select WEXT_PRIV
|
||||
select CRYPTO_LIB_ARC4
|
||||
help
|
||||
This option enables support for RTL8723BS SDIO drivers, such as
|
||||
the wifi found on the 1st gen Intel Compute Stick, the CHIP
|
||||
|
|
|
@ -909,6 +909,8 @@ void sd_int_dpc(struct adapter *adapter)
|
|||
} else {
|
||||
rtw_c2h_wk_cmd(adapter, (u8 *)c2h_evt);
|
||||
}
|
||||
} else {
|
||||
kfree(c2h_evt);
|
||||
}
|
||||
} else {
|
||||
/* Error handling for malloc fail */
|
||||
|
|
Loading…
Reference in New Issue