staging: r8188eu: Eliminate enum ODM_RADIO_PATH in favor of rf_radio_path
authorLarry Finger <Larry.Finger@lwfinger.net>
Sun, 22 Dec 2013 23:36:57 +0000 (17:36 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2014 03:18:08 +0000 (19:18 -0800)
There are two different enum statements that have been combined.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/hal/HalHWImg8188E_RF.c
drivers/staging/rtl8188eu/hal/odm_HWConfig.c
drivers/staging/rtl8188eu/hal/odm_RegConfig8188E.c
drivers/staging/rtl8188eu/hal/rtl8188e_rf6052.c
drivers/staging/rtl8188eu/include/odm.h
drivers/staging/rtl8188eu/include/odm_HWConfig.h
drivers/staging/rtl8188eu/include/odm_RegConfig8188E.h

index 480c810c4468103d4cd97c48c13c33e1e2fdee7c..17c6411ce8ac887c6f92d0b2e84ea054605d9d85 100644 (file)
@@ -211,7 +211,7 @@ enum HAL_STATUS ODM_ReadAndConfig_RadioA_1T_8188E(struct odm_dm_struct *pDM_Odm)
                                else if (v1 == 0xf9)
                                        rtw_IOL_append_DELAY_US_cmd(pxmit_frame, 1);
                                else
-                                       rtw_IOL_append_WRF_cmd(pxmit_frame, ODM_RF_PATH_A, (u16)v1, v2, bRFRegOffsetMask);
+                                       rtw_IOL_append_WRF_cmd(pxmit_frame, RF_PATH_A, (u16)v1, v2, bRFRegOffsetMask);
                        } else {
                                odm_ConfigRF_RadioA_8188E(pDM_Odm, v1, v2);
                        }
@@ -247,7 +247,7 @@ enum HAL_STATUS ODM_ReadAndConfig_RadioA_1T_8188E(struct odm_dm_struct *pDM_Odm)
                                                else if (v1 == 0xf9)
                                                        rtw_IOL_append_DELAY_US_cmd(pxmit_frame, 1);
                                                else
-                                                       rtw_IOL_append_WRF_cmd(pxmit_frame, ODM_RF_PATH_A, (u16)v1, v2, bRFRegOffsetMask);
+                                                       rtw_IOL_append_WRF_cmd(pxmit_frame, RF_PATH_A, (u16)v1, v2, bRFRegOffsetMask);
                                        } else {
                                                odm_ConfigRF_RadioA_8188E(pDM_Odm, v1, v2);
                                        }
index a452c7df37a3983c64aca99f0119870d8f9ff128..a755df35ec7ded45b36acdec6750a08cac7b5465 100644 (file)
@@ -106,8 +106,8 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,
 
        isCCKrate = ((pPktinfo->Rate >= DESC92C_RATE1M) && (pPktinfo->Rate <= DESC92C_RATE11M)) ? true : false;
 
-       pPhyInfo->RxMIMOSignalQuality[ODM_RF_PATH_A] = -1;
-       pPhyInfo->RxMIMOSignalQuality[ODM_RF_PATH_B] = -1;
+       pPhyInfo->RxMIMOSignalQuality[RF_PATH_A] = -1;
+       pPhyInfo->RxMIMOSignalQuality[RF_PATH_B] = -1;
 
        if (isCCKrate) {
                u8 cck_agc_rpt;
@@ -190,15 +190,15 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,
                                        SQ = ((64-SQ_rpt) * 100) / 44;
                        }
                        pPhyInfo->SignalQuality = SQ;
