staging: r8188eu: remove RFType member of odm_dm_struct structure
authorIvan Safonov <insafonov@gmail.com>
Thu, 22 Sep 2016 14:59:22 +0000 (21:59 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Sep 2016 12:12:34 +0000 (14:12 +0200)
rf_type is always equal to ODM_1T1R.
So, only RF PATH A exists for r8188eu device...

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/phy.c
drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
drivers/staging/rtl8188eu/include/odm.h

index 06774741362cd74c944390c94b68b11b874e0da3..d983a8029f4c24a874759e7c0b94187cbf7ecf51 100644 (file)
@@ -285,7 +285,6 @@ void odm_CmnInfoInit_Debug(struct odm_dm_struct *pDM_Odm)
        ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("SupportInterface=%d\n", pDM_Odm->SupportInterface));
        ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("SupportICType=0x%x\n", pDM_Odm->SupportICType));
        ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("CutVersion=%d\n", pDM_Odm->CutVersion));
-       ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("RFType=%d\n", pDM_Odm->RFType));
        ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("BoardType=%d\n", pDM_Odm->BoardType));
        ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("ExtLNA=%d\n", pDM_Odm->ExtLNA));
        ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("ExtPA=%d\n", pDM_Odm->ExtPA));
@@ -763,37 +762,21 @@ u32 ODM_Get_Rate_Bitmap(struct odm_dm_struct *pDM_Odm, u32 macid, u32 ra_mask, u
                break;
        case (ODM_WM_B|ODM_WM_G|ODM_WM_N24G):
        case (ODM_WM_A|ODM_WM_B|ODM_WM_G|ODM_WM_N24G):
-               if (pDM_Odm->RFType == ODM_1T2R || pDM_Odm->RFType == ODM_1T1R) {
-                       if (rssi_level == DM_RATR_STA_HIGH) {
-                               rate_bitmap = 0x000f0000;
-                       } else if (rssi_level == DM_RATR_STA_MIDDLE) {
-                               rate_bitmap = 0x000ff000;
-                       } else {
-                               if (*(pDM_Odm->pBandWidth) == ODM_BW40M)
-                                       rate_bitmap = 0x000ff015;
-                               else
-                                       rate_bitmap = 0x000ff005;
-                       }
+               if (rssi_level == DM_RATR_STA_HIGH) {
+                       rate_bitmap = 0x000f0000;
+               } else if (rssi_level == DM_RATR_STA_MIDDLE) {
+                       rate_bitmap = 0x000ff000;
                } else {
-                       if (rssi_level == DM_RATR_STA_HIGH) {
-                               rate_bitmap = 0x0f8f0000;
-                       } else if (rssi_level == DM_RATR_STA_MIDDLE) {
-                               rate_bitmap = 0x0f8ff000;
-                       } else {
-                               if (*(pDM_Odm->pBandWidth) == ODM_BW40M)
-                                       rate_bitmap = 0x0f8ff015;
-                               else
-                                       rate_bitmap = 0x0f8ff005;
-                       }
+                       if (*(pDM_Odm->pBandWidth) == ODM_BW40M)
+                               rate_bitmap = 0x000ff015;
+                       else
+                               rate_bitmap = 0x000ff005;
                }
                break;
        default:
                /* case WIRELESS_11_24N: */
                /* case WIRELESS_11_5N: */
-               if (pDM_Odm->RFType == RF_1T2R)
-                       rate_bitmap = 0x000fffff;
-               else
-                       rate_bitmap = 0x0fffffff;
+               rate_bitmap = 0x0fffffff;
                break;
        }
 
index aaf8c264c72bff21b4f018ff4c4b09578485ee89..5192ef70bcfcd415fc0023f39029a561f2d358b7 100644 (file)
@@ -944,16 +944,11 @@ static bool simularity_compare(struct adapter *adapt, s32 resulta[][8],
                               u8 c1, u8 c2)
 {
        u32 i, j, diff, sim_bitmap = 0, bound;
-       struct odm_dm_struct *dm_odm = &adapt->HalData->odmpriv;
        u8 final_candidate[2] = {0xFF, 0xFF};   /* for path A and path B */
        bool result = true;
        s32 tmp1 = 0, tmp2 = 0;
 
-       if ((dm_odm->RFType == ODM_2T2R) || (dm_odm->RFType == ODM_2T3R) ||
-           (dm_odm->RFType == ODM_2T4R))
-               bound = 8;
-       else
-               bound = 4;
+       bound = 4;
 
        for (i = 0; i < bound; i++) {
                if ((i == 1) || (i == 3) || (i == 5) || (i == 7)) {
@@ -1282,7 +1277,7 @@ void rtl88eu_phy_iq_calibrate(struct adapter *adapt, bool recovery)
                rOFDM0_RxIQExtAnta};
        bool is2t;
 
-       is2t = (dm_odm->RFType == ODM_2T2R) ? true : false;
+       is2t = false;
 
        if (!(dm_odm->SupportAbility & ODM_RF_CALIBRATION))
                return;
@@ -1408,12 +1403,7 @@ void rtl88eu_phy_lc_calibrate(struct adapter *adapt)
 
        dm_odm->RFCalibrateInfo.bLCKInProgress = true;
 
-       if (dm_odm->RFType == ODM_2T2R) {
-               phy_lc_calibrate(adapt, true);
-       } else {
-               /* For 88C 1T1R */
-               phy_lc_calibrate(adapt, false);
-       }
+       phy_lc_calibrate(adapt, false);
 
        dm_odm->RFCalibrateInfo.bLCKInProgress = false;
 }
index 62c75cc63e8aa42b1666f760237295abd51ab08d..d04b7fbb71e1d3ab0c872af09675ecb41a210a1f 100644 (file)
@@ -57,8 +57,6 @@ static void Init_ODM_ComInfo_88E(struct adapter *Adapter)
        dm_odm->PatchID = hal_data->CustomerID;
        dm_odm->bWIFITest = Adapter->registrypriv.wifi_spec;
 
-       dm_odm->RFType = ODM_1T1R;
-
        dm_odm->AntDivType = hal_data->TRxAntDivType;
 
        /*  Tx power tracking BB swing table. */
index 21fb4225e42da7c8e15fd722e1b949c4a970cd17..805f52e108b287c7f1ce058a8dafe69b78e5f587 100644 (file)
@@ -724,8 +724,6 @@ struct odm_dm_struct {
        u32     SupportICType;
        /*  Cut Version TestChip/A-cut/B-cut... = 0/1/2/3/... */
        u8      CutVersion;
-       /*  RF Type 4T4R/3T3R/2T2R/1T2R/1T1R/... */
-       u8      RFType;
        /*  Board Type Normal/HighPower/MiniCard/SLIM/Combo/. = 0/1/2/3/4/. */
        u8      BoardType;
        /*  with external LNA  NO/Yes = 0/1 */