mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
staging: r8188eu: remove change_rfpwrstate
Remove the change_rfpwrstate component in struct pwrctrl_priv. change_rfpwrstate is set to rf_off directly before each ips_enter call and then checked in ips_enter. This makes no sense. change_rfpwrstate might have been used to avoid conflicts between suspend and resume operations. If a driver has to do this at all, pwrpriv->ps_processing will do this job. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230206210124.150142-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
75c68a49cb
commit
0fb449c574
@ -25,15 +25,14 @@ static void ips_enter(struct adapter *padapter)
|
||||
pwrpriv->ips_mode = pwrpriv->ips_mode_req;
|
||||
|
||||
pwrpriv->ips_enter_cnts++;
|
||||
if (rf_off == pwrpriv->change_rfpwrstate) {
|
||||
pwrpriv->bpower_saving = true;
|
||||
pwrpriv->bpower_saving = true;
|
||||
|
||||
if (pwrpriv->ips_mode == IPS_LEVEL_2)
|
||||
pwrpriv->bkeepfwalive = true;
|
||||
if (pwrpriv->ips_mode == IPS_LEVEL_2)
|
||||
pwrpriv->bkeepfwalive = true;
|
||||
|
||||
rtw_ips_pwr_down(padapter);
|
||||
pwrpriv->rf_pwrstate = rf_off;
|
||||
|
||||
rtw_ips_pwr_down(padapter);
|
||||
pwrpriv->rf_pwrstate = rf_off;
|
||||
}
|
||||
pwrpriv->bips_processing = false;
|
||||
|
||||
mutex_unlock(&pwrpriv->lock);
|
||||
@ -51,7 +50,6 @@ static int ips_leave(struct adapter *padapter)
|
||||
|
||||
if ((pwrpriv->rf_pwrstate == rf_off) && (!pwrpriv->bips_processing)) {
|
||||
pwrpriv->bips_processing = true;
|
||||
pwrpriv->change_rfpwrstate = rf_on;
|
||||
pwrpriv->ips_leave_cnts++;
|
||||
|
||||
result = rtw_ips_pwr_up(padapter);
|
||||
@ -133,10 +131,9 @@ void rtw_ps_processor(struct adapter *padapter)
|
||||
if (!rtw_pwr_unassociated_idle(padapter))
|
||||
goto exit;
|
||||
|
||||
if (pwrpriv->rf_pwrstate == rf_on) {
|
||||
pwrpriv->change_rfpwrstate = rf_off;
|
||||
if (pwrpriv->rf_pwrstate == rf_on)
|
||||
ips_enter(padapter);
|
||||
}
|
||||
|
||||
exit:
|
||||
rtw_set_pwr_state_check_timer(&padapter->pwrctrlpriv);
|
||||
pwrpriv->ps_processing = false;
|
||||
|
@ -71,7 +71,6 @@ struct pwrctrl_priv {
|
||||
int pwr_state_check_interval;
|
||||
|
||||
enum rt_rf_power_state rf_pwrstate;/* cur power state */
|
||||
enum rt_rf_power_state change_rfpwrstate;
|
||||
|
||||
u8 bkeepfwalive;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user