Commit fc7e745c authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman
Browse files

staging: r8188eu: remove switches from phy_RF6052_Config_ParaFile()



In function phy_RF6052_Config_ParaFile() the variable eRFPath is always 0
and RF_PATH_A = 0 in this driver. So we can remove the 'switch (eRFPath)'
statements and just keep the code from the RF_PATH_A cases.

Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210917080615.25819-5-straube.linux@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f7b687d6
Loading
Loading
Loading
Loading
+6 −33
Original line number Diff line number Diff line
@@ -466,16 +466,8 @@ static int phy_RF6052_Config_ParaFile(struct adapter *Adapter)
	pPhyReg = &pHalData->PHYRegDef[eRFPath];

	/*----Store original RFENV control type----*/
	switch (eRFPath) {
	case RF_PATH_A:
	case RF_PATH_C:
	u4RegValue = PHY_QueryBBReg(Adapter, pPhyReg->rfintfs, bRFSI_RFENV);
		break;
	case RF_PATH_B:
	case RF_PATH_D:
		u4RegValue = PHY_QueryBBReg(Adapter, pPhyReg->rfintfs, bRFSI_RFENV << 16);
		break;
	}

	/*----Set RF_ENV enable----*/
	PHY_SetBBReg(Adapter, pPhyReg->rfintfe, bRFSI_RFENV << 16, 0x1);
	udelay(1);/* PlatformStallExecution(1); */
@@ -492,31 +484,12 @@ static int phy_RF6052_Config_ParaFile(struct adapter *Adapter)
	udelay(1);/* PlatformStallExecution(1); */

	/*----Initialize RF fom connfiguration file----*/
	switch (eRFPath) {
	case RF_PATH_A:
	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 rf_radio_path)eRFPath, (enum rf_radio_path)eRFPath))
			rtStatus = _FAIL;
		break;
	case RF_PATH_C:
		break;
	case RF_PATH_D:
		break;
	}

	/*----Restore RFENV control type----*/;
	switch (eRFPath) {
	case RF_PATH_A:
	case RF_PATH_C:
	PHY_SetBBReg(Adapter, pPhyReg->rfintfs, bRFSI_RFENV, u4RegValue);
		break;
	case RF_PATH_B:
	case RF_PATH_D:
		PHY_SetBBReg(Adapter, pPhyReg->rfintfs, bRFSI_RFENV << 16, u4RegValue);
		break;
	}

	if (rtStatus != _SUCCESS)
		goto phy_RF6052_Config_ParaFile_Fail;