diff options
author | Michael Straube <straube.linux@gmail.com> | 2022-04-03 12:37:11 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-04 07:33:50 +0200 |
commit | c5f668fd1e33695ee29e2b4680052b56eab7c5f8 (patch) | |
tree | eb1ceefd8a467c94010e933e7c8a766911b28fb3 | |
parent | staging: r8188eu: remove unused parameter from _rtw_pwr_wakeup() (diff) | |
download | linux-dev-c5f668fd1e33695ee29e2b4680052b56eab7c5f8.tar.xz linux-dev-c5f668fd1e33695ee29e2b4680052b56eab7c5f8.zip |
staging: r8188eu: remove constant parameter from _rtw_pwr_wakeup()
The parameter 'ips_deffer_ms' of _rtw_pwr_wakeup() is always
RTW_PWR_STATE_CHK_INTERVAL. Make it local.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220403103713.12883-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/r8188eu/core/rtw_pwrctrl.c | 7 | ||||
-rw-r--r-- | drivers/staging/r8188eu/include/rtw_pwrctrl.h | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c index 1b925c79cc1a..1567827b8fdd 100644 --- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c @@ -362,16 +362,19 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter) /* * rtw_pwr_wakeup - Wake the NIC up from: 1)IPS. 2)USB autosuspend * @adapter: pointer to struct adapter structure -* @ips_deffer_ms: the ms wiil prevent from falling into IPS after wakeup * Return _SUCCESS or _FAIL */ -int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms) +int _rtw_pwr_wakeup(struct adapter *padapter) { struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; int ret = _SUCCESS; u32 start = jiffies; + u32 ips_deffer_ms; + + /* the ms will prevent from falling into IPS after wakeup */ + ips_deffer_ms = RTW_PWR_STATE_CHK_INTERVAL; if (pwrpriv->ips_deny_time < jiffies + rtw_ms_to_systime(ips_deffer_ms)) pwrpriv->ips_deny_time = jiffies + rtw_ms_to_systime(ips_deffer_ms); diff --git a/drivers/staging/r8188eu/include/rtw_pwrctrl.h b/drivers/staging/r8188eu/include/rtw_pwrctrl.h index 0a0f7a4c4052..fd301a9f117a 100644 --- a/drivers/staging/r8188eu/include/rtw_pwrctrl.h +++ b/drivers/staging/r8188eu/include/rtw_pwrctrl.h @@ -121,9 +121,8 @@ s32 LPS_RF_ON_check(struct adapter *adapter, u32 delay_ms); void LPS_Enter(struct adapter *adapter); void LPS_Leave(struct adapter *adapter); -int _rtw_pwr_wakeup(struct adapter *adapter, u32 ips_defer_ms); -#define rtw_pwr_wakeup(adapter) \ - _rtw_pwr_wakeup(adapter, RTW_PWR_STATE_CHK_INTERVAL) +int _rtw_pwr_wakeup(struct adapter *adapter); +#define rtw_pwr_wakeup(adapter) _rtw_pwr_wakeup(adapter) int rtw_pm_set_ips(struct adapter *adapter, u8 mode); int rtw_pm_set_lps(struct adapter *adapter, u8 mode); |