Esempio n. 1
0
void pwr_state_check_handler(void *FunctionContext)
{
	_adapter *padapter = (_adapter *)FunctionContext;
	struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
	struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
	struct pwrctrl_priv *pwrctrlpriv = &padapter->pwrctrlpriv;
#ifdef CONFIG_P2P
	struct wifidirect_info	*pwdinfo = &( padapter->wdinfo );
#endif //CONFIG_P2P
	//DBG_871X("%s\n", __FUNCTION__);

#ifdef SUPPORT_HW_RFOFF_DETECTED
	//DBG_8192C("%s...bHWPwrPindetect(%d)\n",__FUNCTION__,padapter->pwrctrlpriv.bHWPwrPindetect);
	if(padapter->pwrctrlpriv.bHWPwrPindetect)
	{
		rtw_ps_cmd(padapter);		
		rtw_set_pwr_state_check_timer(&padapter->pwrctrlpriv);
	}	
	else	
#endif
	{
		//if(padapter->net_closed == _TRUE)		return;
		//DBG_8192C("==>%s .fw_state(%x)\n", __FUNCTION__, get_fwstate(pmlmepriv));
		if (	(check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) ||
			(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE) ||
			(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) ||	
			(check_fwstate(pmlmepriv, _FW_LINKED|_FW_UNDER_SURVEY|_FW_UNDER_LINKING) == _TRUE)  ||
			(padapter->bup == _FALSE)		
#ifdef CONFIG_P2P
			|| (pwdinfo->p2p_state != P2P_STATE_NONE)
#endif //CONFIG_P2P
			)
		{	
			//other pwr ctrl....	
			rtw_set_pwr_state_check_timer(&padapter->pwrctrlpriv);
		}
		else
		{	
			if((pwrpriv->rf_pwrstate == rf_on) &&(_FALSE == pwrpriv->bips_processing))
			{	
				pwrpriv->change_rfpwrstate = rf_off;
				pwrctrlpriv->pwr_state_check_cnts = 0;
				DBG_8192C("==>pwr_state_check_handler .fw_state(%x)\n",get_fwstate(pmlmepriv));				
				rtw_ps_cmd(padapter);				
			}

		}
	}
	


}
Esempio n. 2
0
static void pwr_state_check_handler(struct timer_list *t)
{
	struct pwrctrl_priv *pwrctrlpriv =
		from_timer(pwrctrlpriv, t, pwr_state_check_timer);
	struct adapter *padapter = pwrctrlpriv->adapter;

	rtw_ps_cmd(padapter);
}
void pwr_state_check_handler(void *FunctionContext)
{
	_adapter *padapter = (_adapter *)FunctionContext;
	struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
	struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
	struct pwrctrl_priv *pwrctrlpriv = &padapter->pwrctrlpriv;

#ifdef SUPPORT_HW_RFOFF_DETECTED
	//DBG_8192C("%s...bHWPwrPindetect(%d)\n",__FUNCTION__,padapter->pwrctrlpriv.bHWPwrPindetect);
	if(padapter->pwrctrlpriv.bHWPwrPindetect)
	{
		rtw_ps_cmd(padapter);		
		_set_timer(&padapter->pwrctrlpriv.pwr_state_check_timer, padapter->pwrctrlpriv.pwr_state_check_inverval);
	}	
	else	
#endif
	{
		if(padapter->net_closed == _TRUE)		return;
		//DBG_8192C("%s\n",__FUNCTION__);
		if (	(check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) ||
			(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE) ||
			(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) ||	
			(check_fwstate(pmlmepriv, _FW_LINKED|_FW_UNDER_SURVEY|_FW_UNDER_LINKING) == _TRUE)  ||
			(padapter->net_closed == _TRUE)|| (padapter->bup == _FALSE)		
			)
		{	
			//other pwr ctrl....	
			_set_timer(&padapter->pwrctrlpriv.pwr_state_check_timer, padapter->pwrctrlpriv.pwr_state_check_inverval);
		}
		else
		{	
			if((pwrpriv->current_rfpwrstate == rf_on) &&(_FALSE == pwrpriv->bips_processing))
			{	
				pwrpriv->change_rfpwrstate = rf_off;
				pwrctrlpriv->pwr_state_check_cnts = 0;
				DBG_8192C("==>pwr_state_check_handler .fw_state(%x)\n",padapter->mlmepriv.fw_state);				
				rtw_ps_cmd(padapter);				
			}

		}
	}
	


}
Esempio n. 4
0
void pwr_state_check_handler(struct timer_list *t)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
	_adapter *padapter = (_adapter *)FunctionContext;
#else
	_adapter *padapter = from_timer(padapter, t, pwrctrlpriv.pwr_state_check_timer);
#endif
	rtw_ps_cmd(padapter);
}
void pwr_state_check_handler(void *FunctionContext)
{
	_adapter *padapter = (_adapter *)FunctionContext;
	rtw_ps_cmd(padapter);
}
Esempio n. 6
0
void pwr_state_check_handler(RTW_TIMER_HDL_ARGS)
{
	_adapter *padapter = (_adapter *)FunctionContext;
	rtw_ps_cmd(padapter);
}
Esempio n. 7
0
static void pwr_state_check_handler(unsigned long data)
{
	struct adapter *padapter = (struct adapter *)data;
	rtw_ps_cmd(padapter);
}
Esempio n. 8
0
static void pwr_state_check_handler(RTW_TIMER_HDL_ARGS)
{
	struct rtl_priv *rtlpriv = (struct rtl_priv *)FunctionContext;
	rtw_ps_cmd(rtlpriv);
}