staging: rtl8723bs: remove rf type branching (third patch)
authorFabio Aiuto <fabioaiuto83@gmail.com>
Sat, 7 Aug 2021 09:48:06 +0000 (11:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Aug 2021 10:12:19 +0000 (12:12 +0200)
remove rf_type struct member, keep all 1T1R code
unconditionally, remove the other *T*R branches.
Removed dead code related to MCS indexes above 7.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/e626790eb8bd7d96f939e1bbb47b899bf12dab0d.1628329348.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/hal_com.c
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c
drivers/staging/rtl8723bs/hal/sdio_halinit.c
drivers/staging/rtl8723bs/include/Hal8192CPhyReg.h
drivers/staging/rtl8723bs/include/hal_data.h

index 65987e3..8964303 100644 (file)
@@ -670,9 +670,6 @@ void GetHwReg(struct adapter *adapter, u8 variable, u8 *val)
        case HW_VAR_DM_FLAG:
                *((u32 *)val) = odm->SupportAbility;
                break;
-       case HW_VAR_RF_TYPE:
-               *((u8 *)val) = hal_data->rf_type;
-               break;
        default:
                netdev_dbg(adapter->pnetdev,
                           FUNC_ADPT_FMT " variable(%d) not defined!\n",
index 3e426c9..4a249d2 100644 (file)
@@ -116,12 +116,6 @@ u8 PHY_GetRateSectionIndexOfTxPowerByRate(
                case rTxAGC_A_Mcs07_Mcs04:
                        index = 3;
                        break;
-               case rTxAGC_A_Mcs11_Mcs08:
-                       index = 4;
-                       break;
-               case rTxAGC_A_Mcs15_Mcs12:
-                       index = 5;
-                       break;
                case rTxAGC_B_Rate18_06:
                        index = 8;
                        break;
@@ -137,12 +131,6 @@ u8 PHY_GetRateSectionIndexOfTxPowerByRate(
                case rTxAGC_B_Mcs07_Mcs04:
                        index = 11;
                        break;
-               case rTxAGC_B_Mcs11_Mcs08:
-                       index = 12;
-                       break;
-               case rTxAGC_B_Mcs15_Mcs12:
-                       index = 13;
-                       break;
                default:
                        break;
                }
@@ -395,11 +383,6 @@ void PHY_StoreTxPowerByRate(
                PHY_StoreTxPowerByRateNew(padapter, RfPath, TxNum, RegAddr, BitMask, Data);
        else if (pDM_Odm->PhyRegPgVersion == 0) {
                PHY_StoreTxPowerByRateOld(padapter, RegAddr, BitMask, Data);
-
-               if (RegAddr == rTxAGC_A_Mcs15_Mcs12 && pHalData->rf_type == RF_1T1R)
-                       pHalData->pwrGroupCnt++;
-               else if (RegAddr == rTxAGC_B_Mcs15_Mcs12 && pHalData->rf_type != RF_1T1R)
-                       pHalData->pwrGroupCnt++;
        }
 }
 
index 5da8e21..cce3e7e 100644 (file)
@@ -1660,7 +1660,6 @@ static struct hal_version ReadChipVersion8723B(struct adapter *padapter)
        dump_chip_info(ChipVersion);
 #endif
        pHalData->VersionID = ChipVersion;
-       pHalData->rf_type = RF_1T1R;
 
        return ChipVersion;
 }
index 51865f8..ffb35e1 100644 (file)
@@ -156,10 +156,7 @@ int PHY_RF6052_Config8723B(struct adapter *Adapter)
        /*  */
        /*  Initialize general global value */
        /*  */
-       if (pHalData->rf_type == RF_1T1R)
-               pHalData->NumTotalRFPath = 1;
-       else
-               pHalData->NumTotalRFPath = 2;
+       pHalData->NumTotalRFPath = 1;
 
        /*  */
        /*  Config BB and RF */
index a07a6da..c9cd657 100644 (file)
@@ -556,8 +556,6 @@ static void _InitRFType(struct adapter *padapter)
        struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
 
        pHalData->rf_chip       = RF_6052;
-
-       pHalData->rf_type = RF_1T1R;
 }
 
 static void _RfPowerSave(struct adapter *padapter)
index aad9625..586a3da 100644 (file)
 #define                rTxAGC_B_Mcs03_Mcs00                    0x83c
 
 #define                rTxAGC_B_Mcs07_Mcs04                    0x848
-#define                rTxAGC_B_Mcs11_Mcs08                    0x84c
 
 #define                rFPGA0_XA_LSSIParameter         0x840
 #define                rFPGA0_XB_LSSIParameter         0x844
 #define                rFPGA0_XA_RFInterfaceOE         0x860   /*  RF Channel switch */
 #define                rFPGA0_XB_RFInterfaceOE         0x864
 
-#define                rTxAGC_B_Mcs15_Mcs12                    0x868
 #define                rTxAGC_B_CCK11_A_CCK2_11                0x86c
 
 #define                rFPGA0_XAB_RFInterfaceSW                0x870   /*  RF Interface Software Control */
 #define                rTxAGC_A_CCK1_Mcs32                     0xe08
 #define                rTxAGC_A_Mcs03_Mcs00                    0xe10
 #define                rTxAGC_A_Mcs07_Mcs04                    0xe14
-#define                rTxAGC_A_Mcs11_Mcs08                    0xe18
-#define                rTxAGC_A_Mcs15_Mcs12                    0xe1c
 
 #define                rFPGA0_IQK                                      0xe28
 #define                rTx_IQK_Tone_A                          0xe30
index 3298fa8..f0b26e4 100644 (file)
@@ -189,7 +189,6 @@ struct hal_com_data {
 
        /* rf_ctrl */
        u8 rf_chip;
-       u8 rf_type;
        u8 PackageType;
        u8 NumTotalRFPath;