diff options
Diffstat (limited to 'drivers/staging/r8188eu/core/rtw_pwrctrl.c')
-rw-r--r-- | drivers/staging/r8188eu/core/rtw_pwrctrl.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c index 00750394c50b..353b7bd850d9 100644 --- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c @@ -99,10 +99,7 @@ static bool rtw_pwr_unassociated_idle(struct adapter *adapter) { struct adapter *buddy = adapter->pbuddy_adapter; struct mlme_priv *pmlmepriv = &adapter->mlmepriv; -#ifdef CONFIG_88EU_P2P struct wifidirect_info *pwdinfo = &adapter->wdinfo; -#endif - bool ret = false; if (adapter->pwrctrlpriv.ips_deny_time >= jiffies) @@ -113,29 +110,19 @@ static bool rtw_pwr_unassociated_idle(struct adapter *adapter) check_fwstate(pmlmepriv, WIFI_UNDER_WPS) || check_fwstate(pmlmepriv, WIFI_AP_STATE) || check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE | WIFI_ADHOC_STATE) || -#if defined(CONFIG_88EU_P2P) !rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) -#else - 0) -#endif goto exit; /* consider buddy, if exist */ if (buddy) { struct mlme_priv *b_pmlmepriv = &buddy->mlmepriv; - #ifdef CONFIG_88EU_P2P struct wifidirect_info *b_pwdinfo = &buddy->wdinfo; - #endif if (check_fwstate(b_pmlmepriv, WIFI_ASOC_STATE | WIFI_SITE_MONITOR) || check_fwstate(b_pmlmepriv, WIFI_UNDER_LINKING | WIFI_UNDER_WPS) || check_fwstate(b_pmlmepriv, WIFI_AP_STATE) || check_fwstate(b_pmlmepriv, WIFI_ADHOC_MASTER_STATE | WIFI_ADHOC_STATE) || -#if defined(CONFIG_88EU_P2P) !rtw_p2p_chk_state(b_pwdinfo, P2P_STATE_NONE)) -#else - 0) -#endif goto exit; } ret = true; @@ -274,9 +261,7 @@ static u8 PS_RDY_CHECK(struct adapter *padapter) void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode) { struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; -#ifdef CONFIG_88EU_P2P struct wifidirect_info *pwdinfo = &padapter->wdinfo; -#endif /* CONFIG_88EU_P2P */ if (ps_mode > PM_Card_Disable) return; @@ -292,7 +277,6 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a /* if (pwrpriv->pwr_mode == PS_MODE_ACTIVE) */ if (ps_mode == PS_MODE_ACTIVE) { -#ifdef CONFIG_88EU_P2P if (pwdinfo->opp_ps == 0) { DBG_88E("rtw_set_ps_mode: Leave 802.11 power save\n"); pwrpriv->pwr_mode = ps_mode; @@ -301,7 +285,6 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a pwrpriv->bFwCurrentInPSMode = false; } } else { -#endif /* CONFIG_88EU_P2P */ if (PS_RDY_CHECK(padapter)) { DBG_88E("%s: Enter 802.11 power save\n", __func__); pwrpriv->bFwCurrentInPSMode = true; @@ -310,11 +293,9 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a pwrpriv->bcn_ant_mode = bcn_ant_mode; rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode)); -#ifdef CONFIG_88EU_P2P /* Set CTWindow after LPS */ if (pwdinfo->opp_ps == 1) p2p_ps_wk_cmd(padapter, P2P_PS_ENABLE, 0); -#endif /* CONFIG_88EU_P2P */ rtw_set_rpwm(padapter, PS_STATE_S2); } |