staging: r8188eu: rename phy_query_rf_reg to rtw_hal_read_rfreg
authorIvan Safonov <insafonov@gmail.com>
Sat, 3 Sep 2016 15:33:05 +0000 (22:33 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Sep 2016 09:30:02 +0000 (11:30 +0200)
And remove two one-line wrappers.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/hal/hal_intf.c
drivers/staging/rtl8188eu/hal/phy.c
drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
drivers/staging/rtl8188eu/hal/usb_halinit.c
drivers/staging/rtl8188eu/include/hal_intf.h
drivers/staging/rtl8188eu/include/phy.h

index adceade..df1192e 100644 (file)
@@ -104,17 +104,6 @@ void rtw_hal_add_ra_tid(struct adapter *adapt, u32 bitmap, u8 arg,
                                               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,
                        enum ht_channel_width bandwidth, u8 offset)
 {
index 0c2b54f..2b66c6d 100644 (file)
@@ -118,7 +118,7 @@ static void rf_serial_write(struct adapter *adapt,
        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 original_value, readback_value, bit_shift;
@@ -436,7 +436,7 @@ void rtl88eu_dm_txpower_tracking_callback_thermalmeter(struct adapter *adapt)
 
        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);
 
        if (is2t)
@@ -1229,12 +1229,12 @@ static void phy_lc_calibrate(struct adapter *adapt, bool is2t)
        if ((tmpreg&0x70) != 0) {
                /* 1. Read original RF mode */
                /* 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);
 
                /* Path-B */
                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);
 
                /* 2. Set RF mode = standby mode */
@@ -1249,7 +1249,7 @@ static void phy_lc_calibrate(struct adapter *adapt, bool is2t)
        }
 
        /* 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 */
        phy_set_rf_reg(adapt, RF_PATH_A, RF_CHNLBW, bMask12Bits,
index ea46ea7..c7b030f 100644 (file)
@@ -202,7 +202,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
 
        pHalFunc->AntDivBeforeLinkHandler = &AntDivBeforeLink8188E;
        pHalFunc->AntDivCompareHandler = &AntDivCompare8188E;
-       pHalFunc->read_rfreg = &phy_query_rf_reg;
 }
 
 /*  */
index 36abe9f..e2f54cf 100644 (file)
@@ -810,8 +810,8 @@ u32 rtl8188eu_hal_init(struct adapter *Adapter)
        usb_write16(Adapter, REG_PKT_BE_BK_LIFE_TIME, 0x0400);  /*  unit: 256us. 256ms */
 
        /* Keep RfRegChnlVal for later use. */
-       haldata->RfRegChnlVal[0] = phy_query_rf_reg(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[0] = rtw_hal_read_rfreg(Adapter, (enum rf_radio_path)0, 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);
        _BBTurnOnBlock(Adapter);
index 971fc62..075cf03 100644 (file)
@@ -161,9 +161,6 @@ struct hal_ops {
        void    (*AntDivCompareHandler)(struct adapter *adapter,
                                        struct wlan_bssid_ex *dst,
                                        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);
 };
index 9a9ab82..0b42fc1 100644 (file)
@@ -11,7 +11,7 @@ bool rtl88eu_phy_bb_config(struct adapter *adapt);
 
 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);
-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);
 void phy_set_rf_reg(struct adapter *adapt, enum rf_radio_path rf_path,
                    u32 reg_addr, u32 bit_mask, u32 data);