Commit 12003847 authored by Philipp Hortmann's avatar Philipp Hortmann Committed by Greg Kroah-Hartman
Browse files

staging: rtl8192e: Remove priv->rf_chip in _rtl92e_phy_rf_write



priv->rf_chip is initialized to RF_8256 and never changed. Remove
conditions in function _rtl92e_phy_rf_write as those are dead code.

Signed-off-by: default avatarPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/77628b7ecade212401d7da5e3c0b79f8ef55b5c1.1679732276.git.philipp.g.hortmann@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fe730bfd
Loading
Loading
Loading
Loading
+21 −25
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ static void _rtl92e_phy_rf_write(struct net_device *dev,
	struct bb_reg_definition *pPhyReg = &priv->phy_reg_def[eRFPath];

	Offset &= 0x3f;
	if (priv->rf_chip == RF_8256) {

	rtl92e_set_bb_reg(dev, rFPGA0_AnalogParameter4, 0xf00, 0x0);

	if (Offset >= 31) {
@@ -145,8 +145,6 @@ static void _rtl92e_phy_rf_write(struct net_device *dev,
				  bMaskDWord,
				  (priv->rf_reg_0value[eRFPath] << 16));
		NewOffset = Offset - 15;
		} else
			NewOffset = Offset;
	} else {
		NewOffset = Offset;
	}
@@ -158,7 +156,6 @@ static void _rtl92e_phy_rf_write(struct net_device *dev,
	if (Offset == 0x0)
		priv->rf_reg_0value[eRFPath] = Data;

	if (priv->rf_chip == RF_8256) {
	if (Offset != 0) {
		priv->rf_reg_0value[eRFPath] &= 0xebf;
		rtl92e_set_bb_reg(dev, pPhyReg->rf3wireOffset,
@@ -167,7 +164,6 @@ static void _rtl92e_phy_rf_write(struct net_device *dev,
	}
	rtl92e_set_bb_reg(dev, rFPGA0_AnalogParameter4, 0x300, 0x3);
}
}

void rtl92e_set_rf_reg(struct net_device *dev, enum rf90_radio_path eRFPath,
		       u32 RegAddr, u32 BitMask, u32 Data)