]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: r8188eu: remove ODM_CmnInfoHook function
authorIvan Safonov <insafonov@gmail.com>
Fri, 16 Sep 2016 14:33:42 +0000 (21:33 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Sep 2016 18:33:19 +0000 (20:33 +0200)
This function used once, and does not improve code readability.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/hal/odm.c
drivers/staging/rtl8188eu/hal/rtl8188e_dm.c

index 33f483924adb0b1043376b5e222e4e38c6a21edc..534e91950ebebb22911ede76bacbc5b8eb5ad053 100644 (file)
@@ -293,83 +293,6 @@ void ODM_CmnInfoInit(struct odm_dm_struct *pDM_Odm, enum odm_common_info_def Cmn
        pDM_Odm->BbSwingFlagOfdm                = false;
 }
 
-void ODM_CmnInfoHook(struct odm_dm_struct *pDM_Odm, enum odm_common_info_def CmnInfo, void *pValue)
-{
-       /*  */
-       /*  Hook call by reference pointer. */
-       /*  */
-       switch  (CmnInfo) {
-       /*  Dynamic call by reference pointer. */
-       case    ODM_CMNINFO_MAC_PHY_MODE:
-               pDM_Odm->pMacPhyMode = (u8 *)pValue;
-               break;
-       case    ODM_CMNINFO_TX_UNI:
-               pDM_Odm->pNumTxBytesUnicast = (u64 *)pValue;
-               break;
-       case    ODM_CMNINFO_RX_UNI:
-               pDM_Odm->pNumRxBytesUnicast = (u64 *)pValue;
-               break;
-       case    ODM_CMNINFO_WM_MODE:
-               pDM_Odm->pWirelessMode = (u8 *)pValue;
-               break;
-       case    ODM_CMNINFO_BAND:
-               pDM_Odm->pBandType = (u8 *)pValue;
-               break;
-       case    ODM_CMNINFO_SEC_CHNL_OFFSET:
-               pDM_Odm->pSecChOffset = (u8 *)pValue;
-               break;
-       case    ODM_CMNINFO_SEC_MODE:
-               pDM_Odm->pSecurity = (u8 *)pValue;
-               break;
-       case    ODM_CMNINFO_BW:
-               pDM_Odm->pBandWidth = (u8 *)pValue;
-               break;
-       case    ODM_CMNINFO_CHNL:
-               pDM_Odm->pChannel = (u8 *)pValue;
-               break;
-       case    ODM_CMNINFO_DMSP_GET_VALUE:
-               pDM_Odm->pbGetValueFromOtherMac = (bool *)pValue;
-               break;
-       case    ODM_CMNINFO_BUDDY_ADAPTOR:
-               pDM_Odm->pBuddyAdapter = (struct adapter **)pValue;
-               break;
-       case    ODM_CMNINFO_DMSP_IS_MASTER:
-               pDM_Odm->pbMasterOfDMSP = (bool *)pValue;
-               break;
-       case    ODM_CMNINFO_SCAN:
-               pDM_Odm->pbScanInProcess = (bool *)pValue;
-               break;
-       case    ODM_CMNINFO_POWER_SAVING:
-               pDM_Odm->pbPowerSaving = (bool *)pValue;
-               break;
-       case    ODM_CMNINFO_ONE_PATH_CCA:
-               pDM_Odm->pOnePathCCA = (u8 *)pValue;
-               break;
-       case    ODM_CMNINFO_DRV_STOP:
-               pDM_Odm->pbDriverStopped =  (bool *)pValue;
-               break;
-       case    ODM_CMNINFO_PNP_IN:
-               pDM_Odm->pbDriverIsGoingToPnpSetPowerSleep =  (bool *)pValue;
-               break;
-       case    ODM_CMNINFO_INIT_ON:
-               pDM_Odm->pinit_adpt_in_progress =  (bool *)pValue;
-               break;
-       case    ODM_CMNINFO_ANT_TEST:
-               pDM_Odm->pAntennaTest =  (u8 *)pValue;
-               break;
-       case    ODM_CMNINFO_NET_CLOSED:
-               pDM_Odm->pbNet_closed = (bool *)pValue;
-               break;
-       case    ODM_CMNINFO_MP_MODE:
-               pDM_Odm->mp_mode = (u8 *)pValue;
-               break;
-       /* To remove the compiler warning, must add an empty default statement to handle the other values. */
-       default:
-               /* do nothing */
-               break;
-       }
-}
-
 void ODM_CmnInfoPtrArrayHook(struct odm_dm_struct *pDM_Odm, enum odm_common_info_def CmnInfo, u16 Index, void *pValue)
 {
        /*  Hook call by reference pointer. */
index b99008b44a3d95a09fb794ffd36f283508d008a8..8070a24d0407ee19d42ac860793b4dacc3f37022 100644 (file)
@@ -111,17 +111,17 @@ static void Update_ODM_ComInfo_88E(struct adapter *Adapter)
 
        dm_odm->SupportAbility = pdmpriv->InitODMFlag;
 
-       ODM_CmnInfoHook(dm_odm, ODM_CMNINFO_TX_UNI, &(Adapter->xmitpriv.tx_bytes));
-       ODM_CmnInfoHook(dm_odm, ODM_CMNINFO_RX_UNI, &(Adapter->recvpriv.rx_bytes));
-       ODM_CmnInfoHook(dm_odm, ODM_CMNINFO_WM_MODE, &(pmlmeext->cur_wireless_mode));
-       ODM_CmnInfoHook(dm_odm, ODM_CMNINFO_SEC_CHNL_OFFSET, &(hal_data->nCur40MhzPrimeSC));
-       ODM_CmnInfoHook(dm_odm, ODM_CMNINFO_SEC_MODE, &(Adapter->securitypriv.dot11PrivacyAlgrthm));
-       ODM_CmnInfoHook(dm_odm, ODM_CMNINFO_BW, &(hal_data->CurrentChannelBW));
-       ODM_CmnInfoHook(dm_odm, ODM_CMNINFO_CHNL, &(hal_data->CurrentChannel));
-       ODM_CmnInfoHook(dm_odm, ODM_CMNINFO_NET_CLOSED, &(Adapter->net_closed));
-       ODM_CmnInfoHook(dm_odm, ODM_CMNINFO_MP_MODE, &(Adapter->registrypriv.mp_mode));
-       ODM_CmnInfoHook(dm_odm, ODM_CMNINFO_SCAN, &(pmlmepriv->bScanInProcess));
-       ODM_CmnInfoHook(dm_odm, ODM_CMNINFO_POWER_SAVING, &(pwrctrlpriv->bpower_saving));
+       dm_odm->pNumTxBytesUnicast = &Adapter->xmitpriv.tx_bytes;
+       dm_odm->pNumRxBytesUnicast = &Adapter->recvpriv.rx_bytes;
+       dm_odm->pWirelessMode = &pmlmeext->cur_wireless_mode;
+       dm_odm->pSecChOffset = &hal_data->nCur40MhzPrimeSC;
+       dm_odm->pSecurity = (u8 *)&Adapter->securitypriv.dot11PrivacyAlgrthm;
+       dm_odm->pBandWidth = (u8 *)&hal_data->CurrentChannelBW;
+       dm_odm->pChannel = &hal_data->CurrentChannel;
+       dm_odm->pbNet_closed = (bool *)&Adapter->net_closed;
+       dm_odm->mp_mode = &Adapter->registrypriv.mp_mode;
+       dm_odm->pbScanInProcess = (bool *)&pmlmepriv->bScanInProcess;
+       dm_odm->pbPowerSaving = (bool *)&pwrctrlpriv->bpower_saving;
        ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_RF_ANTENNA_TYPE, hal_data->TRxAntDivType);
 
        for (i = 0; i < NUM_STA; i++)