staging: r8188eu: remove HW_VAR_DM_FUNC_OP from SetHwReg8188EU()
authorMichael Straube <straube.linux@gmail.com>
Sat, 9 Jul 2022 09:44:55 +0000 (11:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Jul 2022 08:05:57 +0000 (10:05 +0200)
Remove the HW_VAR_DM_FUNC_OP case from SetHwReg8188EU() and move the
functionality to the functions that call SetHwReg8188EU() with
HW_VAR_DM_FUNC_OP. This is part of the ongoing effort to get rid of
SetHwReg8188EU().

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

index 60c49e161c12e74d543f72b0d526d76a6e765590..b48e0b9dfd7b54d5219242f62821e7341f34a6a1 100644 (file)
@@ -264,16 +264,18 @@ void UpdateBrateTblForSoftAP(u8 *bssrateset, u32 bssratelen)
 
 void Save_DM_Func_Flag(struct adapter *padapter)
 {
-       u8      saveflag = true;
+       struct hal_data_8188e *haldata = &padapter->haldata;
+       struct odm_dm_struct *odmpriv = &haldata->odmpriv;
 
-       SetHwReg8188EU(padapter, HW_VAR_DM_FUNC_OP, (u8 *)(&saveflag));
+       odmpriv->BK_SupportAbility = odmpriv->SupportAbility;
 }
 
 void Restore_DM_Func_Flag(struct adapter *padapter)
 {
-       u8      saveflag = false;
+       struct hal_data_8188e *haldata = &padapter->haldata;
+       struct odm_dm_struct *odmpriv = &haldata->odmpriv;
 
-       SetHwReg8188EU(padapter, HW_VAR_DM_FUNC_OP, (u8 *)(&saveflag));
+       odmpriv->SupportAbility = odmpriv->BK_SupportAbility;
 }
 
 void Set_MSR(struct adapter *padapter, u8 type)
index 97893543d8619cce2848354688f5fd5441890331..0aae713d2c1c499930c901420d5c6d6786a0ca2f 100644 (file)
@@ -1160,12 +1160,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
        case HW_VAR_DM_FLAG:
                podmpriv->SupportAbility = *((u8 *)val);
                break;
-       case HW_VAR_DM_FUNC_OP:
-               if (val[0])
-                       podmpriv->BK_SupportAbility = podmpriv->SupportAbility;
-               else
-                       podmpriv->SupportAbility = podmpriv->BK_SupportAbility;
-               break;
        case HW_VAR_DM_FUNC_RESET:
                podmpriv->SupportAbility = pdmpriv->InitODMFlag;
                break;
index 3e0ee33aa131d731191a42ebc7b3c66fc8e08486..261823e7e8e80ab45351bce2b0e9f09dd166ce46 100644 (file)
@@ -13,7 +13,6 @@ enum hw_variables {
        HW_VAR_CORRECT_TSF,
        HW_VAR_MLME_SITESURVEY,
        HW_VAR_DM_FLAG,
-       HW_VAR_DM_FUNC_OP,
        HW_VAR_DM_FUNC_RESET,
        HW_VAR_DM_FUNC_CLR,
 };