Example #1
0
void sreset_reset(_adapter *padapter)
{
#ifdef DBG_CONFIG_ERROR_RESET
	HAL_DATA_TYPE	*pHalData = GET_HAL_DATA(padapter);
	struct sreset_priv *psrtpriv = &pHalData->srestpriv;
	struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
	struct mlme_priv	*pmlmepriv = &(padapter->mlmepriv);
	struct xmit_priv	*pxmitpriv = &padapter->xmitpriv;
	_irqL irqL;
	unsigned long start = jiffies;
	struct dvobj_priv *psdpriv = padapter->dvobj;
	struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;

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

	psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;


#ifdef CONFIG_LPS
	rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0, "SRESET");
#endif//#ifdef CONFIG_LPS
	
	_enter_pwrlock(&pwrpriv->lock);

	psrtpriv->silent_reset_inprogress = _TRUE;
	pwrpriv->change_rfpwrstate = rf_off;

	sreset_stop_adapter(padapter);
	#ifdef CONFIG_CONCURRENT_MODE
	sreset_stop_adapter(padapter->pbuddy_adapter);
	#endif

	#ifdef CONFIG_IPS
	_ips_enter(padapter);
	_ips_leave(padapter);
	#endif

	sreset_start_adapter(padapter);
	#ifdef CONFIG_CONCURRENT_MODE
	sreset_start_adapter(padapter->pbuddy_adapter);
	#endif

	psrtpriv->silent_reset_inprogress = _FALSE;

	_exit_pwrlock(&pwrpriv->lock);

	DBG_871X("%s done in %d ms\n", __FUNCTION__, jiffies_to_msecs(jiffies - start));
	pdbgpriv->dbg_sreset_cnt++;
#endif
}
Example #2
0
void rtw_sreset_reset(struct rtw_adapter *active_adapter)
{
	struct rtw_adapter *padapter = GET_PRIMARY_ADAPTER(active_adapter);
	struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
	struct sreset_priv *psrtpriv = &pHalData->srestpriv;
	struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
	unsigned long start = jiffies;

	DBG_8723A("%s\n", __func__);

	mutex_lock(&psrtpriv->silentreset_mutex);
	psrtpriv->silent_reset_inprogress = true;
	pwrpriv->change_rfpwrstate = rf_off;

	sreset_stop_adapter(padapter);

	ips_enter23a(padapter);
	ips_leave23a(padapter);

	sreset_start_adapter(padapter);
	psrtpriv->silent_reset_inprogress = false;
	mutex_unlock(&psrtpriv->silentreset_mutex);

	DBG_8723A("%s done in %d ms\n", __func__,
		  jiffies_to_msecs(jiffies - start));
}
Example #3
0
static u8 _rtw_mi_sreset_adapter_hdl(_adapter *adapter, void *data)
{
    u8 bstart = *(u8 *)data;

    if (bstart)
        sreset_start_adapter(adapter);
    else
        sreset_stop_adapter(adapter);
    return _TRUE;
}
void sreset_reset(_adapter *padapter)
{
#ifdef DBG_CONFIG_ERROR_RESET
	HAL_DATA_TYPE	*pHalData = GET_HAL_DATA(padapter);
	struct sreset_priv *psrtpriv = &pHalData->srestpriv;
	struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
	struct mlme_priv	*pmlmepriv = &(padapter->mlmepriv);
	struct xmit_priv	*pxmitpriv = &padapter->xmitpriv;
	_irqL irqL;
	u32 start = rtw_get_current_time();

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

	psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;

	_enter_pwrlock(&pwrpriv->lock);

	psrtpriv->silent_reset_inprogress = _TRUE;
	pwrpriv->change_rfpwrstate = rf_off;

	sreset_stop_adapter(padapter);
	#ifdef CONFIG_CONCURRENT_MODE
	sreset_stop_adapter(padapter->pbuddy_adapter);
	#endif

	#ifdef CONFIG_IPS
	_ips_enter(padapter);
	_ips_leave(padapter);
	#endif

	sreset_start_adapter(padapter);
	#ifdef CONFIG_CONCURRENT_MODE
	sreset_start_adapter(padapter->pbuddy_adapter);
	#endif

	psrtpriv->silent_reset_inprogress = _FALSE;

	_exit_pwrlock(&pwrpriv->lock);

	DBG_871X("%s done in %d ms\n", __FUNCTION__, rtw_get_passing_time_ms(start));
#endif
}