diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-03-25 03:53:42 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-03-25 03:53:42 -0300 |
commit | 03dd4cb26d967f9588437b0fc9cc0e8353322bb7 (patch) | |
tree | fa581f6dc1c0596391690d1f67eceef3af8246dc /drivers/staging/rtl8192u | |
parent | d4e493caf788ef44982e131ff9c786546904d934 (diff) |
Linux-libre 4.5-gnu
Diffstat (limited to 'drivers/staging/rtl8192u')
-rw-r--r-- | drivers/staging/rtl8192u/r8192U_core.c | 15 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/r819xU_phy.c | 25 |
2 files changed, 5 insertions, 35 deletions
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index e06864f64..f4a4eae72 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -5114,21 +5114,6 @@ static void __exit rtl8192_usb_module_exit(void) RT_TRACE(COMP_DOWN, "Exiting"); } - -void rtl8192_try_wake_queue(struct net_device *dev, int pri) -{ - unsigned long flags; - short enough_desc; - struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); - - spin_lock_irqsave(&priv->tx_lock, flags); - enough_desc = check_nic_enough_desc(dev, pri); - spin_unlock_irqrestore(&priv->tx_lock, flags); - - if (enough_desc) - ieee80211_wake_queue(priv->ieee80211); -} - void EnableHWSecurityConfig8192(struct net_device *dev) { u8 SECR_value = 0x0; diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c index 70656441c..f264d8836 100644 --- a/drivers/staging/rtl8192u/r819xU_phy.c +++ b/drivers/staging/rtl8192u/r819xU_phy.c @@ -38,21 +38,6 @@ static u32 RF_CHANNEL_TABLE_ZEBRA[] = { #define rtl819XAGCTAB_Array Rtl8192UsbAGCTAB_Array /****************************************************************************** - * function: This function reads BB parameters from header file we generate, - * and does register read/write - * input: u32 bitmask //taget bit pos in the addr to be modified - * output: none - * return: u32 return the shift bit position of the mask - ******************************************************************************/ -static u32 rtl8192_CalculateBitShift(u32 bitmask) -{ - u32 i; - - i = ffs(bitmask) - 1; - return i; -} - -/****************************************************************************** * function: This function checks different RF type to execute legal judgement. * If RF Path is illegal, we will return false. * input: net_device *dev @@ -94,7 +79,7 @@ void rtl8192_setBBreg(struct net_device *dev, u32 reg_addr, u32 bitmask, if (bitmask != bMaskDWord) { read_nic_dword(dev, reg_addr, ®); - bitshift = rtl8192_CalculateBitShift(bitmask); + bitshift = ffs(bitmask) - 1; reg &= ~bitmask; reg |= data << bitshift; write_nic_dword(dev, reg_addr, reg); @@ -117,7 +102,7 @@ u32 rtl8192_QueryBBReg(struct net_device *dev, u32 reg_addr, u32 bitmask) u32 reg, bitshift; read_nic_dword(dev, reg_addr, ®); - bitshift = rtl8192_CalculateBitShift(bitmask); + bitshift = ffs(bitmask) - 1; return (reg & bitmask) >> bitshift; } @@ -306,7 +291,7 @@ void rtl8192_phy_SetRFReg(struct net_device *dev, RF90_RADIO_PATH_E eRFPath, if (bitmask != bMask12Bits) { /* RF data is 12 bits only */ reg = phy_FwRFSerialRead(dev, eRFPath, reg_addr); - bitshift = rtl8192_CalculateBitShift(bitmask); + bitshift = ffs(bitmask) - 1; reg &= ~bitmask; reg |= data << bitshift; @@ -321,7 +306,7 @@ void rtl8192_phy_SetRFReg(struct net_device *dev, RF90_RADIO_PATH_E eRFPath, if (bitmask != bMask12Bits) { /* RF data is 12 bits only */ reg = rtl8192_phy_RFSerialRead(dev, eRFPath, reg_addr); - bitshift = rtl8192_CalculateBitShift(bitmask); + bitshift = ffs(bitmask) - 1; reg &= ~bitmask; reg |= data << bitshift; @@ -356,7 +341,7 @@ u32 rtl8192_phy_QueryRFReg(struct net_device *dev, RF90_RADIO_PATH_E eRFPath, } else { reg = rtl8192_phy_RFSerialRead(dev, eRFPath, reg_addr); } - bitshift = rtl8192_CalculateBitShift(bitmask); + bitshift = ffs(bitmask) - 1; reg = (reg & bitmask) >> bitshift; return reg; |