staging: r8188eu: setting HW_VAR_SET_RPWM does nothing
authorMartin Kaiser <martin@kaiser.cx>
Sat, 11 Sep 2021 14:15:11 +0000 (16:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Sep 2021 16:19:12 +0000 (18:19 +0200)
Setting the HW_VAR_SET_RPWM "hardware variable" is an empty operation.

Remove the call to set HW_VAR_SET_RPWM, the calculation of the value to be
set and the definition of HW_VAR_SET_RPWM itself.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210911141521.24901-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_pwrctrl.c
drivers/staging/r8188eu/hal/usb_halinit.c
drivers/staging/r8188eu/include/hal_intf.h

index f9ee917..daae91f 100644 (file)
@@ -195,7 +195,6 @@ static void pwr_state_check_handler(struct timer_list *t)
  */
 void rtw_set_rpwm(struct adapter *padapter, u8 pslv)
 {
-       u8      rpwm;
        struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
 
        pslv = PS_STATE(pslv);
@@ -215,12 +214,8 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv)
                        return;
        }
 
-       rpwm = pslv | pwrpriv->tog;
-
        pwrpriv->rpwm = pslv;
 
-       rtw_hal_set_hwreg(padapter, HW_VAR_SET_RPWM, (u8 *)(&rpwm));
-
        pwrpriv->tog += 0x80;
        pwrpriv->cpwm = pslv;
 
index 0c317a8..31e601e 100644 (file)
@@ -1742,8 +1742,6 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                        rtw_write8(Adapter, REG_RXDMA_AGG_PG_TH, threshold);
                }
                break;
-       case HW_VAR_SET_RPWM:
-               break;
        case HW_VAR_H2C_FW_PWRMODE:
                {
                        u8 psmode = (*(u8 *)val);
index 174819b..49c34d5 100644 (file)
@@ -63,7 +63,6 @@ enum hw_variables {
        HW_VAR_AMPDU_MIN_SPACE,
        HW_VAR_AMPDU_FACTOR,
        HW_VAR_RXDMA_AGG_PG_TH,
-       HW_VAR_SET_RPWM,
        HW_VAR_H2C_FW_PWRMODE,
        HW_VAR_H2C_FW_JOINBSSRPT,
        HW_VAR_FWLPS_RF_ON,