mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-22 04:23:39 +00:00
rtl8188eu: Remove SUPPORT_HW_RFOFF_DETECTED
This parameter was selected. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
f2c2552bb1
commit
d538ad412a
8 changed files with 8 additions and 53 deletions
|
@ -283,44 +283,25 @@ int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
|
|||
{
|
||||
u8 bAllow = false; /* set to true to allow enqueuing cmd when hw_init_completed is false */
|
||||
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
/* To decide allow or not */
|
||||
if ( (pcmdpriv->padapter->pwrctrlpriv.bHWPwrPindetect)
|
||||
&&(!pcmdpriv->padapter->registrypriv.usbss_enable)
|
||||
)
|
||||
{
|
||||
if (cmd_obj->cmdcode == GEN_CMD_CODE(_Set_Drv_Extra) )
|
||||
{
|
||||
if ((pcmdpriv->padapter->pwrctrlpriv.bHWPwrPindetect) &&
|
||||
(!pcmdpriv->padapter->registrypriv.usbss_enable)) {
|
||||
if (cmd_obj->cmdcode == GEN_CMD_CODE(_Set_Drv_Extra) ) {
|
||||
struct drvextra_cmd_parm *pdrvextra_cmd_parm = (struct drvextra_cmd_parm *)cmd_obj->parmbuf;
|
||||
if (pdrvextra_cmd_parm->ec_id == POWER_SAVING_CTRL_WK_CID)
|
||||
{
|
||||
/* DBG_88E("==>enqueue POWER_SAVING_CTRL_WK_CID\n"); */
|
||||
bAllow = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (cmd_obj->cmdcode == GEN_CMD_CODE(_SetChannelPlan))
|
||||
bAllow = true;
|
||||
|
||||
if ( (pcmdpriv->padapter->hw_init_completed ==false && bAllow == false)
|
||||
|| pcmdpriv->cmdthd_running== false /* com_thread not running */
|
||||
)
|
||||
{
|
||||
/* DBG_88E("%s:%s: drop cmdcode:%u, hw_init_completed:%u, cmdthd_running:%u\n", caller_func, __func__, */
|
||||
/* cmd_obj->cmdcode, */
|
||||
/* pcmdpriv->padapter->hw_init_completed, */
|
||||
/* pcmdpriv->cmdthd_running */
|
||||
/* */
|
||||
|
||||
if ((pcmdpriv->padapter->hw_init_completed ==false && bAllow == false) ||
|
||||
pcmdpriv->cmdthd_running== false) /* com_thread not running */
|
||||
return _FAIL;
|
||||
}
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
|
||||
{
|
||||
int res = _FAIL;
|
||||
|
|
|
@ -188,13 +188,10 @@ void rtw_ps_processor(_adapter*padapter)
|
|||
#endif /* CONFIG_P2P */
|
||||
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
rt_rf_power_state rfpwrstate;
|
||||
#endif /* SUPPORT_HW_RFOFF_DETECTED */
|
||||
|
||||
pwrpriv->ps_processing = true;
|
||||
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
if (pwrpriv->bips_processing == true)
|
||||
goto exit;
|
||||
|
||||
|
@ -250,7 +247,6 @@ void rtw_ps_processor(_adapter*padapter)
|
|||
}
|
||||
pwrpriv->pwr_state_check_cnts ++;
|
||||
}
|
||||
#endif /* SUPPORT_HW_RFOFF_DETECTED */
|
||||
|
||||
if (pwrpriv->ips_mode_req == IPS_NONE)
|
||||
goto exit;
|
||||
|
@ -656,9 +652,7 @@ _func_enter_;
|
|||
pwrctrlpriv->bkeepfwalive = false;
|
||||
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
pwrctrlpriv->pwr_state_check_interval = (pwrctrlpriv->bHWPwrPindetect) ?1000:2000;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
pwrctrlpriv->LpsIdleCount = 0;
|
||||
|
|
|
@ -1676,17 +1676,13 @@ static u32 rtl8188eu_hal_deinit(PADAPTER Adapter)
|
|||
rtw_write32(Adapter, REG_HIMRE_88E, IMR_DISABLED_88E);
|
||||
#endif
|
||||
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
DBG_88E("bkeepfwalive(%x)\n",Adapter->pwrctrlpriv.bkeepfwalive);
|
||||
if (Adapter->pwrctrlpriv.bkeepfwalive)
|
||||
{
|
||||
_ps_close_RF(Adapter);
|
||||
if ((Adapter->pwrctrlpriv.bHWPwrPindetect) && (Adapter->pwrctrlpriv.bHWPowerdown))
|
||||
rtl8192cu_hw_power_down(Adapter);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
if (Adapter->hw_init_completed == true){
|
||||
CardDisableRTL8188EU(Adapter);
|
||||
|
||||
|
@ -3532,13 +3528,13 @@ static u8 rtl8188eu_ps_func(PADAPTER Adapter,HAL_INTF_PS_FUNC efunc_id, u8 *val)
|
|||
u8 bResult = true;
|
||||
switch (efunc_id){
|
||||
|
||||
#if defined(CONFIG_AUTOSUSPEND) && defined(SUPPORT_HW_RFOFF_DETECTED)
|
||||
#if defined(CONFIG_AUTOSUSPEND)
|
||||
case HAL_USB_SELECT_SUSPEND:
|
||||
{
|
||||
u8 bfwpoll = *(( u8*)val);
|
||||
}
|
||||
break;
|
||||
#endif /* CONFIG_AUTOSUSPEND && SUPPORT_HW_RFOFF_DETECTED */
|
||||
#endif /* CONFIG_AUTOSUSPEND */
|
||||
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -42,8 +42,6 @@
|
|||
|
||||
#define CONFIG_SUPPORT_USB_INT
|
||||
|
||||
#define SUPPORT_HW_RFOFF_DETECTED
|
||||
|
||||
#define CONFIG_AP_MODE
|
||||
|
||||
#define CONFIG_P2P
|
||||
|
|
|
@ -101,10 +101,7 @@ void rtw_bb_rf_gain_offset(_adapter *padapter);
|
|||
|
||||
int rtw_ips_pwr_up(_adapter *padapter);
|
||||
void rtw_ips_pwr_down(_adapter *padapter);
|
||||
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
int rtw_hw_suspend(_adapter *padapter );
|
||||
int rtw_hw_resume(_adapter *padapter);
|
||||
#endif
|
||||
|
||||
#endif //_OSDEP_INTF_H_
|
||||
|
|
|
@ -290,9 +290,7 @@ void rtw_ps_processor(_adapter*padapter);
|
|||
#ifdef CONFIG_AUTOSUSPEND
|
||||
int autoresume_enter(_adapter* padapter);
|
||||
#endif
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
rt_rf_power_state RfOnOffDetect( PADAPTER pAdapter );
|
||||
#endif
|
||||
|
||||
s32 LPS_RF_ON_check(PADAPTER padapter, u32 delay_ms);
|
||||
void LPS_Enter(PADAPTER padapter);
|
||||
|
|
|
@ -708,10 +708,8 @@ _func_enter_;
|
|||
#ifdef CONFIG_AUTOSUSPEND
|
||||
registry_par->usbss_enable = (u8)rtw_enusbss;//0:disable,1:enable
|
||||
#endif
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
registry_par->hwpdn_mode = (u8)rtw_hwpdn_mode;//0:disable,1:enable,2:by EFUSE config
|
||||
registry_par->hwpwrp_detect = (u8)rtw_hwpwrp_detect;//0:disable,1:enable
|
||||
#endif
|
||||
registry_par->hw_wps_pbc = (u8)rtw_hw_wps_pbc;
|
||||
#ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE
|
||||
snprintf(registry_par->adaptor_info_caching_file_path, PATH_LENGTH_MAX, "%s", rtw_adaptor_info_caching_file_path);
|
||||
|
|
|
@ -495,7 +495,6 @@ static void process_spec_devid(const struct usb_device_id *pdid)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
int rtw_hw_suspend(_adapter *padapter )
|
||||
{
|
||||
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
|
||||
|
@ -619,7 +618,6 @@ error_exit:
|
|||
DBG_88E("%s, Open net dev failed\n",__func__);
|
||||
return (-1);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
|
||||
{
|
||||
|
@ -657,16 +655,13 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
|
|||
if (pwrpriv->bInternalAutoSuspend )
|
||||
{
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
// The FW command register update must after MAC and FW init ready.
|
||||
if ((padapter->bFWReady) && ( padapter->pwrctrlpriv.bHWPwrPindetect ) && (padapter->registrypriv.usbss_enable ))
|
||||
{
|
||||
u8 bOpen = true;
|
||||
rtw_interface_ps_func(padapter,HAL_USB_SELECT_SUSPEND,&bOpen);
|
||||
//rtl8192c_set_FwSelectSuspend_cmd(padapter,true ,500);//note fw to support hw power down ping detect
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
pwrpriv->bInSuspend = true;
|
||||
rtw_cancel_all_timer(padapter);
|
||||
|
@ -810,7 +805,6 @@ int rtw_resume_process(_adapter *padapter)
|
|||
if (pwrpriv->bInternalAutoSuspend )
|
||||
{
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
// The FW command register update must after MAC and FW init ready.
|
||||
if ((padapter->bFWReady) && ( padapter->pwrctrlpriv.bHWPwrPindetect ) && (padapter->registrypriv.usbss_enable ))
|
||||
{
|
||||
|
@ -819,7 +813,6 @@ int rtw_resume_process(_adapter *padapter)
|
|||
rtw_interface_ps_func(padapter,HAL_USB_SELECT_SUSPEND,&bOpen);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
DBG_88E("pwrpriv->bAutoResume (%x)\n",pwrpriv->bAutoResume );
|
||||
if ( true == pwrpriv->bAutoResume ){
|
||||
|
|
Loading…
Reference in a new issue