rtl8188eu: Remove SUPPORT_HW_RFOFF_DETECTED

This parameter was selected.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-07-20 13:33:00 -05:00
parent f2c2552bb1
commit d538ad412a
8 changed files with 8 additions and 53 deletions

View file

@ -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 */ 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 */ /* To decide allow or not */
if ( (pcmdpriv->padapter->pwrctrlpriv.bHWPwrPindetect) if ((pcmdpriv->padapter->pwrctrlpriv.bHWPwrPindetect) &&
&&(!pcmdpriv->padapter->registrypriv.usbss_enable) (!pcmdpriv->padapter->registrypriv.usbss_enable)) {
) if (cmd_obj->cmdcode == GEN_CMD_CODE(_Set_Drv_Extra) ) {
{
if (cmd_obj->cmdcode == GEN_CMD_CODE(_Set_Drv_Extra) )
{
struct drvextra_cmd_parm *pdrvextra_cmd_parm = (struct drvextra_cmd_parm *)cmd_obj->parmbuf; 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) if (pdrvextra_cmd_parm->ec_id == POWER_SAVING_CTRL_WK_CID)
{
/* DBG_88E("==>enqueue POWER_SAVING_CTRL_WK_CID\n"); */
bAllow = true; bAllow = true;
}
} }
} }
#endif
if (cmd_obj->cmdcode == GEN_CMD_CODE(_SetChannelPlan)) if (cmd_obj->cmdcode == GEN_CMD_CODE(_SetChannelPlan))
bAllow = true; bAllow = true;
if ( (pcmdpriv->padapter->hw_init_completed ==false && bAllow == false) if ((pcmdpriv->padapter->hw_init_completed ==false && bAllow == false) ||
|| pcmdpriv->cmdthd_running== false /* com_thread not running */ 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 */
/* */
return _FAIL; return _FAIL;
}
return _SUCCESS; return _SUCCESS;
} }
u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj) u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
{ {
int res = _FAIL; int res = _FAIL;

View file

@ -188,13 +188,10 @@ void rtw_ps_processor(_adapter*padapter)
#endif /* CONFIG_P2P */ #endif /* CONFIG_P2P */
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
#ifdef SUPPORT_HW_RFOFF_DETECTED
rt_rf_power_state rfpwrstate; rt_rf_power_state rfpwrstate;
#endif /* SUPPORT_HW_RFOFF_DETECTED */
pwrpriv->ps_processing = true; pwrpriv->ps_processing = true;
#ifdef SUPPORT_HW_RFOFF_DETECTED
if (pwrpriv->bips_processing == true) if (pwrpriv->bips_processing == true)
goto exit; goto exit;
@ -250,7 +247,6 @@ void rtw_ps_processor(_adapter*padapter)
} }
pwrpriv->pwr_state_check_cnts ++; pwrpriv->pwr_state_check_cnts ++;
} }
#endif /* SUPPORT_HW_RFOFF_DETECTED */
if (pwrpriv->ips_mode_req == IPS_NONE) if (pwrpriv->ips_mode_req == IPS_NONE)
goto exit; goto exit;
@ -656,9 +652,7 @@ _func_enter_;
pwrctrlpriv->bkeepfwalive = false; pwrctrlpriv->bkeepfwalive = false;
#ifdef CONFIG_AUTOSUSPEND #ifdef CONFIG_AUTOSUSPEND
#ifdef SUPPORT_HW_RFOFF_DETECTED
pwrctrlpriv->pwr_state_check_interval = (pwrctrlpriv->bHWPwrPindetect) ?1000:2000; pwrctrlpriv->pwr_state_check_interval = (pwrctrlpriv->bHWPwrPindetect) ?1000:2000;
#endif
#endif #endif
pwrctrlpriv->LpsIdleCount = 0; pwrctrlpriv->LpsIdleCount = 0;

View file

