Example #1
0
static int rtw_gspi_resume(struct spi_device *spi)
{
	struct dvobj_priv *dvobj = spi_get_drvdata(spi);
	PADAPTER padapter = dvobj->if1;
	struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
	 int ret = 0;


	DBG_871X("==> %s (%s:%d)\n",__FUNCTION__, current->comm, current->pid);

	if(pwrpriv->bInternalAutoSuspend ){
 		ret = rtw_resume_process(padapter);
	} else {
#ifdef CONFIG_RESUME_IN_WORKQUEUE
		rtw_resume_in_workqueue(pwrpriv);
#elif defined(CONFIG_HAS_EARLYSUSPEND) || defined(CONFIG_ANDROID_POWER)
		if(rtw_is_earlysuspend_registered(pwrpriv)) {
			//jeff: bypass resume here, do in late_resume
			pwrpriv->do_late_resume = _TRUE;
		} else {
			ret = rtw_resume_process(padapter);
		}
#else // Normal resume process
		ret = rtw_resume_process(padapter);
#endif //CONFIG_RESUME_IN_WORKQUEUE
	}

	DBG_871X("<========  %s return %d\n", __FUNCTION__, ret);
	return ret;

}
Example #2
0
static int rtw_sdio_resume(struct device *dev)
{
	struct sdio_func *func =dev_to_sdio_func(dev);
	struct dvobj_priv *psdpriv = sdio_get_drvdata(func);
	_adapter *padapter = psdpriv->padapter;
	struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
	 int ret = 0;
 
	if(pwrpriv->bInternalAutoSuspend ){
 		ret = rtw_resume_process(padapter);
	} else {
#ifdef CONFIG_RESUME_IN_WORKQUEUE
		rtw_resume_in_workqueue(pwrpriv);
#elif defined(CONFIG_HAS_EARLYSUSPEND) || defined(CONFIG_ANDROID_POWER)
		if(rtw_is_earlysuspend_registered(pwrpriv)) {
			//jeff: bypass resume here, do in late_resume
			pwrpriv->do_late_resume = _TRUE;
		} else {
			ret = rtw_resume_process(padapter);
		}
#else // Normal resume process
		ret = rtw_resume_process(padapter);
#endif //CONFIG_RESUME_IN_WORKQUEUE
	}
	
	return ret;

}
static int rtw_gspi_resume(struct spi_device *spi)
{
	struct dvobj_priv *dvobj = spi_get_drvdata(spi);
	PADAPTER padapter = dvobj->if1;
	struct pwrctrl_priv *pwrpriv = dvobj_to_pwrctl(dvobj);
	 int ret = 0;


	DBG_871X("==> %s (%s:%d)\n",__FUNCTION__, current->comm, current->pid);

	if(pwrpriv->bInternalAutoSuspend ){
 		ret = rtw_resume_process(padapter);
	} else {
#ifdef CONFIG_RESUME_IN_WORKQUEUE
		rtw_resume_in_workqueue(pwrpriv);
#else
		if(rtw_is_earlysuspend_registered(pwrpriv)) {
			/* jeff: bypass resume here, do in late_resume */
			rtw_set_do_late_resume(pwrpriv, _TRUE);
		} else {
			ret = rtw_resume_process(padapter);
		}
#endif /* CONFIG_RESUME_IN_WORKQUEUE */
	}

	DBG_871X("<========  %s return %d\n", __FUNCTION__, ret);
	return ret;

}
Example #4
0
static int rtw_resume(struct usb_interface *pusb_intf)
{
    struct dvobj_priv *dvobj = usb_get_intfdata(pusb_intf);
    struct adapter *padapter = dvobj->if1;

    return rtw_resume_process(padapter);
}
Example #5
0
static void resume_workitem_callback(struct work_struct *work)
{
	struct pwrctrl_priv *pwrpriv =
	    container_of(work, struct pwrctrl_priv, resume_work);
	struct rtw_adapter *adapter =
	    container_of(pwrpriv, _adapter, pwrctrlpriv);

	DBG_8192D("%s\n", __func__);
	rtw_resume_process(adapter);
}
Example #6
0
static int rtw_sdio_resume(struct device *dev)
{
	struct sdio_func *func =dev_to_sdio_func(dev);
	struct dvobj_priv *psdpriv = sdio_get_drvdata(func);
	_adapter *padapter = psdpriv->padapter;
	struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
	 int ret = 0;

/*depends on sunxi power control */
#if defined CONFIG_MMC_SUNXI_POWER_CONTROL
    unsigned int mod_sel = mmc_pm_get_mod_type();
	if(mod_sel == SUNXI_SDIO_WIFI_NUM_RTL8723AS) {
//		rtl8723as_sdio_powerup();
// 		sunximmc_rescan_card(SDIOID, 1);		
		printk("[rtl8723as] %s: resume start.\n", __FUNCTION__);  		
	} else {
		printk("[rtl8723as] %s: mod_sel = %d is incorrect./n", __FUNCTION__, mod_sel);
	}
#endif

	if(pwrpriv->bInternalAutoSuspend ){
 		ret = rtw_resume_process(padapter);
	} else {
#ifdef CONFIG_RESUME_IN_WORKQUEUE
		rtw_resume_in_workqueue(pwrpriv);
#elif defined(CONFIG_HAS_EARLYSUSPEND) || defined(CONFIG_ANDROID_POWER)
		if(rtw_is_earlysuspend_registered(pwrpriv)) {
			//jeff: bypass resume here, do in late_resume
			pwrpriv->do_late_resume = _TRUE;
		} else {
			ret = rtw_resume_process(padapter);
		}
#else // Normal resume process
		ret = rtw_resume_process(padapter);
#endif //CONFIG_RESUME_IN_WORKQUEUE
	}
	
	return ret;

}
Example #7
0
static void resume_workitem_callback(struct work_struct *work)
{
	struct pwrctrl_priv *pwrpriv = container_of(work, struct pwrctrl_priv, resume_work);
	_adapter *adapter = container_of(pwrpriv, _adapter, pwrctrlpriv);

	DBG_871X("%s\n",__FUNCTION__);

	#ifdef CONFIG_USB_HCI
	rtw_resume_process(adapter->dvobjpriv.pusbintf);
	#elif defined(CONFIG_PCI_HCI)
	#endif
	
}
Example #8
0
static void rtw_late_resume(android_early_suspend_t *h)
{
	struct pwrctrl_priv *pwrpriv =
	    container_of(h, struct pwrctrl_priv, early_suspend);
	struct rtw_adapter *adapter =
	    container_of(pwrpriv, _adapter, pwrctrlpriv);

	DBG_8192D("%s\n", __func__);
	if (pwrpriv->do_late_resume) {
		rtw_set_do_late_resume(pwrpriv, false);
		rtw_resume_process(adapter);
	}
}
Example #9
0
static void rtw_late_resume(android_early_suspend_t *h)
{
	struct pwrctrl_priv *pwrpriv = container_of(h, struct pwrctrl_priv, early_suspend);
	_adapter *adapter = container_of(pwrpriv, _adapter, pwrctrlpriv);

	DBG_871X("%s\n",__FUNCTION__);
	if(pwrpriv->do_late_resume) {
		#ifdef CONFIG_USB_HCI
		rtw_resume_process(adapter->dvobjpriv.pusbintf);
		pwrpriv->do_late_resume = _FALSE;
		#elif defined(CONFIG_PCI_HCI)
		#endif
	}
}