From d538ad412ac6499482f831f1be2167b33d045b9a Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Sat, 20 Jul 2013 13:33:00 -0500 Subject: [PATCH] rtl8188eu: Remove SUPPORT_HW_RFOFF_DETECTED This parameter was selected. Signed-off-by: Larry Finger --- core/rtw_cmd.c | 29 +++++------------------------ core/rtw_pwrctrl.c | 6 ------ hal/usb_halinit.c | 10 +++------- include/autoconf.h | 2 -- include/osdep_intf.h | 3 --- include/rtw_pwrctrl.h | 2 -- os_dep/os_intfs.c | 2 -- os_dep/usb_intf.c | 7 ------- 8 files changed, 8 insertions(+), 53 deletions(-) diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index db98ec1..7386331 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -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; diff --git a/core/rtw_pwrctrl.c b/core/rtw_pwrctrl.c index 3a1332b..a0cb3ac 100644 --- a/core/rtw_pwrctrl.c +++ b/core/rtw_pwrctrl.c @@ -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; diff --git a/hal/usb_halinit.c b/hal/usb_halinit.c index f77b734..7e46dcb 100644 --- a/hal/usb_halinit.c +++ b/hal/usb_halinit.c @@ -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; diff --git a/include/autoconf.h b/include/autoconf.h index 9f55b33..716f7ee 100644 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -42,8 +42,6 @@ #define CONFIG_SUPPORT_USB_INT -#define SUPPORT_HW_RFOFF_DETECTED - #define CONFIG_AP_MODE #define CONFIG_P2P diff --git a/include/osdep_intf.h b/include/osdep_intf.h index 154d117..47785fb 100644 --- a/include/osdep_intf.h +++ b/include/osdep_intf.h @@ -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_ diff --git a/include/rtw_pwrctrl.h b/include/rtw_pwrctrl.h index 10aea13..1b67f59 100644 --- a/include/rtw_pwrctrl.h +++ b/include/rtw_pwrctrl.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); diff --git a/os_dep/os_intfs.c b/os_dep/os_intfs.c index 25d7973..e9371b9 100644 --- a/os_dep/os_intfs.c +++ b/os_dep/os_intfs.c @@ -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); diff --git a/os_dep/usb_intf.c b/os_dep/usb_intf.c index 7e20409..c898e4c 100644 --- a/os_dep/usb_intf.c +++ b/os_dep/usb_intf.c @@ -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 ){