static void rtw_dev_unload(struct adapter *padapter) { RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("+rtw_dev_unload\n")); if (padapter->bup) { pr_debug("===> rtw_dev_unload\n"); padapter->bDriverStopped = true; if (padapter->xmitpriv.ack_tx) rtw_ack_tx_done(&padapter->xmitpriv, RTW_SCTX_DONE_DRV_STOP); /* s3. */ usb_intf_stop(padapter); /* s4. */ if (!padapter->pwrctrlpriv.bInternalAutoSuspend) rtw_stop_drv_threads(padapter); /* s5. */ if (!padapter->bSurpriseRemoved) { rtw_hal_deinit(padapter); padapter->bSurpriseRemoved = true; } padapter->bup = false; } else { RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("r871x_dev_unload():padapter->bup == false\n")); } pr_debug("<=== rtw_dev_unload\n"); RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("-rtw_dev_unload\n")); }
void rtw_ips_dev_unload(struct adapter *padapter) { DBG_88E("====> %s...\n", __func__); rtw_hal_set_hwreg(padapter, HW_VAR_FIFO_CLEARN_UP, NULL); usb_intf_stop(padapter); /* s5. */ if (!padapter->bSurpriseRemoved) rtw_hal_deinit(padapter); }