diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index ef8dd59..a8bc815 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -656,11 +656,9 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num, _func_enter_; -#ifdef CONFIG_LPS if (check_fwstate(pmlmepriv, _FW_LINKED) == true){ rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_SCAN, 1); } -#endif #ifdef CONFIG_P2P_PS if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { @@ -1853,9 +1851,7 @@ u8 rtw_tdls_cmd(_adapter *padapter, u8 *addr, u8 option) static void traffic_status_watchdog(_adapter *padapter) { -#ifdef CONFIG_LPS u8 bEnterPS; -#endif u8 bBusyTraffic = false, bTxBusyTraffic = false, bRxBusyTraffic = false; u8 bHigherBusyTraffic = false, bHigherBusyRxTraffic = false, bHigherBusyTxTraffic = false; #ifdef CONFIG_FTP_PROTECT @@ -1914,7 +1910,6 @@ static void traffic_status_watchdog(_adapter *padapter) } #endif /* CONFIG_KEEP_FTP_TRANSMIT */ -#ifdef CONFIG_LPS #ifdef CONFIG_BT_COEXIST if (BT_1Ant(padapter) == false) #endif @@ -1941,13 +1936,10 @@ static void traffic_status_watchdog(_adapter *padapter) LPS_Leave(padapter); } } -#endif /* CONFIG_LPS */ } else { -#ifdef CONFIG_LPS LPS_Leave(padapter); -#endif } pmlmepriv->LinkDetectInfo.NumRxOkInPeriod = 0; @@ -1987,8 +1979,6 @@ void dynamic_chk_wk_hdl(_adapter *padapter, u8 *pbuf, int sz) #endif } -#ifdef CONFIG_LPS - void lps_ctrl_wk_hdl(_adapter *padapter, u8 lps_ctrl_type) { struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; @@ -2122,8 +2112,6 @@ _func_exit_; } -#endif - #if (RATE_ADAPTIVE_SUPPORT==1) static void rpt_timer_setting_wk_hdl(_adapter *padapter, u16 minRptTime) { @@ -2507,11 +2495,9 @@ u8 rtw_drvextra_cmd_hdl(_adapter *padapter, unsigned char *pbuf) case POWER_SAVING_CTRL_WK_CID: power_saving_wk_hdl(padapter, pdrvextra_cmd->pbuf, pdrvextra_cmd->type_size); break; -#ifdef CONFIG_LPS case LPS_CTRL_WK_CID: lps_ctrl_wk_hdl(padapter, (u8)pdrvextra_cmd->type_size); break; -#endif #if (RATE_ADAPTIVE_SUPPORT==1) case RTP_TIMER_CFG_WK_CID: rpt_timer_setting_wk_hdl(padapter, pdrvextra_cmd->type_size); diff --git a/core/rtw_ioctl_set.c b/core/rtw_ioctl_set.c index 35f3db0..e203091 100644 --- a/core/rtw_ioctl_set.c +++ b/core/rtw_ioctl_set.c @@ -336,20 +336,13 @@ _func_enter_; _clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE); set_fwstate(pmlmepriv, WIFI_ADHOC_STATE); } - } - else - { + } else { goto release_mlme_lock;/* it means driver is in WIFI_ADHOC_MASTER_STATE, we needn't create bss again. */ } - } -#ifdef CONFIG_LPS - else { + } else { rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_JOINBSS, 1); } -#endif - } - else - { + } else { RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("Set SSID not the same ssid\n")); RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("set_ssid=[%s] len=0x%x\n", ssid->Ssid, (unsigned int)ssid->SsidLength)); RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("assoc_ssid=[%s] len=0x%x\n", pmlmepriv->assoc_ssid.Ssid, (unsigned int)pmlmepriv->assoc_ssid.SsidLength)); diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c index 4674552..ec03746 100644 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -1296,12 +1296,10 @@ _func_enter_; p2p_ps_wk_cmd(padapter, P2P_PS_DISABLE, 1); #endif /* CONFIG_P2P_PS */ -#ifdef CONFIG_LPS #ifdef CONFIG_WOWLAN if (padapter->pwrctrlpriv.wowlan_mode==false) #endif /* CONFIG_WOWLAN */ rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_DISCONNECT, 1); -#endif _func_exit_; } diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index a5345d0..363c451 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -9102,10 +9102,7 @@ void mlmeext_joinbss_event_callback(_adapter *padapter, int join_res) /* set_link_timer(pmlmeext, DISCONNECT_TO); */ } - -#ifdef CONFIG_LPS rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_CONNECT, 0); -#endif exit_mlmeext_joinbss_event_callback: diff --git a/core/rtw_pwrctrl.c b/core/rtw_pwrctrl.c index ea7fd85..b541111 100644 --- a/core/rtw_pwrctrl.c +++ b/core/rtw_pwrctrl.c @@ -330,9 +330,6 @@ void pwr_state_check_handler(void *FunctionContext) rtw_ps_cmd(padapter); } - - -#ifdef CONFIG_LPS /* * * Parameters @@ -621,7 +618,6 @@ _func_enter_; _func_exit_; } -#endif /* */ /* Description: Leave all power save mode: LPS, FwLPS, IPS if needed. */ @@ -640,10 +636,7 @@ _func_enter_; p2p_ps_wk_cmd(Adapter, P2P_PS_DISABLE, enqueue); #endif /* CONFIG_P2P_PS */ -#ifdef CONFIG_LPS rtw_lps_ctrl_wk_cmd(Adapter, LPS_CTRL_LEAVE, enqueue); -#endif - } else { if (Adapter->pwrctrlpriv.rf_pwrstate== rf_off) { diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c index a6fccf6..ce6a68e 100644 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -627,11 +627,9 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr rtw_set_scan_deny(padapter, 3000); } -#ifdef CONFIG_LPS /* If EAPOL , ARP , OR DHCP packet, driver must be in active mode. */ if ( (pattrib->ether_type == 0x0806) || (pattrib->ether_type == 0x888e) || (pattrib->dhcp_pkt == 1) ) rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_SPECIAL_PACKET, 1); -#endif bmcast = IS_MCAST(pattrib->ra); diff --git a/hal/odm.c b/hal/odm.c index 66931f5..404db8f 100644 --- a/hal/odm.c +++ b/hal/odm.c @@ -1231,9 +1231,7 @@ odm_DIGbyRSSI_LPS( return; CurrentIGI=CurrentIGI+RSSI_OFFSET_DIG; -#ifdef CONFIG_LPS bFwCurrentInPSMode = pAdapter->pwrctrlpriv.bFwCurrentInPSMode; -#endif /* Using FW PS mode to make IGI */ if (bFwCurrentInPSMode) diff --git a/hal/rtl8188e_dm.c b/hal/rtl8188e_dm.c index a1f989f..5f7c7c2 100644 --- a/hal/rtl8188e_dm.c +++ b/hal/rtl8188e_dm.c @@ -274,10 +274,8 @@ rtl8188e_HalDmWatchDog( if (hw_init_completed == false) goto skip_dm; -#ifdef CONFIG_LPS bFwCurrentInPSMode = Adapter->pwrctrlpriv.bFwCurrentInPSMode; rtw_hal_get_hwreg(Adapter, HW_VAR_FWLPS_RF_ON, (u8 *)(&bFwPSAwake)); -#endif #ifdef CONFIG_P2P_PS /* Fw is under p2p powersaving mode, driver should stop dynamic mechanism. */ diff --git a/include/autoconf.h b/include/autoconf.h index 2cef7c7..afb3416 100644 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -51,8 +51,6 @@ #define CONFIG_IPS #define SUPPORT_HW_RFOFF_DETECTED -#define CONFIG_LPS - #define CONFIG_AP_MODE #ifdef CONFIG_AP_MODE #ifdef CONFIG_INTERRUPT_BASED_TXBCN diff --git a/include/rtw_pwrctrl.h b/include/rtw_pwrctrl.h index 776ba73..3d269e1 100644 --- a/include/rtw_pwrctrl.h +++ b/include/rtw_pwrctrl.h @@ -296,12 +296,9 @@ int autoresume_enter(_adapter* padapter); rt_rf_power_state RfOnOffDetect( PADAPTER pAdapter ); #endif - -#ifdef CONFIG_LPS s32 LPS_RF_ON_check(PADAPTER padapter, u32 delay_ms); void LPS_Enter(PADAPTER padapter); void LPS_Leave(PADAPTER padapter); -#endif #ifdef CONFIG_RESUME_IN_WORKQUEUE void rtw_resume_in_workqueue(struct pwrctrl_priv *pwrpriv); diff --git a/os_dep/ioctl_cfg80211.c b/os_dep/ioctl_cfg80211.c index cbef003..dedaf62 100644 --- a/os_dep/ioctl_cfg80211.c +++ b/os_dep/ioctl_cfg80211.c @@ -2565,11 +2565,8 @@ static int cfg80211_rtw_set_power_mgmt(struct wiphy *wiphy, rtw_wdev_priv->power_mgmt = enabled; - #ifdef CONFIG_LPS if (!enabled) LPS_Leave(padapter); - #endif - return 0; } diff --git a/os_dep/ioctl_linux.c b/os_dep/ioctl_linux.c index 78284dd..6b7b136 100644 --- a/os_dep/ioctl_linux.c +++ b/os_dep/ioctl_linux.c @@ -7844,10 +7844,8 @@ static int rtw_mp_efuse_get(struct net_device *dev, err = -EFAULT; goto exit; } - #ifdef CONFIG_LPS lps_mode = pwrctrlpriv->power_mgnt;//keep org value rtw_pm_set_lps(padapter,PS_MODE_ACTIVE); - #endif #ifdef CONFIG_IPS ips_mode = pwrctrlpriv->ips_mode;//keep org value @@ -8267,9 +8265,7 @@ exit: #ifdef CONFIG_IPS rtw_pm_set_ips(padapter, ips_mode); #endif - #ifdef CONFIG_LPS rtw_pm_set_lps(padapter, lps_mode); - #endif padapter->registrypriv.fw_iol = org_fw_iol;// 0:Disable, 1:enable, 2:by usb speed return err; } @@ -8320,10 +8316,8 @@ static int rtw_mp_efuse_set(struct net_device *dev, goto exit; } - #ifdef CONFIG_LPS lps_mode = pwrctrlpriv->power_mgnt;//keep org value rtw_pm_set_lps(padapter,PS_MODE_ACTIVE); - #endif #ifdef CONFIG_IPS ips_mode = pwrctrlpriv->ips_mode;//keep org value @@ -8692,9 +8686,7 @@ exit: #ifdef CONFIG_IPS rtw_pm_set_ips(padapter, ips_mode); #endif - #ifdef CONFIG_LPS rtw_pm_set_lps(padapter, lps_mode); - #endif return err; } diff --git a/os_dep/usb_intf.c b/os_dep/usb_intf.c index be5157b..fa28a13 100644 --- a/os_dep/usb_intf.c +++ b/os_dep/usb_intf.c @@ -542,10 +542,8 @@ int rtw_hw_suspend(_adapter *padapter ) rtw_os_indicate_disconnect(padapter); - #ifdef CONFIG_LPS //donnot enqueue cmd rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_DISCONNECT, 0); - #endif } }