Пример #1
0
static void rtw_dev_unload(struct adapter *padapter)
{
    RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("+rtw_dev_unload\n"));

    if (padapter->bup) {
        DBG_88E("===> rtw_dev_unload\n");
        padapter->bDriverStopped = true;
        if (padapter->xmitpriv.ack_tx)
            rtw_ack_tx_done(&padapter->xmitpriv, RTW_SCTX_DONE_DRV_STOP);
        /* s3. */
        if (padapter->intf_stop)
            padapter->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"));
    }

    DBG_88E("<=== rtw_dev_unload\n");

    RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("-rtw_dev_unload\n"));
}
Пример #2
0
void r871x_dev_unload(_adapter *padapter)
{
	struct net_device *pnetdev = (struct net_device*)padapter->pnetdev;

	RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("+r871x_dev_unload\n"));

	if (padapter->bup == _TRUE)
	{
#if 0
		//s1.
		if (pnetdev) {
			netif_carrier_off(pnetdev);
			netif_stop_queue(pnetdev);
		}
		RT_TRACE(_module_hci_intfs_c_,_drv_err_,("@ r871x_dev_unload:complelte s1!\n"));

		//s2.
		// indicate-disconnect if necssary (free all assoc-resources)
		// dis-assoc from assoc_sta (optional)
		rtw_indicate_disconnect(padapter);
		rtw_free_network_queue(padapter,_TRUE);
#endif

		padapter->bDriverStopped = _TRUE;
		RT_TRACE(_module_hci_intfs_c_,_drv_err_,("@ r871x_dev_unload:complete s2!\n"));

		//s3.
		rtl871x_intf_stop(padapter);
		RT_TRACE(_module_hci_intfs_c_,_drv_err_,("@ r871x_dev_unload:complete s3!\n"));

		//s4.
		rtw_stop_drv_threads(padapter);
		RT_TRACE(_module_hci_intfs_c_,_drv_err_,("@ r871x_dev_unload:complete s4!\n"));

		//s5.
		if (padapter->bSurpriseRemoved == _FALSE) {
			rtl871x_hal_deinit(padapter);
			padapter->bSurpriseRemoved = _TRUE;
		}
		RT_TRACE(_module_hci_intfs_c_,_drv_err_,("@ r871x_dev_unload:complelt s5!\n"));

		//s6.
		if (padapter->dvobj_deinit) {
			padapter->dvobj_deinit(padapter); // call sd_dvobj_deinit()
		} else {
			RT_TRACE(_module_hci_intfs_c_,_drv_err_,("Initialize hcipriv.hci_priv_init error!!!\n"));
		}
		RT_TRACE(_module_hci_intfs_c_,_drv_err_,("@ r871x_dev_unload:complete s6!\n"));

		padapter->bup = _FALSE;
	}
	else {
		RT_TRACE(_module_hci_intfs_c_,_drv_err_,("r871x_dev_unload():padapter->bup == _FALSE\n" ));
	}

	RT_TRACE(_module_hci_intfs_c_,_drv_err_,("-r871x_dev_unload\n"));
}
/*
 * Do deinit job corresponding to netdev_open()
 */
void rtw_dev_unload(PADAPTER padapter)
{
	struct net_device *pnetdev = (struct net_device*)padapter->pnetdev;
	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;

	RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("+rtw_dev_unload\n"));

	padapter->bDriverStopped = _TRUE;
	#ifdef CONFIG_XMIT_ACK
	if (padapter->xmitpriv.ack_tx)
		rtw_ack_tx_done(&padapter->xmitpriv, RTW_SCTX_DONE_DRV_STOP);
	#endif

	if (padapter->bup == _TRUE)
	{
#if 0
		if (padapter->intf_stop)
			padapter->intf_stop(padapter);
#else
		gspi_intf_stop(padapter);
#endif
		RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("@ rtw_dev_unload: stop intf complete!\n"));

		if (!adapter_to_pwrctl(padapter)->bInternalAutoSuspend)
			rtw_stop_drv_threads(padapter);

		RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("@ rtw_dev_unload: stop thread complete!\n"));

		if (padapter->bSurpriseRemoved == _FALSE)
		{
#ifdef CONFIG_WOWLAN
			if (adapter_to_pwrctl(padapter)->bSupportRemoteWakeup == _TRUE) {
				DBG_871X("%s bSupportRemoteWakeup==_TRUE  do not run rtw_hal_deinit()\n",__FUNCTION__);
			}
			else
#endif
			{
				rtw_hal_deinit(padapter);
			}
			padapter->bSurpriseRemoved = _TRUE;
		}
		RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("@ rtw_dev_unload: deinit hal complelt!\n"));

		padapter->bup = _FALSE;
	}
	else {
		RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("rtw_dev_unload: bup==_FALSE\n"));
	}

	RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("-rtw_dev_unload\n"));
}
Пример #4
0
/*
 * Do deinit job corresponding to netdev_open()
 */
static void rtw_dev_unload(PADAPTER padapter)
{
	struct net_device *pnetdev = (struct net_device*)padapter->pnetdev;


	RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("+rtw_dev_unload\n"));

	padapter->bDriverStopped = _TRUE;

	if (padapter->bup == _TRUE)
	{
		// stop TX
//		val8 = 0xFF;
//		padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_TXPAUSE,&val8);

#if 0
		if (padapter->intf_stop)
			padapter->intf_stop(padapter);
#else
		sd_intf_stop(padapter);
#endif
		RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("@ rtw_dev_unload: stop intf complete!\n"));

		if (!padapter->pwrctrlpriv.bInternalAutoSuspend)
			rtw_stop_drv_threads(padapter);
		
		RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("@ rtw_dev_unload: stop thread complete!\n"));

		if (padapter->bSurpriseRemoved == _FALSE)
		{
#ifdef CONFIG_WOWLAN
			if (padapter->pwrctrlpriv.bSupportWakeOnWlan == _TRUE) {
				DBG_871X("%s bSupportWakeOnWlan==_TRUE  do not run rtw_hal_deinit()\n",__FUNCTION__);
			}
			else
#endif
			{
				rtw_hal_deinit(padapter);
			}
			padapter->bSurpriseRemoved = _TRUE;
		}
		RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("@ rtw_dev_unload: deinit hal complelt!\n"));

		padapter->bup = _FALSE;
	}
	else {
		RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("rtw_dev_unload: bup==_FALSE\n"));
	}

	RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("-rtw_dev_unload\n"));
}
Пример #5
0
static u8 _rtw_mi_stop_drv_threads(_adapter *adapter, void *data)
{
    rtw_stop_drv_threads(adapter);
    return _TRUE;
}