staging: r8188eu: remove unneeded parameter from rtl8188e_SetHalODMVar
authorMichael Straube <straube.linux@gmail.com>
Tue, 4 Jan 2022 09:07:32 +0000 (10:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Jan 2022 14:04:30 +0000 (15:04 +0100)
Function rtl8188e_SetHalODMVar is always called with HAL_ODM_STA_INFO.
Remove the unneeded parameter eVariable from the function.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220104090732.13994-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_ap.c
drivers/staging/r8188eu/core/rtw_mlme.c
drivers/staging/r8188eu/core/rtw_sta_mgt.c
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
drivers/staging/r8188eu/include/hal_intf.h

index 47bd84b67a0856f3addd4016966ec9c1a5eef673..1675e2e8439c34ccef406ff370a0f76818e7f6aa 100644 (file)
@@ -447,7 +447,7 @@ void update_bmc_sta(struct adapter *padapter)
                init_rate = get_highest_rate_idx(tx_ra_bitmap & 0x0fffffff) & 0x3f;
 
                /* ap mode */
-               rtl8188e_SetHalODMVar(padapter, HAL_ODM_STA_INFO, psta, true);
+               rtl8188e_SetHalODMVar(padapter, psta, true);
 
                {
                        u8 arg = 0;
@@ -499,7 +499,7 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)
        DBG_88E("%s\n", __func__);
 
        /* ap mode */
-       rtl8188e_SetHalODMVar(padapter, HAL_ODM_STA_INFO, psta, true);
+       rtl8188e_SetHalODMVar(padapter, psta, true);
 
        if (psecuritypriv->dot11AuthAlgrthm == dot11AuthAlgrthm_8021X)
                psta->ieee8021x_blocked = true;
index a3996a7ee814855c9242e6f25a4ecb2c41a674f5..394e8a5ce03c0b3ea8596287d067945ab61f8534 100644 (file)
@@ -913,7 +913,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, str
                psta->aid  = pnetwork->join_res;
                psta->mac_id = 0;
                /* sta mode */
-               rtl8188e_SetHalODMVar(padapter, HAL_ODM_STA_INFO, psta, true);
+               rtl8188e_SetHalODMVar(padapter, psta, true);
                /* security related */
                if (padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) {
                        padapter->securitypriv.binstallGrpkey = false;
@@ -1198,7 +1198,7 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
        psta->mac_id = (uint)pstassoc->cam_id;
        DBG_88E("%s\n", __func__);
        /* for ad-hoc mode */
-       rtl8188e_SetHalODMVar(adapter, HAL_ODM_STA_INFO, psta, true);
+       rtl8188e_SetHalODMVar(adapter, psta, true);
        rtw_sta_media_status_rpt(adapter, psta, 1);
        if (adapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X)
                psta->dot118021XPrivacy = adapter->securitypriv.dot11PrivacyAlgrthm;
index a3d4d5d8a78532e74eb0d25296e0ba7a3c27e2f2..54561ff239a0d6c58f64f1486a9d4d7765d30529 100644 (file)
@@ -310,7 +310,7 @@ u32 rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta)
        }
 
        if (!(psta->state & WIFI_AP_STATE))
-               rtl8188e_SetHalODMVar(padapter, HAL_ODM_STA_INFO, psta, false);
+               rtl8188e_SetHalODMVar(padapter, psta, false);
 
        spin_lock_bh(&pstapriv->auth_list_lock);
        if (!list_empty(&psta->auth_list)) {
index cce291ca44b12401b3337a2874ced21facafbb76..33bad50ed3b828a6d7f1363fff194f13b7670628 100644 (file)
@@ -845,27 +845,19 @@ void rtl8188e_read_chip_version(struct adapter *padapter)
        pHalData->VersionID = ChipVersion;
 }
 
-void rtl8188e_SetHalODMVar(struct adapter *Adapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet)
+void rtl8188e_SetHalODMVar(struct adapter *Adapter, void *pValue1, bool bSet)
 {
        struct hal_data_8188e *pHalData = &Adapter->haldata;
        struct odm_dm_struct *podmpriv = &pHalData->odmpriv;
-       switch (eVariable) {
-       case HAL_ODM_STA_INFO:
-               {
-                       struct sta_info *psta = (struct sta_info *)pValue1;
-
-                       if (bSet) {
-                               DBG_88E("### Set STA_(%d) info\n", psta->mac_id);
-                               podmpriv->pODM_StaInfo[psta->mac_id] = psta;
-                               ODM_RAInfo_Init(podmpriv, psta->mac_id);
-                       } else {
-                               DBG_88E("### Clean STA_(%d) info\n", psta->mac_id);
-                               podmpriv->pODM_StaInfo[psta->mac_id] = NULL;
-                      }
-               }
-               break;
-       default:
-               break;
+       struct sta_info *psta = (struct sta_info *)pValue1;
+
+       if (bSet) {
+               DBG_88E("### Set STA_(%d) info\n", psta->mac_id);
+               podmpriv->pODM_StaInfo[psta->mac_id] = psta;
+               ODM_RAInfo_Init(podmpriv, psta->mac_id);
+       } else {
+               DBG_88E("### Clean STA_(%d) info\n", psta->mac_id);
+               podmpriv->pODM_StaInfo[psta->mac_id] = NULL;
        }
 }
 
index b5474d199c10fbb4694e9ba89ba9505e622d48bd..b4a7e0ce3116eee7e7d1c16d97a39473c59b2e90 100644 (file)
@@ -94,10 +94,6 @@ enum hal_def_variable {
        HAL_DEF_DBG_DUMP_TXPKT,
 };
 
-enum hal_odm_variable {
-       HAL_ODM_STA_INFO,
-};
-
 typedef s32 (*c2h_id_filter)(u8 id);
 
 #define is_boot_from_eeprom(adapter) (adapter->eeprompriv.EepromOrEfuse)
@@ -105,8 +101,7 @@ typedef s32 (*c2h_id_filter)(u8 id);
 void rtl8188eu_interface_configure(struct adapter *adapt);
 void ReadAdapterInfo8188EU(struct adapter *Adapter);
 void rtl8188eu_init_default_value(struct adapter *adapt);
-void rtl8188e_SetHalODMVar(struct adapter *Adapter,
-                          enum hal_odm_variable eVariable, void *pValue1, bool bSet);
+void rtl8188e_SetHalODMVar(struct adapter *Adapter, void *pValue1, bool bSet);
 u32 rtl8188eu_InitPowerOn(struct adapter *adapt);
 void rtl8188e_EfusePowerSwitch(struct adapter *pAdapter, u8 PwrState);
 void rtl8188e_ReadEFuse(struct adapter *Adapter, u16 _offset, u16 _size_byte, u8 *pbuf);