Commit e8411ff1 authored by Mateusz Kulikowski's avatar Mateusz Kulikowski Committed by Greg Kroah-Hartman

staging: rtl8192e: Rename rtl8192_CalculateBitShift

Use naming schema found in other rtlwifi devices.
Rename rtl8192_CalculateBitShift to _rtl92e_calculate_bit_shift.
Signed-off-by: default avatarMateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 43af9f4a
...@@ -52,7 +52,7 @@ static void _rtl92e_phy_rf_fw_write(struct net_device *dev, ...@@ -52,7 +52,7 @@ static void _rtl92e_phy_rf_fw_write(struct net_device *dev,
enum rf90_radio_path eRFPath, u32 Offset, enum rf90_radio_path eRFPath, u32 Offset,
u32 Data); u32 Data);
static u32 rtl8192_CalculateBitShift(u32 dwBitMask) static u32 _rtl92e_calculate_bit_shift(u32 dwBitMask)
{ {
u32 i; u32 i;
...@@ -87,7 +87,7 @@ void rtl92e_set_bb_reg(struct net_device *dev, u32 dwRegAddr, u32 dwBitMask, ...@@ -87,7 +87,7 @@ void rtl92e_set_bb_reg(struct net_device *dev, u32 dwRegAddr, u32 dwBitMask,
if (dwBitMask != bMaskDWord) { if (dwBitMask != bMaskDWord) {
OriginalValue = rtl92e_readl(dev, dwRegAddr); OriginalValue = rtl92e_readl(dev, dwRegAddr);
BitShift = rtl8192_CalculateBitShift(dwBitMask); BitShift = _rtl92e_calculate_bit_shift(dwBitMask);
NewValue = (((OriginalValue) & (~dwBitMask)) | NewValue = (((OriginalValue) & (~dwBitMask)) |
(dwData << BitShift)); (dwData << BitShift));
rtl92e_writel(dev, dwRegAddr, NewValue); rtl92e_writel(dev, dwRegAddr, NewValue);
...@@ -100,7 +100,7 @@ u32 rtl92e_get_bb_reg(struct net_device *dev, u32 dwRegAddr, u32 dwBitMask) ...@@ -100,7 +100,7 @@ u32 rtl92e_get_bb_reg(struct net_device *dev, u32 dwRegAddr, u32 dwBitMask)
u32 Ret = 0, OriginalValue, BitShift; u32 Ret = 0, OriginalValue, BitShift;
OriginalValue = rtl92e_readl(dev, dwRegAddr); OriginalValue = rtl92e_readl(dev, dwRegAddr);
BitShift = rtl8192_CalculateBitShift(dwBitMask); BitShift = _rtl92e_calculate_bit_shift(dwBitMask);
Ret = (OriginalValue & dwBitMask) >> BitShift; Ret = (OriginalValue & dwBitMask) >> BitShift;
return Ret; return Ret;
...@@ -230,7 +230,7 @@ void rtl92e_set_rf_reg(struct net_device *dev, enum rf90_radio_path eRFPath, ...@@ -230,7 +230,7 @@ void rtl92e_set_rf_reg(struct net_device *dev, enum rf90_radio_path eRFPath,
if (BitMask != bMask12Bits) { if (BitMask != bMask12Bits) {
Original_Value = _rtl92e_phy_rf_fw_read(dev, eRFPath, Original_Value = _rtl92e_phy_rf_fw_read(dev, eRFPath,
RegAddr); RegAddr);
BitShift = rtl8192_CalculateBitShift(BitMask); BitShift = _rtl92e_calculate_bit_shift(BitMask);
New_Value = (((Original_Value) & (~BitMask)) | New_Value = (((Original_Value) & (~BitMask)) |
(Data << BitShift)); (Data << BitShift));
...@@ -244,7 +244,7 @@ void rtl92e_set_rf_reg(struct net_device *dev, enum rf90_radio_path eRFPath, ...@@ -244,7 +244,7 @@ void rtl92e_set_rf_reg(struct net_device *dev, enum rf90_radio_path eRFPath,
if (BitMask != bMask12Bits) { if (BitMask != bMask12Bits) {
Original_Value = _rtl92e_phy_rf_read(dev, eRFPath, Original_Value = _rtl92e_phy_rf_read(dev, eRFPath,
RegAddr); RegAddr);
BitShift = rtl8192_CalculateBitShift(BitMask); BitShift = _rtl92e_calculate_bit_shift(BitMask);
New_Value = (((Original_Value) & (~BitMask)) | New_Value = (((Original_Value) & (~BitMask)) |
(Data << BitShift)); (Data << BitShift));
...@@ -271,7 +271,7 @@ u32 rtl92e_get_rf_reg(struct net_device *dev, enum rf90_radio_path eRFPath, ...@@ -271,7 +271,7 @@ u32 rtl92e_get_rf_reg(struct net_device *dev, enum rf90_radio_path eRFPath,
} else { } else {
Original_Value = _rtl92e_phy_rf_read(dev, eRFPath, RegAddr); Original_Value = _rtl92e_phy_rf_read(dev, eRFPath, RegAddr);
} }
BitShift = rtl8192_CalculateBitShift(BitMask); BitShift = _rtl92e_calculate_bit_shift(BitMask);
Readback_Value = (Original_Value & BitMask) >> BitShift; Readback_Value = (Original_Value & BitMask) >> BitShift;
up(&priv->rf_sem); up(&priv->rf_sem);
return Readback_Value; return Readback_Value;
......
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