diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index b030bec..bbbeb15 100755 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -274,18 +274,14 @@ void rtw_free_evt_priv (struct evt_priv *pevtpriv) void rtw_free_cmd_priv (struct cmd_priv *pcmdpriv) { -; RT_TRACE(_module_rtl871x_cmd_c_,_drv_info_,("rtw_free_cmd_priv\n")); _rtw_free_cmd_priv(pcmdpriv); -; } -int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj); 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( (adapter_to_pwrctl(pcmdpriv->padapter)->bHWPwrPindetect) &&(!pcmdpriv->padapter->registrypriv.usbss_enable) @@ -301,7 +297,6 @@ int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj) } } } - #endif if(cmd_obj->cmdcode == GEN_CMD_CODE(_SetChannelPlan)) bAllow = true; diff --git a/core/rtw_pwrctrl.c b/core/rtw_pwrctrl.c index 6ece1ad..72479b9 100755 --- a/core/rtw_pwrctrl.c +++ b/core/rtw_pwrctrl.c @@ -201,13 +201,10 @@ void rtw_ps_processor(struct adapter*padapter) #endif /* CONFIG_P2P */ struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); 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; @@ -263,7 +260,6 @@ void rtw_ps_processor(struct adapter*padapter) } pwrpriv->pwr_state_check_cnts ++; } -#endif /* SUPPORT_HW_RFOFF_DETECTED */ if (pwrpriv->ips_mode_req == IPS_NONE) goto exit; @@ -1351,9 +1347,7 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter) 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 a244fad..5c9f284 100755 --- a/hal/usb_halinit.c +++ b/hal/usb_halinit.c @@ -1810,16 +1810,12 @@ static u32 rtl8188eu_hal_deinit(struct adapter *Adapter) rtw_write32(Adapter, REG_HIMRE_88E, IMR_DISABLED_88E); #endif - #ifdef SUPPORT_HW_RFOFF_DETECTED DBG_8192C("bkeepfwalive(%x)\n", pwrctl->bkeepfwalive); if(pwrctl->bkeepfwalive) { if((pwrctl->bHWPwrPindetect) && (pwrctl->bHWPowerdown)) rtl8188eu_hw_power_down(Adapter); - } - else -#endif - { + } else { if(Adapter->hw_init_completed == true){ hal_poweroff_rtl8188eu(Adapter); @@ -3826,11 +3822,11 @@ static u8 rtl8188eu_ps_func(struct adapter *Adapter,HAL_INTF_PS_FUNC efunc_id, u 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 f604a6b..934659c 100755 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -32,8 +32,6 @@ #define CONFIG_SUPPORT_USB_INT - #define SUPPORT_HW_RFOFF_DETECTED - #define CONFIG_LPS #ifdef CONFIG_LPS_LCLK diff --git a/include/recv_osdep.h b/include/recv_osdep.h index 09a70f5..d612513 100755 --- a/include/recv_osdep.h +++ b/include/recv_osdep.h @@ -24,11 +24,8 @@ #include #include - -#ifdef SUPPORT_HW_RFOFF_DETECTED int rtw_hw_suspend(struct adapter *padapter ); int rtw_hw_resume(struct adapter *padapter); -#endif extern void rtw_dev_unload(struct adapter *padapter); extern sint _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter); diff --git a/include/rtw_pwrctrl.h b/include/rtw_pwrctrl.h index b1394af..b1ee781 100755 --- a/include/rtw_pwrctrl.h +++ b/include/rtw_pwrctrl.h @@ -330,10 +330,7 @@ void rtw_ps_processor(struct adapter*padapter); #ifdef CONFIG_AUTOSUSPEND int autoresume_enter(struct adapter* padapter); #endif -#ifdef SUPPORT_HW_RFOFF_DETECTED rt_rf_power_state RfOnOffDetect(IN struct adapter *pAdapter ); -#endif - #ifdef CONFIG_LPS s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms); diff --git a/os_dep/os_intfs.c b/os_dep/os_intfs.c index a9c9925..953d6b4 100755 --- a/os_dep/os_intfs.c +++ b/os_dep/os_intfs.c @@ -378,10 +378,8 @@ static uint loadparam( struct adapter *padapter, _nic_hdl pnetdev) #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->qos_opt_enable = (u8)rtw_qos_opt_enable; registry_par->hw_wps_pbc = (u8)rtw_hw_wps_pbc; diff --git a/os_dep/usb_intf.c b/os_dep/usb_intf.c index 0a3de4a..4faf47a 100755 --- a/os_dep/usb_intf.c +++ b/os_dep/usb_intf.c @@ -546,7 +546,6 @@ static void process_spec_devid(const struct usb_device_id *pdid) } } -#ifdef SUPPORT_HW_RFOFF_DETECTED int rtw_hw_suspend(struct adapter *padapter ) { struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); @@ -672,9 +671,7 @@ error_exit: DBG_871X("%s, Open net dev failed \n",__FUNCTION__); return (-1); } -#endif -#if 1 #ifdef CONFIG_WOWLAN static void rtw_suspend_wow(struct adapter *padapter) { @@ -785,7 +782,6 @@ 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) && (pwrpriv->bHWPwrPindetect ) && (padapter->registrypriv.usbss_enable )) { @@ -793,7 +789,6 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message) rtw_interface_ps_func(padapter,HAL_USB_SELECT_SUSPEND,&bOpen); } #endif - #endif } pwrpriv->bInSuspend = true; @@ -819,7 +814,6 @@ exit: ; return ret; } -#endif static int rtw_resume(struct usb_interface *pusb_intf) { struct dvobj_priv *dvobj = usb_get_intfdata(pusb_intf); @@ -903,7 +897,6 @@ int rtw_resume_process(struct 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) && (pwrpriv->bHWPwrPindetect) && (padapter->registrypriv.usbss_enable )) { @@ -911,7 +904,6 @@ int rtw_resume_process(struct adapter *padapter) rtw_interface_ps_func(padapter,HAL_USB_SELECT_SUSPEND,&bOpen); } #endif - #endif #ifdef CONFIG_BT_COEXIST DBG_871X("pwrpriv->bAutoResume (%x)\n",pwrpriv->bAutoResume ); if( true == pwrpriv->bAutoResume ){