-                       pPhyInfo->RxMIMOSignalQuality[ODM_RF_PATH_A] = SQ;
-                       pPhyInfo->RxMIMOSignalQuality[ODM_RF_PATH_B] = -1;
+                       pPhyInfo->RxMIMOSignalQuality[RF_PATH_A] = SQ;
+                       pPhyInfo->RxMIMOSignalQuality[RF_PATH_B] = -1;
                }
        } else { /* is OFDM rate */
                dm_odm->PhyDbgInfo.NumQryPhyStatusOFDM++;
 
                /*  (1)Get RSSI for HT rate */
 
-                for (i = ODM_RF_PATH_A; i < ODM_RF_PATH_MAX; i++) {
+                for (i = RF_PATH_A; i < RF_PATH_MAX; i++) {
                        /*  2008/01/30 MH we will judge RF RX path now. */
                        if (dm_odm->RFPathRxEnable & BIT(i))
                                rf_rx_num++;
@@ -252,7 +252,7 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,
                        EVM = odm_EVMdbToPercentage((pPhyStaRpt->stream_rxevm[i]));     /* dbm */
 
                        if (pPktinfo->bPacketMatchBSSID) {
-                               if (i == ODM_RF_PATH_A) /*  Fill value in RFD, Get the first spatial stream only */
+                               if (i == RF_PATH_A) /*  Fill value in RFD, Get the first spatial stream only */
                                        pPhyInfo->SignalQuality = (u8)(EVM & 0xff);
                                pPhyInfo->RxMIMOSignalQuality[i] = (u8)(EVM & 0xff);
                        }
@@ -330,15 +330,15 @@ static void odm_Process_RSSIForDM(struct odm_dm_struct *dm_odm,
 
        if (pPktinfo->bPacketToSelf || pPktinfo->bPacketBeacon) {
                if (!isCCKrate) { /* ofdm rate */
-                       if (pPhyInfo->RxMIMOSignalStrength[ODM_RF_PATH_B] == 0) {
-                               RSSI_Ave = pPhyInfo->RxMIMOSignalStrength[ODM_RF_PATH_A];
+                       if (pPhyInfo->RxMIMOSignalStrength[RF_PATH_B] == 0) {
+                               RSSI_Ave = pPhyInfo->RxMIMOSignalStrength[RF_PATH_A];
                        } else {
-                               if (pPhyInfo->RxMIMOSignalStrength[ODM_RF_PATH_A] > pPhyInfo->RxMIMOSignalStrength[ODM_RF_PATH_B]) {
-                                       RSSI_max = pPhyInfo->RxMIMOSignalStrength[ODM_RF_PATH_A];
-                                       RSSI_min = pPhyInfo->RxMIMOSignalStrength[ODM_RF_PATH_B];
+                               if (pPhyInfo->RxMIMOSignalStrength[RF_PATH_A] > pPhyInfo->RxMIMOSignalStrength[RF_PATH_B]) {
+                                       RSSI_max = pPhyInfo->RxMIMOSignalStrength[RF_PATH_A];
+                                       RSSI_min = pPhyInfo->RxMIMOSignalStrength[RF_PATH_B];
                                } else {
-                                       RSSI_max = pPhyInfo->RxMIMOSignalStrength[ODM_RF_PATH_B];
-                                       RSSI_min = pPhyInfo->RxMIMOSignalStrength[ODM_RF_PATH_A];
+                                       RSSI_max = pPhyInfo->RxMIMOSignalStrength[RF_PATH_B];
+                                       RSSI_min = pPhyInfo->RxMIMOSignalStrength[RF_PATH_A];
                                }
                                if ((RSSI_max - RSSI_min) < 3)
                                        RSSI_Ave = RSSI_max;
@@ -445,11 +445,11 @@ void ODM_MacStatusQuery(struct odm_dm_struct *dm_odm, u8 *mac_stat,
 }
 
 enum HAL_STATUS ODM_ConfigRFWithHeaderFile(struct odm_dm_struct *dm_odm,
-                                          enum ODM_RF_RADIO_PATH content,
-                                          enum ODM_RF_RADIO_PATH rfpath)
+                                          enum rf_radio_path content,
+                                          enum rf_radio_path rfpath)
 {
        ODM_RT_TRACE(dm_odm, ODM_COMP_INIT, ODM_DBG_LOUD, ("===>ODM_ConfigRFWithHeaderFile\n"));
-       if (rfpath == ODM_RF_PATH_A)
+       if (rfpath == RF_PATH_A)
                READ_AND_CONFIG(8188E, _RadioA_1T_);
        ODM_RT_TRACE(dm_odm, ODM_COMP_INIT, ODM_DBG_LOUD, (" ===> ODM_ConfigRFWithHeaderFile() Radio_A:Rtl8188ERadioA_1TArray\n"));
        ODM_RT_TRACE(dm_odm, ODM_COMP_INIT, ODM_DBG_LOUD, (" ===> ODM_ConfigRFWithHeaderFile() Radio_B:Rtl8188ERadioB_1TArray\n"));
index 0594e70f2a587aa8dfc0694eb6a8fe4fc5306c47..6193d9fafb98abe538eee0bbcebb47313361cc44 100644 (file)
@@ -21,7 +21,7 @@
 #include "odm_precomp.h"
 
 void odm_ConfigRFReg_8188E(struct odm_dm_struct *pDM_Odm, u32 Addr,
-                          u32 Data, enum ODM_RF_RADIO_PATH RF_PATH,
+                          u32 Data, enum rf_radio_path RF_PATH,
                           u32 RegAddr)
 {
        struct adapter *adapter = pDM_Odm->Adapter;
@@ -50,7 +50,7 @@ void odm_ConfigRF_RadioA_8188E(struct odm_dm_struct *pDM_Odm, u32 Addr, u32 Data
        u32  content = 0x1000; /*  RF_Content: radioa_txt */
        u32 maskforPhySet = (u32)(content&0xE000);
 
-       odm_ConfigRFReg_8188E(pDM_Odm, Addr, Data, ODM_RF_PATH_A, Addr|maskforPhySet);
+       odm_ConfigRFReg_8188E(pDM_Odm, Addr, Data, RF_PATH_A, Addr|maskforPhySet);
        ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_TRACE, ("===> ODM_ConfigRFWithHeaderFile: [RadioA] %08X %08X\n", Addr, Data));
 }
 
@@ -59,7 +59,7 @@ void odm_ConfigRF_RadioB_8188E(struct odm_dm_struct *pDM_Odm, u32 Addr, u32 Data
        u32  content = 0x1001; /*  RF_Content: radiob_txt */
        u32 maskforPhySet = (u32)(content&0xE000);
 
-       odm_ConfigRFReg_8188E(pDM_Odm, Addr, Data, ODM_RF_PATH_B, Addr|maskforPhySet);
+       odm_ConfigRFReg_8188E(pDM_Odm, Addr, Data, RF_PATH_B, Addr|maskforPhySet);
 
        ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_TRACE, ("===> ODM_ConfigRFWithHeaderFile: [RadioB] %08X %08X\n", Addr, Data));
 }
index 2999da716f5e4e5fd2b74a070e8e9e47feb991e3..b1cb5c4a6fd638d42505b8650c69c67972f6bfcb 100644 (file)
@@ -518,11 +518,11 @@ static int phy_RF6052_Config_ParaFile(struct adapter *Adapter)
                /*----Initialize RF fom connfiguration file----*/
                switch (eRFPath) {
                case RF_PATH_A:
-                       if (HAL_STATUS_FAILURE == ODM_ConfigRFWithHeaderFile(&pHalData->odmpriv, (enum ODM_RF_RADIO_PATH)eRFPath, (enum ODM_RF_RADIO_PATH)eRFPath))
+                       if (HAL_STATUS_FAILURE == ODM_ConfigRFWithHeaderFile(&pHalData->odmpriv, (enum rf_radio_path)eRFPath, (enum rf_radio_path)eRFPath))
                                rtStatus = _FAIL;
                        break;
                case RF_PATH_B:
-               if (HAL_STATUS_FAILURE == ODM_ConfigRFWithHeaderFile(&pHalData->odmpriv, (enum ODM_RF_RADIO_PATH)eRFPath, (enum ODM_RF_RADIO_PATH)eRFPath))
+               if (HAL_STATUS_FAILURE == ODM_ConfigRFWithHeaderFile(&pHalData->odmpriv, (enum rf_radio_path)eRFPath, (enum rf_radio_path)eRFPath))
                                rtStatus = _FAIL;
                        break;
                case RF_PATH_C:
index cc5d0b23826861e41e7cdbcafbd9704875506d6f..8e9c92c5d28b1baa3e44dd1cb5490f1e67ee1b75 100644 (file)
@@ -928,13 +928,6 @@ struct odm_dm_struct {
 
 #define ODM_RF_PATH_MAX 3
 
-enum ODM_RF_RADIO_PATH {
-       ODM_RF_PATH_A = 0,   /* Radio Path A */
-       ODM_RF_PATH_B = 1,   /* Radio Path B */
-       ODM_RF_PATH_C = 2,   /* Radio Path C */
-       ODM_RF_PATH_D = 3,   /* Radio Path D */
-};
-
 enum ODM_RF_CONTENT {
        odm_radioa_txt = 0x1000,
        odm_radiob_txt = 0x1001,
index df5272221bad976bbb133b991eddb440749d883c..49e7e163ba70af1d5d1ef023716015e748c60e4b 100644 (file)
@@ -121,8 +121,8 @@ void ODM_MacStatusQuery(struct odm_dm_struct *pDM_Odm,
                        bool    bPacketBeacon);
 
 enum HAL_STATUS ODM_ConfigRFWithHeaderFile(struct odm_dm_struct *pDM_Odm,
-                                          enum ODM_RF_RADIO_PATH Content,
-                                          enum ODM_RF_RADIO_PATH eRFPath);
+                                          enum rf_radio_path Content,
+                                          enum rf_radio_path eRFPath);
 
 enum HAL_STATUS ODM_ConfigBBWithHeaderFile(struct odm_dm_struct *pDM_Odm,
                                           enum odm_bb_config_type ConfigType);
index 727e6b26fb0865961293918246f0ba1131c336f0..f2bf7a0d98672fc820f752b75d241288b63522c7 100644 (file)
@@ -21,7 +21,7 @@
 #define __INC_ODM_REGCONFIG_H_8188E
 
 void odm_ConfigRFReg_8188E(struct odm_dm_struct *pDM_Odm, u32 Addr, u32 Data,
-                          enum ODM_RF_RADIO_PATH  RF_PATH, u32 RegAddr);
+                          enum rf_radio_path  RF_PATH, u32 RegAddr);
 
 void odm_ConfigRF_RadioA_8188E(struct odm_dm_struct *pDM_Odm,
                               u32 Addr, u32 Data);