@ -1676,17 +1676,13 @@ static u32 rtl8188eu_hal_deinit(PADAPTER Adapter)
rtw_write32(Adapter, REG_HIMRE_88E, IMR_DISABLED_88E); rtw_write32(Adapter, REG_HIMRE_88E, IMR_DISABLED_88E);
#endif #endif
#ifdef SUPPORT_HW_RFOFF_DETECTED
DBG_88E("bkeepfwalive(%x)\n",Adapter->pwrctrlpriv.bkeepfwalive); DBG_88E("bkeepfwalive(%x)\n",Adapter->pwrctrlpriv.bkeepfwalive);
if (Adapter->pwrctrlpriv.bkeepfwalive) if (Adapter->pwrctrlpriv.bkeepfwalive)
{ {
_ps_close_RF(Adapter); _ps_close_RF(Adapter);
if ((Adapter->pwrctrlpriv.bHWPwrPindetect) && (Adapter->pwrctrlpriv.bHWPowerdown)) if ((Adapter->pwrctrlpriv.bHWPwrPindetect) && (Adapter->pwrctrlpriv.bHWPowerdown))
rtl8192cu_hw_power_down(Adapter); rtl8192cu_hw_power_down(Adapter);
} } else {
else
#endif
{
if (Adapter->hw_init_completed == true){ if (Adapter->hw_init_completed == true){
CardDisableRTL8188EU(Adapter); CardDisableRTL8188EU(Adapter);
@ -3532,13 +3528,13 @@ static u8 rtl8188eu_ps_func(PADAPTER Adapter,HAL_INTF_PS_FUNC efunc_id, u8 *val)
u8 bResult = true; u8 bResult = true;
switch (efunc_id){ switch (efunc_id){
#if defined(CONFIG_AUTOSUSPEND) && defined(SUPPORT_HW_RFOFF_DETECTED) #if defined(CONFIG_AUTOSUSPEND)
case HAL_USB_SELECT_SUSPEND: case HAL_USB_SELECT_SUSPEND:
{ {
u8 bfwpoll = *(( u8*)val); u8 bfwpoll = *(( u8*)val);
} }
break; break;
#endif /* CONFIG_AUTOSUSPEND && SUPPORT_HW_RFOFF_DETECTED */ #endif /* CONFIG_AUTOSUSPEND */
default: default:
break; break;

View file

@ -42,8 +42,6 @@
#define CONFIG_SUPPORT_USB_INT #define CONFIG_SUPPORT_USB_INT
#define SUPPORT_HW_RFOFF_DETECTED
#define CONFIG_AP_MODE #define CONFIG_AP_MODE
#define CONFIG_P2P #define CONFIG_P2P

View file

@ -101,10 +101,7 @@ void rtw_bb_rf_gain_offset(_adapter *padapter);
int rtw_ips_pwr_up(_adapter *padapter); int rtw_ips_pwr_up(_adapter *padapter);
void rtw_ips_pwr_down(_adapter *padapter); void rtw_ips_pwr_down(_adapter *padapter);
#ifdef SUPPORT_HW_RFOFF_DETECTED
int rtw_hw_suspend(_adapter *padapter ); int rtw_hw_suspend(_adapter *padapter );
int rtw_hw_resume(_adapter *padapter); int rtw_hw_resume(_adapter *padapter);
#endif
#endif //_OSDEP_INTF_H_ #endif //_OSDEP_INTF_H_

View file

@ -290,9 +290,7 @@ void rtw_ps_processor(_adapter*padapter);
#ifdef CONFIG_AUTOSUSPEND #ifdef CONFIG_AUTOSUSPEND
int autoresume_enter(_adapter* padapter); int autoresume_enter(_adapter* padapter);
#endif #endif
#ifdef SUPPORT_HW_RFOFF_DETECTED
rt_rf_power_state RfOnOffDetect( PADAPTER pAdapter ); rt_rf_power_state RfOnOffDetect( PADAPTER pAdapter );
#endif
s32 LPS_RF_ON_check(PADAPTER padapter, u32 delay_ms); s32 LPS_RF_ON_check(PADAPTER padapter, u32 delay_ms);
void LPS_Enter(PADAPTER padapter); void LPS_Enter(PADAPTER padapter);

View file

@ -708,10 +708,8 @@ _func_enter_;
#ifdef CONFIG_AUTOSUSPEND #ifdef CONFIG_AUTOSUSPEND
registry_par->usbss_enable = (u8)rtw_enusbss;//0:disable,1:enable registry_par->usbss_enable = (u8)rtw_enusbss;//0:disable,1:enable
#endif #endif
#ifdef SUPPORT_HW_RFOFF_DETECTED
registry_par->hwpdn_mode = (u8)rtw_hwpdn_mode;//0:disable,1:enable,2:by EFUSE config 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 registry_par->hwpwrp_detect = (u8)rtw_hwpwrp_detect;//0:disable,1:enable
#endif
registry_par->hw_wps_pbc = (u8)rtw_hw_wps_pbc; registry_par->hw_wps_pbc = (u8)rtw_hw_wps_pbc;
#ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE #ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE
snprintf(registry_par->adaptor_info_caching_file_path, PATH_LENGTH_MAX, "%s", rtw_adaptor_info_caching_file_path); snprintf(registry_par->adaptor_info_caching_file_path, PATH_LENGTH_MAX, "%s", rtw_adaptor_info_caching_file_path);

View file

@ -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 ) int rtw_hw_suspend(_adapter *padapter )
{ {
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
@ -619,7 +618,6 @@ error_exit:
DBG_88E("%s, Open net dev failed\n",__func__); DBG_88E("%s, Open net dev failed\n",__func__);
return (-1); return (-1);
} }
#endif
static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message) 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 ) if (pwrpriv->bInternalAutoSuspend )
{ {
#ifdef CONFIG_AUTOSUSPEND #ifdef CONFIG_AUTOSUSPEND
#ifdef SUPPORT_HW_RFOFF_DETECTED
// The FW command register update must after MAC and FW init ready. // The FW command register update must after MAC and FW init ready.
if ((padapter->bFWReady) && ( padapter->pwrctrlpriv.bHWPwrPindetect ) && (padapter->registrypriv.usbss_enable )) if ((padapter->bFWReady) && ( padapter->pwrctrlpriv.bHWPwrPindetect ) && (padapter->registrypriv.usbss_enable ))
{ {
u8 bOpen = true; u8 bOpen = true;
rtw_interface_ps_func(padapter,HAL_USB_SELECT_SUSPEND,&bOpen); 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
#endif
} }
pwrpriv->bInSuspend = true; pwrpriv->bInSuspend = true;
rtw_cancel_all_timer(padapter); rtw_cancel_all_timer(padapter);
@ -810,7 +805,6 @@ int rtw_resume_process(_adapter *padapter)
if (pwrpriv->bInternalAutoSuspend ) if (pwrpriv->bInternalAutoSuspend )
{ {
#ifdef CONFIG_AUTOSUSPEND #ifdef CONFIG_AUTOSUSPEND
#ifdef SUPPORT_HW_RFOFF_DETECTED
// The FW command register update must after MAC and FW init ready. // The FW command register update must after MAC and FW init ready.
if ((padapter->bFWReady) && ( padapter->pwrctrlpriv.bHWPwrPindetect ) && (padapter->registrypriv.usbss_enable )) 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); rtw_interface_ps_func(padapter,HAL_USB_SELECT_SUSPEND,&bOpen);
} }
#endif #endif
#endif
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
DBG_88E("pwrpriv->bAutoResume (%x)\n",pwrpriv->bAutoResume ); DBG_88E("pwrpriv->bAutoResume (%x)\n",pwrpriv->bAutoResume );
if ( true == pwrpriv->bAutoResume ){ if ( true == pwrpriv->bAutoResume ){