staging: r8188eu: remove HW_VAR_H2C_FW_P2P_PS_OFFLOAD from SetHwReg8188EU()
authorMichael Straube <straube.linux@gmail.com>
Sat, 2 Apr 2022 09:23:32 +0000 (11:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Apr 2022 05:33:50 +0000 (07:33 +0200)
The HW_VAR_H2C_FW_P2P_PS_OFFLOAD case in SetHwReg8188EU() just calls a
function. Call the function directly and remove the
HW_VAR_H2C_FW_P2P_PS_OFFLOAD case from SetHwReg8188EU(). This is part
of the ongoing effort to get rid of the unwanted hal layer.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220402092332.6627-8-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_p2p.c
drivers/staging/r8188eu/hal/usb_halinit.c
drivers/staging/r8188eu/include/hal_intf.h

index 48500fb..1e728a0 100644 (file)
@@ -1602,7 +1602,7 @@ void p2p_ps_wk_hdl(struct adapter *padapter, u8 p2p_ps_state)
        case P2P_PS_DISABLE:
                pwdinfo->p2p_ps_state = p2p_ps_state;
 
-               SetHwReg8188EU(padapter, HW_VAR_H2C_FW_P2P_PS_OFFLOAD, (u8 *)(&p2p_ps_state));
+               rtl8188e_set_p2p_ps_offload_cmd(padapter, p2p_ps_state);
 
                pwdinfo->noa_index = 0;
                pwdinfo->ctwindow = 0;
@@ -1626,7 +1626,7 @@ void p2p_ps_wk_hdl(struct adapter *padapter, u8 p2p_ps_state)
                                        SetHwReg8188EU(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&padapter->pwrctrlpriv.pwr_mode));
                                }
                        }
-                       SetHwReg8188EU(padapter, HW_VAR_H2C_FW_P2P_PS_OFFLOAD, (u8 *)(&p2p_ps_state));
+                       rtl8188e_set_p2p_ps_offload_cmd(padapter, p2p_ps_state);
                }
                break;
        case P2P_PS_SCAN:
@@ -1634,7 +1634,7 @@ void p2p_ps_wk_hdl(struct adapter *padapter, u8 p2p_ps_state)
        case P2P_PS_ALLSTASLEEP:
                if (pwdinfo->p2p_ps_mode > P2P_PS_NONE) {
                        pwdinfo->p2p_ps_state = p2p_ps_state;
-                       SetHwReg8188EU(padapter, HW_VAR_H2C_FW_P2P_PS_OFFLOAD, (u8 *)(&p2p_ps_state));
+                       rtl8188e_set_p2p_ps_offload_cmd(padapter, p2p_ps_state);
                }
                break;
        default:
index cbd4918..4bc6b08 100644 (file)
@@ -1150,12 +1150,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                        rtl8188e_set_FwPwrMode_cmd(Adapter, psmode);
                }
                break;
-       case HW_VAR_H2C_FW_P2P_PS_OFFLOAD:
-               {
-                       u8 p2p_ps_state = (*(u8 *)val);
-                       rtl8188e_set_p2p_ps_offload_cmd(Adapter, p2p_ps_state);
-               }
-               break;
        case HW_VAR_INITIAL_GAIN:
                {
                        struct rtw_dig *pDigTable = &podmpriv->DM_DigTable;
index 0f64cb4..e222ab8 100644 (file)
@@ -22,7 +22,6 @@ enum hw_variables {
        HW_VAR_AC_PARAM_BE,
        HW_VAR_AMPDU_FACTOR,
        HW_VAR_H2C_FW_PWRMODE,
-       HW_VAR_H2C_FW_P2P_PS_OFFLOAD,
        HW_VAR_INITIAL_GAIN,
        HW_VAR_FIFO_CLEARN_UP,
        HW_VAR_H2C_MEDIA_STATUS_RPT,