Пример #1
0
static void rtw_dev_unload(struct rtw_adapter *padapter)
{
	struct submit_ctx *pack_tx_ops = &padapter->xmitpriv.ack_tx_ops;
	RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("+rtw_dev_unload\n"));

	if (padapter->bup) {
		DBG_8723A("===> rtw_dev_unload\n");

		padapter->bDriverStopped = true;
		if (padapter->xmitpriv.ack_tx)
			rtw23a_sctx_done_err(&pack_tx_ops,
					     RTW_SCTX_DONE_DRV_STOP);

		/* s3. */
		rtl8723a_usb_intf_stop(padapter);

		/* s4. */
		flush_workqueue(padapter->cmdpriv.wq);

		/* s5. */
		if (!padapter->bSurpriseRemoved) {
			rtl8723au_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"));
	}
	DBG_8723A("<=== rtw_dev_unload\n");
	RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("-rtw_dev_unload\n"));
}
Пример #2
0
void rtw_ips_dev_unload23a(struct rtw_adapter *padapter)
{
	rtl8723a_fifo_cleanup(padapter);

	rtl8723a_usb_intf_stop(padapter);

	/* s5. */
	if (!padapter->bSurpriseRemoved)
		rtw_hal_deinit23a(padapter);
}