Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: rtl8723bs: remove rf type branching (third patch)

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>

authored by

Fabio Aiuto and committed by
Greg Kroah-Hartman
f75b87a6 9d535e92

+1 -32
-3
drivers/staging/rtl8723bs/hal/hal_com.c
··· 670 670 case HW_VAR_DM_FLAG: 671 671 *((u32 *)val) = odm->SupportAbility; 672 672 break; 673 - case HW_VAR_RF_TYPE: 674 - *((u8 *)val) = hal_data->rf_type; 675 - break; 676 673 default: 677 674 netdev_dbg(adapter->pnetdev, 678 675 FUNC_ADPT_FMT " variable(%d) not defined!\n",
-17
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
··· 116 116 case rTxAGC_A_Mcs07_Mcs04: 117 117 index = 3; 118 118 break; 119 - case rTxAGC_A_Mcs11_Mcs08: 120 - index = 4; 121 - break; 122 - case rTxAGC_A_Mcs15_Mcs12: 123 - index = 5; 124 - break; 125 119 case rTxAGC_B_Rate18_06: 126 120 index = 8; 127 121 break; ··· 130 136 break; 131 137 case rTxAGC_B_Mcs07_Mcs04: 132 138 index = 11; 133 - break; 134 - case rTxAGC_B_Mcs11_Mcs08: 135 - index = 12; 136 - break; 137 - case rTxAGC_B_Mcs15_Mcs12: 138 - index = 13; 139 139 break; 140 140 default: 141 141 break; ··· 383 395 PHY_StoreTxPowerByRateNew(padapter, RfPath, TxNum, RegAddr, BitMask, Data); 384 396 else if (pDM_Odm->PhyRegPgVersion == 0) { 385 397 PHY_StoreTxPowerByRateOld(padapter, RegAddr, BitMask, Data); 386 - 387 - if (RegAddr == rTxAGC_A_Mcs15_Mcs12 && pHalData->rf_type == RF_1T1R) 388 - pHalData->pwrGroupCnt++; 389 - else if (RegAddr == rTxAGC_B_Mcs15_Mcs12 && pHalData->rf_type != RF_1T1R) 390 - pHalData->pwrGroupCnt++; 391 398 } 392 399 } 393 400
-1
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
··· 1660 1660 dump_chip_info(ChipVersion); 1661 1661 #endif 1662 1662 pHalData->VersionID = ChipVersion; 1663 - pHalData->rf_type = RF_1T1R; 1664 1663 1665 1664 return ChipVersion; 1666 1665 }
+1 -4
drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c
··· 156 156 /* */ 157 157 /* Initialize general global value */ 158 158 /* */ 159 - if (pHalData->rf_type == RF_1T1R) 160 - pHalData->NumTotalRFPath = 1; 161 - else 162 - pHalData->NumTotalRFPath = 2; 159 + pHalData->NumTotalRFPath = 1; 163 160 164 161 /* */ 165 162 /* Config BB and RF */
-2
drivers/staging/rtl8723bs/hal/sdio_halinit.c
··· 556 556 struct hal_com_data *pHalData = GET_HAL_DATA(padapter); 557 557 558 558 pHalData->rf_chip = RF_6052; 559 - 560 - pHalData->rf_type = RF_1T1R; 561 559 } 562 560 563 561 static void _RfPowerSave(struct adapter *padapter)
-4
drivers/staging/rtl8723bs/include/Hal8192CPhyReg.h
··· 109 109 #define rTxAGC_B_Mcs03_Mcs00 0x83c 110 110 111 111 #define rTxAGC_B_Mcs07_Mcs04 0x848 112 - #define rTxAGC_B_Mcs11_Mcs08 0x84c 113 112 114 113 #define rFPGA0_XA_LSSIParameter 0x840 115 114 #define rFPGA0_XB_LSSIParameter 0x844 ··· 122 123 #define rFPGA0_XA_RFInterfaceOE 0x860 /* RF Channel switch */ 123 124 #define rFPGA0_XB_RFInterfaceOE 0x864 124 125 125 - #define rTxAGC_B_Mcs15_Mcs12 0x868 126 126 #define rTxAGC_B_CCK11_A_CCK2_11 0x86c 127 127 128 128 #define rFPGA0_XAB_RFInterfaceSW 0x870 /* RF Interface Software Control */ ··· 301 303 #define rTxAGC_A_CCK1_Mcs32 0xe08 302 304 #define rTxAGC_A_Mcs03_Mcs00 0xe10 303 305 #define rTxAGC_A_Mcs07_Mcs04 0xe14 304 - #define rTxAGC_A_Mcs11_Mcs08 0xe18 305 - #define rTxAGC_A_Mcs15_Mcs12 0xe1c 306 306 307 307 #define rFPGA0_IQK 0xe28 308 308 #define rTx_IQK_Tone_A 0xe30
-1
drivers/staging/rtl8723bs/include/hal_data.h
··· 189 189 190 190 /* rf_ctrl */ 191 191 u8 rf_chip; 192 - u8 rf_type; 193 192 u8 PackageType; 194 193 u8 NumTotalRFPath; 195 194