提交 c45049ad 编写于 作者: M Martin Kaiser 提交者: Greg Kroah-Hartman

staging: r8188eu: remove path parameter from rtl8188e_PHY_QueryRFReg

All callers of rtl8188e_PHY_QueryRFReg set the eRFPath parameter
to RF_PATH_A. Remove the parameter and use RF_PATH_A directly.
Signed-off-by: NMartin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220212161737.381841-9-martin@kaiser.cxSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 8460ddc2
...@@ -132,7 +132,7 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E( ...@@ -132,7 +132,7 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E(
/* <Kordan> RFCalibrateInfo.RegA24 will be initialized when ODM HW configuring, but MP configures with para files. */ /* <Kordan> RFCalibrateInfo.RegA24 will be initialized when ODM HW configuring, but MP configures with para files. */
dm_odm->RFCalibrateInfo.RegA24 = 0x090e1317; dm_odm->RFCalibrateInfo.RegA24 = 0x090e1317;
ThermalValue = (u8)rtl8188e_PHY_QueryRFReg(Adapter, RF_PATH_A, RF_T_METER_88E, 0xfc00); /* 0x42: RF Reg[15:10] 88E */ ThermalValue = (u8)rtl8188e_PHY_QueryRFReg(Adapter, RF_T_METER_88E, 0xfc00); /* 0x42: RF Reg[15:10] 88E */
if (ThermalValue) { if (ThermalValue) {
/* Query OFDM path A default setting */ /* Query OFDM path A default setting */
...@@ -759,7 +759,7 @@ static void phy_LCCalibrate_8188E(struct adapter *adapt) ...@@ -759,7 +759,7 @@ static void phy_LCCalibrate_8188E(struct adapter *adapt)
if ((tmpreg & 0x70) != 0) { if ((tmpreg & 0x70) != 0) {
/* 1. Read original RF mode */ /* 1. Read original RF mode */
/* Path-A */ /* Path-A */
RF_Amode = rtl8188e_PHY_QueryRFReg(adapt, RF_PATH_A, RF_AC, bMask12Bits); RF_Amode = rtl8188e_PHY_QueryRFReg(adapt, RF_AC, bMask12Bits);
/* 2. Set RF mode = standby mode */ /* 2. Set RF mode = standby mode */
/* Path-A */ /* Path-A */
...@@ -767,7 +767,7 @@ static void phy_LCCalibrate_8188E(struct adapter *adapt) ...@@ -767,7 +767,7 @@ static void phy_LCCalibrate_8188E(struct adapter *adapt)
} }
/* 3. Read RF reg18 */ /* 3. Read RF reg18 */
LC_Cal = rtl8188e_PHY_QueryRFReg(adapt, RF_PATH_A, RF_CHNLBW, bMask12Bits); LC_Cal = rtl8188e_PHY_QueryRFReg(adapt, RF_CHNLBW, bMask12Bits);
/* 4. Set LC calibration begin bit15 */ /* 4. Set LC calibration begin bit15 */
rtl8188e_PHY_SetRFReg(adapt, RF_CHNLBW, bMask12Bits, LC_Cal | 0x08000); rtl8188e_PHY_SetRFReg(adapt, RF_CHNLBW, bMask12Bits, LC_Cal | 0x08000);
......
...@@ -253,7 +253,6 @@ phy_RFSerialWrite( ...@@ -253,7 +253,6 @@ phy_RFSerialWrite(
* *
* Input: * Input:
* struct adapter *Adapter, * struct adapter *Adapter,
* enum rf_radio_path eRFPath, Radio path of A/B/C/D
* u32 RegAddr, The target address to be read * u32 RegAddr, The target address to be read
* u32 BitMask The target bit position in the target address * u32 BitMask The target bit position in the target address
* to be read * to be read
...@@ -262,12 +261,11 @@ phy_RFSerialWrite( ...@@ -262,12 +261,11 @@ phy_RFSerialWrite(
* Return: u32 Readback value * Return: u32 Readback value
* Note: This function is equal to "GetRFRegSetting" in PHY programming guide * Note: This function is equal to "GetRFRegSetting" in PHY programming guide
*/ */
u32 rtl8188e_PHY_QueryRFReg(struct adapter *Adapter, enum rf_radio_path eRFPath, u32 rtl8188e_PHY_QueryRFReg(struct adapter *Adapter, u32 RegAddr, u32 BitMask)
u32 RegAddr, u32 BitMask)
{ {
u32 Original_Value, Readback_Value, BitShift; u32 Original_Value, Readback_Value, BitShift;
Original_Value = phy_RFSerialRead(Adapter, eRFPath, RegAddr); Original_Value = phy_RFSerialRead(Adapter, RF_PATH_A, RegAddr);
BitShift = phy_CalculateBitShift(BitMask); BitShift = phy_CalculateBitShift(BitMask);
Readback_Value = (Original_Value & BitMask) >> BitShift; Readback_Value = (Original_Value & BitMask) >> BitShift;
......
...@@ -662,7 +662,7 @@ u32 rtl8188eu_hal_init(struct adapter *Adapter) ...@@ -662,7 +662,7 @@ u32 rtl8188eu_hal_init(struct adapter *Adapter)
rtw_write16(Adapter, REG_PKT_BE_BK_LIFE_TIME, 0x0400); /* unit: 256us. 256ms */ rtw_write16(Adapter, REG_PKT_BE_BK_LIFE_TIME, 0x0400); /* unit: 256us. 256ms */
/* Keep RfRegChnlVal for later use. */ /* Keep RfRegChnlVal for later use. */
haldata->RfRegChnlVal = rtl8188e_PHY_QueryRFReg(Adapter, RF_PATH_A, RF_CHNLBW, bRFRegOffsetMask); haldata->RfRegChnlVal = rtl8188e_PHY_QueryRFReg(Adapter, RF_CHNLBW, bRFRegOffsetMask);
_BBTurnOnBlock(Adapter); _BBTurnOnBlock(Adapter);
......
...@@ -73,8 +73,7 @@ struct bb_reg_def { ...@@ -73,8 +73,7 @@ struct bb_reg_def {
u32 rtl8188e_PHY_QueryBBReg(struct adapter *adapter, u32 regaddr, u32 mask); u32 rtl8188e_PHY_QueryBBReg(struct adapter *adapter, u32 regaddr, u32 mask);
void rtl8188e_PHY_SetBBReg(struct adapter *Adapter, u32 RegAddr, void rtl8188e_PHY_SetBBReg(struct adapter *Adapter, u32 RegAddr,
u32 mask, u32 data); u32 mask, u32 data);
u32 rtl8188e_PHY_QueryRFReg(struct adapter *adapter, enum rf_radio_path rfpath, u32 rtl8188e_PHY_QueryRFReg(struct adapter *adapter, u32 regaddr, u32 mask);
u32 regaddr, u32 mask);
void rtl8188e_PHY_SetRFReg(struct adapter *adapter, u32 regaddr, u32 mask, u32 data); void rtl8188e_PHY_SetRFReg(struct adapter *adapter, u32 regaddr, u32 mask, u32 data);
/* Initialization related function */ /* Initialization related function */
......
...@@ -2067,7 +2067,7 @@ static int rtw_wx_read_rf(struct net_device *dev, ...@@ -2067,7 +2067,7 @@ static int rtw_wx_read_rf(struct net_device *dev,
return -EINVAL; return -EINVAL;
addr = *((u32 *)extra + 1); addr = *((u32 *)extra + 1);
data32 = rtl8188e_PHY_QueryRFReg(padapter, RF_PATH_A, addr, 0xFFFFF); data32 = rtl8188e_PHY_QueryRFReg(padapter, addr, 0xFFFFF);
/* /*
* IMPORTANT!! * IMPORTANT!!
* Only when wireless private ioctl is at odd order, * Only when wireless private ioctl is at odd order,
...@@ -3547,7 +3547,7 @@ static void rf_reg_dump(struct adapter *padapter) ...@@ -3547,7 +3547,7 @@ static void rf_reg_dump(struct adapter *padapter)
pr_info("\n ======= RF REG =======\n"); pr_info("\n ======= RF REG =======\n");
pr_info("\nRF_Path(%x)\n", RF_PATH_A); pr_info("\nRF_Path(%x)\n", RF_PATH_A);
for (i = 0; i < 0x100; i++) { for (i = 0; i < 0x100; i++) {
value = rtl8188e_PHY_QueryRFReg(padapter, RF_PATH_A, i, 0xffffffff); value = rtl8188e_PHY_QueryRFReg(padapter, i, 0xffffffff);
if (j % 4 == 1) if (j % 4 == 1)
pr_info("0x%02x ", i); pr_info("0x%02x ", i);
pr_info(" 0x%08x ", value); pr_info(" 0x%08x ", value);
...@@ -3625,7 +3625,7 @@ static int rtw_dbg_port(struct net_device *dev, ...@@ -3625,7 +3625,7 @@ static int rtw_dbg_port(struct net_device *dev,
ret = -EINVAL; ret = -EINVAL;
break; break;
} }
DBG_88E("read RF_reg path(0x%02x), offset(0x%x), value(0x%08x)\n", RF_PATH_A, arg, rtl8188e_PHY_QueryRFReg(padapter, RF_PATH_A, arg, 0xffffffff)); DBG_88E("read RF_reg path(0x%02x), offset(0x%x), value(0x%08x)\n", RF_PATH_A, arg, rtl8188e_PHY_QueryRFReg(padapter, arg, 0xffffffff));
break; break;
case 0x75:/* write_rf */ case 0x75:/* write_rf */
if (minor_cmd != RF_PATH_A) { if (minor_cmd != RF_PATH_A) {
...@@ -3633,7 +3633,7 @@ static int rtw_dbg_port(struct net_device *dev, ...@@ -3633,7 +3633,7 @@ static int rtw_dbg_port(struct net_device *dev,
break; break;
} }
rtl8188e_PHY_SetRFReg(padapter, arg, 0xffffffff, extra_arg); rtl8188e_PHY_SetRFReg(padapter, arg, 0xffffffff, extra_arg);
DBG_88E("write RF_reg path(0x%02x), offset(0x%x), value(0x%08x)\n", RF_PATH_A, arg, rtl8188e_PHY_QueryRFReg(padapter, RF_PATH_A, arg, 0xffffffff)); DBG_88E("write RF_reg path(0x%02x), offset(0x%x), value(0x%08x)\n", RF_PATH_A, arg, rtl8188e_PHY_QueryRFReg(padapter, arg, 0xffffffff));
break; break;
case 0x76: case 0x76:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册