Commit 76098bcb authored by Ivan Safonov's avatar Ivan Safonov Committed by Greg Kroah-Hartman

staging: r8188eu: rename phy_query_rf_reg to rtw_hal_read_rfreg

And remove two one-line wrappers.
Signed-off-by: default avatarIvan Safonov <insafonov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 348526f7
...@@ -104,17 +104,6 @@ void rtw_hal_add_ra_tid(struct adapter *adapt, u32 bitmap, u8 arg, ...@@ -104,17 +104,6 @@ void rtw_hal_add_ra_tid(struct adapter *adapt, u32 bitmap, u8 arg,
rssi_level); rssi_level);
} }
u32 rtw_hal_read_rfreg(struct adapter *adapt, enum rf_radio_path rfpath,
u32 regaddr, u32 bitmask)
{
u32 data = 0;
if (adapt->HalFunc.read_rfreg)
data = adapt->HalFunc.read_rfreg(adapt, rfpath, regaddr,
bitmask);
return data;
}
void rtw_hal_set_bwmode(struct adapter *adapt, void rtw_hal_set_bwmode(struct adapter *adapt,
enum ht_channel_width bandwidth, u8 offset) enum ht_channel_width bandwidth, u8 offset)
{ {
......
...@@ -118,7 +118,7 @@ static void rf_serial_write(struct adapter *adapt, ...@@ -118,7 +118,7 @@ static void rf_serial_write(struct adapter *adapt,
phy_set_bb_reg(adapt, phyreg->rf3wireOffset, bMaskDWord, data_and_addr); phy_set_bb_reg(adapt, phyreg->rf3wireOffset, bMaskDWord, data_and_addr);
} }
u32 phy_query_rf_reg(struct adapter *adapt, enum rf_radio_path rf_path, u32 rtw_hal_read_rfreg(struct adapter *adapt, enum rf_radio_path rf_path,
u32 reg_addr, u32 bit_mask) u32 reg_addr, u32 bit_mask)
{ {
u32 original_value, readback_value, bit_shift; u32 original_value, readback_value, bit_shift;
...@@ -436,7 +436,7 @@ void rtl88eu_dm_txpower_tracking_callback_thermalmeter(struct adapter *adapt) ...@@ -436,7 +436,7 @@ void rtl88eu_dm_txpower_tracking_callback_thermalmeter(struct adapter *adapt)
dm_odm->RFCalibrateInfo.RegA24 = 0x090e1317; dm_odm->RFCalibrateInfo.RegA24 = 0x090e1317;
thermal_val = (u8)phy_query_rf_reg(adapt, RF_PATH_A, thermal_val = (u8)rtw_hal_read_rfreg(adapt, RF_PATH_A,
RF_T_METER_88E, 0xfc00); RF_T_METER_88E, 0xfc00);
if (is2t) if (is2t)
...@@ -1229,12 +1229,12 @@ static void phy_lc_calibrate(struct adapter *adapt, bool is2t) ...@@ -1229,12 +1229,12 @@ static void phy_lc_calibrate(struct adapter *adapt, bool is2t)
if ((tmpreg&0x70) != 0) { if ((tmpreg&0x70) != 0) {
/* 1. Read original RF mode */ /* 1. Read original RF mode */
/* Path-A */ /* Path-A */
rf_a_mode = phy_query_rf_reg(adapt, RF_PATH_A, RF_AC, rf_a_mode = rtw_hal_read_rfreg(adapt, RF_PATH_A, RF_AC,
bMask12Bits); bMask12Bits);
/* Path-B */ /* Path-B */
if (is2t) if (is2t)
rf_b_mode = phy_query_rf_reg(adapt, RF_PATH_B, RF_AC, rf_b_mode = rtw_hal_read_rfreg(adapt, RF_PATH_B, RF_AC,
bMask12Bits); bMask12Bits);
/* 2. Set RF mode = standby mode */ /* 2. Set RF mode = standby mode */
...@@ -1249,7 +1249,7 @@ static void phy_lc_calibrate(struct adapter *adapt, bool is2t) ...@@ -1249,7 +1249,7 @@ static void phy_lc_calibrate(struct adapter *adapt, bool is2t)
} }
/* 3. Read RF reg18 */ /* 3. Read RF reg18 */
lc_cal = phy_query_rf_reg(adapt, RF_PATH_A, RF_CHNLBW, bMask12Bits); lc_cal = rtw_hal_read_rfreg(adapt, RF_PATH_A, RF_CHNLBW, bMask12Bits);
/* 4. Set LC calibration begin bit15 */ /* 4. Set LC calibration begin bit15 */
phy_set_rf_reg(adapt, RF_PATH_A, RF_CHNLBW, bMask12Bits, phy_set_rf_reg(adapt, RF_PATH_A, RF_CHNLBW, bMask12Bits,
......
...@@ -202,7 +202,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) ...@@ -202,7 +202,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
pHalFunc->AntDivBeforeLinkHandler = &AntDivBeforeLink8188E; pHalFunc->AntDivBeforeLinkHandler = &AntDivBeforeLink8188E;
pHalFunc->AntDivCompareHandler = &AntDivCompare8188E; pHalFunc->AntDivCompareHandler = &AntDivCompare8188E;
pHalFunc->read_rfreg = &phy_query_rf_reg;
} }
/* */ /* */
......
...@@ -810,8 +810,8 @@ u32 rtl8188eu_hal_init(struct adapter *Adapter) ...@@ -810,8 +810,8 @@ u32 rtl8188eu_hal_init(struct adapter *Adapter)
usb_write16(Adapter, REG_PKT_BE_BK_LIFE_TIME, 0x0400); /* unit: 256us. 256ms */ usb_write16(Adapter, REG_PKT_BE_BK_LIFE_TIME, 0x0400); /* unit: 256us. 256ms */
/* Keep RfRegChnlVal for later use. */ /* Keep RfRegChnlVal for later use. */
haldata->RfRegChnlVal[0] = phy_query_rf_reg(Adapter, (enum rf_radio_path)0, RF_CHNLBW, bRFRegOffsetMask); haldata->RfRegChnlVal[0] = rtw_hal_read_rfreg(Adapter, (enum rf_radio_path)0, RF_CHNLBW, bRFRegOffsetMask);
haldata->RfRegChnlVal[1] = phy_query_rf_reg(Adapter, (enum rf_radio_path)1, RF_CHNLBW, bRFRegOffsetMask); haldata->RfRegChnlVal[1] = rtw_hal_read_rfreg(Adapter, (enum rf_radio_path)1, RF_CHNLBW, bRFRegOffsetMask);
HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_TURN_ON_BLOCK); HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_TURN_ON_BLOCK);
_BBTurnOnBlock(Adapter); _BBTurnOnBlock(Adapter);
......
...@@ -161,9 +161,6 @@ struct hal_ops { ...@@ -161,9 +161,6 @@ struct hal_ops {
void (*AntDivCompareHandler)(struct adapter *adapter, void (*AntDivCompareHandler)(struct adapter *adapter,
struct wlan_bssid_ex *dst, struct wlan_bssid_ex *dst,
struct wlan_bssid_ex *src); struct wlan_bssid_ex *src);
u32 (*read_rfreg)(struct adapter *padapter,
enum rf_radio_path eRFPath, u32 RegAddr,
u32 BitMask);
void (*hal_reset_security_engine)(struct adapter *adapter); void (*hal_reset_security_engine)(struct adapter *adapter);
}; };
......
...@@ -11,7 +11,7 @@ bool rtl88eu_phy_bb_config(struct adapter *adapt); ...@@ -11,7 +11,7 @@ bool rtl88eu_phy_bb_config(struct adapter *adapt);
u32 phy_query_bb_reg(struct adapter *adapt, u32 regaddr, u32 bitmask); u32 phy_query_bb_reg(struct adapter *adapt, u32 regaddr, u32 bitmask);
void phy_set_bb_reg(struct adapter *adapt, u32 regaddr, u32 bitmask, u32 data); void phy_set_bb_reg(struct adapter *adapt, u32 regaddr, u32 bitmask, u32 data);
u32 phy_query_rf_reg(struct adapter *adapt, enum rf_radio_path rf_path, u32 rtw_hal_read_rfreg(struct adapter *adapt, enum rf_radio_path rf_path,
u32 reg_addr, u32 bit_mask); u32 reg_addr, u32 bit_mask);
void phy_set_rf_reg(struct adapter *adapt, enum rf_radio_path rf_path, void phy_set_rf_reg(struct adapter *adapt, enum rf_radio_path rf_path,
u32 reg_addr, u32 bit_mask, u32 data); u32 reg_addr, u32 bit_mask, u32 data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment